|
@@ -176,16 +176,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
) t on t1.organ_name = t.submit_org_nm
|
|
) t on t1.organ_name = t.submit_org_nm
|
|
UNION ALL
|
|
UNION ALL
|
|
SELECT '总计' company,
|
|
SELECT '总计' company,
|
|
- sum(1) total,
|
|
|
|
- sum(if(plan_typ_cd = '2028001',1,0)) week_sum,
|
|
|
|
- sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd = '2029005'),1,0)) week_cancel_sum,
|
|
|
|
- IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028001',1,0))*100,2),'%'),'100%') week_ratio,
|
|
|
|
- sum(if(plan_typ_cd = '2028002',1,0)) temporary_sum,
|
|
|
|
- sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0)) temporary_cancel_sum,
|
|
|
|
- IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028002',1,0))*100,2),'%'),'100%') temporary_ratio,
|
|
|
|
- IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0))/sum(1)*100,2),'%'),'100%') temporary_plan_ratio
|
|
|
|
|
|
+ count(1) total,
|
|
|
|
+ IFNULL(sum(if(plan_typ_cd = '2028001',1,0)),0) week_sum,
|
|
|
|
+ IFNULL(sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd = '2029005'),1,0)),0) week_cancel_sum,
|
|
|
|
+ IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028001' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028001',1,0))*100,2),'%'),'100%') week_ratio,
|
|
|
|
+ IFNULL(sum(if(plan_typ_cd = '2028002',1,0)),0) temporary_sum,
|
|
|
|
+ IFNULL(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0)),0) temporary_cancel_sum,
|
|
|
|
+ IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd != '2029005'),1,0))/sum(if(plan_typ_cd = '2028002',1,0))*100,2),'%'),'100%') temporary_ratio,
|
|
|
|
+ IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0))/sum(1)*100,2),'%'),'100%') temporary_plan_ratio
|
|
from
|
|
from
|
|
- pdm_work_plan
|
|
|
|
|
|
+ pdm_work_plan
|
|
where
|
|
where
|
|
date_format(plan_start_wk_tm,'%Y%m%d') >= #{startDate}
|
|
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}
|