|
@@ -193,29 +193,29 @@
|
|
<if test="userCondition.tenantId != null">and ms.tenant_id = #{userCondition.tenantId}</if>
|
|
<if test="userCondition.tenantId != null">and ms.tenant_id = #{userCondition.tenantId}</if>
|
|
<if test="userCondition.userType!=null and userCondition.userType!=-999 and userCondition.userType!=-9999 and userCondition.programItems != null and userCondition.programItems.size() > 0">
|
|
<if test="userCondition.userType!=null and userCondition.userType!=-999 and userCondition.userType!=-9999 and userCondition.programItems != null and userCondition.programItems.size() > 0">
|
|
<if test="userCondition.permissionType == 5 or userCondition.permissionType == 2">
|
|
<if test="userCondition.permissionType == 5 or userCondition.permissionType == 2">
|
|
- and ( ms.dept_org_id in
|
|
|
|
|
|
+ and ( mi.dept_org_id in
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
#{item.orgId}
|
|
#{item.orgId}
|
|
</foreach>
|
|
</foreach>
|
|
or
|
|
or
|
|
- ms.company_org_id in
|
|
|
|
|
|
+ mi.company_org_id in
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
#{item.orgId}
|
|
#{item.orgId}
|
|
</foreach>
|
|
</foreach>
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
<if test="userCondition.permissionType == 4 or userCondition.permissionType == 3">
|
|
<if test="userCondition.permissionType == 4 or userCondition.permissionType == 3">
|
|
- and ms.dept_org_id in
|
|
|
|
|
|
+ and mi.dept_org_id in
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
#{item.orgId}
|
|
#{item.orgId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="userCondition.permissionType == 1">
|
|
<if test="userCondition.permissionType == 1">
|
|
- and ms.company_org_id in
|
|
|
|
|
|
+ and mi.company_org_id in
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
#{item.orgId}
|
|
#{item.orgId}
|
|
</foreach>
|
|
</foreach>
|
|
- and (ms.dept_org_id is null or ms.dept_org_id =0)
|
|
|
|
|
|
+ and (mi.dept_org_id is null or mi.dept_org_id =0)
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</sql>
|
|
</sql>
|