|
|
@ -637,16 +637,17 @@ |
|
|
|
<if test="startTime != '' and endTime != ''"> |
|
|
|
AND DATE_FORMAT( u.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} and #{endTime} |
|
|
|
</if> |
|
|
|
) USER |
|
|
|
WHERE |
|
|
|
USER.DEPT_ID IN |
|
|
|
and u.DEPT_ID IN |
|
|
|
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
<if test="realName != '' and realName != null">and USER.real_name like '%${realName}%'</if> |
|
|
|
<if test="nickname != '' and nickname != null">and USER.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and USER.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and USER.identity_no like '%${identityNo}%'</if> |
|
|
|
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if> |
|
|
|
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if> |
|
|
|
) USER |
|
|
|
WHERE |
|
|
|
1 = 1 |
|
|
|
<if test="streetId != '' and streetId != null"> |
|
|
|
AND (find_in_set(#{streetId},USER.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},USER.ALL_DEPT_IDS)) |
|
|
@ -749,15 +750,17 @@ |
|
|
|
<if test="startTime != '' and endTime != ''"> |
|
|
|
and DATE_FORMAT(u.CREATED_TIME,'%Y-%m-%d') between #{startTime} and #{endTime} |
|
|
|
</if> |
|
|
|
) user |
|
|
|
where user.DEPT_ID IN |
|
|
|
and u.DEPT_ID IN |
|
|
|
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
<if test="realName != '' and realName != null">and user.real_name like '%${realName}%'</if> |
|
|
|
<if test="nickname != '' and nickname != null">and user.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and user.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and user.identity_no like '%${identityNo}%'</if> |
|
|
|
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if> |
|
|
|
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if> |
|
|
|
) user |
|
|
|
where |
|
|
|
1 = 1 |
|
|
|
|
|
|
|
<if test="streetId != '' and streetId != null"> |
|
|
|
AND (find_in_set(#{streetId},user.PARENT_DEPT_IDS) |
|
|
@ -850,14 +853,14 @@ |
|
|
|
CREATED_TIME, |
|
|
|
id |
|
|
|
LIMIT 1 |
|
|
|
)) AS DEPT_ID, |
|
|
|
ifnull( |
|
|
|
IF( u.ALL_DEPT_IDS = '', NULL, u.ALL_DEPT_IDS ), |
|
|
|
( SELECT ALL_DEPT_IDS FROM epdc_user_grid_relation WHERE DEL_FLAG = '0' AND USER_ID = u.ID ORDER BY CREATED_TIME, id LIMIT 1 ) |
|
|
|
) AS ALL_DEPT_IDS |
|
|
|
)) AS DEPT_ID |
|
|
|
FROM |
|
|
|
epdc_user u |
|
|
|
where u.DEL_FLAG = '0' |
|
|
|
<if test="realName != '' and realName != null">and u.real_name like '%${realName}%'</if> |
|
|
|
<if test="nickname != '' and nickname != null">and u.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and u.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and u.identity_no like '%${identityNo}%'</if> |
|
|
|
<if test="startTime != '' and endTime != ''">and DATE_FORMAT(u.CREATED_TIME,'%Y-%m-%d') between #{startTime} and |
|
|
|
#{endTime} |
|
|
|
</if>) user |
|
|
@ -1272,12 +1275,12 @@ |
|
|
|
<if test="nickname != '' and nickname != null">and uu.NICKNAME like '%${nickname}%'</if> |
|
|
|
<if test="mobile != '' and mobile != null">and uu.mobile like '%${mobile}%'</if> |
|
|
|
<if test="identityNo != '' and identityNo != null">and uu.identity_no like '%${identityNo}%'</if> |
|
|
|
) user |
|
|
|
where user.DEL_FLAG = '0' |
|
|
|
AND user.dept_id IN |
|
|
|
AND uu.dept_id IN |
|
|
|
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
) user |
|
|
|
where user.DEL_FLAG = '0' |
|
|
|
|
|
|
|
<if test="streetId != '' and streetId != null"> |
|
|
|
AND (find_in_set(#{streetId},user.PARENT_DEPT_IDS) |
|
|
|