From b6b37e54641e286d356a4e235bad1513c65eaf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=9C=A8c?= <857448963@qq.com> Date: Mon, 31 Jul 2023 20:07:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E7=9B=91=E7=9D=A3bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/mapper/SupvReportMMapper.java | 2 +- .../mapper/mapping/SupvReportMMapper.xml | 6 +++ .../service/impl/SupvReportMServiceImpl.java | 39 ++++++++++++------- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java index 17ec7cd9b..d32b19fa9 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/SupvReportMMapper.java @@ -21,7 +21,7 @@ import java.util.List; */ public interface SupvReportMMapper extends MppBaseMapper { - List statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType); + List statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType,@Param("effectStatus")List effectStatus); List statisticQueReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType); diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml index f57c10025..31b475044 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/mapper/mapping/SupvReportMMapper.xml @@ -12,6 +12,12 @@ and obj_type = #{objType} + + and effect_Status in + + #{item} + + group by supv_Org_Id diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java index 27fd35688..539a10b70 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvReportMServiceImpl.java @@ -43,6 +43,7 @@ import java.util.Map; import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; /** *

@@ -75,6 +76,11 @@ public class SupvReportMServiceImpl extends MppServiceImpl dictDataUhv = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPV_TYPE.getCode()).getData(); @@ -87,17 +93,17 @@ public class SupvReportMServiceImpl extends MppServiceImpl mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity())); Map mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity())); - List processPublicDTOListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null); - List processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null); - List processPublicDTOListAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null); + List processPublicDTOListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,null); + List processPublicDTOListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null, Stream.of("02","03","04").collect(Collectors.toList())); - List processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null); - List processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null); - List processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null); + List processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null); + List processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); - List processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02"); - List processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02"); - List processPublicDTOListNewZAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02"); + List processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",null); + List processPublicDTOListNewZAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",Stream.of("02","03","04").collect(Collectors.toList())); //换流站问题总数量 @@ -125,9 +131,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTOMingGanM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null); - List processPublicDTOMingGanY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null); - List processPublicDTOMingGanAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null); + List processPublicDTOMingGanM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); + List processPublicDTOMingGanY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null); + List processPublicDTOMingGanAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); //换流站问题总数量 List processPublicDTOQesMingGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null); @@ -138,8 +144,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReport(null,null,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null); //电压 - List processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null); - List processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null); + List processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); + List processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList())); + //本月问题数量和累计问题数量 List processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); List processPublicDTODianYaGanAll = this.baseMapper.statisticQueReport(null,null,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null); @@ -149,6 +156,10 @@ public class SupvReportMServiceImpl extends MppServiceImpl supvReportMBatch = new ArrayList<>(); for(DeptGetBase deptGetBase : deptGetBaseList){ + + if(deptGetBase.getUnitName().equals("国家电网公司")){ + System.out.println(55); + } if(deptGetBase.getDeptLevel() !=2 && deptGetBase.getDeptLevel() !=3 && deptGetBase.getDeptLevel() !=4){ continue; }