From 7f15f6f8ba97ea84f6a73bfad87b4ee261491a01 Mon Sep 17 00:00:00 2001 From: Mlin Date: Wed, 5 Jul 2023 10:40:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=98=89=E5=85=86bug=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/jclorgmap/JclOrgMapper.xml | 33 +++++++++++++++++++ .../mapper/resource/ResourceMapper.xml | 5 ++- .../service/impl/OrgChartServiceImpl.java | 2 +- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml b/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml index dcab7ff4..fc52c6dd 100644 --- a/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml +++ b/src/com/engine/organization/mapper/jclorgmap/JclOrgMapper.xml @@ -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 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 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 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 + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/resource/ResourceMapper.xml b/src/com/engine/organization/mapper/resource/ResourceMapper.xml index 280bd46f..e9b25f85 100644 --- a/src/com/engine/organization/mapper/resource/ResourceMapper.xml +++ b/src/com/engine/organization/mapper/resource/ResourceMapper.xml @@ -155,9 +155,8 @@ AND t.last_name like '%'+#{param.lastName}+'%' - + select a.id,a.workcode,a.lastName,a.sex,a.accountType,a.belongTo,a.departmentId from hrmresource a where a.MANAGERID=#{managerId} and a.DEPARTMENTID=#{deptId} diff --git a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java index 70955a68..2d29a7c1 100644 --- a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java @@ -567,7 +567,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { RecordSet rs = new RecordSet(); rs.execute("select c.id as id,c.departmentid as departmentid from hrmdepartment a \n" + "inner join hrmdepartmentdefined b on a.id=b.DEPTID\n" + - "inner join hrmresource c on b.BMFZR=c.id "); + "inner join hrmresource c on cast(b.BMFZR as varchar(10))=cast(c.ID as varchar(10)) ");//sqlserver版 while (rs.next()) { //同步人员信息 syncHrmResource(rs.getString("id"),rs.getString("departmentid"),3);