소스 검색

统计报表排除已禁用的机构

jingyuanchao 1 년 전
부모
커밋
fd9c3903e6

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java

@@ -700,9 +700,9 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社")) {
-            sysOrgList = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgList = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             sysOrgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgTreeListByCurOrgId(orgId, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
         }

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -719,9 +719,9 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社")) {
-            sysOrgList = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgList = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             sysOrgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgTreeListByCurOrgId(orgId, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
         }

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/monitor/service/impl/MonitorAccessReportServiceImpl.java

@@ -113,9 +113,9 @@ public class MonitorAccessReportServiceImpl implements MonitorAccessReportServic
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = remoteOrgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = remoteOrgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = remoteOrgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = remoteOrgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }

+ 8 - 8
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/resumption/service/impl/ResumptionReportServiceImpl.java

@@ -63,9 +63,9 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }
@@ -391,9 +391,9 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }
@@ -522,7 +522,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
         if (null == sysOrg.getType()) {
             return Collections.emptyList();
         }
-        List<SysOrg> sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+        List<SysOrg> sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
 
         //如果查看省联社/地区 数据,那么就展示离行机构数量
         //如果查看行社数据,那么列表上展示离行机构名称
@@ -550,7 +550,7 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             });
         } else {
             for (SysOrg hsOrg : sysOrgs) {
-                List<SysOrg> lhOrgList = orgService.selectOrgByPathAndType(sysOrg.getPath(), OrgTypeEnum.LIHANG_ZIZHU_YINGHANG.getCode(), SecurityConstants.INNER);
+                List<SysOrg> lhOrgList = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), OrgTypeEnum.LIHANG_ZIZHU_YINGHANG.getCode(), SecurityConstants.INNER);
                 for (SysOrg lhOrg : lhOrgList) {
                     CompletableFuture<LhSelfBankInspectionReport> future = CompletableFuture.supplyAsync(() -> {
                         LhSelfBankInspectionReport intrusionTestReportVO = resumptionReportMapper.selectServiceBankReport(null, resumptionDTO, lhOrg.getPath());
@@ -606,9 +606,9 @@ public class ResumptionReportServiceImpl implements ResumptionReportService {
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }

+ 4 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/reportForms/safetyInspect/service/impl/SafetyInspectServiceImpl.java

@@ -68,9 +68,9 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
             return Collections.emptyList();
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }
@@ -196,9 +196,9 @@ public class SafetyInspectServiceImpl implements SafetyInspectService {
             return Collections.EMPTY_LIST;
         }
         if (sysOrg.getType() < 3 || sysOrg.getShortName().endsWith("地区行社") || sysOrg.getType() == 9) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 3, SecurityConstants.INNER);
         } else if (sysOrg.getType() == 3) {
-            sysOrgs = orgService.selectOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
+            sysOrgs = orgService.selectSysOrgByPathAndType(sysOrg.getPath(), 4, SecurityConstants.INNER);
         } else {
             return Collections.emptyList();
         }

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/drill/CoreDrillTaskMapper.xml

@@ -124,7 +124,7 @@
         round(ifnull(avg(t.comment_score),0),2) AS score
         from core_drill_task t inner join sys_org o on t.org_id = o.id
         <where>
-                and o.deleted=0
+                and o.deleted=0 and o.is_lock=0
             <if test="request.orgPath != null">
                 and o.path like concat(#{request.orgPath}, '%')
             </if>

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/edu/CoreEduTrainingTaskMapper.xml

@@ -148,7 +148,7 @@
         ifnull(SUM(t.status = 2),0) AS finish
         from core_edu_training_task t inner join sys_org o on t.org_id = o.id
         <where>
-                and o.deleted=0
+                and o.deleted=0 and o.is_lock=0
             <if test="request.orgPath != null">
                 and o.path like concat(#{request.orgPath}, '%')
             </if>

+ 1 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/MonitorAccessReportMapper.xml

@@ -31,7 +31,7 @@
         b.id
     </select>
     <select id="selectOrgNumByPathAndType" resultType="java.lang.Integer">
-        SELECT COUNT(1) FROM sys_org WHERE path LIKE  concat( #{orgPath}, '%') AND type=#{orgType} AND deleted=0
+        SELECT COUNT(1) FROM sys_org WHERE path LIKE  concat( #{orgPath}, '%') AND type=#{orgType} AND deleted=0 AND is_lock=0
     </select>
     <select id="selectAll" resultType="com.xunmei.core.reportForms.monitor.vo.MonitoringAccessVO">
         SELECT

+ 6 - 6
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/ResumptionReportMapper.xml

@@ -82,7 +82,7 @@
                 exception_reform_count
             FROM
             core_resumption r
-            INNER JOIN sys_org o ON r.org_id = o.id AND o.deleted = 0
+            INNER JOIN sys_org o ON r.org_id = o.id AND o.deleted = 0 and o.is_lock =0
             LEFT JOIN core_resumption_plan b ON r.plan_id = b.id
         WHERE
             r.type = 2 and b.plan_exec in (2,3,4)
@@ -145,7 +145,7 @@
                     (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11,13)) as exception_reform_count
                     FROM
                     core_resumption r
-                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0
+                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
                 INNER JOIN core_resumption_plan b ON r.plan_id = b.id
                 WHERE
                 b.plan_type =4
@@ -197,7 +197,7 @@
                 (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11,13)) as exception_reform_count
             FROM
                 core_resumption r
-                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0
+                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
                 LEFT JOIN core_resumption_plan b ON r.plan_id = b.id
             WHERE
                 b.plan_type =5
@@ -257,7 +257,7 @@
                 (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11,13)) as exception_reform_count
             FROM
                 core_resumption r
-                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0
+                INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
                 INNER JOIN core_resumption_plan b ON r.plan_id = b.id
             WHERE
                 b.plan_type =6
@@ -295,7 +295,7 @@
         ) AS realityRectificationRate
         FROM
                 core_resumption a
-                INNER JOIN sys_org o ON a.org_id=o.id AND o.deleted=0
+                INNER JOIN sys_org o ON a.org_id=o.id AND o.deleted=0 and o.is_lock=0
                 LEFT JOIN core_resumption_plan b ON a.plan_id = b.id
                 LEFT JOIN core_question c ON c.src_task_id = a.id
         WHERE
@@ -340,7 +340,7 @@
         ) AS realityRectificationRate
         FROM
         core_resumption a
-        INNER JOIN sys_org o ON a.org_id=o.id AND o.deleted=0
+        INNER JOIN sys_org o ON a.org_id=o.id AND o.deleted=0 and o.is_lock=0
         LEFT JOIN core_resumption_plan b ON a.plan_id = b.id
         LEFT JOIN core_question c ON c.src_task_id = a.id
         WHERE

+ 6 - 6
soc-modules/soc-modules-core/src/main/resources/mapper/reportForms/SafetyInspectMapper.xml

@@ -93,7 +93,7 @@
         INNER JOIN sys_org b ON a.org_id = b.id
         INNER JOIN core_safecheck_plan c ON a.plan_id = c.id
         WHERE
-        a.deleted = 0 and b.deleted=0
+        a.deleted = 0 and b.deleted=0 and b.is_lock=0
         AND c.check_type =4
           <if test="orgId !=null">
               and a.org_id=#{orgId}
@@ -131,7 +131,7 @@
         INNER JOIN core_safecheck_plan b ON a.plan_id = b.id
         INNER JOIN sys_org c ON a.org_id = c.id
         WHERE
-        a.deleted = 0
+        a.deleted = 0 and c.deleted=0 and c.is_lock=0
           <if test="orgId !=null">
               and a.org_id =#{orgId}
           </if>
@@ -178,7 +178,7 @@
         LEFT JOIN core_safecheck_plan d ON c.plan_id=d.id
         WHERE
             a.src_type = 2
-        AND d.check_type =#{type}
+        AND d.check_type =#{type} and b.deleted=0 and b.is_lock=0
           <if test="orgId !=null">
               and a.org_id =#{orgId}
           </if>
@@ -221,7 +221,7 @@
         INNER JOIN sys_org b ON a.org_id = b.id
         INNER JOIN core_safecheck_plan c ON a.plan_id = c.id
         WHERE
-        a.deleted = 0 and b.deleted=0
+        a.deleted = 0 and b.deleted=0 and b.is_lock=0
         AND c.check_type =3
         <if test="orgId !=null">
             and a.org_id =#{orgId}
@@ -259,7 +259,7 @@
         INNER JOIN core_safecheck_plan b ON a.plan_id = b.id
         INNER JOIN sys_org c ON a.org_id = c.id
         WHERE
-        a.deleted = 0  and c.deleted = 0
+        a.deleted = 0  and c.deleted = 0 and c.is_lock=0
           <if test="orgId !=null">
               and a.org_id =#{orgId}
           </if>
@@ -284,7 +284,7 @@
         INNER JOIN core_safecheck_plan b ON a.plan_id = b.id
         INNER JOIN sys_org c ON a.org_id = c.id
         WHERE
-        a.deleted = 0  and c.deleted = 0
+        a.deleted = 0  and c.deleted = 0 and c.is_lock=0
         AND a.`status` =3
           <if test="orgId !=null">
               and a.org_id=#{orgId}