修复组织机构重复问题

dev-7.6.0-portal
fengshuonan 2023-07-15 10:04:37 +08:00
parent 07a63e8252
commit 8ec3f3b4c3
1 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,8 @@
left join hr_position hpos on suorg.position_id = hpos.position_id left join hr_position hpos on suorg.position_id = hpos.position_id
left join hr_organization hrorg on suorg.org_id = hrorg.org_id left join hr_organization hrorg on suorg.org_id = hrorg.org_id
<where> <where>
<if test="sysUserRequest.realName != null and sysUserRequest.realName != ''"> <if test="sysUserRequest.realName != null and sysUserRequest.realName != ''">
and suser.real_name like concat('%',#{sysUserRequest.realName},'%') and suser.real_name like concat('%',#{sysUserRequest.realName},'%')
</if> </if>
@ -35,9 +37,14 @@
<if test="sysUserRequest.statusFlag != null and sysUserRequest.statusFlag != ''"> <if test="sysUserRequest.statusFlag != null and sysUserRequest.statusFlag != ''">
and suser.status_flag like concat('%',#{sysUserRequest.statusFlag},'%') and suser.status_flag like concat('%',#{sysUserRequest.statusFlag},'%')
</if> </if>
<if test="sysUserRequest.orgId != null and sysUserRequest.orgId != ''"> <if test="sysUserRequest.orgId != null and sysUserRequest.orgId != ''">
and suorg.org_id in (select org_id from hr_organization where org_pids like CONCAT('%$[',#{sysUserRequest.orgId},'$]%') escape '$' or org_id=#{sysUserRequest.orgId} ) and suorg.org_id in (select org_id from hr_organization where org_pids like CONCAT('%$[',#{sysUserRequest.orgId},'$]%') escape '$' or org_id=#{sysUserRequest.orgId} )
</if> </if>
<if test="sysUserRequest.orgId == null or sysUserRequest.orgId == ''">
and suorg.main_flag = 'Y'
</if>
<if test="sysUserRequest.scopeOrgIds != null and sysUserRequest.scopeOrgIds.size() > 0"> <if test="sysUserRequest.scopeOrgIds != null and sysUserRequest.scopeOrgIds.size() > 0">
and suorg.org_id in and suorg.org_id in
<foreach item="item" collection="sysUserRequest.scopeOrgIds" index="index" open="(" separator="," close=")"> <foreach item="item" collection="sysUserRequest.scopeOrgIds" index="index" open="(" separator="," close=")">