代码调整

This commit is contained in:
tiger_zhou 2023-12-26 13:51:17 +08:00
parent 3b36e5737a
commit 0a70258a3c
2 changed files with 11 additions and 12 deletions

View File

@ -62,9 +62,9 @@ public class AxleLedInterlockTask implements AlertMonitoringTask {
}
for (String lineId : lineCollSet) {
InterLockData interLockData = DeviceDataRepository.findDataSouce(lineId, DataTypeEnum.INTER_LOCK);
List<String> interlockOneList = interLockData.findKeysStart(AlertType.INTERLOCK_LEVEL_ONE.name());
List<String> interlockOneList = interLockData.findKeysStart(AlertType.INTERLOCK_LEVEL_ONE.name())
.stream().filter(d -> StringUtils.endsWith(d, AlertDeviceType.DEVICE_TYPE_TRACK.name())).toList();
for (String lockLevel : interlockOneList) {
if (StringUtils.endsWith(lockLevel, AlertDeviceType.DEVICE_TYPE_TRACK.name())) {
Map<String, InterLockDetail> detailMap = interLockData.getDetailByInterlockKey(lockLevel);
for (Entry<String, InterLockDetail> interLockDetail : detailMap.entrySet()) {
String rtuIdJoinStr = interLockDetail.getKey();
@ -79,7 +79,6 @@ public class AxleLedInterlockTask implements AlertMonitoringTask {
}
}
}
}
private Optional<AxleInterLockSource> handle(String lineId, InterLockDetail detail, AlertType findWarnAlertType, AlertType warnAlertType, String rtuIdJoinStr) {
int deviceCount = detail.getDevices().size();

View File

@ -155,7 +155,7 @@ public class MockOccServer {
}
private Integer findDeviceRtuId(Integer lineId, DeviceType dt, String deviceName, AlertType alertType) {
if (alertType == AlertType.AXLE_LED_RED || alertType == AlertType.AXLE_LED_ORANGE) {
if (alertType == AlertType.AXLE_LED_RED || alertType == AlertType.AXLE_LED_ORANGE || alertType == AlertType.TRAIN_EB_ATP) {
MessageOrBuilder t = LineGraphicDataRepository.getDeviceByCodeNotException(lineId, deviceName);
if (t instanceof Turnout) {