兼容EC岗位名称重复
This commit is contained in:
parent
a7a3d1e0e5
commit
9df3349715
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -115,6 +115,20 @@
|
|||
select *
|
||||
from hrmjobtitles
|
||||
where jobtitlename = #{name}
|
||||
order by created desc limit 1
|
||||
</select>
|
||||
<select id="getHrmJobTitleByName" resultMap="RecordMap" databaseId="sqlserver">
|
||||
select top 1 *
|
||||
from hrmjobtitles
|
||||
where jobtitlename = #{name}
|
||||
order by created desc
|
||||
</select>
|
||||
<select id="getHrmJobTitleByName" resultMap="RecordMap" databaseId="oracle">
|
||||
select *
|
||||
from hrmjobtitles
|
||||
where jobtitlename = #{name}
|
||||
and rownum < 2
|
||||
order by created desc
|
||||
</select>
|
||||
<select id="getHrmResourceIds" resultType="java.lang.Long">
|
||||
select id
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class CusFieldDataTrigger {
|
|||
}
|
||||
|
||||
// field100001更新,职等职级
|
||||
if (null != sourceField100001 && sourceField100001.split("A").length == 3 && !sourceField100001.equals(directionData.getField100001())) {
|
||||
if (null != sourceField100001 && sourceField100001.split("A").length == 3) {
|
||||
directionData.setField100001(sourceField100001);
|
||||
String[] field100001Array = sourceField100001.split("A");
|
||||
// 职等
|
||||
|
|
@ -145,7 +145,7 @@ public class CusFieldDataTrigger {
|
|||
}
|
||||
|
||||
|
||||
if (null != sourceField100003 && sourceField100003.split("_").length == 2 && !sourceField100003.equals(directionData.getField100003())) {
|
||||
if (null != sourceField100003 && sourceField100003.split("_").length == 2) {
|
||||
directionData.setField100003(sourceField100003);
|
||||
String[] field100003Array = sourceField100003.split("_");
|
||||
long zwId = Long.parseLong(field100003Array[1]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue