From 9df334971576d874ea43b7cd2ed03d287869bcad Mon Sep 17 00:00:00 2001 From: dxfeng Date: Sun, 9 Oct 2022 15:36:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9EC=E5=B2=97=E4=BD=8D=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/非标从发SQL脚本/SqlServer.sql | 2 +- .../mapper/hrmresource/SystemDataMapper.xml | 14 ++++++++++++++ .../trigger/cusfielddata/CusFieldDataTrigger.java | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/非标从发SQL脚本/SqlServer.sql b/docs/非标从发SQL脚本/SqlServer.sql index 680dad19..209661b9 100644 --- a/docs/非标从发SQL脚本/SqlServer.sql +++ b/docs/非标从发SQL脚本/SqlServer.sql @@ -60,7 +60,7 @@ update jcl_org_comp set ec_company = ( select eccompany from ( select DISTINCT b update JCL_ORG_DEPT set ec_department = ( select ecdepartment from ( select DISTINCT b.id as parent_dept, c.id as ecdepartment from JCL_ORG_DEPT a inner join JCL_ORG_DEPT b on a.parent_dept = b.id inner join hrmdepartment c on b.uuid = c.uuid ) e where JCL_ORG_DEPT.parent_dept = e.parent_dept ); update JCL_ORG_DEPT set ec_company = ( select eccompany from ( select a.id as id, c.id as eccompany from jcl_org_comp a inner join hrmsubcompany c on a.uuid = c.uuid) e where JCL_ORG_DEPT.parent_comp = e.id ); -- 更新人员jobtitle -update hrmresource set jobtitle = ( select id from HRMJOBTITLES where JOBTITLENAME = ( select JOB_NAME from jcl_org_job where id = ( select FIELD100002 from CUS_FIELDDATA where scope = 'HrmCustomFieldByInfoType' and SCOPEID = '-1' and CUS_FIELDDATA.ID = hrmresource.ID))); +update hrmresource set jobtitle = ( select top 1 id from HRMJOBTITLES where JOBTITLENAME = ( select JOB_NAME from jcl_org_job where id = ( select FIELD100002 from CUS_FIELDDATA where scope = 'HrmCustomFieldByInfoType' and SCOPEID = '-1' and CUS_FIELDDATA.ID = hrmresource.ID))); -- 更新岗位ec_company、ec_department update jcl_org_job set ec_company = (select eccompany from ( select a.id as id, c.id as eccompany from jcl_org_comp a inner join hrmsubcompany c on a.uuid = c.uuid) e where jcl_org_job.parent_comp = e.id ); update jcl_org_job set ec_department = ( select ec_department from ( select a.id as id, c.id as ec_department from jcl_org_dept a inner join hrmdepartment c on a.uuid = c.uuid) e where jcl_org_job.parent_dept = e.id ); diff --git a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml index c73897e8..3fb1909b 100644 --- a/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml +++ b/src/com/engine/organization/mapper/hrmresource/SystemDataMapper.xml @@ -115,6 +115,20 @@ select * from hrmjobtitles where jobtitlename = #{name} + order by created desc limit 1 + + +