diff --git a/src/main/java/club/joylink/xiannccda/ats/warn/axle/AxleLedInterlockTask.java b/src/main/java/club/joylink/xiannccda/ats/warn/axle/AxleLedInterlockTask.java index 1837256..c04c955 100644 --- a/src/main/java/club/joylink/xiannccda/ats/warn/axle/AxleLedInterlockTask.java +++ b/src/main/java/club/joylink/xiannccda/ats/warn/axle/AxleLedInterlockTask.java @@ -13,8 +13,6 @@ import club.joylink.xiannccda.ats.message.collect.datasource.DeviceStatusData; import club.joylink.xiannccda.ats.message.collect.datasource.InterLockData; import club.joylink.xiannccda.ats.message.collect.datasource.InterLockData.InterLockDetail; import club.joylink.xiannccda.ats.message.collect.datasource.TrainDataSource; -import club.joylink.xiannccda.ats.message.line3.changer.DeviceNameChangerManage; -import club.joylink.xiannccda.ats.message.line3.device.DeviceType; import club.joylink.xiannccda.ats.warn.axle.event.LedMostEvent; import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; import club.joylink.xiannccda.dto.protos.DeviceStatusProto.Switch; @@ -31,7 +29,6 @@ import java.time.LocalDateTime; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -73,10 +70,8 @@ public class AxleLedInterlockTask implements AlertMonitoringTask { InterLockDetail detail = interLockDetail.getValue(); Optional redOpt = this.handle(lineId, detail, AlertType.AXLE_LED_RED, AlertType.AXLE_LED_RED_INTERLOCK_AREA, rtuIdJoinStr); Optional orangeOpt = this.handle(lineId, detail, AlertType.AXLE_LED_ORANGE, AlertType.AXLE_LED_ORANGE_INTERLOCK_AREA, rtuIdJoinStr); - redOpt.ifPresent(axleInterLockSource -> this.alertManager.emit(new LedMostEvent(axleInterLockSource))); orangeOpt.ifPresent(axleInterLockSource -> this.alertManager.emit(new LedMostEvent(axleInterLockSource))); - } } } @@ -156,7 +151,7 @@ public class AxleLedInterlockTask implements AlertMonitoringTask { } } } - + return sectionStatusList.stream().allMatch(d -> d); }