增加一个ATS报警信息类型

This commit is contained in:
joylink_zhangsai 2023-05-09 17:21:24 +08:00
parent bf0bd580f7
commit b0c3dabc38
2 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,8 @@ public class AtsAlarm {
Conflict_Route_Set,
/** 列车延误 */
TRAIN_DELAY,
/** 设备故障 */
DEVICE_FAULT,
}
/**

View File

@ -29,7 +29,7 @@ public class AtsAlarmService {
Simulation simulation = event.getSimulation();
DeviceFaultInfo deviceFaultInfo = event.getDeviceFaultInfo();
AtsAlarm alarm = new AtsAlarm(String.valueOf(simulation.getIdGenerator().generateAlarmId()),
simulation.getCorrectSystemTime(), null, "A",
simulation.getCorrectSystemTime(), AtsAlarm.Type.DEVICE_FAULT, "A",
deviceFaultInfo.getCode(), deviceFaultInfo.getFault());
simulation.getRepository().addAtsAlarm(alarm);
SocketMessageVO<Collection<AtsAlarm>> alarmMessage