From 5c79263ead0baaf0903e1396cb8ec1f3aa458c8f Mon Sep 17 00:00:00 2001 From: dxfeng Date: Mon, 13 Jun 2022 17:44:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A1=A8=E7=BB=93=E6=9E=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/表结构SQL/MySQL.sql | 6 ++++-- docs/表结构SQL/Oracle.sql | 8 +++++--- docs/表结构SQL/SqlServer.sql | 6 ++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql index 58ff63f3..3dc7dd8d 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, @@ -135,6 +136,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 +245,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..ac642a30 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, @@ -136,6 +137,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 +247,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..909b3fa3 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, @@ -134,6 +135,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 +245,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, From bbe5a11f5de1ff81cd014d10ce988fb56988eb7e Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 14 Jun 2022 11:17:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/SelectOptionParam.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/com/engine/organization/entity/SelectOptionParam.java b/src/com/engine/organization/entity/SelectOptionParam.java index 7e27c490..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: TODO * @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); } From 2ed79cc994ee9e8155cbf699271ce5c9ceeb895a Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 14 Jun 2022 13:58:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=88=86=E7=BB=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/表结构SQL/MySQL.sql | 14 +++++ docs/表结构SQL/Oracle.sql | 14 +++++ docs/表结构SQL/SqlServer.sql | 14 +++++ .../entity/extend/po/ExtendTitlePO.java | 49 ++++++++++++++++ .../mapper/extend/ExtendTitleMapper.java | 24 ++++++++ .../mapper/extend/ExtendTitleMapper.xml | 57 +++++++++++++++++++ .../service/impl/CompServiceImpl.java | 26 ++++----- .../service/impl/ExtServiceImpl.java | 16 +++--- 8 files changed, 194 insertions(+), 20 deletions(-) create mode 100644 src/com/engine/organization/entity/extend/po/ExtendTitlePO.java create mode 100644 src/com/engine/organization/mapper/extend/ExtendTitleMapper.java create mode 100644 src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql index 3dc7dd8d..fe065481 100644 --- a/docs/表结构SQL/MySQL.sql +++ b/docs/表结构SQL/MySQL.sql @@ -126,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, diff --git a/docs/表结构SQL/Oracle.sql b/docs/表结构SQL/Oracle.sql index ac642a30..cc122eac 100644 --- a/docs/表结构SQL/Oracle.sql +++ b/docs/表结构SQL/Oracle.sql @@ -128,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, diff --git a/docs/表结构SQL/SqlServer.sql b/docs/表结构SQL/SqlServer.sql index 909b3fa3..f164c0cd 100644 --- a/docs/表结构SQL/SqlServer.sql +++ b/docs/表结构SQL/SqlServer.sql @@ -126,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, 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..a6e0c700 --- /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") String 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..f5ccee0d --- /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..4c2235a3 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(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/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) { From 5b0864d50356e97049f186684d22d0a81f0086c8 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 14 Jun 2022 14:31:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=88=86=E7=BB=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/extend/ExtendTitleMapper.java | 2 +- .../mapper/extend/ExtendTitleMapper.xml | 2 +- .../service/impl/CompServiceImpl.java | 4 +-- .../service/impl/DepartmentServiceImpl.java | 25 +++++++------- .../service/impl/JobServiceImpl.java | 34 +++++++------------ 5 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java index a6e0c700..c825c5ad 100644 --- a/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java +++ b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.java @@ -18,7 +18,7 @@ public interface ExtendTitleMapper { * @param groupId * @return */ - List getTitlesByGroupID(@Param("groupId") String groupId); + 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 index f5ccee0d..36599d59 100644 --- a/src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml +++ b/src/com/engine/organization/mapper/extend/ExtendTitleMapper.xml @@ -34,7 +34,7 @@ FROM jcl_field_extendtitle t WHERE t.delete_type = 0 - + and group_id = #{groupId} order by show_order diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index 4c2235a3..f7bc2409 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -239,7 +239,7 @@ public class CompServiceImpl extends Service implements CompService { if ("0".equals(groupId)) { groupId = GROUP_ID.toString(); } - List extendTitles = getExtendTitleMapper().getTitlesByGroupID(groupId); + List extendTitles = getExtendTitleMapper().getTitlesByGroupID(Long.parseLong(groupId)); if (CollectionUtils.isNotEmpty(extendTitles)) { for (ExtendTitlePO extendTitle : extendTitles) { @@ -268,7 +268,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); 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()))); 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/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<>();