代码调整

This commit is contained in:
tiger_zhou 2023-09-04 16:30:11 +08:00
parent 0038a63ecb
commit 4c277754cc
2 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,6 @@ package club.joylink.xiannccda.ats.message.collect.convertor;
import club.joylink.xiannccda.alert.core.AlertManager;
import club.joylink.xiannccda.ats.message.MessageId;
import club.joylink.xiannccda.ats.message.collect.DeviceDataRepository.DataTypeEnum;
import club.joylink.xiannccda.ats.message.line3.rep.TrainRecordResponse;
import club.joylink.xiannccda.ats.warn.TrainRecordAlertEvent;
import club.joylink.xiannccda.dto.protos.TrainProto.TrainRecord;
import com.google.protobuf.GeneratedMessageV3.Builder;

View File

@ -19,9 +19,11 @@ public class TrainReacrdAlertListener implements AlertSourceEventListener<TrainR
public void accept(TrainRecordAlertEvent event) {
TrainRecord.Builder trainRecord = event.getSource();
if (trainRecord.getTrainType() == TrainTypeEnum.PlannedTrain.getType()) {
if (trainRecord.getRecordType()) {
this.platformAlertMonitoringTask.putTrainRecord(trainRecord);
} else {
this.platformAlertMonitoringTask.remoceTrainRecord(trainRecord);
}
}
}
}