diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql index 58ff63f3..fe065481 100644 --- a/docs/表结构SQL/MySQL.sql +++ b/docs/表结构SQL/MySQL.sql @@ -116,6 +116,7 @@ CREATE TABLE JCL_ORG_COMP ( -- JCL_FIELD_EXTENDGROUP CREATE TABLE JCL_FIELD_EXTENDGROUP ( id int auto_increment NOT NULL, + pid int null, extend_type int null, group_name varchar(100) NULL, creator int null, @@ -125,6 +126,20 @@ CREATE TABLE JCL_FIELD_EXTENDGROUP ( CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id) ); +-- JCL_FIELD_EXTENDTITLE +create table JCL_FIELD_EXTENDTITLE ( + id int auto_increment not null, + group_id int null, + title varchar(100) null, + show_order int null, + is_show int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + constraint JCL_FIELD_EXTENDTITLE_PK primary key (id) +); + -- JCL_FIELD_EXTENDINFO CREATE TABLE JCL_FIELD_EXTENDINFO ( id int auto_increment NOT NULL, @@ -135,6 +150,7 @@ CREATE TABLE JCL_FIELD_EXTENDINFO ( field_type varchar(1000) NULL, control_type int null, browser_type varchar(100) NULL, + custom_value text null, extend_group_id int null, isenable int null, isrequired int null, @@ -243,8 +259,8 @@ CREATE TABLE JCL_ORG_JOBDT ( mainid int NULL, level_id varchar(100) NULL, grade_id varchar(100) NULL, - level_id_span varchar(100) NULL, - grade_id_span varchar(100) NULL, + level_id_span varchar(1000) NULL, + grade_id_span varchar(1000) NULL, creator int null, delete_type int null, create_time date null, diff --git a/docs/表结构SQL/Oracle.sql b/docs/表结构SQL/Oracle.sql index 2f2c7aad..cc122eac 100644 --- a/docs/表结构SQL/Oracle.sql +++ b/docs/表结构SQL/Oracle.sql @@ -118,7 +118,8 @@ CREATE TABLE JCL_ORG_COMP ( -- JCL_FIELD_EXTENDGROUP CREATE TABLE JCL_FIELD_EXTENDGROUP ( ID NUMBER NOT NULL, - EXTEND_TYPE NUMBER NULL, + PID NUMBER NULL, + EXTEND_TYPE NUMBER NULL, GROUP_NAME NVARCHAR2(100) NULL, CREATOR NUMBER NULL, DELETE_TYPE NUMBER NULL, @@ -127,6 +128,20 @@ CREATE TABLE JCL_FIELD_EXTENDGROUP ( CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (ID) ); +-- JCL_FIELD_EXTENDTITLE +CREATE TABLE JCL_FIELD_EXTENDTITLE ( + ID NUMBER NOT NULL, + GROUP_ID NUMBER NULL, + TITLE VARCHAR(100) NULL, + SHOW_ORDER NUMBER NULL, + IS_SHOW NUMBER NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_FIELD_EXTENDTITLE_PK PRIMARY KEY (ID) +); + -- JCL_FIELD_EXTENDINFO CREATE TABLE JCL_FIELD_EXTENDINFO ( ID NUMBER NOT NULL, @@ -136,6 +151,7 @@ CREATE TABLE JCL_FIELD_EXTENDINFO ( FIELD_NAME_DESC NVARCHAR2(100) NULL, FIELD_TYPE NVARCHAR2(1000) NULL, CONTROL_TYPE NUMBER NULL, + CUSTOM_VALUE NVARCHAR2(1000) NULL, BROWSER_TYPE NVARCHAR2(100) NULL, EXTEND_GROUP_ID NUMBER NULL, ISENABLE NUMBER NULL, @@ -245,8 +261,8 @@ CREATE TABLE JCL_ORG_JOBDT ( MAINID NUMBER NULL, LEVEL_ID NVARCHAR2(100) NULL, GRADE_ID NVARCHAR2(100) NULL, - LEVEL_ID_SPAN NVARCHAR2(100) NULL, - GRADE_ID_SPAN NVARCHAR2(100) NULL, + LEVEL_ID_SPAN NVARCHAR2(1000) NULL, + GRADE_ID_SPAN NVARCHAR2(1000) NULL, CREATOR NUMBER NULL, DELETE_TYPE NUMBER NULL, CREATE_TIME DATE NULL, diff --git a/docs/表结构SQL/SqlServer.sql b/docs/表结构SQL/SqlServer.sql index 923e3cf2..f164c0cd 100644 --- a/docs/表结构SQL/SqlServer.sql +++ b/docs/表结构SQL/SqlServer.sql @@ -116,6 +116,7 @@ CREATE TABLE JCL_ORG_COMP ( -- JCL_FIELD_EXTENDGROUP CREATE TABLE JCL_FIELD_EXTENDGROUP ( id int IDENTITY(1,1) NOT NULL, + pid int null, extend_type int null, group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL, creator int null, @@ -125,6 +126,20 @@ CREATE TABLE JCL_FIELD_EXTENDGROUP ( CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id) ); +-- JCL_FIELD_EXTENDTITLE +create table JCL_FIELD_EXTENDTITLE ( + id int IDENTITY(1,1) NOT NULL, + group_id int null, + title varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + show_order int null, + is_show int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDTITLE_PK PRIMARY KEY (id) +); + -- JCL_FIELD_EXTENDINFO CREATE TABLE JCL_FIELD_EXTENDINFO ( id int IDENTITY(1,1) NOT NULL, @@ -134,6 +149,7 @@ CREATE TABLE JCL_FIELD_EXTENDINFO ( field_name_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL, field_type varchar(1000) COLLATE Chinese_PRC_CI_AS NULL, control_type int null, + custom_value text null, browser_type varchar(100) COLLATE Chinese_PRC_CI_AS NULL, extend_group_id int null, isenable int null, @@ -243,8 +259,8 @@ CREATE TABLE JCL_ORG_JOBDT ( mainid int NULL, level_id varchar(100) NULL, grade_id varchar(100) NULL, - level_id_span varchar(100) NULL, - grade_id_span varchar(100) NULL, + level_id_span varchar(1000) NULL, + grade_id_span varchar(1000) NULL, creator int null, delete_type int null, create_time datetime null, diff --git a/src/com/engine/organization/entity/SelectOptionParam.java b/src/com/engine/organization/entity/SelectOptionParam.java index 9c2b38ab..8690b3be 100644 --- a/src/com/engine/organization/entity/SelectOptionParam.java +++ b/src/com/engine/organization/entity/SelectOptionParam.java @@ -1,16 +1,13 @@ package com.engine.organization.entity; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.api.browser.bean.SearchConditionOption; -import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.List; /** - * @description: * @author:dxfeng * @createTime: 2022/06/13 * @version: 1.0 @@ -20,16 +17,21 @@ public class SelectOptionParam { /** * 下拉框Json转换 * - * @param datas + * @param customValue * @return */ - public static List convertJsonToListOption(String datas) { + public static List convertJsonToListOption(String customValue) { List selectOptions = new ArrayList<>(); - if (StringUtils.isNotBlank(datas)) { - JSONArray objectArray = JSON.parseArray(datas); - int size = objectArray.size(); + JSONArray objects = JSONObject.parseArray(customValue); + if (objects.size() < 3) { + return selectOptions; + } + JSONObject o = (JSONObject) objects.get(2); + JSONArray datas = o.getJSONArray("datas"); + if (!datas.isEmpty()) { + int size = datas.size(); for (int i = 0; i < size; i++) { - JSONObject jsonObject = (JSONObject) objectArray.get(i); + JSONObject jsonObject = (JSONObject) datas.get(i); SearchConditionOption option = new SearchConditionOption(jsonObject.getString("key"), jsonObject.getString("option")); selectOptions.add(option); } diff --git a/src/com/engine/organization/entity/extend/po/ExtendTitlePO.java b/src/com/engine/organization/entity/extend/po/ExtendTitlePO.java new file mode 100644 index 00000000..7d7b5406 --- /dev/null +++ b/src/com/engine/organization/entity/extend/po/ExtendTitlePO.java @@ -0,0 +1,49 @@ +package com.engine.organization.entity.extend.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @author:dxfeng + * @createTime: 2022/06/14 + * @version: 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ExtendTitlePO { + /** + * 主键 + */ + private Long id; + + /** + * 分组标识 + */ + private Long groupid; + + /** + * 分组名称 + */ + private String title; + /** + * 展示排序 + */ + private Integer showOrder; + + /** + * 是否展示 + */ + private Integer isShow; + + + private Integer creator; + private Integer deleteType; + private Date createTime; + private Date updateTime; +} diff --git a/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java new file mode 100644 index 00000000..c825c5ad --- /dev/null +++ b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java @@ -0,0 +1,24 @@ +package com.engine.organization.mapper.extend; + +import com.engine.organization.entity.extend.po.ExtendTitlePO; +import org.apache.ibatis.annotations.Param; + +import java.util.Collection; +import java.util.List; + +/** + * @author:dxfeng + * @createTime: 2022/06/14 + * @version: 1.0 + */ +public interface ExtendTitleMapper { + /** + * 根据分组类型获取标题信息 + * + * @param groupId + * @return + */ + List getTitlesByGroupID(@Param("groupId") Long groupId); + + List getTitlesByIds(@Param("ids") Collection ids); +} diff --git a/src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml new file mode 100644 index 00000000..36599d59 --- /dev/null +++ b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + t + . + id + , t.group_id + , t.title + , show_order + , is_show + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index 409637ed..f7bc2409 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -15,9 +15,9 @@ import com.engine.organization.entity.company.bo.CompBO; import com.engine.organization.entity.company.dto.CompListDTO; import com.engine.organization.entity.company.param.CompSearchParam; import com.engine.organization.entity.company.po.CompPO; -import com.engine.organization.entity.extend.po.ExtendGroupPO; +import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.mapper.comp.CompMapper; -import com.engine.organization.mapper.extend.ExtendGroupMapper; +import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.service.CompService; import com.engine.organization.service.ExtService; import com.engine.organization.util.HasRightUtil; @@ -75,8 +75,8 @@ public class CompServiceImpl extends Service implements CompService { return MapperProxyFactory.getProxy(CompMapper.class); } - private ExtendGroupMapper getExtendGroupMapper() { - return MapperProxyFactory.getProxy(ExtendGroupMapper.class); + private ExtendTitleMapper getExtendTitleMapper() { + return MapperProxyFactory.getProxy(ExtendTitleMapper.class); } private ExtService getExtService(User user) { @@ -187,7 +187,6 @@ public class CompServiceImpl extends Service implements CompService { SearchConditionItem compNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "compName"); // 简称 SearchConditionItem compNameShortItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "compNameShort"); - // TODO // 上级公司 SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "161", "parentCompany", "compBrowser"); // 组织机构代码 @@ -240,10 +239,11 @@ public class CompServiceImpl extends Service implements CompService { if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); - if (CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_COMPEXT : JCL_ORG_COMP, viewAttr, id, extendGroupPO.getId().toString(), "comp_no"))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_COMPEXT : JCL_ORG_COMP, viewAttr, id, extendTitle.getId() + "", "comp_no"))); } } @@ -268,10 +268,10 @@ public class CompServiceImpl extends Service implements CompService { HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(GROUP_ID); - if (CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendGroupPO.getId().toString(), "comp_no", RuleCodeType.SUBCOMPANY.getValue()))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_COMP, 2, extendTitle.getId() + "", "comp_no", RuleCodeType.SUBCOMPANY.getValue()))); } } apiDatas.put("condition", addGroups); diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java index 72f2ba4a..71f97b2c 100644 --- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java +++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java @@ -17,7 +17,7 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO; import com.engine.organization.entity.department.param.*; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.department.vo.SingleDeptTreeVO; -import com.engine.organization.entity.extend.po.ExtendGroupPO; +import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.job.bo.JobBO; import com.engine.organization.entity.job.po.JobPO; import com.engine.organization.entity.job.vo.SingleJobTreeVO; @@ -25,7 +25,7 @@ import com.engine.organization.entity.searchtree.SearchTree; import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; -import com.engine.organization.mapper.extend.ExtendGroupMapper; +import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.job.JobMapper; import com.engine.organization.service.DepartmentService; import com.engine.organization.service.ExtService; @@ -91,8 +91,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService return MapperProxyFactory.getProxy(CompMapper.class); } - private ExtendGroupMapper getExtendGroupMapper() { - return MapperProxyFactory.getProxy(ExtendGroupMapper.class); + private ExtendTitleMapper getExtendTitleMapper() { + return MapperProxyFactory.getProxy(ExtendTitleMapper.class); } private ExtService getExtService(User user) { @@ -293,10 +293,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); - if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_DEPTEXT : JCL_ORG_DEPT, viewAttr, id, extendGroupPO.getId().toString(), "dept_no"))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_DEPTEXT : JCL_ORG_DEPT, viewAttr, id, extendTitle.getId().toString(), "dept_no"))); } } @@ -320,10 +320,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(GROUP_ID); - if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_DEPT, 2, extendGroupPO.getId().toString(), "dept_no", RuleCodeType.DEPARTMENT.getValue()))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_DEPT, 2, extendTitle.getId().toString(), "dept_no", RuleCodeType.DEPARTMENT.getValue()))); } } apiDatas.put("condition", addGroups); diff --git a/src/com/engine/organization/service/impl/ExtServiceImpl.java b/src/com/engine/organization/service/impl/ExtServiceImpl.java index 24c42183..4f2ea7c1 100644 --- a/src/com/engine/organization/service/impl/ExtServiceImpl.java +++ b/src/com/engine/organization/service/impl/ExtServiceImpl.java @@ -6,13 +6,10 @@ import com.engine.organization.entity.TopTab; import com.engine.organization.entity.codesetting.po.CodeRulePO; import com.engine.organization.entity.extend.ExtendInfoOperateType; import com.engine.organization.entity.extend.bo.ExtendInfoBO; -import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendInfoPO; +import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.mapper.codesetting.CodeRuleMapper; -import com.engine.organization.mapper.extend.ExtDTMapper; -import com.engine.organization.mapper.extend.ExtMapper; -import com.engine.organization.mapper.extend.ExtendGroupMapper; -import com.engine.organization.mapper.extend.ExtendInfoMapper; +import com.engine.organization.mapper.extend.*; import com.engine.organization.service.ExtService; import com.engine.organization.util.OrganizationAssert; import com.engine.organization.util.db.MapperProxyFactory; @@ -49,6 +46,10 @@ public class ExtServiceImpl extends Service implements ExtService { return MapperProxyFactory.getProxy(ExtendGroupMapper.class); } + private ExtendTitleMapper getExtendTitleMapper() { + return MapperProxyFactory.getProxy(ExtendTitleMapper.class); + } + private ExtDTMapper getExtDTMapper() { return MapperProxyFactory.getProxy(ExtDTMapper.class); } @@ -158,8 +159,9 @@ public class ExtServiceImpl extends Service implements ExtService { List infoPOList1 = getExtendInfoMapper().listFields(extendType, "", tableName.toLowerCase().replace("ext", ""), ExtendInfoOperateType.EDIT.getValue()); infoPOList.addAll(infoPOList1); List ids = infoPOList.stream().map(ExtendInfoPO::getExtendGroupId).collect(Collectors.toList()); - List extendGroupPOS = getExtendGroupMapper().listGroupByIds(ids); - Set extendGroups = extendGroupPOS.stream().map(ExtendGroupPO::getPid).collect(Collectors.toSet()); + List extendTitles = getExtendTitleMapper().getTitlesByIds(ids); + Set extendGroups = extendTitles.stream().map(ExtendTitlePO::getGroupid).collect(Collectors.toSet()); + // 拓展信息 if (CollectionUtils.isNotEmpty(extendGroups)) { for (Long groupId : extendGroups) { diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index 7bb7f1b8..f38a2abd 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -17,8 +17,8 @@ import com.engine.organization.entity.department.bo.DepartmentBO; import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.employee.vo.EmployeeTableVO; import com.engine.organization.entity.extend.bo.ExtendInfoBO; -import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendInfoPO; +import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.job.bo.JobBO; import com.engine.organization.entity.job.dto.JobListDTO; import com.engine.organization.entity.job.param.JobSearchParam; @@ -29,13 +29,11 @@ import com.engine.organization.entity.searchtree.SearchTree; import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; -import com.engine.organization.mapper.extend.ExtendGroupMapper; +import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.job.JobDTMapper; import com.engine.organization.mapper.job.JobMapper; import com.engine.organization.mapper.scheme.GradeMapper; import com.engine.organization.mapper.scheme.LevelMapper; -import com.engine.organization.mapper.scheme.SchemeMapper; -import com.engine.organization.mapper.sequence.SequenceMapper; import com.engine.organization.service.ExtService; import com.engine.organization.service.JobService; import com.engine.organization.util.HasRightUtil; @@ -117,16 +115,8 @@ public class JobServiceImpl extends Service implements JobService { return MapperProxyFactory.getProxy(DepartmentMapper.class); } - private SequenceMapper getSequenceMapper() { - return MapperProxyFactory.getProxy(SequenceMapper.class); - } - - private SchemeMapper getSchemeMapper() { - return MapperProxyFactory.getProxy(SchemeMapper.class); - } - - private ExtendGroupMapper getExtendGroupMapper() { - return MapperProxyFactory.getProxy(ExtendGroupMapper.class); + private ExtendTitleMapper getExtendTitleMapper() { + return MapperProxyFactory.getProxy(ExtendTitleMapper.class); } private ExtService getExtService(User user) { @@ -261,10 +251,10 @@ public class JobServiceImpl extends Service implements JobService { HasRightUtil.hasRight(user, RIGHT_NAME, false); Map apiDatas = new HashMap<>(); List addGroups = new ArrayList<>(); - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(GROUP_ID); - if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendGroupPO.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue()))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue()))); } } apiDatas.put("condition", addGroups); @@ -288,10 +278,10 @@ public class JobServiceImpl extends Service implements JobService { if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendGroupPOS = getExtendGroupMapper().listGroupByPid(Long.parseLong(groupId)); - if (org.apache.commons.collections.CollectionUtils.isNotEmpty(extendGroupPOS)) { - for (ExtendGroupPO extendGroupPO : extendGroupPOS) { - addGroups.add(new SearchConditionGroup(extendGroupPO.getGroupName(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_JOBEXT : JCL_ORG_JOB, viewAttr, id, extendGroupPO.getId().toString(), "job_no"))); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID); + if (CollectionUtils.isNotEmpty(extendTitles)) { + for (ExtendTitlePO extendTitle : extendTitles) { + addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, getExtService(user).getExtForm(user, EXTEND_TYPE + "", Integer.parseInt(groupId) >= 0 ? JCL_ORG_JOBEXT : JCL_ORG_JOB, viewAttr, id, extendTitle.getId().toString(), "job_no"))); } } HashMap resultMap = new HashMap<>();