代码调整
This commit is contained in:
parent
0038a63ecb
commit
4c277754cc
@ -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;
|
||||
|
@ -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()) {
|
||||
this.platformAlertMonitoringTask.putTrainRecord(trainRecord);
|
||||
} else {
|
||||
this.platformAlertMonitoringTask.remoceTrainRecord(trainRecord);
|
||||
if (trainRecord.getRecordType()) {
|
||||
this.platformAlertMonitoringTask.putTrainRecord(trainRecord);
|
||||
} else {
|
||||
this.platformAlertMonitoringTask.remoceTrainRecord(trainRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user