Przeglądaj źródła

气瓶统计,危险源统计院级权限添加

xuxiaofei 2 lat temu
rodzic
commit
1dec1f7abb

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

@@ -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>