|
@@ -630,6 +630,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="getWorkNumStatisticsHome" resultType="com.ruoyi.powerdistribution.domain.vo.WorkNumStatisticsHome">
|
|
<select id="getWorkNumStatisticsHome" resultType="com.ruoyi.powerdistribution.domain.vo.WorkNumStatisticsHome">
|
|
select
|
|
select
|
|
t1.organ_abbr company,
|
|
t1.organ_abbr company,
|
|
|
|
+ t1.organ_name submit_org_nm,
|
|
IFNULL(t2.plan_sum,0) plan_sum,
|
|
IFNULL(t2.plan_sum,0) plan_sum,
|
|
IFNULL(t2.cancel_sum,0) cancel_sum,
|
|
IFNULL(t2.cancel_sum,0) cancel_sum,
|
|
IFNULL(t2.execute_ratio,'0%') execute_ratio,
|
|
IFNULL(t2.execute_ratio,'0%') execute_ratio,
|
|
@@ -648,16 +649,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
sum(if(op_risk_lvl_cd = '2007003',1,0)) plan_sum_3,
|
|
sum(if(op_risk_lvl_cd = '2007003',1,0)) plan_sum_3,
|
|
sum(if(op_risk_lvl_cd = '2007004',1,0)) plan_sum_4,
|
|
sum(if(op_risk_lvl_cd = '2007004',1,0)) plan_sum_4,
|
|
sum(if(op_risk_lvl_cd = '2007005',1,0)) plan_sum_5,
|
|
sum(if(op_risk_lvl_cd = '2007005',1,0)) plan_sum_5,
|
|
|
|
+ submit_org_id,
|
|
submit_org_nm
|
|
submit_org_nm
|
|
from
|
|
from
|
|
ads_cst_hywzqlc_pdmworkplan_df
|
|
ads_cst_hywzqlc_pdmworkplan_df
|
|
where date_format(plan_start_wk_tm,'%Y%m%d') >= #{startDate}
|
|
where date_format(plan_start_wk_tm,'%Y%m%d') >= #{startDate}
|
|
and date_format(plan_start_wk_tm,'%Y%m%d') <= #{endDate}
|
|
and date_format(plan_start_wk_tm,'%Y%m%d') <= #{endDate}
|
|
- GROUP BY submit_org_nm
|
|
|
|
|
|
+ GROUP BY submit_org_id,submit_org_nm
|
|
) t2 on t1.organ_name = t2.submit_org_nm
|
|
) t2 on t1.organ_name = t2.submit_org_nm
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getWorkNumStatisticsHomeChild" resultType="com.ruoyi.powerdistribution.domain.vo.WorkNumStatisticsHomeChild">
|
|
|
|
+ SELECT
|
|
|
|
+ submit_org_nm,
|
|
|
|
+ const_org_nm,
|
|
|
|
+ sum(1) plan_sum,
|
|
|
|
+ sum(if(plan_exec_st_cd = '2029005',1,0)) cancel_sum,
|
|
|
|
+ CONCAT(ROUND(sum(if(plan_exec_st_cd != '2029005',1,0))/sum(1)*100,2),'%') execute_ratio,
|
|
|
|
+ sum(if(risk_type not in ('0,','1'),1,0)) risk_sum,
|
|
|
|
+ sum(if(op_risk_lvl_cd = '2007003',1,0)) plan_sum_3,
|
|
|
|
+ sum(if(op_risk_lvl_cd = '2007004',1,0)) plan_sum_4,
|
|
|
|
+ sum(if(op_risk_lvl_cd = '2007005',1,0)) plan_sum_5
|
|
|
|
+
|
|
|
|
+ from
|
|
|
|
+ ads_cst_hywzqlc_pdmworkplan_df
|
|
|
|
+ where submit_org_nm = #{submitOrgNm}
|
|
|
|
+ and date_format(plan_start_wk_tm,'%Y%m%d') >= #{startDate}
|
|
|
|
+ and date_format(plan_start_wk_tm,'%Y%m%d') <= #{endDate}
|
|
|
|
+ GROUP BY submit_org_nm,const_org_nm
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="selectWorkPlanStatistics" resultType="com.ruoyi.powerdistribution.domain.vo.WorkPlanStatistics">
|
|
<select id="selectWorkPlanStatistics" resultType="com.ruoyi.powerdistribution.domain.vo.WorkPlanStatistics">
|
|
select proj_id,
|
|
select proj_id,
|
|
sum(if(volt_lvl_cd = '2001008' and ((op_content like '%新建%' and op_content like '%电缆%') or (op_content like '%更换%' and op_content like '%电缆%')or (op_content like '%拆除%' and op_content like '%电缆%')),1,0)) line_cable_new_accu_qt_work,
|
|
sum(if(volt_lvl_cd = '2001008' and ((op_content like '%新建%' and op_content like '%电缆%') or (op_content like '%更换%' and op_content like '%电缆%')or (op_content like '%拆除%' and op_content like '%电缆%')),1,0)) line_cable_new_accu_qt_work,
|