初始版本提交

This commit is contained in:
hzj
2025-07-03 11:12:05 +08:00
parent e048c92ad1
commit f1f86ea854
4 changed files with 6 additions and 3 deletions

View File

@@ -38,6 +38,7 @@
PQ_SUBVOLTAGE.name busBarName, PQ_SUBVOLTAGE.name busBarName,
pq_device.dev_index devId, pq_device.dev_index devId,
pq_device.name devName, pq_device.name devName,
pq_device.Status runFlag,
PQ_SUBSTATION.sub_index stationId, PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName PQ_SUBSTATION.name stationName
from from

View File

@@ -23,5 +23,6 @@ public class DeviceDTO {
private LocalDateTime updateTime; private LocalDateTime updateTime;
private String devFlag; private String devFlag;
private String ip; private String ip;
//通讯状态
private Integer runFlag=0; private Integer runFlag=0;
} }

View File

@@ -27,7 +27,8 @@ public class LedgerBaseInfoDTO {
private Integer stationId; private Integer stationId;
private String stationName; private String stationName;
//通讯状态
private Integer runFlag=0;
private Integer runFlag=0;;
} }

View File

@@ -125,7 +125,8 @@ public class LargeScreenCountServiceImpl implements LargeScreenCountService {
long runDevCount = runDevList.stream().count(); long runDevCount = runDevList.stream().count();
List<Integer> runSubList = list.stream().map(PqDevice::getSubIndex).distinct().collect(Collectors.toList()); List<Integer> runSubList = list.stream().map(PqDevice::getSubIndex).distinct().collect(Collectors.toList());
long runSubCount = runSubList.stream().count(); long runSubCount = runSubList.stream().count();
List<Integer> runLineList = pqLineList.stream().filter(temp->runDevList.contains(temp.getDevIndex())).map(PqLine::getLineIndex).collect(Collectors.toList()); List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = pqLineService.getBaseLineInfo(allLineIds);
List<Integer> runLineList = ledgerBaseInfoDTOS.stream().filter(temp->Objects.equals(temp.getStatus(),1)).map(LedgerBaseInfoDTO::getLineId).collect(Collectors.toList());
long runLineCount = runLineList.stream().count(); long runLineCount = runLineList.stream().count();
@@ -138,7 +139,6 @@ public class LargeScreenCountServiceImpl implements LargeScreenCountService {
ledgerCountVO.setRunSubCount(runSubCount); ledgerCountVO.setRunSubCount(runSubCount);
ledgerCountVO.setRunLineCount(runLineCount); ledgerCountVO.setRunLineCount(runLineCount);
List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = pqLineService.getBaseLineInfo(allLineIds);
ledgerBaseInfoDTOS.stream().forEach(temp->temp.setRunFlag(runLineList.contains(temp.getLineId())?1:0)); ledgerBaseInfoDTOS.stream().forEach(temp->temp.setRunFlag(runLineList.contains(temp.getLineId())?1:0));
ledgerCountVO.setAllLineList(ledgerBaseInfoDTOS); ledgerCountVO.setAllLineList(ledgerBaseInfoDTOS);
List<DeviceDTO> deviceDTOS = pqDeviceService.queryListByIds(devList); List<DeviceDTO> deviceDTOS = pqDeviceService.queryListByIds(devList);