|
|
|
@ -353,6 +353,22 @@
|
|
|
|
|
left join jcl_org_grade f on d.${grade}=f.id
|
|
|
|
|
where a.status < 4 and a.MANAGERID=#{managerId} and a.departmentid=#{deptId}
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertResToMapJZ" databaseId="sqlserver">
|
|
|
|
|
insert into jcl_org_map
|
|
|
|
|
(id,ftype,fobjid,uuid,fclass,fclassname,fnumber,fname,fleaderimg,
|
|
|
|
|
fleaderjobid,fleaderjob,fleaderlv,fleaderst,fparentid,fobjparentid,
|
|
|
|
|
fisvitual,fdatebegin,fdateend)
|
|
|
|
|
select a.id+300000000,4,a.id,a.uuid,0,'行政维度',a.workcode,a.LASTNAME,a.messagerurl,
|
|
|
|
|
c.id,c.jobtitlename,e.level_name,f.grade_name, ${parentField},a.MANAGERID,
|
|
|
|
|
0,convert(varchar(100),getDate(),23),'2099-12-31'
|
|
|
|
|
from hrmresource a
|
|
|
|
|
left join jcl_org_job b ON a.JOBTITLE = b.ec_jobTitle and a.subcompanyid1=b.ec_company and a.departmentid=b.ec_department
|
|
|
|
|
left join HrmJobTitles c on b.ec_jobTitle = c.id
|
|
|
|
|
left join cus_fielddata d on a.id = d.id and d.scope='HrmCustomFieldByInfoType' and d.scopeid=3
|
|
|
|
|
left join jcl_org_level e on d.${level}=e.id
|
|
|
|
|
left join jcl_org_grade f on d.${grade}=f.id
|
|
|
|
|
where a.status < 4 and a.MANAGERID=#{managerId} and a.departmentid=#{deptId}
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- 嘉兆:部门负责人初始化 -->
|
|
|
|
|
<insert id="insertBmfzrToMapJZ" databaseId="mysql">
|
|
|
|
|
insert into jcl_org_map
|
|
|
|
@ -371,4 +387,21 @@
|
|
|
|
|
left join jcl_org_level g on f.${level}=g.id
|
|
|
|
|
left join jcl_org_grade h on f.${grade}=h.id
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertBmfzrToMapJZ" databaseId="sqlserver">
|
|
|
|
|
insert into jcl_org_map
|
|
|
|
|
(id,ftype,fobjid,uuid,fclass,fclassname,fnumber,fname,fleaderimg,
|
|
|
|
|
fleaderjobid,fleaderjob,fleaderlv,fleaderst,fparentid,fobjparentid,
|
|
|
|
|
fisvitual,fdatebegin,fdateend,this_dept)
|
|
|
|
|
select c.id+200000000,3,c.id,c.uuid,0,'行政维度',c.workcode,c.LASTNAME,c.messagerurl,
|
|
|
|
|
e.id,e.jobtitlename,g.level_name,h.grade_name, a.id +100000000,a.id,
|
|
|
|
|
0,convert(varchar(100),getDate(),23),'2099-12-31',(case when a.id=c.departmentid then '1' else '0' end) this_dept
|
|
|
|
|
from hrmdepartment a
|
|
|
|
|
inner join hrmdepartmentdefined b on a.id=b.DEPTID and b.zzjgxs=1
|
|
|
|
|
inner join hrmresource c on cast(b.BMFZR as varchar(10))=cast(c.ID as varchar(10))
|
|
|
|
|
left join jcl_org_job d on c.jobtitle = d.ec_jobTitle and c.SUBCOMPANYID1=d.ec_company and c.DEPARTMENTID=d.ec_department
|
|
|
|
|
left join hrmjobtitles e on d.ec_jobTitle=e.id
|
|
|
|
|
left join cus_fielddata f on c.id = f.id and f.scope='HrmCustomFieldByInfoType' and f.scopeid=3
|
|
|
|
|
left join jcl_org_level g on f.${level}=g.id
|
|
|
|
|
left join jcl_org_grade h on f.${grade}=h.id
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|