1.冀北电网一张图,变电站,终端,暂态列表接口重新调整
2.技术监督统计,电容器和评估报告统计调整
This commit is contained in:
@@ -4,11 +4,9 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/25 10:40
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2024/4/29 11:00
|
||||
*/
|
||||
@Data
|
||||
public class PollutionGridDiagramDTO extends PollutionSubstationDTO{
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description 冀北电网一张图入参
|
||||
@@ -19,6 +21,9 @@ public class GridDiagramParam extends BaseParam {
|
||||
@ApiModelProperty(name="type",value="类型(1年 2季度 3月份 4周 5日)")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(name="deviceInfoParam",value="")
|
||||
@ApiModelProperty(value = "ids集合", required = true)
|
||||
private List<String> ids;
|
||||
|
||||
@ApiModelProperty(name="deviceInfoParam")
|
||||
private DeviceInfoParam deviceInfoParam;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,9 @@ public class GridDiagramVO {
|
||||
@ApiModelProperty(name = "devCount", value = "终端数量")
|
||||
private Long devCount;
|
||||
|
||||
@ApiModelProperty(name = "devOnCount", value = "终端数量")
|
||||
private Long devOnCount;
|
||||
|
||||
@ApiModelProperty(name = "onlineEvaluate", value = "终端在线率评价")
|
||||
private Double onlineEvaluate;
|
||||
|
||||
|
||||
@@ -3,19 +3,13 @@ package com.njcn.device.pq.controller;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pq.pojo.param.AlarmStrategyParam;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.device.pq.service.AlarmStrategyService;
|
||||
import com.njcn.device.pq.service.GridDiagramService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.device.pq.service;
|
||||
|
||||
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
|
||||
|
||||
@@ -330,13 +330,21 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), "time_id", DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), "time_id", DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))
|
||||
.groupBy("dev_index"));
|
||||
List<String> devIds = generalDeviceDTOList.stream().flatMap(x -> x.getDeviceIndexes().stream()).distinct().collect(Collectors.toList());
|
||||
List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>()
|
||||
.select(Device::getId, Device::getRunFlag, Device::getComFlag)
|
||||
.in(CollUtil.isNotEmpty(devIds), Device::getId, devIds)
|
||||
);
|
||||
List<GridDiagramVO.DeviceData> info = new ArrayList<>();
|
||||
GridDiagramVO.DeviceData data;
|
||||
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
||||
data = new GridDiagramVO.DeviceData();
|
||||
data.setOrgId(generalDeviceDTO.getIndex());
|
||||
data.setOrgName(generalDeviceDTO.getName());
|
||||
data.setDevCount(generalDeviceDTO.getDeviceIndexes().stream().distinct().count());
|
||||
List<Device> collect = list.stream().filter(x -> generalDeviceDTO.getDeviceIndexes().contains(x.getId())).collect(Collectors.toList());
|
||||
List<Device> runDevice = collect.stream().filter(x -> 0 == x.getRunFlag()).collect(Collectors.toList());
|
||||
data.setDevCount(Long.valueOf(runDevice.size()));
|
||||
data.setDevOnCount(runDevice.stream().filter(x -> 1 == x.getComFlag()).count());
|
||||
List<RStatOnlinerateD> onlineRateDS = onlinerateDS.stream().filter(x -> generalDeviceDTO.getDeviceIndexes().contains(x.getDevIndex())).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(onlineRateDS)) {
|
||||
double onlineTime = onlineRateDS.stream().mapToDouble(RStatOnlinerateD::getOnlineMin).sum();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.event.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -12,8 +13,31 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class EventDetailVO implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "id",value = "id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "time",value = "特征幅值")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty(name = "name",value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(name = "swellTimes",value = "电压暂升发生次数")
|
||||
private Long swellTimes;
|
||||
|
||||
@ApiModelProperty(name = "sagTimes",value = "电压暂降发生次数")
|
||||
private Long sagTimes;
|
||||
|
||||
@ApiModelProperty(name = "interruptTimes",value = "短时中断发生次数")
|
||||
private Long interruptTimes;
|
||||
|
||||
@ApiModelProperty(name = "rate90",value = "暂态严重度占比小于90%")
|
||||
private Double rate90;
|
||||
|
||||
@ApiModelProperty(name = "rate50",value = "暂态严重度占比小于50%")
|
||||
private Double rate50;
|
||||
|
||||
@ApiModelProperty(name = "rate20",value = "暂态严重度占比小于20%")
|
||||
private Double rate20;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.event.pojo.vo.EventDetailVO;
|
||||
import com.njcn.event.service.majornetwork.RmpEventDetailService;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Validated
|
||||
@@ -40,4 +43,12 @@ public class GridDiagramEventController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventLevelEvaluation, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventDetailByList")
|
||||
@ApiOperation("暂态详细列表")
|
||||
public HttpResult<List<EventDetailVO>> getEventDetailByList(@RequestBody GridDiagramParam param) {
|
||||
String methodDescribe = getMethodDescribe("getEventDetailByList");
|
||||
List<EventDetailVO> eventDetailByList = rmpEventDetailService.getEventDetailByList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventDetailByList, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -26,33 +27,37 @@ import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.event.enums.EventResponseEnum;
|
||||
import com.njcn.event.mapper.majornetwork.RmpEventDetailMapper;
|
||||
import com.njcn.event.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.*;
|
||||
import com.njcn.event.service.majornetwork.EventDetailService;
|
||||
import com.njcn.event.service.majornetwork.RmpEventDetailService;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.event.enums.EventResponseEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
@@ -327,6 +332,52 @@ public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper,
|
||||
return gridDiagramVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EventDetailVO> getEventDetailByList(GridDiagramParam param) {
|
||||
List<EventDetailVO> info=new ArrayList<>();
|
||||
//获取污区图统计类型
|
||||
DictData dip = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||
DictData rise = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_RISE.getCode()).getData();
|
||||
DictData interruptions = dicDataFeignClient.getDicDataByCode(DicDataEnum.SHORT_INTERRUPTIONS.getCode()).getData();
|
||||
|
||||
|
||||
List<GeneralDeviceDTO> data = generalDeviceInfoClient.getPracticalRunDeviceInfo(param.getDeviceInfoParam()).getData();
|
||||
List<String> lineIds = data.stream().flatMap(x -> x.getLineIndexes().stream()).distinct().collect(Collectors.toList());
|
||||
List<RmpEventDetailPO> list = this.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.select(RmpEventDetailPO::getEventId, RmpEventDetailPO::getEventType, RmpEventDetailPO::getSeverity)
|
||||
.in(CollUtil.isNotEmpty(lineIds), RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RmpEventDetailPO::getStartTime, DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))
|
||||
);
|
||||
EventDetailVO vo;
|
||||
for (GeneralDeviceDTO datum : data) {
|
||||
vo=new EventDetailVO();
|
||||
vo.setId(datum.getIndex());
|
||||
vo.setName(datum.getName());
|
||||
List<RmpEventDetailPO> detailPOList = list.stream().filter(x -> datum.getLineIndexes().contains(x.getMeasurementPointId())).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(detailPOList)){
|
||||
vo.setSwellTimes(detailPOList.stream().filter(x->x.getEventType().equals(rise.getId())).count());
|
||||
vo.setSagTimes(detailPOList.stream().filter(x->x.getEventType().equals(dip.getId())).count());
|
||||
vo.setInterruptTimes(detailPOList.stream().filter(x->x.getEventType().equals(interruptions.getId())).count());
|
||||
double v90 = detailPOList.stream().filter(x -> x.getSeverity()*100<=90).count() * 100.0 / detailPOList.size();
|
||||
double v50 = detailPOList.stream().filter(x -> x.getSeverity()*100<=50).count() * 100.0 / detailPOList.size();
|
||||
double v20 = detailPOList.stream().filter(x -> x.getSeverity()*100<=20).count() * 100.0 / detailPOList.size();
|
||||
vo.setRate90(NumberUtil.round(v90,2).doubleValue());
|
||||
vo.setRate50(NumberUtil.round(v50,2).doubleValue());
|
||||
vo.setRate20(NumberUtil.round(v20,2).doubleValue());
|
||||
}else {
|
||||
vo.setSwellTimes(0L);
|
||||
vo.setSagTimes(0L);
|
||||
vo.setInterruptTimes(0L);
|
||||
vo.setRate90(0.0D);
|
||||
vo.setRate50(0.0D);
|
||||
vo.setRate20(0.0D);
|
||||
}
|
||||
info.add(vo);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
private Double setData(GridDiagramVO gridDiagramVO, List<String> gwLineAllIds, List<RmpEventDetailPO> list) {
|
||||
List<Double> asGwDouble = list.stream()
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.njcn.event.service.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.event.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.AdvanceEventDetailVO;
|
||||
import com.njcn.event.pojo.vo.EventDetailVO;
|
||||
import com.njcn.event.pojo.vo.RmpEventDetailVO;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
@@ -59,4 +61,5 @@ public interface RmpEventDetailService extends IService<RmpEventDetailPO> {
|
||||
|
||||
GridDiagramVO getEventLevelEvaluation(StatSubstationBizBaseParam param);
|
||||
|
||||
List<EventDetailVO> getEventDetailByList(GridDiagramParam param);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.service.IRMpTargetWarnDService;
|
||||
@@ -68,6 +69,14 @@ public class GridDiagramHarmController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subLineGiveAnAlarm, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPollutionAlarmList")
|
||||
@ApiOperation("变电站新详细列表")
|
||||
public HttpResult<List<List<String>>> getPollutionAlarmList(@RequestBody GridDiagramParam param) {
|
||||
String methodDescribe = getMethodDescribe("getPollutionAlarmList");
|
||||
List<List<String>> subLineGiveAnAlarm = pollutionSubstationService.getPollutionAlarmList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subLineGiveAnAlarm, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getGridDiagramLineData")
|
||||
@ApiOperation("监测点分布统计")
|
||||
public HttpResult<List<GridDiagramVO.LineData>> getGridDiagramLineData(@RequestBody DeviceInfoParam.BusinessParam param) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionLineDTO;
|
||||
import com.njcn.device.pq.pojo.dto.PollutionSubstationDTO;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.harmonic.pojo.param.HarmonicPublicParam;
|
||||
import com.njcn.harmonic.pojo.param.PollutionSubstationQuryParam;
|
||||
@@ -80,4 +81,8 @@ public interface PollutionSubstationService extends IService<RStatPollutionSubst
|
||||
* @Date: 2024/4/22 11:00
|
||||
*/
|
||||
Page<PollutionGridDiagramDTO> getPollutionAlarmPageData(StatSubstationBizBaseParam param);
|
||||
|
||||
|
||||
List<List<String>> getPollutionAlarmList(GridDiagramParam param);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.api.SubstationFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.*;
|
||||
import com.njcn.device.pq.pojo.param.GridDiagramParam;
|
||||
import com.njcn.device.pq.pojo.vo.GridDiagramVO;
|
||||
import com.njcn.harmonic.constant.Param;
|
||||
import com.njcn.harmonic.mapper.*;
|
||||
@@ -104,6 +105,8 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
|
||||
/**
|
||||
* @param pollutionSubstationQuryParam
|
||||
* @Description: getPollutionSubstationData
|
||||
@@ -771,4 +774,57 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
return pollutionPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<List<String>> getPollutionAlarmList(GridDiagramParam param) {
|
||||
List<List<String>> info = new ArrayList<>();
|
||||
List<GeneralDeviceDTO> data = generalDeviceInfoClient.getPracticalRunDeviceInfo(param.getDeviceInfoParam()).getData();
|
||||
List<String> subIds = data.stream().flatMap(x -> x.getSubIndexes().stream()).collect(Collectors.toList());
|
||||
List<RStatPollutionSubstationM> substationMlist = pollutionSubstationMMapper.selectList(new LambdaQueryWrapper<RStatPollutionSubstationM>()
|
||||
.select(RStatPollutionSubstationM::getSubstationId,RStatPollutionSubstationM::getValue)
|
||||
.in(CollUtil.isNotEmpty(subIds), RStatPollutionSubstationM::getSubstationId, subIds)
|
||||
.in(CollUtil.isNotEmpty(param.getIds()), RStatPollutionSubstationM::getPollutionType, param.getIds())
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatPollutionSubstationM::getDataDate, DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatPollutionSubstationM::getDataDate, DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())))
|
||||
);
|
||||
List<String> dept;
|
||||
for (GeneralDeviceDTO datum : data) {
|
||||
List<RStatPollutionSubstationM> collect = substationMlist.stream().filter(x -> datum.getSubIndexes().contains(x.getSubstationId())).collect(Collectors.toList());
|
||||
dept=new ArrayList<>();
|
||||
dept.add(datum.getName());
|
||||
dept.add(String.valueOf(datum.getSubIndexes().size()));
|
||||
dept.addAll(addList(collect));
|
||||
info.add(dept);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
private List<String> addList(List<RStatPollutionSubstationM> substationMlist) {
|
||||
List<String> info=new ArrayList<>();
|
||||
Integer num1 = 0;
|
||||
Integer num2 = 0;
|
||||
Integer num3 = 0;
|
||||
Integer num4 = 0;
|
||||
Integer num5 = 0;
|
||||
for (RStatPollutionSubstationM x : substationMlist) {
|
||||
Double value = x.getValue();
|
||||
//无污染 轻微污染 轻度污染 中度污染 重度污染
|
||||
if (0 <= value && value < 1) {
|
||||
num1++;
|
||||
} else if (1 <= value && value < 1.2) {
|
||||
num2++;
|
||||
} else if (1.2 <= value && value < 1.6) {
|
||||
num3++;
|
||||
} else if (1.6 <= value && value < 2) {
|
||||
num4++;
|
||||
} else if (2 <= value) {
|
||||
num5++;
|
||||
}
|
||||
}
|
||||
info.add(String.valueOf(num1));
|
||||
info.add(String.valueOf(num2));
|
||||
info.add(String.valueOf(num3));
|
||||
info.add(String.valueOf(num4));
|
||||
info.add(String.valueOf(num5));
|
||||
return info;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,13 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl<RUpl
|
||||
List<DeptGetChildrenMoreDTO> deptAll = calculatedParam.getIdList();
|
||||
|
||||
Map<String,PmsRunStatistic> pmsRunStatisticMap = pmsRunStatisticsList.stream().collect(Collectors.toMap(PmsRunStatistic::getDeptId,Function.identity()));
|
||||
List<String> monitorIds = CollectionUtil.toList(pmsRunStatisticMap.get(dept.getCode()).getRunMonitorIds().split(StrUtil.COMMA));
|
||||
List<LineDTO> lineDTOList = commLineClient.getLineDetailBatch(monitorIds).getData();
|
||||
List<LineDTO> lineDTOList;
|
||||
if(pmsRunStatisticMap.containsKey(dept.getCode())){
|
||||
List<String> monitorIds = CollectionUtil.toList(pmsRunStatisticMap.get(dept.getCode()).getRunMonitorIds().split(StrUtil.COMMA));
|
||||
lineDTOList = commLineClient.getLineDetailBatch(monitorIds).getData();
|
||||
} else {
|
||||
lineDTOList = new ArrayList<>();
|
||||
}
|
||||
|
||||
deptAll.forEach(item -> {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.process.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.TimeInterval;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -163,6 +164,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
|
||||
|
||||
//电容器组月前统计
|
||||
List<ProcessPublicDTO> processPublicYearDTOS = this.baseMapper.statisticPlanReportYear(firstYearDay, endYearDay, mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(), null, null);
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),null,null);
|
||||
//电容器组问题数量
|
||||
@@ -173,6 +175,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
List<ProcessPublicDTO> processPublicDTOCapacitorYesAll = this.baseMapper.statisticQueReportRectify(firstYearDay,endTime,mapStatistic.get(DicDataEnum.capacitor_bank.getCode()).getId(),"02",null);
|
||||
|
||||
//评估报告月前统计
|
||||
List<ProcessPublicDTO> processPublicYearDTOAppraisalS = this.baseMapper.statisticPlanReportYear(firstYearDay, endYearDay, mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(), null, null);
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalListM = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
List<ProcessPublicDTO> processPublicDTOAppraisalAll = this.baseMapper.statisticPlanReport(firstYearDay,endTime,mapStatistic.get(DicDataEnum.report_supervision.getCode()).getId(),null,null);
|
||||
//评估报告问题数量
|
||||
@@ -263,7 +266,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
all+=d;
|
||||
|
||||
//电容器组
|
||||
supvReportM.setCapacitorYearSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorAll));
|
||||
supvReportM.setCapacitorYearSupvNum(dealData(childrenDeptList,processPublicYearDTOS));
|
||||
supvReportM.setCapacitorMonthSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorListM));
|
||||
supvReportM.setCapacitorTotalSupvNum(dealData(childrenDeptList,processPublicDTOCapacitorAll));
|
||||
supvReportM.setCapacitorMonthQuesNum(dealData(childrenDeptList,processPublicDTOCapacitorGanM));
|
||||
@@ -272,7 +275,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
supvReportM.setCapacitorTotalReformNum(dealData(childrenDeptList,processPublicDTOCapacitorYesAll));
|
||||
all+=supvReportM.getCapacitorTotalSupvNum();
|
||||
//评估报告
|
||||
supvReportM.setAppraisalReportYearSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalAll));
|
||||
supvReportM.setAppraisalReportYearSupvNum(dealData(childrenDeptList,processPublicYearDTOAppraisalS));
|
||||
supvReportM.setAppraisalReportMonthSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalListM));
|
||||
supvReportM.setAppraisalReportTotalSupvNum(dealData(childrenDeptList,processPublicDTOAppraisalAll));
|
||||
supvReportM.setAppraisalReportMonthQuesNum(dealData(childrenDeptList,processPublicDTOAppraisalGanM));
|
||||
@@ -352,27 +355,42 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
||||
record.getEnergyYearSupvNum()+
|
||||
record.getEnergyYearSupvNewNum()+
|
||||
record.getSensitiveYearSupvNum()+
|
||||
record.getPowerMonthPlanNum()
|
||||
record.getCapacitorYearSupvNum()+
|
||||
record.getAppraisalReportYearSupvNum()
|
||||
);
|
||||
record.setPlanCountNum(record.getConvertTotalSupvNum()+
|
||||
record.getEnergyTotalSupvNum()+
|
||||
record.getEnergyTotalSupvNewNum()+
|
||||
record.getSensitiveTotalSupvNum()+
|
||||
record.getPowerMonthConductedNum()
|
||||
record.getPowerMonthConductedNum()+
|
||||
record.getCapacitorTotalSupvNum()+
|
||||
record.getAppraisalReportTotalSupvNum()
|
||||
);
|
||||
record.setProblemCountNum(record.getConvertTotalQuesNum()+
|
||||
record.getEnergyTotalQuesNum()+
|
||||
record.getEnergyTotalQuesNewNum()+
|
||||
record.getSensitiveTotalQuesNum()+
|
||||
record.getPowerTotalQuesNum());
|
||||
record.getPowerTotalQuesNum()+
|
||||
record.getCapacitorTotalQuesNum()+
|
||||
record.getAppraisalReportTotalQuesNum()
|
||||
|
||||
);
|
||||
record.setReformCountNum(record.getConvertTotalReformNum()+
|
||||
record.getEnergyTotalReformNum()+
|
||||
record.getEnergyTotalReformNewNum()+
|
||||
record.getSensitiveTotalReformNum()+
|
||||
record.getPowerTotalReformNum());
|
||||
record.getPowerTotalReformNum()+
|
||||
record.getCapacitorTotalReformNum()+
|
||||
record.getAppraisalReportTotalReformNum()
|
||||
|
||||
);
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(record.getStatisticsDept()).getData();
|
||||
//获取预告警单信息
|
||||
List<SupvAlarm> list = supvAlarmService.list(new LambdaQueryWrapper<SupvAlarm>().in(SupvAlarm::getCreaterOrgId, deptIds));
|
||||
List<SupvAlarm> list = supvAlarmService.list(new LambdaQueryWrapper<SupvAlarm>().in(SupvAlarm::getCreaterOrgId, deptIds)
|
||||
.between(StrUtil.isNotBlank(baseParam.getSearchBeginTime()),SupvAlarm::getCreaterTime,
|
||||
DateUtil.beginOfYear(DateUtil.parse(baseParam.getSearchBeginTime())),
|
||||
DateUtil.endOfYear(DateUtil.parse(baseParam.getSearchEndTime())))
|
||||
);
|
||||
int count =0;
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
List<String> alarmIds = list.stream().map(SupvAlarm::getAlarmId).distinct().collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user