Pārlūkot izejas kodu

统一统计报表中问题整改数的统计逻辑:已整改数量统计: 已整改数

zhulu 9 mēneši atpakaļ
vecāks
revīzija
514a3f24bc

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

@@ -78,7 +78,7 @@
             SELECT
                 r.*,
                 b.plan_exec as planExec,
-                (SELECT COUNT(d.id) FROM core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11,13)) AS
+                (SELECT COUNT(d.id) FROM core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11)) AS
                 exception_reform_count
             FROM
             core_resumption r
@@ -142,7 +142,7 @@
                 SELECT
                     r.*,
                     b.plan_type,
-                    (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
+                    (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11)) as exception_reform_count
                     FROM
                     core_resumption r
                 INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
@@ -194,7 +194,7 @@
             SELECT
                 r.*,
                 b.plan_type,
-                (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
+                (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11)) as exception_reform_count
             FROM
                 core_resumption r
                 INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
@@ -254,7 +254,7 @@
             SELECT
                 r.*,
                 b.plan_type,
-                (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
+                (SELECT COUNT(d.id) from core_question d WHERE r.id = d.src_task_id AND d.reform_status IN (11)) as exception_reform_count
             FROM
                 core_resumption r
                 INNER JOIN sys_org o ON r.org_id=o.id AND o.deleted=0 and o.is_lock=0
@@ -279,14 +279,14 @@
     </select>
     <select id="selectStandbyPowerAbnormalNumber" resultType="java.util.Map">
         SELECT
-            IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 ) AS abnormalNumber,
+            IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 ) AS abnormalNumber,
             IFNULL( SUM( IF ( c.reform_status = 11, 1, 0 )), 0 ) AS realityRectificationNumber,
         IFNULL(
         CONCAT(
         ROUND(
         SUM(
         IF
-        ( c.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 )* 100,
+        ( c.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 )* 100,
         2
         ),
         '%'
@@ -324,14 +324,14 @@
     </select>
     <select id="selectIntrusionTestAbnormalNumber" resultType="java.util.Map">
         SELECT
-        IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 ) AS abnormalNumber,
+        IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 ) AS abnormalNumber,
         IFNULL( SUM( IF ( c.reform_status = 11, 1, 0 )), 0 ) AS realityRectificationNumber,
         IFNULL(
         CONCAT(
         ROUND(
         SUM(
         IF
-        ( c.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 )* 100,
+        ( c.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 )* 100,
         2
         ),
         '%'

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

@@ -157,14 +157,14 @@
     </select>
     <select id="pitfallDimension" resultType="java.util.Map">
         SELECT
-        IFNULL( SUM( IF ( a.confirm_status >= 2 AND a.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 ) AS pitfallNumber,
+        IFNULL( SUM( IF ( a.confirm_status >= 2 AND a.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 ) AS pitfallNumber,
         IFNULL( SUM( IF ( a.reform_status = 11, 1, 0 )), 0 ) AS rectificationNumber,
         IFNULL(
         CONCAT(
         ROUND(
         SUM(
         IF
-        ( a.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( a.confirm_status >= 2 AND a.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 )* 100,
+        ( a.reform_status = 11, 1, 0 ))/ IFNULL( SUM( IF ( a.confirm_status >= 2 AND a.reform_status IN ( 10, 11,12,13 ), 1, 0 ) ), 0 )* 100,
         2
         ),
         '%'