luojun 2 سال پیش
والد
کامیت
80554641d5
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      soc-modules/soc-modules-core/src/main/resources/mapper/safetycheck/CoreSafetyTaskMapper.xml

+ 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">