diff --git a/docs/0829/Mysql.sql b/docs/0829/Mysql.sql
index a859b7b6..2d975372 100644
--- a/docs/0829/Mysql.sql
+++ b/docs/0829/Mysql.sql
@@ -35,3 +35,5 @@ DROP TRIGGER IF EXISTS JCL_ORG_job_ed;
DROP TRIGGER IF EXISTS JCL_ORG_job_del;
DROP TRIGGER IF EXISTS hrmresource_ed;
DROP TRIGGER IF EXISTS cus_fielddata_jclgw;
+
+update WORKFLOW_BROWSERURL set TYPEID = 2 where id ='666';
\ No newline at end of file
diff --git a/docs/0829/Oracle.sql b/docs/0829/Oracle.sql
index 7a13b4fd..adc3ca26 100644
--- a/docs/0829/Oracle.sql
+++ b/docs/0829/Oracle.sql
@@ -122,4 +122,7 @@ if V_NUM > 0 then
execute immediate 'DROP TRIGGER cus_fielddata_jclgw';
end if;
END;
+/
+
+update WORKFLOW_BROWSERURL set TYPEID = 2 where id ='666'
/
\ No newline at end of file
diff --git a/docs/0829/SqlServer.sql b/docs/0829/SqlServer.sql
index 7b161090..e10e587a 100644
--- a/docs/0829/SqlServer.sql
+++ b/docs/0829/SqlServer.sql
@@ -1,5 +1,7 @@
alter table JCL_ORG_STAFFS add description varchar(200)
GO
+update WORKFLOW_BROWSERURL set TYPEID = 2 where id ='666'
+GO
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_ITEMCLASS]') AND type IN ('U'))
DROP TABLE [dbo].[JCL_ORG_ITEMCLASS]
@@ -50,30 +52,3 @@ ALTER TABLE [dbo].[JCL_ORG_ITEM] ADD CONSTRAINT [JCL_ORG_ITEM_PK] PRIMARY KEY CL
GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[HrmCompany_ed]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[HrmCompany_ed]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_COMP_ed]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_COMP_ed]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_COMP_del]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_COMP_del]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_dept_ed]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_dept_ed]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_dept_del]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_dept_del]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_job_ed]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_job_ed]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[JCL_ORG_job_del]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[JCL_ORG_job_del]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[hrmresource_ed]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[hrmresource_ed]
-GO
-IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[cus_fielddata_jclgw]') AND type IN ('TR'))
-DROP TRIGGER [dbo].[cus_fielddata_jclgw]
-GO
\ No newline at end of file
diff --git a/docs/脚本/Mysql/浏览按钮mysql.sql b/docs/脚本/Mysql/浏览按钮mysql.sql
index 9b7e65cc..72bb7769 100644
--- a/docs/脚本/Mysql/浏览按钮mysql.sql
+++ b/docs/脚本/Mysql/浏览按钮mysql.sql
@@ -38,8 +38,8 @@ select @current_time:= date_format( now(),'%T');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('PostInfoBrowser', '1', '1', '', 'select * from jcl_org_post_info where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '职务信息浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0', uuid(), '', '', '', '', '1', 0, 1);
select @datashowset_id:= max(id) from datashowset;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('PostInfoBrowser', '0', 0, @current_date, @current_time, NULL, NULL);
-INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 1, 1, uuid(), NULL);
-INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 0, 2, uuid(), NULL);
+INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 0, 1, uuid(), NULL);
+INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 1, 2, uuid(), NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '职务分类', 'post_id', 'select post_name from jcl_org_post where id = {?currentvalue}', 0, 3, uuid(), NULL);
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '编号', 'post_info_no', '2', '', 1, uuid(), '');
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '名称', 'post_info_name', '2', '', 2, uuid(), '');
diff --git a/docs/脚本/Mysql/表结构、初始化数据.sql b/docs/脚本/Mysql/表结构、初始化数据.sql
index 5497f737..640563b4 100644
--- a/docs/脚本/Mysql/表结构、初始化数据.sql
+++ b/docs/脚本/Mysql/表结构、初始化数据.sql
@@ -84,6 +84,7 @@ CREATE TABLE `jcl_org_comp` (
`comp_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`comp_name_short` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_company` int(11) NULL DEFAULT NULL,
+ `ec_company` int(11) NULL DEFAULT NULL,
`org_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`industry` int(11) NULL DEFAULT NULL,
`comp_principal` int(11) NULL DEFAULT NULL,
@@ -133,7 +134,9 @@ CREATE TABLE `jcl_org_dept` (
`dept_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`dept_name_short` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_comp` int(11) NULL DEFAULT NULL,
+ `ec_company` int(11) NULL DEFAULT NULL,
`parent_dept` int(11) NULL DEFAULT NULL,
+ `ec_department` int(11) NULL DEFAULT NULL,
`dept_principal` int(11) NULL DEFAULT NULL,
`show_order` int(11) NULL DEFAULT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
@@ -482,7 +485,9 @@ CREATE TABLE `jcl_org_staff` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plan_id` int(11) NULL DEFAULT NULL,
`comp_id` int(11) NULL DEFAULT NULL,
+ `ec_company` int(11) NULL DEFAULT NULL,
`dept_id` int(11) NULL DEFAULT NULL,
+ `ec_department` int(11) NULL DEFAULT NULL,
`job_id` int(11) NULL DEFAULT NULL,
`staff_num` int(11) NULL DEFAULT NULL,
`control_policy` int(11) NULL DEFAULT NULL,
@@ -508,6 +513,7 @@ CREATE TABLE `jcl_org_staffplan` (
`time_start` date NULL DEFAULT NULL,
`time_end` date NULL DEFAULT NULL,
`company_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `ec_company` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`control_dimension` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`forbidden_tag` int(11) NULL DEFAULT NULL,
diff --git a/docs/脚本/Oracle/表结构、初始化数据Oracle.sql b/docs/脚本/Oracle/表结构、初始化数据Oracle.sql
index 510e4dd6..ae02ca38 100644
--- a/docs/脚本/Oracle/表结构、初始化数据Oracle.sql
+++ b/docs/脚本/Oracle/表结构、初始化数据Oracle.sql
@@ -104,6 +104,7 @@ CREATE TABLE JCL_ORG_COMP (
COMP_NAME NVARCHAR2(100) NULL,
COMP_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMPANY NUMBER NULL,
+ EC_COMPANY NUMBER NULL,
ORG_CODE NVARCHAR2(100) NULL,
INDUSTRY NUMBER NULL,
COMP_PRINCIPAL NUMBER NULL,
@@ -212,7 +213,9 @@ CREATE TABLE JCL_ORG_DEPT (
DEPT_NAME NVARCHAR2(100) NULL,
DEPT_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMP NUMBER NULL,
+ EC_COMPANY NUMBER NULL,
PARENT_DEPT NUMBER NULL,
+ EC_DEPARTMENT NUMBER NULL,
DEPT_PRINCIPAL NUMBER NULL,
SHOW_ORDER NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
@@ -427,6 +430,7 @@ CREATE TABLE JCL_ORG_STAFFPLAN (
TIME_START DATE NULL,
TIME_END DATE NULL,
COMPANY_ID NVARCHAR2(100) NULL,
+ EC_COMPANY NVARCHAR2(100) NULL,
CONTROL_DIMENSION NVARCHAR2(5) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
@@ -444,7 +448,9 @@ CREATE TABLE JCL_ORG_STAFF (
ID NUMBER NOT NULL,
PLAN_ID NUMBER NULL,
COMP_ID NUMBER NULL,
+ EC_COMPANY NUMBER NULL,
DEPT_ID NUMBER NULL,
+ EC_DEPARTMENT NUMBER NULL,
JOB_ID NUMBER NULL,
STAFF_NUM NUMBER NULL,
CONTROL_POLICY NUMBER NULL,
diff --git a/docs/脚本/SqlServer/浏览按钮sqlserver.sql b/docs/脚本/SqlServer/浏览按钮sqlserver.sql
index dfdda47c..ed6d3f2d 100644
--- a/docs/脚本/SqlServer/浏览按钮sqlserver.sql
+++ b/docs/脚本/SqlServer/浏览按钮sqlserver.sql
@@ -58,8 +58,8 @@ select @current_time = CONVERT(varchar(100), GETDATE(), 24)
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('PostInfoBrowser', '1', '1', '', 'select * from jcl_org_post_info where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '职务信息浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0', newid(), '', '', '', '', '1', 0, 1)
set @datashowset_id = (select max(id) from datashowset)
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('PostInfoBrowser', '0', 0, @current_date, @current_time, NULL, NULL)
-INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 1, 1, newid(), NULL)
-INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 0, 2, newid(), NULL)
+INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 0, 1, newid(), NULL)
+INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 1, 2, newid(), NULL)
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '职务分类', 'post_id', 'select post_name from jcl_org_post where id = {?currentvalue}', 0, 3, newid(), NULL)
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '编号', 'post_info_no', '2', '', 1, newid(), '')
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '名称', 'post_info_name', '2', '', 2, newid(), '')
diff --git a/docs/脚本/SqlServer/表结构、基础数据.sql b/docs/脚本/SqlServer/表结构、基础数据.sql
index df806b9b..44f81814 100644
--- a/docs/脚本/SqlServer/表结构、基础数据.sql
+++ b/docs/脚本/SqlServer/表结构、基础数据.sql
@@ -109,6 +109,7 @@ CREATE TABLE [dbo].[JCL_ORG_COMP] (
[comp_name] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[comp_name_short] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[parent_company] int NULL,
+ [ec_company] int NULL,
[org_code] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[industry] int NULL,
[comp_principal] int NULL,
@@ -170,7 +171,9 @@ CREATE TABLE [dbo].[JCL_ORG_DEPT] (
[dept_name] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[dept_name_short] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[parent_comp] int NULL,
+ [ec_company] int NULL,
[parent_dept] int NULL,
+ [ec_department] int NULL,
[dept_principal] int NULL,
[show_order] int NULL,
[description] varchar(1000) COLLATE Chinese_PRC_CI_AS NULL,
@@ -589,7 +592,9 @@ CREATE TABLE [dbo].[JCL_ORG_STAFF] (
[id] int IDENTITY(1,1) NOT NULL,
[plan_id] int NULL,
[comp_id] int NULL,
+ [ec_company] int NULL,
[dept_id] int NULL,
+ [ec_department] int NULL,
[job_id] int NULL,
[staff_num] int NULL,
[control_policy] int NULL,
@@ -621,6 +626,7 @@ CREATE TABLE [dbo].[JCL_ORG_STAFFPLAN] (
[time_start] datetime NULL,
[time_end] datetime NULL,
[company_id] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
+ [ec_company] varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
[control_dimension] varchar(5) COLLATE Chinese_PRC_CI_AS NULL,
[description] varchar(1000) COLLATE Chinese_PRC_CI_AS NULL,
[forbidden_tag] int NULL,
diff --git a/src/com/engine/organization/entity/company/bo/CompBO.java b/src/com/engine/organization/entity/company/bo/CompBO.java
index f0c62966..e1e04f5d 100644
--- a/src/com/engine/organization/entity/company/bo/CompBO.java
+++ b/src/com/engine/organization/entity/company/bo/CompBO.java
@@ -88,6 +88,7 @@ public class CompBO {
.compName(param.getCompName())
.compNameShort(param.getCompNameShort())
.parentCompany(param.getParentCompany())
+ .ecCompany(param.getEcCompany())
.orgCode(param.getOrgCode())
.industry(param.getIndustry())
.compPrincipal(param.getCompPrincipal())
diff --git a/src/com/engine/organization/entity/company/param/CompSearchParam.java b/src/com/engine/organization/entity/company/param/CompSearchParam.java
index 1134b99c..425bb5a5 100644
--- a/src/com/engine/organization/entity/company/param/CompSearchParam.java
+++ b/src/com/engine/organization/entity/company/param/CompSearchParam.java
@@ -42,6 +42,7 @@ public class CompSearchParam extends BaseQueryParam {
* 上级公司
*/
private Long parentCompany;
+ private Long ecCompany;
/**
* 组织机构代码
diff --git a/src/com/engine/organization/entity/company/po/CompPO.java b/src/com/engine/organization/entity/company/po/CompPO.java
index 1ab9fd96..98bfc5c5 100644
--- a/src/com/engine/organization/entity/company/po/CompPO.java
+++ b/src/com/engine/organization/entity/company/po/CompPO.java
@@ -44,6 +44,8 @@ public class CompPO {
*/
private Long parentCompany;
+ private Long ecCompany;
+
/**
* 组织机构代码
*/
diff --git a/src/com/engine/organization/entity/department/bo/DepartmentBO.java b/src/com/engine/organization/entity/department/bo/DepartmentBO.java
index 8c12d663..4223df42 100644
--- a/src/com/engine/organization/entity/department/bo/DepartmentBO.java
+++ b/src/com/engine/organization/entity/department/bo/DepartmentBO.java
@@ -84,7 +84,9 @@ public class DepartmentBO {
.deptName(param.getDepartmentName())
.deptNameShort(param.getDeptNameShort())
.parentComp(null == param.getParentComp() ? param.getSubcompanyid1() : param.getParentComp())
+ .ecCompany(param.getEcCompany())
.parentDept(null == param.getParentDept() ? param.getDepartmentid() : param.getParentDept())
+ .ecDepartment(param.getEcDepartment())
.deptPrincipal(param.getDeptPrincipal())
.showOrder(param.getShowOrder())
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
diff --git a/src/com/engine/organization/entity/department/param/DeptSearchParam.java b/src/com/engine/organization/entity/department/param/DeptSearchParam.java
index 1eaff53c..ed70fcfe 100644
--- a/src/com/engine/organization/entity/department/param/DeptSearchParam.java
+++ b/src/com/engine/organization/entity/department/param/DeptSearchParam.java
@@ -26,8 +26,10 @@ public class DeptSearchParam extends BaseQueryParam {
private String deptNameShort;
private Long parentComp;
+ private Long ecCompany;
private Long parentDept;
+ private Long ecDepartment;
private Long deptPrincipal;
diff --git a/src/com/engine/organization/entity/department/po/DepartmentPO.java b/src/com/engine/organization/entity/department/po/DepartmentPO.java
index d4f5528f..ab4fcbf2 100644
--- a/src/com/engine/organization/entity/department/po/DepartmentPO.java
+++ b/src/com/engine/organization/entity/department/po/DepartmentPO.java
@@ -28,8 +28,10 @@ public class DepartmentPO {
private String deptNameShort;
private Long parentComp;
+ private Long ecCompany;
private Long parentDept;
+ private Long ecDepartment;
private Long deptPrincipal; //部门负责人
diff --git a/src/com/engine/organization/entity/staff/bo/StaffBO.java b/src/com/engine/organization/entity/staff/bo/StaffBO.java
index bd058175..929699c9 100644
--- a/src/com/engine/organization/entity/staff/bo/StaffBO.java
+++ b/src/com/engine/organization/entity/staff/bo/StaffBO.java
@@ -20,7 +20,9 @@ public class StaffBO {
.id(param.getId())
.planId(param.getPlanId())
.compId(param.getCompId())
+ .ecCompany(param.getEcCompany())
.deptId(param.getDeptId())
+ .ecDepartment(param.getEcDepartment())
.jobId(param.getJobId())
.staffNum(param.getStaffNum())
.controlPolicy(param.getControlPolicy())
diff --git a/src/com/engine/organization/entity/staff/bo/StaffPlanBO.java b/src/com/engine/organization/entity/staff/bo/StaffPlanBO.java
index 3e1c46aa..6682fb6f 100644
--- a/src/com/engine/organization/entity/staff/bo/StaffPlanBO.java
+++ b/src/com/engine/organization/entity/staff/bo/StaffPlanBO.java
@@ -26,6 +26,7 @@ public class StaffPlanBO {
.timeStart(StringUtil.isEmpty(param.getTimeStart()) ? null : DateUtil.parseToDateTime(param.getTimeStart()))
.timeEnd(StringUtil.isEmpty(param.getTimeEnd()) ? null : DateUtil.parseToDateTime(param.getTimeEnd()))
.companyId(param.getCompanyId())
+ .ecCompany(param.getEcCompany())
.controlDimension(param.getControlDimension())
.description(param.getDescription())
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
diff --git a/src/com/engine/organization/entity/staff/param/StaffPlanSearchParam.java b/src/com/engine/organization/entity/staff/param/StaffPlanSearchParam.java
index 6a68e479..2b646ce3 100644
--- a/src/com/engine/organization/entity/staff/param/StaffPlanSearchParam.java
+++ b/src/com/engine/organization/entity/staff/param/StaffPlanSearchParam.java
@@ -44,6 +44,7 @@ public class StaffPlanSearchParam {
* 适用公司
*/
private String companyId;
+ private String ecCompany;
/**
* 控制维度
*/
diff --git a/src/com/engine/organization/entity/staff/param/StaffSearchParam.java b/src/com/engine/organization/entity/staff/param/StaffSearchParam.java
index 49fb0f68..29e944ae 100644
--- a/src/com/engine/organization/entity/staff/param/StaffSearchParam.java
+++ b/src/com/engine/organization/entity/staff/param/StaffSearchParam.java
@@ -28,10 +28,12 @@ public class StaffSearchParam {
* 分部
*/
private Long compId;
+ private Long ecCompany;
/**
* 部门
*/
private Long deptId;
+ private Long ecDepartment;
/**
* 岗位
*/
diff --git a/src/com/engine/organization/entity/staff/po/StaffPO.java b/src/com/engine/organization/entity/staff/po/StaffPO.java
index 992d5ee7..bedc2ea7 100644
--- a/src/com/engine/organization/entity/staff/po/StaffPO.java
+++ b/src/com/engine/organization/entity/staff/po/StaffPO.java
@@ -30,10 +30,12 @@ public class StaffPO {
* 分部
*/
private Long compId;
+ private Long ecCompany;
/**
* 部门
*/
private Long deptId;
+ private Long ecDepartment;
/**
* 岗位
*/
diff --git a/src/com/engine/organization/entity/staff/po/StaffPlanPO.java b/src/com/engine/organization/entity/staff/po/StaffPlanPO.java
index a63b0e30..99e05a2c 100644
--- a/src/com/engine/organization/entity/staff/po/StaffPlanPO.java
+++ b/src/com/engine/organization/entity/staff/po/StaffPlanPO.java
@@ -46,6 +46,7 @@ public class StaffPlanPO {
* 适用公司
*/
private String companyId;
+ private String ecCompany;
/**
* 控制维度
*/
diff --git a/src/com/engine/organization/mapper/comp/CompMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml
index 96ca0365..2acd1494 100644
--- a/src/com/engine/organization/mapper/comp/CompMapper.xml
+++ b/src/com/engine/organization/mapper/comp/CompMapper.xml
@@ -7,6 +7,7 @@
+
@@ -30,6 +31,7 @@
, t.comp_name
, t.comp_name_short
, t.parent_company
+ , t.ec_company
, t.org_code
, t.industry
, t.comp_principal
@@ -98,6 +100,9 @@
parent_company,
+
+ ec_company,
+
org_code,
@@ -140,6 +145,9 @@
#{parentCompany},
+
+ #{ecCompany},
+
#{orgCode},
@@ -160,7 +168,7 @@
-
+
select JCL_ORG_COMP_ID.currval from dual
INSERT INTO jcl_org_comp
@@ -189,6 +197,9 @@
parent_company,
+
+ ec_company,
+
org_code,
@@ -228,8 +239,8 @@
#{compNameShort},
-
- #{parentCompany},
+
+ #{ecCompany},
#{orgCode},
@@ -300,8 +311,8 @@
jcl_org_comp t
WHERE t.delete_type = 0
-
- and t.parent_company = #{compPO.parentCompany}
+
+ and t.ec_company = #{compPO.ecCompany}
and t.industry = #{compPO.industry}
@@ -434,6 +445,7 @@
comp_name=#{compName},
comp_name_short=#{compNameShort},
parent_company=#{parentCompany},
+ ec_company=#{ecCompany},
org_code=#{orgCode},
industry=#{industry},
comp_principal=#{compPrincipal},
diff --git a/src/com/engine/organization/mapper/department/DepartmentMapper.xml b/src/com/engine/organization/mapper/department/DepartmentMapper.xml
index 4221b0fe..fed2aec7 100644
--- a/src/com/engine/organization/mapper/department/DepartmentMapper.xml
+++ b/src/com/engine/organization/mapper/department/DepartmentMapper.xml
@@ -7,7 +7,9 @@
+
+
@@ -30,7 +32,9 @@
t.dept_name,
t.dept_name_short,
t.parent_comp,
+ t.ec_company,
t.parent_dept,
+ t.ec_department,
t.dept_principal,
t.show_order,
t.description,
@@ -39,17 +43,19 @@
-
+
select JCL_ORG_STAFF_ID.currval from dual
INSERT INTO jcl_org_staff
@@ -222,6 +239,12 @@
dept_id,
+
+ ec_company,
+
+
+ ec_department,
+
job_id,
@@ -270,6 +293,12 @@
#{deptId},
+
+ #{ecCompany},
+
+
+ #{ecDepartment},
+
#{jobId},
diff --git a/src/com/engine/organization/mapper/staff/StaffPlanMapper.xml b/src/com/engine/organization/mapper/staff/StaffPlanMapper.xml
index 6640a79f..afe9e648 100644
--- a/src/com/engine/organization/mapper/staff/StaffPlanMapper.xml
+++ b/src/com/engine/organization/mapper/staff/StaffPlanMapper.xml
@@ -9,6 +9,7 @@
+
@@ -29,6 +30,7 @@
, t.time_start
, t.time_end
, t.company_id
+ , t.ec_company
, t.control_dimension
, t.description
, t.forbidden_tag
@@ -88,6 +90,7 @@
time_start=#{timeStart},
time_end=#{timeEnd},
company_id=#{companyId},
+ ec_company=#{ecCompany},
control_dimension=#{controlDimension},
description=#{description},
@@ -128,6 +131,9 @@
company_id,
+
+ ec_company,
+
control_dimension,
@@ -167,6 +173,9 @@
#{companyId},
+
+ #{ecCompany},
+
#{controlDimension},
@@ -177,8 +186,9 @@
-
-
+
+
select JCL_ORG_STAFFPLAN_ID.currval from dual
INSERT INTO jcl_org_staffplan
@@ -213,6 +223,9 @@
company_id,
+
+ ec_company,
+
control_dimension,
@@ -252,6 +265,9 @@
#{companyId},
+
+ #{ecCompany},
+
#{controlDimension},
diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java
index 1143da41..013dcb72 100644
--- a/src/com/engine/organization/service/impl/CompServiceImpl.java
+++ b/src/com/engine/organization/service/impl/CompServiceImpl.java
@@ -37,6 +37,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
import com.engine.organization.util.page.Column;
import com.engine.organization.util.page.PageInfo;
import com.engine.organization.util.page.PageUtil;
+import com.engine.organization.util.relation.EcHrmRelationUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import weaver.general.StringUtil;
@@ -161,6 +162,11 @@ public class CompServiceImpl extends Service implements CompService {
}
params.put("show_order", maxShowOrder + 1);
}
+ // 赋值上级分部
+ String ecCompany = Util.null2String(params.get("ec_company"));
+ if (StringUtils.isNotBlank(ecCompany)) {
+ params.put("parent_company", EcHrmRelationUtil.getJclCompanyId(ecCompany).getId());
+ }
Map syncMap = new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, params).sync();
String ecCompanyID = Util.null2String(syncMap.get("id"));
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecCompanyID), syncMap.get("message").toString());
@@ -196,6 +202,11 @@ public class CompServiceImpl extends Service implements CompService {
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
}
+ // 上级分部
+ String ecCompany = Util.null2String(params.get("ec_company"));
+ if (StringUtils.isNotBlank(ecCompany)) {
+ params.put("parent_company", EcHrmRelationUtil.getJclCompanyId(ecCompany).getId());
+ }
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
// 更新主表数据
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", searchParam.getId());
@@ -234,7 +245,7 @@ public class CompServiceImpl extends Service implements CompService {
// 简称
SearchConditionItem compNameShortItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "compNameShort");
// 上级公司
- SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "161", "parentCompany", "compBrowser");
+ SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "164", "ecCompany", "");
// 组织机构代码
SearchConditionItem orgCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "组织机构代码", "orgCode");
// 行业
@@ -356,6 +367,8 @@ public class CompServiceImpl extends Service implements CompService {
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部");
CompPO compPO = getCompMapper().listById(companyId);
compPO.setParentCompany(targetCompanyId);
+ String ecCompanyId = EcHrmRelationUtil.getEcCompanyId(targetCompanyId + "");
+ compPO.setEcCompany(StringUtils.isNotBlank(ecCompanyId) ? Long.parseLong(ecCompanyId) : null);
Map map = new HashMap<>();
map.put("id", compPO.getId());
map.put("parent_company", compPO.getParentCompany());
@@ -379,7 +392,7 @@ public class CompServiceImpl extends Service implements CompService {
&& StringUtil.isEmpty(compPO.getCompNo())
&& StringUtil.isEmpty(compPO.getCompNameShort())
&& StringUtil.isEmpty(compPO.getOrgCode())
- && null == compPO.getParentCompany()
+ && null == compPO.getEcCompany()
&& null == compPO.getIndustry()
&& null == compPO.getCompPrincipal()
&& null == compPO.getForbiddenTag());
diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
index 068ec535..07a5b68c 100644
--- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
+++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java
@@ -219,6 +219,26 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
}
params.put("show_order", maxShowOrder + 1);
}
+ // 上级分部
+ String ecCompany = Util.null2String(params.get("ec_company"));
+ if (StringUtils.isNotBlank(ecCompany)) {
+ CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(ecCompany);
+ if (null != jclCompanyId) {
+ params.put("parent_comp", jclCompanyId.getId());
+ }
+ }
+ // 上级部门
+ String ecDepartment = Util.null2String(params.get("ec_department"));
+ if (StringUtils.isNotBlank(ecDepartment)) {
+ DepartmentPO jclDepartmentId = EcHrmRelationUtil.getJclDepartmentId(ecDepartment);
+ if (null != jclDepartmentId) {
+ params.put("parent_dept", jclDepartmentId.getId());
+ // 部门不为空,自动指定所属分部
+ params.put("parent_comp", jclDepartmentId.getParentComp());
+ params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + ""));
+ }
+
+ }
Map syncMap = new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.ADD, params).sync();
String ecCompanyID = Util.null2String(syncMap.get("id"));
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecCompanyID), syncMap.get("message").toString());
@@ -254,10 +274,25 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
deptNo = repeatDetermine(deptNo);
params.put("dept_no", deptNo);
}
- // 根据部门,自动获取正确分部
- DepartmentPO parentDept = getDepartmentMapper().getDeptById(searchParam.getParentDept());
- if (null != parentDept) {
- params.put("parent_comp", parentDept.getParentComp());
+ // 上级分部
+ String ecCompany = Util.null2String(params.get("ec_company"));
+ if (StringUtils.isNotBlank(ecCompany)) {
+ CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(ecCompany);
+ if (null != jclCompanyId) {
+ params.put("parent_comp", jclCompanyId.getId());
+ }
+ }
+ // 上级部门
+ String ecDepartment = Util.null2String(params.get("ec_department"));
+ if (StringUtils.isNotBlank(ecDepartment)) {
+ DepartmentPO jclDepartmentId = EcHrmRelationUtil.getJclDepartmentId(ecDepartment);
+ if (null != jclDepartmentId) {
+ params.put("parent_dept", jclDepartmentId.getId());
+ // 部门不为空,自动指定所属分部
+ params.put("parent_comp", jclDepartmentId.getParentComp());
+ params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + ""));
+ }
+
}
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, params).sync();
// 更新主表数据
@@ -267,6 +302,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
//更新明细表
getExtService(user).updateExtDT(user, EXTEND_TYPE, JCL_ORG_DEPTEXT_DT1, params, searchParam.getId());
+
+ Long parentComp = StringUtils.isNotEmpty(Util.null2String(params.get("parent_comp"))) ? Long.parseLong(Util.null2String(params.get("parent_comp"))) : null;
+ // 刷新岗位所属分部
+ refreshJobComp(searchParam.getId(), parentComp);
+ List childList = getDepartmentMapper().getDeptListByPId(searchParam.getId());
+ forbiddenChildTag(parentComp, childList, false);
+
return searchParam.getId();
}
@@ -299,9 +341,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 简称
SearchConditionItem deptNameShortItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "deptNameShort");
// 所属分部
- SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "161", "parentComp", "compBrowser");
+ SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "ecCompany", "");
// 上级部门
- SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级部门", "161", "parentDept", "deptBrowser");
+ SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级部门", "4", "ecDepartment", "");
// 部门负责人
SearchConditionItem deptPrincipalBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门负责人", "1", "deptPrincipal", "");
// 显示顺序
@@ -405,7 +447,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List getCopyForm() {
List addGroups = new ArrayList<>();
List condition = new ArrayList<>();
- SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "161", "company", "compBrowser");
+ SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "164", "company", "");
compBrowserItem.setRules("required|string");
List selectOptions = new ArrayList<>();
SearchConditionOption Option = new SearchConditionOption("1", "");
@@ -426,6 +468,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
*/
@Override
public int copyDepartment(DeptCopyParam copyParam) {
+ // TODO 是否复制子部门信息,是否复制子部门岗位信息
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notBlank(copyParam.getCompany(), "请指定需要复制的公司/分部");
int insertCount = 0;
@@ -434,11 +477,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
maxShowOrder = null == maxShowOrder ? 0 : maxShowOrder;
for (int i = 0; i < idList.size(); i++) {
DepartmentPO deptById = getDepartmentMapper().getDeptById(idList.get(i));
- deptById.setDeptName(deptById.getDeptName() + "[复制]");
- deptById.setDeptNameShort(deptById.getDeptNameShort() + "[复制]");
+ long timeMillis = System.currentTimeMillis();
+ deptById.setDeptName(deptById.getDeptName() + "_" + timeMillis);
+ deptById.setDeptNameShort(deptById.getDeptNameShort());
// 处理自动编号
- deptById.setDeptNo(CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptById.getDeptNo(), false));
- deptById.setParentComp(Long.parseLong(copyParam.getCompany()));
+ deptById.setDeptNo(CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptById.getDeptNo(), timeMillis));
+ deptById.setParentComp(EcHrmRelationUtil.getJclCompanyId(copyParam.getCompany()).getId());
+ deptById.setEcCompany(Long.parseLong(copyParam.getCompany()));
deptById.setParentDept(null);
// 显示顺序字段
deptById.setShowOrder(maxShowOrder + i + 1);
@@ -461,7 +506,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (maxJobOrder == null) {
maxJobOrder = 0;
}
- recursionCopyJob((long) user.getUID(), jobPOS, deptById.getParentComp(), deptById.getId(), maxJobOrder);
+ recursionCopyJob((long) user.getUID(), jobPOS, deptById.getParentComp(), deptById.getId(), maxJobOrder, timeMillis);
}
}
return insertCount;
@@ -471,7 +516,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List getMergeForm(Long id) {
List addGroups = new ArrayList<>();
List condition = new ArrayList<>();
- SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "合并到部门", "161", "department", "deptBrowser");
+ SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "合并到部门", "4", "department", "");
deptBrowserItem.setRules("required|string");
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
mergeNameItem.setRules("required|string");
@@ -487,13 +532,15 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
@Override
public int mergeDepartment(DepartmentMergeParam mergeParam) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
- int updateCount = 0;
- OrganizationAssert.isFalse(mergeParam.getId().equals(mergeParam.getDepartment()), "所选部门与待合并部门一致,无需操作");
+ int updateCount;
+ Long ecParamDepartment = mergeParam.getDepartment();
+ DepartmentPO jclDepartmentId = EcHrmRelationUtil.getJclDepartmentId(ecParamDepartment + "");
+ Long jclParamDepartment = jclDepartmentId.getId();
+ OrganizationAssert.isFalse(mergeParam.getId().equals(jclParamDepartment), "所选部门与待合并部门一致,无需操作");
OrganizationAssert.notNull(mergeParam.getDepartment(), "请选择需要合并的部门");
OrganizationAssert.notBlank(mergeParam.getMergeName(), "请输入合并后的名称");
// 合并到的部门
- DepartmentPO targetDepartment = getDepartmentMapper().getDeptById(mergeParam.getDepartment());
- Long parentComp = targetDepartment.getParentComp();
+ DepartmentPO targetDepartment = getDepartmentMapper().getDeptById(jclParamDepartment);
Set disableIds = new HashSet<>();
disableIds.add(mergeParam.getId());
@@ -507,8 +554,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
DepartmentPO mergeDepartment = getDepartmentMapper().getDeptById(mergeParam.getId());
mergeDepartment.setDeptName(mergeParam.getMergeName());
mergeDepartment.setDeptNameShort(mergeParam.getMergeName());
- mergeDepartment.setParentDept(mergeParam.getDepartment());
- mergeDepartment.setParentComp(parentComp);
+
+ mergeDepartment.setParentDept(jclParamDepartment);
+ mergeDepartment.setEcDepartment(ecParamDepartment);
+ mergeDepartment.setParentComp(targetDepartment.getParentComp());
+ mergeDepartment.setEcCompany(targetDepartment.getEcCompany());
// 禁用
mergeDepartment.setForbiddenTag(1);
// 更新EC表部门
@@ -523,7 +573,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
refreshJobComp(mergeDepartment.getId(), mergeDepartment.getParentComp());
// 合并后部门及子部门禁用
List deptList = getDepartmentMapper().getDeptListByPId(mergeParam.getId());
- forbiddenChildTag(parentComp, deptList, true);
+ forbiddenChildTag(targetDepartment.getParentComp(), deptList, true);
return updateCount;
}
@@ -531,8 +581,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List getMoveForm() {
List addGroups = new ArrayList<>();
List condition = new ArrayList<>();
- SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择分部", "161", "company", "compBrowser");
- SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "161", "department", "deptBrowser");
+ SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择分部", "164", "company", "");
+ SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "4", "department", "");
List selectOptions = new ArrayList<>();
@@ -560,20 +610,23 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if ("0".equals(moveParam.getMoveType())) {
Long company = moveParam.getCompany();
OrganizationAssert.notNull(company, "请选择要转移到的分部");
- deptById.setParentComp(company);
+ deptById.setEcCompany(company);
+ deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId(company + "")).getId());
deptById.setParentDept(null);
} else if ("1".equals(moveParam.getMoveType())) {
Long department = moveParam.getDepartment();
- OrganizationAssert.notNull(department, "请选择要转移到的部门");
+ Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId(department + "")).getId();
+ OrganizationAssert.notNull(departmentId, "请选择要转移到的部门");
List deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
Set disableIds = new HashSet<>();
disableIds.add(moveParam.getId());
if (CollectionUtils.isNotEmpty(deptListByPId)) {
addDisableIds(disableIds, deptListByPId);
}
- OrganizationAssert.isFalse(disableIds.contains(department), "请勿选择当前部门本身及其子部门");
- deptById.setParentDept(department);
- DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(department);
+ OrganizationAssert.isFalse(disableIds.contains(departmentId), "请勿选择当前部门本身及其子部门");
+ deptById.setParentDept(departmentId);
+ deptById.setEcDepartment(department);
+ DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(departmentId);
deptById.setParentComp(parentDepartment.getParentComp());
}
// 更新EC部门
@@ -599,6 +652,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (CollectionUtils.isNotEmpty(deptList)) {
for (DepartmentPO departmentPO : deptList) {
departmentPO.setParentComp(parentComp);
+ String ecCompanyId = EcHrmRelationUtil.getEcCompanyId(parentComp + "");
+ if (StringUtils.isNotBlank(ecCompanyId)) {
+ departmentPO.setEcCompany(Long.parseLong(ecCompanyId));
+ }
if (isForbidden) {
departmentPO.setForbiddenTag(1);
// 封存EC表部门
@@ -625,7 +682,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
* @return
*/
private boolean isFilter(DepartmentPO departmentPO) {
- return !(StringUtil.isEmpty(departmentPO.getDeptNo()) && StringUtil.isEmpty(departmentPO.getDeptName()) && StringUtil.isEmpty(departmentPO.getDeptNameShort()) && null == departmentPO.getParentComp() && null == departmentPO.getParentDept() && null == departmentPO.getDeptPrincipal() && null == departmentPO.getShowOrder() && null == departmentPO.getForbiddenTag());
+ return !(StringUtil.isEmpty(departmentPO.getDeptNo())
+ && StringUtil.isEmpty(departmentPO.getDeptName())
+ && StringUtil.isEmpty(departmentPO.getDeptNameShort())
+ && null == departmentPO.getEcCompany()
+ && null == departmentPO.getEcDepartment()
+ && null == departmentPO.getParentComp()
+ && null == departmentPO.getParentDept()
+ && null == departmentPO.getDeptPrincipal()
+ && null == departmentPO.getShowOrder()
+ && null == departmentPO.getForbiddenTag());
}
@@ -709,11 +775,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
* @param parentDeptId
* @param orderNum
*/
- private void recursionCopyJob(Long creator, List jobPOS, Long parentCompId, Long parentDeptId, int orderNum) {
+ private void recursionCopyJob(Long creator, List jobPOS, Long parentCompId, Long parentDeptId, int orderNum, long timeMillis) {
for (JobPO jobPO : jobPOS) {
orderNum++;
// 处理自动编号
- jobPO.setJobNo(CodeRuleUtil.generateCode(RuleCodeType.JOBTITLES, jobPO.getJobNo(), false));
+ jobPO.setJobNo(CodeRuleUtil.generateCode(RuleCodeType.JOBTITLES, jobPO.getJobNo(), timeMillis));
jobPO.setParentDept(parentDeptId);
jobPO.setCreator(creator);
jobPO.setCreateTime(new Date());
@@ -725,7 +791,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 处理子级元素
List jobsByPid = MapperProxyFactory.getProxy(JobMapper.class).getJobsByPid(jobPO.getId());
if (CollectionUtils.isNotEmpty(jobsByPid)) {
- recursionCopyJob(creator, jobsByPid, parentCompId, parentDeptId, orderNum);
+ recursionCopyJob(creator, jobsByPid, parentCompId, parentDeptId, orderNum, timeMillis);
}
}
}
diff --git a/src/com/engine/organization/service/impl/ExtServiceImpl.java b/src/com/engine/organization/service/impl/ExtServiceImpl.java
index ab1f7ff1..429452ca 100644
--- a/src/com/engine/organization/service/impl/ExtServiceImpl.java
+++ b/src/com/engine/organization/service/impl/ExtServiceImpl.java
@@ -62,7 +62,7 @@ public class ExtServiceImpl extends Service implements ExtService {
// 2编辑 1查看
OrganizationAssert.notNull(groupId, "请选择对应的拓展页");
- List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, ExtendInfoOperateType.EDIT.getValue(), "1");
+ List infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, 1 == viewAttr ? ExtendInfoOperateType.LIST.getValue() : ExtendInfoOperateType.EDIT.getValue(), "1");
String fields = infoPOList.stream().map(ExtendInfoPO::getFieldName).collect(Collectors.joining(","));
if (StringUtils.isEmpty(fields)) {
return conditionItems;
diff --git a/src/com/engine/organization/service/impl/GradeServiceImpl.java b/src/com/engine/organization/service/impl/GradeServiceImpl.java
index 6919317c..7c851cd1 100644
--- a/src/com/engine/organization/service/impl/GradeServiceImpl.java
+++ b/src/com/engine/organization/service/impl/GradeServiceImpl.java
@@ -137,7 +137,7 @@ public class GradeServiceImpl extends Service implements GradeService {
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser");
schemeBrowserItem.setRules("required|string");
BrowserBean schemeBrowserBean = schemeBrowserItem.getBrowserConditionParam();
- if (!"-1".equals(schemeId) && StringUtil.isEmpty(id)) {
+ if (StringUtils.isNotBlank(schemeId) && !"-1".equals(schemeId) && StringUtil.isEmpty(id)) {
schemeBrowserBean.setValue(schemeId);
List