|
@@ -219,14 +219,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM uims_user a
|
|
|
<include refid="sysAreaJoins"/>
|
|
|
where a.status=1
|
|
|
- <if test="compayId != null and compayId != ''">
|
|
|
+ <if test="compayId != null and compayId != '' and deptId != null and deptId != ''">
|
|
|
and (
|
|
|
a.COMPANY_ORG_ID = #{compayId}
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
- or a.DEPT_ORG_ID = #{deptId}
|
|
|
+ and a.DEPT_ORG_ID in (#{ids})
|
|
|
</if>
|
|
|
)
|
|
|
</if>
|
|
|
+ <if test="compayId != null and compayId != '' and (deptId == null or deptId ==0 )">
|
|
|
+ and (
|
|
|
+ a.COMPANY_ORG_ID = #{compayId}
|
|
|
+ and (a.DEPT_ORG_ID is null or a.DEPT_ORG_ID =0)
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="findUserIdsByPermissonOrg" resultType="java.lang.Integer">
|