技术监督bug修改

This commit is contained in:
2023-07-31 20:07:36 +08:00
parent 37628315a1
commit b6b37e5464
3 changed files with 32 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ import java.util.List;
*/
public interface SupvReportMMapper extends MppBaseMapper<SupvReportM> {
List<ProcessPublicDTO> statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType);
List<ProcessPublicDTO> statisticPlanReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("objType")String objType,@Param("effectStatus")List<String> effectStatus);
List<ProcessPublicDTO> statisticQueReport(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("statisticType")String statisticType,@Param("rectificationStatus")String rectificationStatus,@Param("objType")String objType);

View File

@@ -12,6 +12,12 @@
<if test="objType !=null and objType!=''">
and obj_type = #{objType}
</if>
<if test="effectStatus !=null">
and effect_Status in
<foreach collection="effectStatus" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
group by supv_Org_Id
</select>

View File

@@ -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;
/**
* <p>
@@ -75,6 +76,11 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
//当年第一天
LocalDateTime firstYearDay = timeId.with(TemporalAdjusters.firstDayOfYear()).atTime(0,0,0);
//年度最后一天
LocalDateTime endYearDay = timeId.with(TemporalAdjusters.lastDayOfYear()).atTime(23,59,59);
//当前统计时间
LocalDateTime endTime = timeId.atTime(23,59,59);
List<DictData> dictDataUhv = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SUPV_TYPE.getCode()).getData();
@@ -87,17 +93,17 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
Map<String,PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
Map<String,PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));
List<ProcessPublicDTO> processPublicDTOListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOListY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null,null);
List<ProcessPublicDTO> processPublicDTOListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.UHV_Converter.getCode()).getId(),null, Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOListNewM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOListNewY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,null);
List<ProcessPublicDTO> processPublicDTOListNewAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02");
List<ProcessPublicDTO> processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02");
List<ProcessPublicDTO> processPublicDTOListNewZAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02");
List<ProcessPublicDTO> processPublicDTOListNewZM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOListNewZY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.New_Energy.getCode()).getId(),"02",null);
List<ProcessPublicDTO> 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<SupvReportMMapper, Su
//敏感用户
List<ProcessPublicDTO> processPublicDTOMingGanM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOMingGanY = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOMingGanAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTOMingGanM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
List<ProcessPublicDTO> processPublicDTOMingGanY = this.baseMapper.statisticPlanReport(firstYearDay,endYearDay,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null);
List<ProcessPublicDTO> processPublicDTOMingGanAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
//换流站问题总数量
List<ProcessPublicDTO> processPublicDTOQesMingGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),null,null);
@@ -138,8 +144,9 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
List<ProcessPublicDTO> processPublicDTOQesMingGanYesAll = this.baseMapper.statisticQueReport(null,null,mapStatistic.get(DicDataEnum.POWER_QUALITY.getCode()).getId(),"01",null);
//电压
List<ProcessPublicDTO> processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(null,null,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null);
List<ProcessPublicDTO> processPublicDTODianYaListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
List<ProcessPublicDTO> processPublicDTODianYaListAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,Stream.of("02","03","04").collect(Collectors.toList()));
//本月问题数量和累计问题数量
List<ProcessPublicDTO> processPublicDTODianYaGanM = this.baseMapper.statisticQueReport(firstDay,endTime,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
List<ProcessPublicDTO> processPublicDTODianYaGanAll = this.baseMapper.statisticQueReport(null,null,mapStatistic.get(DicDataEnum.Technical_Super.getCode()).getId(),null,null);
@@ -149,6 +156,10 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
List<SupvReportM> 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;
}