Explorar o código

异常作业逻辑修改

zx hai 5 meses
pai
achega
3d83ea5c14

+ 11 - 2
ruoyi-powerdistribution/src/main/java/com/ruoyi/powerdistribution/service/impl/PdmWorkPlanServiceImpl.java

@@ -132,9 +132,18 @@ public class PdmWorkPlanServiceImpl implements IPdmWorkPlanService
         List<PdmRiskRole> riskRoleList = riskRoleService.selectPdmRiskRoleList(new PdmRiskRole());
         for(PdmWorkPlan plan:list){
             String voltLvlCd =  plan.getVoltLvlCd();
-            if(!"2001008,2001009".contains(voltLvlCd) &&
-                    !("2006001".equals(plan.getIsEnergizedOpCd()) && "2005002".equals(plan.getPoweroffTypCd()) && "2008015".equals(plan.getWorkticketTypCd()))){
+            /**
+             * 1,电压等级为其他的数据
+             * 2.带电是 停电是
+             * 3.带电否 停电否  工作票类型:配电带电作业工作票
+             * 4.停电是  工作票类型:第二种工作票*
+             */
+            if(!"2001008,2001009".contains(voltLvlCd)){
                 plan.setExceptionType("1001");//电压等级异常
+            }else if(("2006001".equals(plan.getIsEnergizedOpCd()) && "2005001".equals(plan.getPoweroffTypCd()))
+            || ("2006002".equals(plan.getIsEnergizedOpCd()) && "2005002".equals(plan.getPoweroffTypCd()) && "2008015".equals(plan.getWorkticketTypCd()))
+            || ("2006001".equals(plan.getIsEnergizedOpCd()) && "2008014".equals(plan.getWorkticketTypCd()))){
+                plan.setExceptionType("1002");//带电作业异常
             }else{
                 //已处理
                 plan.setExceptionType("1");

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

@@ -152,11 +152,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         IFNULL(t.total,0) total,
         IFNULL(t.week_sum,0) week_sum,
         IFNULL(t.week_cancel_sum,0) week_cancel_sum,
-        IFNULL(CONCAT(round((IFNULL(t.week_sum,0)-IFNULL(t.week_cancel_sum,0))/IFNULL(t.week_sum,0)*100,2),'%'),'100%') week_ratio,
+        IFNULL(CONCAT(round((IFNULL(t.week_sum,0)-IFNULL(t.week_cancel_sum,0))/IFNULL(t.week_sum,0)*100,2),'%'),'100.00%') week_ratio,
         IFNULL(t.temporary_sum,0) temporary_sum,
         IFNULL(t.temporary_cancel_sum,0) temporary_cancel_sum,
-        IFNULL(CONCAT(round((IFNULL(t.temporary_sum,0)-IFNULL(t.temporary_cancel_sum,0))/IFNULL(t.temporary_sum,0)*100,2),'%'),'100%') temporary_ratio,
-        IFNULL(CONCAT(round(IFNULL(t.temporary_sum,0)/IFNULL(t.total,0)*100,2),'%'),'100%') temporary_plan_ratio
+        IFNULL(CONCAT(round((IFNULL(t.temporary_sum,0)-IFNULL(t.temporary_cancel_sum,0))/IFNULL(t.temporary_sum,0)*100,2),'%'),'100.00%') temporary_ratio,
+        IFNULL(CONCAT(round(IFNULL(t.temporary_sum,0)/IFNULL(t.total,0)*100,2),'%'),'100.00%') temporary_plan_ratio
         from pdm_work_organ t1
         LEFT JOIN
         (
@@ -179,11 +179,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                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(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.00%')  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
+               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.00%')  temporary_ratio,
+               IFNULL(CONCAT(round(sum(if((plan_typ_cd = '2028002' and plan_exec_st_cd = '2029005'),1,0))/sum(1)*100,2),'%'),'100.00%')  temporary_plan_ratio
         from
             pdm_work_plan
         where

+ 2 - 2
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmStopTargeMapper.xml

@@ -305,9 +305,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                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,
                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,
+               CONCAT(round(ifnull(t2.plan_stop_total_actual,0)/t1.plan_stop_time_total*100,2),'%') plan_stop_total_ratio,
                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,
+               CONCAT(round(ifnull(t2.error_stop_total_actual,0)/t1.error_stop_time_total*100,2),'%') error_stop_total_ratio,
                ifnull(stop_month_01_actual,0) stop_month_01_actual,
                ifnull(stop_month_02_actual,0) stop_month_02_actual,
                ifnull(stop_month_03_actual,0) stop_month_03_actual,