|
@@ -306,8 +306,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
(
|
|
(
|
|
select std_county_org_nm org_name ,
|
|
select std_county_org_nm org_name ,
|
|
SUM(poweroff_duration_tm) stop_total_actual,
|
|
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)='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)='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,
|
|
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)='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(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
|
|
from pdm_stop_records
|
|
where SUBSTRING(data_dt,1,4) = #{reportYear}
|
|
where SUBSTRING(data_dt,1,4) = #{reportYear}
|
|
GROUP BY std_county_org_nm
|
|
GROUP BY std_county_org_nm
|