1.河北两级贯通接口调整

This commit is contained in:
cdf
2024-05-09 14:04:36 +08:00
parent 5036b8c75d
commit bedd70136b
6 changed files with 295 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ public class PmsRunStatisticMServiceImpl extends MppServiceImpl<PmsRunStatisticM
Set<String> pointOnlineSet = new HashSet<>();
Set<String> busSet = new HashSet<>();
Set<String> busRunSet = new HashSet<>();
Set<String> stationSet = new HashSet<>();
Set<String> typicalSet = new HashSet<>();
@@ -78,6 +79,10 @@ public class PmsRunStatisticMServiceImpl extends MppServiceImpl<PmsRunStatisticM
if(StrUtil.isNotBlank(item.getTypicalOnlineIds())){
typicalSet.addAll(Arrays.asList(item.getTypicalOnlineIds().split(StrUtil.COMMA)));
}
if(StrUtil.isNotBlank(item.getRunBusIds())){
busRunSet.addAll(Arrays.asList(item.getRunBusIds().split(StrUtil.COMMA)));
}
});
pmsRunStatisticM.setRunMonitorIds(String.join(StrUtil.COMMA,pointSet));
pmsRunStatisticM.setOnlineMonitorIds(String.join(StrUtil.COMMA,pointOnlineSet));
@@ -90,7 +95,10 @@ public class PmsRunStatisticMServiceImpl extends MppServiceImpl<PmsRunStatisticM
int temBus = val.stream().map(PmsRunStatisticD::getRunBusNum).filter(Objects::nonNull).max(Integer::compareTo).orElse(0);
int temStation = val.stream().map(PmsRunStatisticD::getRunStationNum).filter(Objects::nonNull).max(Integer::compareTo).orElse(0);
pmsRunStatisticM.setRunBusNum(temBus);
pmsRunStatisticM.setRunBusIds(String.join(StrUtil.COMMA,busRunSet));
pmsRunStatisticM.setRunStationNum(temStation);
pmsRunStatisticM.setStatDate(LocalDate.parse(date));
poList.add(pmsRunStatisticM);

View File

@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -112,6 +113,10 @@ public class PmsRunStatisticServiceImpl extends MppServiceImpl<PmsRunStatisticDM
for(DeptGetChildrenMoreDTO dto : deptGetChildrenMoreDTOList){
List<String> childrenDept = dto.getUnitChildrenList();
List<String> temPointIds = dto.getLineBaseList().stream().map(LineDevGetDTO::getPointId).distinct().collect(Collectors.toList());
List<String> onlinePointIds = temPointIds.stream().filter(rStatIntegrityIds::contains).collect(Collectors.toList());
@@ -130,6 +135,9 @@ public class PmsRunStatisticServiceImpl extends MppServiceImpl<PmsRunStatisticDM
long busBarCount = midLedgerBusBarList.stream().filter(it->childrenDept.contains(it.getSectionId())).map(PmsMidLedger::getId).distinct().count();
pmsRunStatisticD.setRunBusNum((int) busBarCount);
String temRunBusIds = midLedgerBusBarList.stream().filter(it->childrenDept.contains(it.getSectionId())).map(PmsMidLedger::getId).distinct().collect(Collectors.joining(StrUtil.COMMA));
pmsRunStatisticD.setRunBusIds(temRunBusIds);
List<String> runBusIds = monitorList.stream().filter(it->childrenDept.contains(it.getOrgId())).map(Monitor::getLineId).distinct().collect(Collectors.toList());
pmsRunStatisticD.setOnlineBusIds(String.join(StrUtil.COMMA, runBusIds));

View File

@@ -60,6 +60,7 @@ public class PmsRunStatisticYServiceImpl extends MppServiceImpl<PmsRunStatisticY
Set<String> pointOnlineSet = new HashSet<>();
Set<String> busSet = new HashSet<>();
Set<String> busRunSet = new HashSet<>();
Set<String> stationSet = new HashSet<>();
Set<String> typicalSet = new HashSet<>();
@@ -80,6 +81,10 @@ public class PmsRunStatisticYServiceImpl extends MppServiceImpl<PmsRunStatisticY
if(StrUtil.isNotBlank(item.getTypicalOnlineIds())){
typicalSet.addAll(Arrays.asList(item.getTypicalOnlineIds().split(StrUtil.COMMA)));
}
if(StrUtil.isNotBlank(item.getRunBusIds())){
busRunSet.addAll(Arrays.asList(item.getRunBusIds().split(StrUtil.COMMA)));
}
});
pmsRunStatisticY.setRunMonitorIds(String.join(StrUtil.COMMA,pointSet));
pmsRunStatisticY.setOnlineMonitorIds(String.join(StrUtil.COMMA,pointOnlineSet));
@@ -92,7 +97,10 @@ public class PmsRunStatisticYServiceImpl extends MppServiceImpl<PmsRunStatisticY
int temBus = val.stream().map(PmsRunStatisticM::getRunBusNum).filter(Objects::nonNull).max(Integer::compareTo).orElse(0);
int temStation = val.stream().map(PmsRunStatisticM::getRunStationNum).filter(Objects::nonNull).max(Integer::compareTo).orElse(0);
pmsRunStatisticY.setRunBusNum(temBus);
pmsRunStatisticY.setRunBusIds(String.join(StrUtil.COMMA,busRunSet));
pmsRunStatisticY.setRunStationNum(temStation);
pmsRunStatisticY.setStatDate(LocalDate.parse(date));
poList.add(pmsRunStatisticY);
});