1.解决解决全景和台账管理,终端数量不一致问题
This commit is contained in:
@@ -244,7 +244,6 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
public GridDiagramVO getGridDiagramDev(GridDiagramParam param) {
|
public GridDiagramVO getGridDiagramDev(GridDiagramParam param) {
|
||||||
//获取电压等级
|
//获取电压等级
|
||||||
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
List<DictData> dictDataList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE_STAND.getCode()).getData();
|
||||||
|
|
||||||
List<DictData> v = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PANORAMIC_VOLTAGE.getCode()).getData();
|
List<DictData> v = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.PANORAMIC_VOLTAGE.getCode()).getData();
|
||||||
List<String> voltageIds;
|
List<String> voltageIds;
|
||||||
//获取电压等级550 220 110 35
|
//获取电压等级550 220 110 35
|
||||||
@@ -264,7 +263,6 @@ public class GridDiagramServiceImpl implements GridDiagramService {
|
|||||||
List<Dept> data = deptFeignClient.getDirectSonSelf(param.getOrgId()).getData();
|
List<Dept> data = deptFeignClient.getDirectSonSelf(param.getOrgId()).getData();
|
||||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||||
deptGetLineParam.setDeptId(param.getOrgId());
|
deptGetLineParam.setDeptId(param.getOrgId());
|
||||||
deptGetLineParam.setLineRunFlag(0);
|
|
||||||
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalService.deptGetLine(deptGetLineParam);
|
List<DeptGetChildrenMoreDTO> deptGetChildrenMoreDTOS = commTerminalService.deptGetLine(deptGetLineParam);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -133,11 +133,6 @@ public class RunManageServiceImpl implements RunManageService {
|
|||||||
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
DeviceInfoParam deviceInfoParam = new DeviceInfoParam();
|
||||||
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
BeanUtil.copyProperties(runManageParam, deviceInfoParam);
|
||||||
deviceInfoParam.setServerName("pqs-common");
|
deviceInfoParam.setServerName("pqs-common");
|
||||||
if(CollUtil.isNotEmpty(runManageParam.getRunFlag())){
|
|
||||||
if(runManageParam.getRunFlag().get(0)==0){
|
|
||||||
deviceInfoParam.setLineRunFlag(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, runManageParam.getRunFlag(), Stream.of(1).collect(Collectors.toList()));
|
||||||
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
if (CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
||||||
throw new BusinessException("当前部门没有装置台账");
|
throw new BusinessException("当前部门没有装置台账");
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ public class GeneralDeviceService {
|
|||||||
return generalDeviceDTO;
|
return generalDeviceDTO;
|
||||||
}
|
}
|
||||||
// 提取该部门及其子部门所有监测点id
|
// 提取该部门及其子部门所有监测点id
|
||||||
List<String> lineIds = deptLines.stream().map(DeptLine::getLineId).collect(Collectors.toList());
|
List<String> lineIds = deptLines.stream().map(DeptLine::getLineId).distinct().collect(Collectors.toList());
|
||||||
// 获取line详细数据 :根据监测点id,获取所有监测点 联查 pq_line、pq_line_detail
|
// 获取line详细数据 :根据监测点id,获取所有监测点 联查 pq_line、pq_line_detail
|
||||||
List<Line> lines = terminalBaseService.getLineByCondition(lineIds, deviceInfoParam);
|
List<Line> lines = terminalBaseService.getLineByCondition(lineIds, deviceInfoParam);
|
||||||
// 返回空数据
|
// 返回空数据
|
||||||
@@ -417,17 +417,17 @@ public class GeneralDeviceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//1.筛选出母线id,理论上监测点的pids中第六个id为母线id 联查: pq_line t1 ,pq_voltage t2
|
//1.筛选出母线id,理论上监测点的pids中第六个id为母线id 联查: pq_line t1 ,pq_voltage t2
|
||||||
List<String> voltageIds=lines.stream().map(Line::getPid).collect(Collectors.toList());
|
List<String> voltageIds=lines.stream().map(Line::getPid).distinct().collect(Collectors.toList());
|
||||||
//再根据电压等级筛选合法母线信息
|
//再根据电压等级筛选合法母线信息
|
||||||
List<Line> voltages = terminalBaseService.getVoltageByCondition(voltageIds, deviceInfoParam.getScale());
|
List<Line> voltages = terminalBaseService.getVoltageByCondition(voltageIds, deviceInfoParam.getScale());
|
||||||
|
|
||||||
//2.筛选出终端id,理论上监测点的pids中第五个id为终端id
|
//2.筛选出终端id,理论上监测点的pids中第五个id为终端id
|
||||||
List<String> devIds=voltages.stream().map(Line::getPid).collect(Collectors.toList());
|
List<String> devIds=voltages.stream().map(Line::getPid).distinct().collect(Collectors.toList());
|
||||||
// 再根据终端条件筛选合法终端信息 联查:pq_line t1,pq_device t2
|
// 再根据终端条件筛选合法终端信息 联查:pq_line t1,pq_device t2
|
||||||
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds, deviceType, deviceInfoParam.getManufacturer());
|
List<Line> devices = terminalBaseService.getDeviceByCondition(devIds, deviceType, deviceInfoParam.getManufacturer());
|
||||||
|
|
||||||
//3.筛选出变电站id,理论上监测点的pids中第四个id为变电站id 联查: pq_line t1 ,pq_substation t2
|
//3.筛选出变电站id,理论上监测点的pids中第四个id为变电站id 联查: pq_line t1 ,pq_substation t2
|
||||||
List<String> subIds=devices.stream().map(Line::getPid).collect(Collectors.toList());
|
List<String> subIds=devices.stream().map(Line::getPid).distinct().collect(Collectors.toList());
|
||||||
List<Line> sub = terminalBaseService.getSubByCondition(subIds, new ArrayList<>());
|
List<Line> sub = terminalBaseService.getSubByCondition(subIds, new ArrayList<>());
|
||||||
|
|
||||||
//筛选最终的数据
|
//筛选最终的数据
|
||||||
|
|||||||
Reference in New Issue
Block a user