luojun 2 жил өмнө
parent
commit
80554641d5

+ 7 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

@@ -228,6 +228,13 @@
             and t.status =#{task.status}
         </if>
 
+        <if test="task.checkSub==false">
+            and t.check_org_id=#{task.orgId}
+        </if>
+        <if test="task.checkSub==true">
+            and t.check_org_id in (select id from sys_org
+            where path like concat((select path from sys_org where id=#{task.orgId}),'%'))
+        </if>
         <if test="task.checkOrgIds!=null and task.checkOrgIds.size>0">
             and t.org_id in
             <foreach collection="task.checkOrgIds" close=")" open="(" separator="," item="id">