|
|
|
@ -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 );
|
|
|
|
|