修改设置备用车预选模式无效bug
This commit is contained in:
parent
5e5a17d79a
commit
7f30126bd8
|
@ -30,6 +30,19 @@ import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
|||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.simulation.cbtc.onboard.ATP.ATPService;
|
||||
import club.joylink.rtss.simulation.cbtc.tool.DeviceStatusModifyTool;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
@ -37,12 +50,6 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AtsTrainLoadService {
|
||||
|
@ -978,6 +985,15 @@ public class AtsTrainLoadService {
|
|||
train.initAsRM();
|
||||
}
|
||||
}
|
||||
if (preselectionMode != null && !preselectionMode.isHigherThan(train.getPreselectionMode())) {
|
||||
train.initByPreselectionMode(preselectionMode);
|
||||
//列车初始为ITC级别如果当时的移动授权不允许移动,则会无法移动,所以将实际级别降为RM
|
||||
if (preselectionMode.isMatchTheRunLevel(RunLevel.ITC)) {
|
||||
train.setDriveMode(DriveMode.RM);
|
||||
train.setRunLevel(RunLevel.IL);
|
||||
train.setGear(VirtualRealityTrain.Handwheel.MANUAL);
|
||||
}
|
||||
}
|
||||
if (!repository.getConfig().isHandleDepot()) {
|
||||
if (preselectionMode != null && !preselectionMode.isHigherThan(train.getPreselectionMode())) {
|
||||
train.initByPreselectionMode(preselectionMode);
|
||||
|
|
Loading…
Reference in New Issue