@@ -523,6 +523,9 @@
<if test="hazardId != null ">
AND h.id = #{hazardId}
</if>
+ <if test="deptId != null and deptId !=''"> <!-- 部门id-->
+ and ( s.dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE find_in_set(#{deptId} ,ancestors )) or s.dept_id = #{deptId} )
+ </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>