嘉兆bug优化

feature/jiazhao
Mlin 2 years ago
parent 069f943d9a
commit 7f15f6f8ba

@ -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 &lt; 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>

@ -155,9 +155,8 @@
AND t.last_name like '%'+#{param.lastName}+'%'
</if>
</sql>
<select id="getHrmByManagerIdAndDeptId" resultType="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
select
a.id,a.workcode,a.lastName,a.sex,a.accountType,a.belongTo,a.departmentId
<select id="getHrmByManagerIdAndDeptId" resultType="com.engine.organization.entity.hrmresource.po.HrmResourcePO" databaseId="sqlserver">
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}
</select>

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

Loading…
Cancel
Save