From 477a2f3bcefaae930f2d4737a1983455ccc6449b Mon Sep 17 00:00:00 2001 From: dxfeng Date: Mon, 22 Aug 2022 13:35:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5BU?= =?UTF-8?q?G=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/脚本/Mysql/0818补丁.sql | 1 + .../entity/extend/bo/ExtendGroupBO.java | 2 +- .../entity/extend/bo/ExtendInfoBO.java | 3 ++- .../engine/organization/entity/job/po/JobPO.java | 4 ++++ .../mapper/extend/ExtendGroupMapper.java | 4 ++-- .../mapper/extend/ExtendGroupMapper.xml | 11 +++++++++-- .../mapper/extend/ExtendTitleMapper.java | 2 +- .../mapper/extend/ExtendTitleMapper.xml | 9 +++++++-- .../engine/organization/mapper/job/JobMapper.xml | 8 ++++++-- .../organization/service/impl/CompServiceImpl.java | 4 ++-- .../service/impl/DepartmentServiceImpl.java | 4 ++-- .../organization/service/impl/ExtServiceImpl.java | 4 ++-- .../service/impl/FieldDefinedServiceImpl.java | 14 +++++++------- .../service/impl/GroupServiceImpl.java | 1 - .../service/impl/HrmResourceServiceImpl.java | 4 ++-- .../organization/service/impl/JobServiceImpl.java | 14 ++++++++++++-- 16 files changed, 60 insertions(+), 29 deletions(-) diff --git a/docs/脚本/Mysql/0818补丁.sql b/docs/脚本/Mysql/0818补丁.sql index 7c6ef079..939516f6 100644 --- a/docs/脚本/Mysql/0818补丁.sql +++ b/docs/脚本/Mysql/0818补丁.sql @@ -9,6 +9,7 @@ update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_na update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='description' ; update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='work_duty' ; update jcl_field_extendinfo set custom_value='["textarea","",""]' where table_name ='JCL_ORG_JOB' and field_name='work_authority'; +update jcl_field_extendinfo set browser_type='666', custom_value='["browser",{"valueSpan":"聚才林岗位","replaceDatas":[{"itemorderid":"0","name":"聚才林岗位","id":"666","parenttitle":"资产","title":"资产-聚才林岗位"}],"value":"666"}]' where table_name ='JCL_ORG_JOB' and field_name='parent_job'; delete from SystemRightDetail where rightid =2714; diff --git a/src/com/engine/organization/entity/extend/bo/ExtendGroupBO.java b/src/com/engine/organization/entity/extend/bo/ExtendGroupBO.java index f890cf96..0b38f620 100644 --- a/src/com/engine/organization/entity/extend/bo/ExtendGroupBO.java +++ b/src/com/engine/organization/entity/extend/bo/ExtendGroupBO.java @@ -53,7 +53,7 @@ public class ExtendGroupBO { private static boolean isHasGroup(Long id) { - List titlesByGroupID = MapperProxyFactory.getProxy(ExtendTitleMapper.class).getTitlesByGroupID(id); + List titlesByGroupID = MapperProxyFactory.getProxy(ExtendTitleMapper.class).getTitlesByGroupID(id,null); return titlesByGroupID.size() > 0; } diff --git a/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java b/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java index 1e389522..a1e7073f 100644 --- a/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java +++ b/src/com/engine/organization/entity/extend/bo/ExtendInfoBO.java @@ -103,7 +103,8 @@ public class ExtendInfoBO { .isenable("1".equals(infoFieldParam.getEnable()) ? 1 : 0) .isrequired("1".equals(infoFieldParam.getRequired()) ? 1 : 0) .listShow(1) - .editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1) + // .editShow("0".equals(infoFieldParam.getIsModify()) ? 0 : 1) + .editShow(1) .addShow(1) .browserShow(1) .customValue(convertSelectCustom(controlType, infoFieldParam.getFieldType().toString())) diff --git a/src/com/engine/organization/entity/job/po/JobPO.java b/src/com/engine/organization/entity/job/po/JobPO.java index d635e321..43ebd116 100644 --- a/src/com/engine/organization/entity/job/po/JobPO.java +++ b/src/com/engine/organization/entity/job/po/JobPO.java @@ -89,6 +89,10 @@ public class JobPO { */ private Integer showOrder; + private Integer gradeId; + + private String levelId; + private Long creator; private int deleteType; diff --git a/src/com/engine/organization/mapper/extend/ExtendGroupMapper.java b/src/com/engine/organization/mapper/extend/ExtendGroupMapper.java index 7f07081e..a50668ac 100644 --- a/src/com/engine/organization/mapper/extend/ExtendGroupMapper.java +++ b/src/com/engine/organization/mapper/extend/ExtendGroupMapper.java @@ -20,7 +20,7 @@ public interface ExtendGroupMapper { * @param extendType * @return */ - List listByType(@Param("extendType") Integer extendType); + List listByType(@Param("extendType") Integer extendType, @Param("isShow") String isShow); /** * 根据ID 查询数据 @@ -38,7 +38,7 @@ public interface ExtendGroupMapper { * @param pid * @return */ - List listGroupByPid(@Param("pid") Long pid); + List listGroupByPid(@Param("pid") Long pid, @Param("isShow") String isShow); /** * 根据ID查询分组名称 diff --git a/src/com/engine/organization/mapper/extend/ExtendGroupMapper.xml b/src/com/engine/organization/mapper/extend/ExtendGroupMapper.xml index d5b6754c..632c976a 100644 --- a/src/com/engine/organization/mapper/extend/ExtendGroupMapper.xml +++ b/src/com/engine/organization/mapper/extend/ExtendGroupMapper.xml @@ -40,6 +40,9 @@ and extend_type = #{extendType} + + and is_show = #{isShow} + order by show_order @@ -207,6 +211,7 @@ #{id} + and is_show = '1' order by show_order diff --git a/src/com/engine/organization/mapper/job/JobMapper.xml b/src/com/engine/organization/mapper/job/JobMapper.xml index 434bed68..f91add76 100644 --- a/src/com/engine/organization/mapper/job/JobMapper.xml +++ b/src/com/engine/organization/mapper/job/JobMapper.xml @@ -19,6 +19,8 @@ + + @@ -46,7 +48,9 @@ t.work_duty, t.work_authority, t.show_order, - t.forbidden_tag + t.forbidden_tag, + t.grade_id, + t.level_id - + select JCL_ORG_JOB_ID.currval from dual INSERT INTO jcl_org_job diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index 28b15eaa..19b5f31e 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -273,7 +273,7 @@ public class CompServiceImpl extends Service implements CompService { if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { @@ -305,7 +305,7 @@ public class CompServiceImpl extends Service implements CompService { HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { List items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue()); diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java index de206a6c..17ffff8c 100644 --- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java +++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java @@ -326,7 +326,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { List items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_DEPT : JCL_ORG_DEPTEXT, viewAttr, id, extendTitle.getId().toString(), ""); @@ -357,7 +357,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { diff --git a/src/com/engine/organization/service/impl/ExtServiceImpl.java b/src/com/engine/organization/service/impl/ExtServiceImpl.java index 3a65782f..e625ca20 100644 --- a/src/com/engine/organization/service/impl/ExtServiceImpl.java +++ b/src/com/engine/organization/service/impl/ExtServiceImpl.java @@ -132,7 +132,7 @@ public class ExtServiceImpl extends Service implements ExtService { List> tables = new ArrayList<>(); List infoPOList = new ArrayList<>(); // 查询明细表 - List extendGroupList = getExtendGroupMapper().listGroupByPid(groupId); + List extendGroupList = getExtendGroupMapper().listGroupByPid(groupId, "1"); for (ExtendGroupPO extendGroup : extendGroupList) { infoPOList.addAll(getExtendInfoMapper().listFields(extendType, extendGroup.getId() + "", tableName, "", "1")); } @@ -188,7 +188,7 @@ public class ExtServiceImpl extends Service implements ExtService { List extendTitles = getExtendTitleMapper().getTitlesByIds(ids); Set groupIds = extendTitles.stream().map(ExtendTitlePO::getGroupId).collect(Collectors.toSet()); - List extendGroupList = getExtendGroupMapper().listByType(Integer.parseInt(extendType)); + List extendGroupList = getExtendGroupMapper().listByType(Integer.parseInt(extendType), "1"); // 拓展信息 if (CollectionUtils.isNotEmpty(extendGroupList) && CollectionUtils.isNotEmpty(groupIds)) { diff --git a/src/com/engine/organization/service/impl/FieldDefinedServiceImpl.java b/src/com/engine/organization/service/impl/FieldDefinedServiceImpl.java index e1e55dd4..f3719438 100644 --- a/src/com/engine/organization/service/impl/FieldDefinedServiceImpl.java +++ b/src/com/engine/organization/service/impl/FieldDefinedServiceImpl.java @@ -59,7 +59,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ @Override public List getTree(ModuleTypeEnum moduleTypeEnum) { Integer extendType = moduleTypeEnum.getValue(); - List extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType); + List extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType,null); return ExtendGroupBO.buildTypeTree(extendGroupPOS); } @@ -69,7 +69,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ Map datas = new HashMap<>(); Long groupId = Long.parseLong(groupType); String tableName = ExtendGroupBO.getTableNameByGroupPO(getExtendGroupMapper().getGroupById(groupId)); - List extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId); + List extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId,null); List> tabs = new ArrayList<>(); int idx = 1; for (ExtendTitlePO extendTitle : extendTitleList) { @@ -135,7 +135,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ Map datas = new HashMap<>(); Long groupType = param.getGroupType(); Set lsDelGroupId = new HashSet<>(); - List extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType); + List extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType,null); extendTitleList.forEach(item -> lsDelGroupId.add(item.getId())); String data = param.getData(); JSONObject jsonObject = JSON.parseObject(data); @@ -178,7 +178,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ public Map saveTitle(ExtendTitleSaveParam param) { Map datas = new HashMap<>(); - List titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType()); + List titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null); ExtendTitlePO extendTitlePO = titlesByGroupID.stream().max(Comparator.comparing(ExtendTitlePO::getShowOrder)).orElse(ExtendTitlePO.builder().showOrder(1).build()); Set ids = titlesByGroupID.stream().map(ExtendTitlePO::getId).collect(Collectors.toSet()); ExtendTitlePO extendTitle = new ExtendTitlePO(); @@ -201,7 +201,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ @Override public void changeTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) { if (fieldTypeTreeParam.getId() == null) { - List extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue()); + List extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue(),null); ExtendGroupPO extendGroup = extendGroupPOList.stream().max(Comparator.comparing(ExtendGroupPO::getShowOrder)).get(); ExtendGroupPO extendGroupPO = buildExtendGroupType(moduleTypeEnum, fieldTypeTreeParam, extendGroup.getShowOrder()); MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(extendGroupPO); @@ -217,7 +217,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ @Override public int deleteTitle(ExtendTitleSaveParam param) { getExtendTitleMapper().deleteExtendTitleByIds(DeleteParam.builder().ids(param.getId().toString()).build().getIds()); - List titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType()); + List titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null); if (CollectionUtils.isEmpty(titlesByGroupID)) { // 删除整个分组 @@ -469,7 +469,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ @Override public void saveTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) { Set collect = MapperProxyFactory.getProxy(ExtendGroupMapper.class) - .listGroupByPid(fieldTypeTreeParam.getParentId()).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet()); + .listGroupByPid(fieldTypeTreeParam.getParentId(),null).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet()); Integer extendType = moduleTypeEnum.getValue(); List extendGroupPOS = JSONArray.parseArray(fieldTypeTreeParam.getData(), ExtendGroupPO.class); diff --git a/src/com/engine/organization/service/impl/GroupServiceImpl.java b/src/com/engine/organization/service/impl/GroupServiceImpl.java index 1588052c..fbf545c0 100644 --- a/src/com/engine/organization/service/impl/GroupServiceImpl.java +++ b/src/com/engine/organization/service/impl/GroupServiceImpl.java @@ -34,7 +34,6 @@ public class GroupServiceImpl extends Service implements GroupService { List addGroups = new ArrayList<>(); SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部名称", "companyname"); SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部全称", "companydesc"); - companyDescItem.setRules("required|string"); SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 1, 60, "公司网站", "companyweb"); // 赋值 diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index c2b88daa..d4cd3cd4 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -172,7 +172,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic public Map getSaveForm() { Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_HRM, 2, extendTitle.getId() + "", null, null))); @@ -203,7 +203,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId),"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index 9030636b..064b2a3f 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -24,6 +24,7 @@ import com.engine.organization.entity.job.dto.JobListDTO; import com.engine.organization.entity.job.param.JobMergeParam; import com.engine.organization.entity.job.param.JobSearchParam; import com.engine.organization.entity.job.po.JobPO; +import com.engine.organization.entity.scheme.po.GradePO; import com.engine.organization.entity.searchtree.SearchTree; import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.enums.LogModuleNameEnum; @@ -36,6 +37,7 @@ import com.engine.organization.mapper.extend.ExtMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.hrmresource.SystemDataMapper; import com.engine.organization.mapper.job.JobMapper; +import com.engine.organization.mapper.scheme.GradeMapper; import com.engine.organization.service.ExtService; import com.engine.organization.service.JobService; import com.engine.organization.thread.OrganizationRunable; @@ -248,7 +250,7 @@ public class JobServiceImpl extends Service implements JobService { HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID,"1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { List items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue(), "scheme_id", "parent_comp"); @@ -278,7 +280,7 @@ public class JobServiceImpl extends Service implements JobService { if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId), "1"); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { List items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "scheme_id", "parent_comp"); @@ -301,6 +303,14 @@ public class JobServiceImpl extends Service implements JobService { Map apiDatas = new HashMap<>(); apiDatas.put("result", resultMap); + // 返回职等信息 + JobPO jobById = getJobMapper().getJobById(id); + if (null != jobById) { + GradePO gradeByID = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(jobById.getGradeId()); + if (null != gradeByID) { + apiDatas.put("levelIds", gradeByID.getLevelId()); + } + } return apiDatas; }