Pārlūkot izejas kodu

临时取消排序

zx 5 mēneši atpakaļ
vecāks
revīzija
2fc92f7638

+ 12 - 12
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/controller/WeeklyReportController.java

@@ -101,18 +101,18 @@ public class WeeklyReportController extends BaseController {
                    planlist2.add(planWeek);
                }
            });
-           Collections.sort(planlist2, new Comparator<PdmReportPlanWeek>(){
-               public int compare(PdmReportPlanWeek o1, PdmReportPlanWeek o2) {
-                   //按照周计划执行率行升序排列
-                   if((o1.getWeekSum()-o1.getWeekCancelSum())/o1.getWeekSum() > (o2.getWeekSum()-o2.getWeekCancelSum())/o2.getWeekSum()){
-                       return -1;
-                   }
-                   if((o1.getWeekSum()-o1.getWeekCancelSum())/o1.getWeekSum() < (o2.getWeekSum()-o2.getWeekCancelSum())/o2.getWeekSum()){
-                       return 1;
-                   }
-                   return 0;
-               }
-           });
+//           Collections.sort(planlist2, new Comparator<PdmReportPlanWeek>(){
+//               public int compare(PdmReportPlanWeek o1, PdmReportPlanWeek o2) {
+//                   //按照周计划执行率行升序排列
+//                   if((o1.getWeekSum()-o1.getWeekCancelSum())/o1.getWeekSum() > (o2.getWeekSum()-o2.getWeekCancelSum())/o2.getWeekSum()){
+//                       return -1;
+//                   }
+//                   if((o1.getWeekSum()-o1.getWeekCancelSum())/o1.getWeekSum() < (o2.getWeekSum()-o2.getWeekCancelSum())/o2.getWeekSum()){
+//                       return 1;
+//                   }
+//                   return 0;
+//               }
+//           });
            PdmReportPlanWeek lowPdmReportPlan=planlist2.get(planlist2.size()-1);
            lowImplUnit=lowPdmReportPlan.getCompany();
            lowImplRate=lowPdmReportPlan.getWeekRatio();

+ 9 - 9
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmReportPlanDayMapper.xml

@@ -176,16 +176,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ) t on t1.organ_name = t.submit_org_nm
         UNION ALL
         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
-        pdm_work_plan
+            pdm_work_plan
         where
         date_format(plan_start_wk_tm,'%Y%m%d') &gt;= #{startDate}
         and date_format(plan_start_wk_tm,'%Y%m%d') &lt;= #{endDate}