Sfoglia il codice sorgente

停电完成情况 提交

zx 5 mesi fa
parent
commit
a0030d8e2e

+ 13 - 0
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/domain/PdmStopRecords.java

@@ -529,6 +529,11 @@ public class PdmStopRecords extends BaseEntity
     @Excel(name = "标准地市单位编码")
     private String stdCityOrgNo;
 
+    /**
+     * 是否专变
+     */
+    private String specificFlag;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -1664,6 +1669,14 @@ public class PdmStopRecords extends BaseEntity
         return stdCityOrgNo;
     }
 
+    public String getSpecificFlag() {
+        return specificFlag;
+    }
+
+    public void setSpecificFlag(String specificFlag) {
+        this.specificFlag = specificFlag;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 26 - 26
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmStopTargeMapper.xml

@@ -306,8 +306,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         (
         select std_county_org_nm org_name ,
         SUM(poweroff_duration_tm) stop_total_actual,
-        SUM(IF(poweroff_nature_cd in('2200'),poweroff_duration_tm,0)) as plan_stop_total_actual,
-        SUM(IF(poweroff_nature_cd in('1101','1201'),poweroff_duration_tm,0)) as error_stop_total_actual,
+        SUM(IF(poweroff_nature_cd in('2111','2112','2121','2122','2141'),poweroff_duration_tm,0)) as plan_stop_total_actual,
+        SUM(IF(poweroff_nature_cd in('1101','1202'),poweroff_duration_tm,0)) as error_stop_total_actual,
         SUM(IF(SUBSTRING(data_dt,5,2)='01',poweroff_duration_tm,0)) as stop_month_01_actual,
         SUM(IF(SUBSTRING(data_dt,5,2)='02',poweroff_duration_tm,0)) as stop_month_02_actual,
         SUM(IF(SUBSTRING(data_dt,5,2)='03',poweroff_duration_tm,0)) as stop_month_03_actual,
@@ -321,31 +321,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SUM(IF(SUBSTRING(data_dt,5,2)='11',poweroff_duration_tm,0)) as stop_month_11_actual,
         SUM(IF(SUBSTRING(data_dt,5,2)='12',poweroff_duration_tm,0)) as stop_month_12_actual,
 
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='01'),poweroff_duration_tm,0)) as plan_stop_month_01_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='02'),poweroff_duration_tm,0)) as plan_stop_month_02_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='03'),poweroff_duration_tm,0)) as plan_stop_month_03_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='04'),poweroff_duration_tm,0)) as plan_stop_month_04_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='05'),poweroff_duration_tm,0)) as plan_stop_month_05_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='06'),poweroff_duration_tm,0)) as plan_stop_month_06_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='07'),poweroff_duration_tm,0)) as plan_stop_month_07_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='08'),poweroff_duration_tm,0)) as plan_stop_month_08_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='09'),poweroff_duration_tm,0)) as plan_stop_month_09_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='10'),poweroff_duration_tm,0)) as plan_stop_month_10_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='11'),poweroff_duration_tm,0)) as plan_stop_month_11_actual,
-        SUM(IF((poweroff_nature_cd in('2200') and SUBSTRING(data_dt,5,2)='12'),poweroff_duration_tm,0)) as plan_stop_month_12_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='01'),poweroff_duration_tm,0)) as plan_stop_month_01_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='02'),poweroff_duration_tm,0)) as plan_stop_month_02_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='03'),poweroff_duration_tm,0)) as plan_stop_month_03_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='04'),poweroff_duration_tm,0)) as plan_stop_month_04_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='05'),poweroff_duration_tm,0)) as plan_stop_month_05_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='06'),poweroff_duration_tm,0)) as plan_stop_month_06_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='07'),poweroff_duration_tm,0)) as plan_stop_month_07_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='08'),poweroff_duration_tm,0)) as plan_stop_month_08_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='09'),poweroff_duration_tm,0)) as plan_stop_month_09_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='10'),poweroff_duration_tm,0)) as plan_stop_month_10_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='11'),poweroff_duration_tm,0)) as plan_stop_month_11_actual,
+        SUM(IF((poweroff_nature_cd in('2111','2112','2121','2122','2141') and SUBSTRING(data_dt,5,2)='12'),poweroff_duration_tm,0)) as plan_stop_month_12_actual,
 
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='01'),poweroff_duration_tm,0)) as error_stop_month_01_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='02'),poweroff_duration_tm,0)) as error_stop_month_02_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='03'),poweroff_duration_tm,0)) as error_stop_month_03_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='04'),poweroff_duration_tm,0)) as error_stop_month_04_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='05'),poweroff_duration_tm,0)) as error_stop_month_05_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='06'),poweroff_duration_tm,0)) as error_stop_month_06_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='07'),poweroff_duration_tm,0)) as error_stop_month_07_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='08'),poweroff_duration_tm,0)) as error_stop_month_08_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='09'),poweroff_duration_tm,0)) as error_stop_month_09_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='10'),poweroff_duration_tm,0)) as error_stop_month_10_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='11'),poweroff_duration_tm,0)) as error_stop_month_11_actual,
-        SUM(IF((poweroff_nature_cd in('1101','1201') and SUBSTRING(data_dt,5,2)='12'),poweroff_duration_tm,0)) as error_stop_month_12_actual
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='01'),poweroff_duration_tm,0)) as error_stop_month_01_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='02'),poweroff_duration_tm,0)) as error_stop_month_02_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='03'),poweroff_duration_tm,0)) as error_stop_month_03_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='04'),poweroff_duration_tm,0)) as error_stop_month_04_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='05'),poweroff_duration_tm,0)) as error_stop_month_05_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='06'),poweroff_duration_tm,0)) as error_stop_month_06_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='07'),poweroff_duration_tm,0)) as error_stop_month_07_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='08'),poweroff_duration_tm,0)) as error_stop_month_08_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='09'),poweroff_duration_tm,0)) as error_stop_month_09_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='10'),poweroff_duration_tm,0)) as error_stop_month_10_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='11'),poweroff_duration_tm,0)) as error_stop_month_11_actual,
+        SUM(IF((poweroff_nature_cd in('1101','1202') and SUBSTRING(data_dt,5,2)='12'),poweroff_duration_tm,0)) as error_stop_month_12_actual
         from pdm_stop_records
         where SUBSTRING(data_dt,1,4) = #{reportYear}
         GROUP BY std_county_org_nm