代码调整
This commit is contained in:
parent
3b36e5737a
commit
0a70258a3c
@ -62,9 +62,9 @@ public class AxleLedInterlockTask implements AlertMonitoringTask {
|
|||||||
}
|
}
|
||||||
for (String lineId : lineCollSet) {
|
for (String lineId : lineCollSet) {
|
||||||
InterLockData interLockData = DeviceDataRepository.findDataSouce(lineId, DataTypeEnum.INTER_LOCK);
|
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) {
|
for (String lockLevel : interlockOneList) {
|
||||||
if (StringUtils.endsWith(lockLevel, AlertDeviceType.DEVICE_TYPE_TRACK.name())) {
|
|
||||||
Map<String, InterLockDetail> detailMap = interLockData.getDetailByInterlockKey(lockLevel);
|
Map<String, InterLockDetail> detailMap = interLockData.getDetailByInterlockKey(lockLevel);
|
||||||
for (Entry<String, InterLockDetail> interLockDetail : detailMap.entrySet()) {
|
for (Entry<String, InterLockDetail> interLockDetail : detailMap.entrySet()) {
|
||||||
String rtuIdJoinStr = interLockDetail.getKey();
|
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) {
|
private Optional<AxleInterLockSource> handle(String lineId, InterLockDetail detail, AlertType findWarnAlertType, AlertType warnAlertType, String rtuIdJoinStr) {
|
||||||
int deviceCount = detail.getDevices().size();
|
int deviceCount = detail.getDevices().size();
|
||||||
|
@ -155,7 +155,7 @@ public class MockOccServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Integer findDeviceRtuId(Integer lineId, DeviceType dt, String deviceName, AlertType alertType) {
|
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);
|
MessageOrBuilder t = LineGraphicDataRepository.getDeviceByCodeNotException(lineId, deviceName);
|
||||||
|
|
||||||
if (t instanceof Turnout) {
|
if (t instanceof Turnout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user