diff --git a/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/DeviceStatusData.java b/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/DeviceStatusData.java index e0f05f4..37fbaee 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/DeviceStatusData.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/collect/datasource/DeviceStatusData.java @@ -141,6 +141,7 @@ public class DeviceStatusData extends AbstractData { b.setIpSingleSwitchStusLocked(false); b.setIpSingleSwitchStusCbtcOccupied(false); b.setIpSingleSwitchStusCiOccupied(false); + b.setIpSingleSwitchStusJammed(false); } } } diff --git a/src/main/java/club/joylink/xiannccda/ats/warn/BuleDisplayMonitoringTask.java b/src/main/java/club/joylink/xiannccda/ats/warn/BuleDisplayMonitoringTask.java index 163c225..36d93e8 100644 --- a/src/main/java/club/joylink/xiannccda/ats/warn/BuleDisplayMonitoringTask.java +++ b/src/main/java/club/joylink/xiannccda/ats/warn/BuleDisplayMonitoringTask.java @@ -22,6 +22,7 @@ import com.google.protobuf.GeneratedMessageV3; import com.google.protobuf.GeneratedMessageV3.Builder; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -61,17 +62,18 @@ public class BuleDisplayMonitoringTask implements AlertMonitoringTask { private Map findRtuDeviceSource(String lineIdStr) { DeviceStatusData deviceStatusData = DeviceDataRepository.findDataSouce(lineIdStr, DataTypeEnum.DEVICE); if (deviceStatusData.getAllDeviceMap().isEmpty()) { - return null; + return Collections.emptyMap(); } Map builderMap = deviceStatusData.getAllDeviceMap().get(Rtu.getDescriptor().getName()); - if (builderMap.isEmpty()) { - return null; + if (CollectionUtils.isEmpty(builderMap)) { + return Collections.emptyMap(); } return builderMap; } private List findRtuBuild(Map builderMap) { List collectRtuList = Lists.newArrayList(); + for (Builder value : builderMap.values()) { if (value instanceof DeviceStatusProto.Rtu.Builder rtu) { Station station = findAllStation(rtu.getLineId(), rtu.getId());