告警调整

This commit is contained in:
tiger_zhou 2023-08-24 17:59:50 +08:00
parent 17390a7bd9
commit f485ff9ed2
2 changed files with 7 additions and 1 deletions

View File

@ -53,6 +53,7 @@ public class AlertMockService {
case SWITCH_LOST -> {
Switch.Builder switchBuild = Switch.newBuilder();
switchBuild.setId("P0109");
switchBuild.setLineId(lineId);
switchBuild.setRtuId(1);
switchBuild.setIpSingleSwitchStusLostIndication(true);
switchBuild.setIpSingleSwitchStusLocked(true);
@ -67,6 +68,7 @@ public class AlertMockService {
track.setCiOccupied(true);
track.setRtuId(1);
track.setId("G0202-A");
track.setLineId(lineId);
String sectionCode = LineGraphicDataRepository.findSectionFromLogicCode(lineId, "G0202-A");
Section section = LineGraphicDataRepository.getDeviceByCode(lineId, sectionCode, Section.class);
NccAlertInfo alertInfo = this.alertInfoService.createAlert(AlertType.SWITCH_LOST, AlertDeviceType.DEVICE_TYPE_SWITCH, section.getCommon().getId(), track, track.getId());
@ -75,9 +77,11 @@ public class AlertMockService {
}
case AXLE_LED_ORANGE -> {
Track.Builder track = Track.newBuilder();
track.setLineId(3);
track.setAtcInvalid(true);
track.setRtuId(1);
track.setId("G0202-A");
track.setLineId(lineId);
String sectionCode = LineGraphicDataRepository.findSectionFromLogicCode(lineId, "G0202-A");
Section section = LineGraphicDataRepository.getDeviceByCode(lineId, sectionCode, Section.class);
NccAlertInfo alertInfo = this.alertInfoService.createAlert(AlertType.AXLE_LED_ORANGE, AlertDeviceType.DEVICE_TYPE_TRACK, section.getCommon().getId(), track, track.getId());
@ -86,6 +90,7 @@ public class AlertMockService {
}
case PLATFORM_DOOR_CANNOT_OPEN -> {
DeviceStatusProto.Platform.Builder platform = DeviceStatusProto.Platform.newBuilder();
platform.setLineId(lineId);
platform.setId("PF02301").setReceiveTime(System.currentTimeMillis()).setTrainberth(true);
LayoutGraphicsProto.Platform platform2 = LineGraphicDataRepository.getDeviceByCode(lineId, platform.getId(), LayoutGraphicsProto.Platform.class);
NccAlertInfo alertInfo = this.alertInfoService.createAlert(alertType, AlertDeviceType.DEVICE_TYPE_PLATFORM, platform2.getCommon().getId(), platform, platform.getId());
@ -94,6 +99,7 @@ public class AlertMockService {
}
case PLATFORM_DOOR_CANNOT_CLOSE -> {
DeviceStatusProto.Platform.Builder platform = DeviceStatusProto.Platform.newBuilder();
platform.setLineId(lineId);
platform.setId("PF02301").setReceiveTime(System.currentTimeMillis()).setTrainberth(true).setPsdOpen(true);
LayoutGraphicsProto.Platform platform2 = LineGraphicDataRepository.getDeviceByCode(lineId, platform.getId(), LayoutGraphicsProto.Platform.class);
NccAlertInfo alertInfo = this.alertInfoService.createAlert(alertType, AlertDeviceType.DEVICE_TYPE_PLATFORM, platform2.getCommon().getId(), platform, platform.getId());

@ -1 +1 @@
Subproject commit aec7512cf09e451aca396de2f6e8b98e9b68c624
Subproject commit b44f47754df86082bc6402be4899475ad0d4ffff