|
|
|
@ -850,14 +850,14 @@ |
|
|
|
AND ( |
|
|
|
(u.law_certificate_num is not null AND u.law_certificate_num !="") |
|
|
|
or (d.`zone` = 5 or d.`zone` = 15) |
|
|
|
<if test="deptId != null"> |
|
|
|
<if test="userName != null and userName != ''"> |
|
|
|
or EXISTS ( |
|
|
|
SELECT 1 FROM sys_dept anc |
|
|
|
WHERE (anc.`zone` = 5 OR anc.`zone` = 15) |
|
|
|
AND FIND_IN_SET(anc.dept_id, d.ancestors) |
|
|
|
) |
|
|
|
</if> |
|
|
|
<if test="deptId == null"> |
|
|
|
<if test="userName == null or userName == ''"> |
|
|
|
or (d.parent_id in (select dept_id from sys_dept where `zone` = 5 or `zone` = 15)) |
|
|
|
</if> |
|
|
|
) |
|
|
|
@ -902,14 +902,14 @@ |
|
|
|
AND ( |
|
|
|
(u.law_certificate_num is not null AND u.law_certificate_num !="") |
|
|
|
or (d.`zone` = 5 or d.`zone` = 15) |
|
|
|
<if test="deptId != null"> |
|
|
|
<if test="userName != null and userName != ''"> |
|
|
|
or EXISTS ( |
|
|
|
SELECT 1 FROM sys_dept anc |
|
|
|
WHERE (anc.`zone` = 5 OR anc.`zone` = 15) |
|
|
|
AND FIND_IN_SET(anc.dept_id, d.ancestors) |
|
|
|
) |
|
|
|
</if> |
|
|
|
<if test="deptId == null"> |
|
|
|
<if test="userName == null or userName == ''"> |
|
|
|
or (d.parent_id in (select dept_id from sys_dept where `zone` = 5 or `zone` = 15)) |
|
|
|
</if> |
|
|
|
) |
|
|
|
|