|
@@ -302,11 +302,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectTargetAndActual" parameterType="java.lang.String" resultType="com.ruoyi.powerdistribution.domain.vo.StopTargetAndRecords">
|
|
|
select t1.*,
|
|
|
- t2.stop_total_actual,
|
|
|
+ ifnull(t2.stop_total_actual,0) stop_total_actual,
|
|
|
CONCAT(round(ifnull(t2.stop_total_actual,0)/t1.stop_time_total*100,2),'%') stop_total_ratio,
|
|
|
- t2.plan_stop_total_actual,
|
|
|
+ ifnull(t2.plan_stop_total_actual,0) plan_stop_total_actual,
|
|
|
CONCAT(round(ifnull(t2.plan_stop_total_actual,0)/t1.plan_stop_time_total*100,2),'%') plan_stop_ratio,
|
|
|
- t2.error_stop_total_actual,
|
|
|
+ ifnull(t2.error_stop_total_actual,0) error_stop_total_actual,
|
|
|
CONCAT(round(ifnull(t2.error_stop_total_actual,0)/t1.error_stop_time_total*100,2),'%') error_stop_ratio,
|
|
|
ifnull(stop_month_01_actual,0) stop_month_01_actual,
|
|
|
ifnull(stop_month_02_actual,0) stop_month_02_actual,
|
|
@@ -387,9 +387,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
from pdm_stop_targe t1
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
- select std_county_org_nm org_name ,
|
|
|
+ select std_county_org_no,
|
|
|
SUM(poweroff_duration_tm) 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('2111','2112','2121','2122','2141','2211','2212','2221','2231','2241'),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,
|
|
@@ -404,18 +404,18 @@ 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('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('2111','2112','2121','2122','2141','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') 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','2211','2212','2221','2231','2241') and SUBSTRING(data_dt,5,2)='12'),poweroff_duration_tm,0)) as plan_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,
|
|
@@ -431,8 +431,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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
|
|
|
- ) t2 on t1.company_name = t2.org_name
|
|
|
+ GROUP BY std_county_org_no
|
|
|
+ ) t2 on t1.company_no = t2.std_county_org_no
|
|
|
where report_year = #{reportYear}
|
|
|
|
|
|
</select>
|