Pārlūkot izejas kodu

气瓶统计,菜单权限修改

xuxiaofei 2 gadi atpakaļ
vecāks
revīzija
7985f55157

+ 3 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabHazardMapper.xml

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