feat(REQ-3282): 岗位扩展字段优化
This commit is contained in:
parent
5ed580c89e
commit
fca5b84da4
@ -1,11 +1,11 @@
|
||||
package cn.axzo.orgmanax.infra.dao.orgjob.entity;
|
||||
|
||||
import cn.axzo.foundation.dao.support.mysql.type.BaseListTypeHandler;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -23,7 +23,7 @@ import lombok.experimental.SuperBuilder;
|
||||
* @author makejava
|
||||
* @since 2024-12-13 13:59:04
|
||||
*/
|
||||
@TableName(value = "org_job")
|
||||
@TableName(value = "org_job", autoResultMap = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@ -102,20 +102,21 @@ public class OrgJob implements Serializable {
|
||||
private Integer identityType;
|
||||
|
||||
/**
|
||||
* 默认角色id列表 todo
|
||||
* 默认角色id列表
|
||||
*/
|
||||
@TableField(typeHandler = LongListTypeHandler.class)
|
||||
@TableField(value = "def_role_ids", typeHandler = FastjsonTypeHandler.class)
|
||||
private List<Long> defRoleIds;
|
||||
|
||||
/**
|
||||
* 待排除的角色id列表
|
||||
*/
|
||||
@TableField(typeHandler = LongListTypeHandler.class)
|
||||
@TableField(value = "exclude_role_ids", typeHandler = FastjsonTypeHandler.class)
|
||||
private List<Long> excludeRoleIds;
|
||||
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
@TableField(value = "record_ext", typeHandler = FastjsonTypeHandler.class)
|
||||
private JSONObject recordExt;
|
||||
|
||||
/**
|
||||
@ -138,7 +139,7 @@ public class OrgJob implements Serializable {
|
||||
*/
|
||||
private Long isDelete;
|
||||
|
||||
public static class LongListTypeHandler<Long> extends BaseListTypeHandler<Long> {
|
||||
}
|
||||
// public static class LongListTypeHandler<Long> extends BaseListTypeHandler<Long> {
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ public class OrgJobGroupRelationHistory {
|
||||
/**
|
||||
* 岗位编码列表
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
@TableField(value = "job_codes", typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> jobCodes;
|
||||
/**
|
||||
* 变更人的自然人id
|
||||
|
||||
@ -22,6 +22,6 @@ public interface OrgJobGroupFoundationService {
|
||||
/**
|
||||
* 查询岗位分组
|
||||
*/
|
||||
List<OrgJobGroupDTO> whileQuery(OrgJobGroupPageParam param);
|
||||
List<OrgJobGroupDTO> pageAll(OrgJobGroupPageParam param);
|
||||
|
||||
}
|
||||
|
||||
@ -22,5 +22,5 @@ public interface OrgJobGroupRelationFoundationService {
|
||||
/**
|
||||
* 查询岗位分组
|
||||
*/
|
||||
List<OrgJobGroupRelationDTO> whileQuery(OrgJobGroupRelationPageParam param);
|
||||
List<OrgJobGroupRelationDTO> pageAll(OrgJobGroupRelationPageParam param);
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ public class OrgJobGroupFoundationServiceImpl implements OrgJobGroupFoundationSe
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrgJobGroupDTO> whileQuery(OrgJobGroupPageParam param) {
|
||||
public List<OrgJobGroupDTO> pageAll(OrgJobGroupPageParam param) {
|
||||
List<OrgJobGroupDTO> jobGroups = new ArrayList<>();
|
||||
PageResp<OrgJobGroupDTO> jobGroupPage;
|
||||
int pageNumber = 0;
|
||||
|
||||
@ -38,7 +38,7 @@ public class OrgJobGroupRelationFoundationServiceImpl implements OrgJobGroupRela
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrgJobGroupRelationDTO> whileQuery(OrgJobGroupRelationPageParam param) {
|
||||
public List<OrgJobGroupRelationDTO> pageAll(OrgJobGroupRelationPageParam param) {
|
||||
List<OrgJobGroupRelationDTO> jobGroupRelations = new ArrayList<>();
|
||||
PageResp<OrgJobGroupRelationDTO> jobGroupPage;
|
||||
int pageNumber = 0;
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
package cn.axzo.orgmanax.server.orgjob.service;
|
||||
|
||||
|
||||
public interface OrgJobBizService {
|
||||
|
||||
// List<JobGroupRes> groupAndJobTree();
|
||||
|
||||
// List<OrgJobRes> page(OrgJobListReq req);
|
||||
|
||||
// void createJob(OrgJobCreateReq req);
|
||||
//
|
||||
// void deleteJob(Long jobId, Long operatorId);
|
||||
//
|
||||
// void editJob(JobEditReq req);
|
||||
//
|
||||
// void setRoles(JobRoleSetReq req);
|
||||
//
|
||||
// void move(MoveJobReq req);
|
||||
//
|
||||
// OrgJobDTO getById(Long jobId, Boolean needJobGroup);
|
||||
//
|
||||
// OrgJobRes queryDefaultOrgJob(Long topNodeId);
|
||||
}
|
||||
@ -229,7 +229,7 @@ public class OrgJobServiceImpl implements OrgJobService {
|
||||
OrgJobGroupRelationPageParam relationPageParam = OrgJobGroupRelationPageParam.builder()
|
||||
.jobCodes(orgJobs.stream().map(OrgJobDTO::getCode).collect(Collectors.toSet()))
|
||||
.build();
|
||||
Map<String, String> relationGroup = orgJobGroupRelationService.whileQuery(relationPageParam)
|
||||
Map<String, String> relationGroup = orgJobGroupRelationService.pageAll(relationPageParam)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(OrgJobGroupRelationDTO::getJobCode,
|
||||
OrgJobGroupRelationDTO::getGroupCode, (oldVal, newVal) -> oldVal));
|
||||
@ -240,7 +240,7 @@ public class OrgJobServiceImpl implements OrgJobService {
|
||||
// 查询岗位分组列表
|
||||
Set<String> groupCodes = Sets.newHashSet(relationGroup.values());
|
||||
OrgJobGroupPageParam groupListParam = OrgJobGroupPageParam.builder().groupCodes(groupCodes).build();
|
||||
Map<String, OrgJobGroupDTO> groupMap = orgJobGroupService.whileQuery(groupListParam).stream()
|
||||
Map<String, OrgJobGroupDTO> groupMap = orgJobGroupService.pageAll(groupListParam).stream()
|
||||
.collect(Collectors.toMap(OrgJobGroupDTO::getCode, Function.identity(), (oldVal, newVal) -> oldVal));
|
||||
if (CollUtil.isEmpty(groupMap)) {
|
||||
log.info("buildOrgGroup4OrgJob orgJobGroup without any group.");
|
||||
@ -288,7 +288,7 @@ public class OrgJobServiceImpl implements OrgJobService {
|
||||
}
|
||||
|
||||
private Set<String> resolveJobCodesByGroup(OrgJobGroupPageParam groupListParam) {
|
||||
List<OrgJobGroupDTO> groups = orgJobGroupService.whileQuery(groupListParam);
|
||||
List<OrgJobGroupDTO> groups = orgJobGroupService.pageAll(groupListParam);
|
||||
if (CollUtil.isEmpty(groups)) {
|
||||
log.info("resolveJobCodesByGroup there is not any job group. param:{}", JSONUtil.toJsonStr(groupListParam));
|
||||
return Collections.emptySet();
|
||||
@ -297,7 +297,7 @@ public class OrgJobServiceImpl implements OrgJobService {
|
||||
OrgJobGroupRelationPageParam relationListParam = OrgJobGroupRelationPageParam.builder()
|
||||
.groupCodes(groupCodes)
|
||||
.build();
|
||||
List<OrgJobGroupRelationDTO> relations = orgJobGroupRelationService.whileQuery(relationListParam);
|
||||
List<OrgJobGroupRelationDTO> relations = orgJobGroupRelationService.pageAll(relationListParam);
|
||||
if (CollUtil.isEmpty(relations)) {
|
||||
log.info("resolveJobCodesByGroup there is not any job and group relation. param:{}",
|
||||
JSONUtil.toJsonStr(relationListParam));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user