1.终端运行评价初始化类
2.解决稳态符合性占比图接口异常和暂态事件列表按照10kV电压等级查询结果为空
This commit is contained in:
@@ -42,6 +42,8 @@ public class GridDiagramVO {
|
||||
|
||||
@Data
|
||||
public static class LineStatisticsData {
|
||||
@ApiModelProperty(name = "columnName", value = "列名")
|
||||
private String columnName;
|
||||
|
||||
@ApiModelProperty(name = "num", value = "监测点个数")
|
||||
private Integer num;
|
||||
@@ -64,6 +66,8 @@ public class GridDiagramVO {
|
||||
|
||||
@Data
|
||||
public static class StatisticsData {
|
||||
@ApiModelProperty(name = "columnName", value = "列名")
|
||||
private String columnName;
|
||||
|
||||
@ApiModelProperty(name = "numOne", value = "数据")
|
||||
private Long numOne;
|
||||
@@ -71,6 +75,9 @@ public class GridDiagramVO {
|
||||
@ApiModelProperty(name = "numOneList", value = "数据集合")
|
||||
private List<String> numOneList;
|
||||
|
||||
/**
|
||||
* 上送国网
|
||||
*/
|
||||
@ApiModelProperty(name = "numTwo", value = "数据")
|
||||
private Long numTwo;
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.device.pq.controller;
|
||||
|
||||
import com.njcn.device.pq.service.DeviceRunEvaluateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author 终端运行评价
|
||||
* @description
|
||||
* @date 2025/5/8 13:57
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "终端运行评价")
|
||||
@RestController
|
||||
@RequestMapping("/deviceRunEvaluate")
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceRunEvaluateController {
|
||||
|
||||
private final DeviceRunEvaluateService deviceRunEvaluateService;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.njcn.device.pq.service;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2025/5/8 13:45
|
||||
*/
|
||||
public interface DeviceRunEvaluateService {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.device.pq.service.impl;
|
||||
|
||||
import com.njcn.device.pq.service.DeviceRunEvaluateService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2025/5/8 13:45
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceRunEvaluateServiceImpl implements DeviceRunEvaluateService {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -429,7 +429,7 @@ public class GeneralDeviceService {
|
||||
|
||||
//3.筛选出变电站id,理论上监测点的pids中第四个id为变电站id 联查: pq_line t1 ,pq_substation t2
|
||||
List<String> subIds=devices.stream().map(Line::getPid).collect(Collectors.toList());
|
||||
List<Line> sub = terminalBaseService.getSubByCondition(subIds, deviceInfoParam.getScale());
|
||||
List<Line> sub = terminalBaseService.getSubByCondition(subIds, new ArrayList<>());
|
||||
|
||||
//筛选最终的数据
|
||||
dealDeviceData(generalDeviceDTO, lines, devices, voltages, sub);
|
||||
|
||||
@@ -169,7 +169,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
//终端id集合
|
||||
List<String> devIds = lineBaseList.stream().filter(x -> value.equals(x.getVoltageLevel())).map(LineDevGetDTO::getDevId).distinct().collect(Collectors.toList());
|
||||
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds, onIntegrityByIds, devIds, lineIds, onLineNumIds);
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds,value, onIntegrityByIds, devIds, lineIds, onLineNumIds);
|
||||
|
||||
}
|
||||
|
||||
@@ -180,11 +180,12 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
List<String> lineIdsAll = lineBaseList.stream().map(LineDevGetDTO::getPointId).distinct().collect(Collectors.toList());
|
||||
List<String> onLineNumAll = lineBaseList.stream().filter(x -> 1 == x.getComFlag()).map(LineDevGetDTO::getPointId).distinct().collect(Collectors.toList());
|
||||
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds, onIntegrityByIds, devIdsAll, lineIdsAll, onLineNumAll);
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds,null, onIntegrityByIds, devIdsAll, lineIdsAll, onLineNumAll);
|
||||
}
|
||||
|
||||
private void gridDiagramAdd(List<GridDiagramVO.LineStatisticsData> statisticsData, List<RStatOnlinerateD> onlineRateByDevIds, List<RStatIntegrityD> onIntegrityByIds, List<String> devIdsAll, List<String> lineIdsAll, List<String> onLineNumAll) {
|
||||
private void gridDiagramAdd(List<GridDiagramVO.LineStatisticsData> statisticsData, List<RStatOnlinerateD> onlineRateByDevIds,String value, List<RStatIntegrityD> onIntegrityByIds, List<String> devIdsAll, List<String> lineIdsAll, List<String> onLineNumAll) {
|
||||
GridDiagramVO.LineStatisticsData lineStatisticsData = new GridDiagramVO.LineStatisticsData();
|
||||
lineStatisticsData.setColumnName(value);
|
||||
lineStatisticsData.setNum(lineIdsAll.size());
|
||||
lineStatisticsData.setNumList(lineIdsAll);
|
||||
lineStatisticsData.setOnLineNum(onLineNumAll.size());
|
||||
@@ -203,7 +204,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
//终端id集合
|
||||
List<String> devIds = lineBaseList.stream().filter(x -> value.equals(x.getVoltageLevel())).filter(x -> 1 == x.getIsUpToGrid()).map(LineDevGetDTO::getDevId).distinct().collect(Collectors.toList());
|
||||
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds, onIntegrityByIds, devIds, lineIds, onLineNumIds);
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds, value, onIntegrityByIds, devIds, lineIds, onLineNumIds);
|
||||
}
|
||||
|
||||
private void gwStatisticsDataOtherList(List<GridDiagramVO.LineStatisticsData> statisticsData, List<LineDevGetDTO> lineBaseList, List<RStatOnlinerateD> onlineRateByDevIds, List<RStatIntegrityD> onIntegrityByIds) {
|
||||
@@ -213,7 +214,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
List<String> lineIdsAll = lineBaseList.stream().filter(x -> 1 == x.getIsUpToGrid()).map(LineDevGetDTO::getPointId).distinct().collect(Collectors.toList());
|
||||
List<String> onLineNumAll = lineBaseList.stream().filter(x -> 1 == x.getComFlag() && 1 == x.getIsUpToGrid()).map(LineDevGetDTO::getPointId).distinct().collect(Collectors.toList());
|
||||
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds, onIntegrityByIds, devIdsAll, lineIdsAll, onLineNumAll);
|
||||
gridDiagramAdd(statisticsData, onlineRateByDevIds,null, onIntegrityByIds, devIdsAll, lineIdsAll, onLineNumAll);
|
||||
}
|
||||
|
||||
private void onLineAndIntegrity(List<String> lineIds, List<RStatIntegrityD> onIntegrityByIds, List<String> devIds, List<RStatOnlinerateD> onlineRateByDevIds, GridDiagramVO.LineStatisticsData lineStatisticsData) {
|
||||
@@ -555,6 +556,7 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
||||
for (String voltageId : voltageIds) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
data = new GridDiagramVO.StatisticsData();
|
||||
data.setColumnName(voltageId);
|
||||
int finalI = i;
|
||||
//todo 1国网信息
|
||||
long count = lineBaseList.stream().filter(x -> getIsUpToGrid(finalI, x, voltageId)).map(LineDevGetDTO::getDevId).distinct().count();
|
||||
|
||||
@@ -97,7 +97,6 @@ public class TransientServiceImpl implements TransientService {
|
||||
private final DeviceTreeClient deviceTreeClient;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Page<TransientVO> getTransientData(TransientParam transientParam) {
|
||||
Page<TransientVO> page = new Page<>();
|
||||
@@ -292,7 +291,7 @@ public class TransientServiceImpl implements TransientService {
|
||||
page.setSize(transientParam.getPageSize());
|
||||
page.setCurrent(transientParam.getPageNum());
|
||||
// 按部门分类的实际运行终端综合信息
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList =new ArrayList<>();
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList;
|
||||
if (transientParam.getIsType() == 0) {
|
||||
generalDeviceDTOList = generalDeviceInfoClient.getPracticalRunDeviceInfo(transientParam).getData();
|
||||
} else {
|
||||
|
||||
@@ -61,7 +61,6 @@ public class RMpTargetWarnDServiceImpl extends ServiceImpl<RMpTargetWarnDMapper,
|
||||
voltageIds = dictDataList.stream().filter(item -> vName.contains(item.getName())).sorted(Comparator.comparing(DictData::getSort).reversed()).map(DictData::getId).collect(Collectors.toList());
|
||||
}else{
|
||||
voltageIds = dictDataList.stream().filter(item -> Objects.equals(DicDataEnum.DY_500KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_220KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_110KV.getCode(), item.getCode()) || Objects.equals(DicDataEnum.DY_35KV.getCode(), item.getCode())).sorted(Comparator.comparing(DictData::getSort).reversed()).map(DictData::getId).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -136,6 +135,7 @@ public class RMpTargetWarnDServiceImpl extends ServiceImpl<RMpTargetWarnDMapper,
|
||||
for (String voltageId : voltageIds) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
data = new GridDiagramVO.StatisticsData();
|
||||
data.setColumnName(voltageId);
|
||||
int finalI = i;
|
||||
long count = subBaseList.stream()
|
||||
.filter(x -> getIsUpToGrid(finalI, x, voltageId))
|
||||
|
||||
Reference in New Issue
Block a user