This commit is contained in:
tiger_zhou 2023-12-27 17:28:25 +08:00
parent da406fbc60
commit 035cc673bf

View File

@ -82,8 +82,10 @@ public class AxleLedInterlockTask implements AlertMonitoringTask {
Integer lineIdInt = Integer.parseInt(lineId);
//收集联锁下的所有所有区段设备
List<TrackOccupiedStatus> resultList = this.collectorLedWarDevices(findWarnAlertType, lineId, detail.getDevices());
if (resultList.stream().anyMatch(d -> d.occupied)) {
log.info("线路[{}] 联锁区[{}] 需要加载设备数量[{}] 实际加载数量[{}] 区段被占用情况[{}]", lineId, rtuIdJoinStr, deviceCount, resultList.size(),
resultList.stream().filter(d -> d.occupied).map(d -> d.deviceCode).collect(Collectors.joining(",")));
}
int occupidedSzie = (int) resultList.stream().filter(d -> d.occupied).count();
String customName = String.format("%s-%s", findWarnAlertType.name(), detail.getAreaConfigId());
if (occupidedSzie >= deviceCount) {