|
@@ -210,9 +210,10 @@
|
|
|
FROM centerdata_t_forest_importarea a
|
|
|
LEFT JOIN ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
<where>
|
|
|
- <if test="deptId != null and deptId != ''">
|
|
|
- AND FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )
|
|
|
- </if>
|
|
|
+ <choose>
|
|
|
+ <when test="deptId != null and deptId != ''">AND FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</when>
|
|
|
+ <otherwise>${params.dataScope}</otherwise>
|
|
|
+ </choose>
|
|
|
<if test="params.areaName != null and params.areaName != ''">
|
|
|
AND a.area_name like concat('%', #{params.areaName}, '%')
|
|
|
</if>
|