@@ -485,6 +485,9 @@
inner join sys_dept t on s.`build_id` = t.`dept_id`
<where>
1=1
+ <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>