diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java index c3c70aa7f..be093275d 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainLoadService.java @@ -615,7 +615,7 @@ public class AtsTrainLoadService { SimulationDataRepository repository = simulation.getRepository(); int loadedNum = 0; for (TrainLoadParam2 trainLoadParam2 : trainLoadList) { - if (loadedNum > num) { + if (loadedNum == num) { break; } TripPlan tripPlan = trainLoadParam2.getTripPlan(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java index 75043f5c5..79bc7b548 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java @@ -292,17 +292,17 @@ public class ATPLogicLoop { switch (activity) { case PARK: // 停靠 train.nextParkedTrainActivity(); + if (train.isAtoOn()) { + atoService.closeATO(train); + train.setAutoOpenATO(true); + } break; case OPEN_DOOR: // 开门 - if (train.isAtoOn() && !train.getDoorMode().equals(VirtualRealityTrain.DoorMode.MM)) { // 不是自动开门 + if (!train.getDoorMode().equals(VirtualRealityTrain.DoorMode.MM)) { // 不是自动开门 this.atoService.syncOpenDoor(simulation, train); } if (this.isAllDoorOpen(simulation, train)) { train.nextParkedTrainActivity(); - if (train.isAtoOn()) { - atoService.closeATO(train); - train.setAutoOpenATO(true); - } } break; case BOARD: // 乘客乘降 @@ -317,6 +317,9 @@ public class ATPLogicLoop { // } // 可以关门 // this.atoService.syncCloseDoor(simulation, train); + if (train.getDoorMode().equals(VirtualRealityTrain.DoorMode.AA)) { // 自动关门 + this.atoService.syncCloseDoor(simulation, train); + } if (this.isAllDoorClose(simulation, train)) { train.nextParkedTrainActivity(); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java index 3f55cd295..be14dc358 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPService.java @@ -293,7 +293,7 @@ public class ATPService { log.warn(String.format("列车[%s]未停止,不能操作车门", train.getGroupNumber())); return; } - if (!train.getDoorMode().isAuto(right)) { + if (!train.getDoorMode().isAuto(open)) { log.warn(String.format("列车[%s]门模式自动,不能操作车门", train.getGroupNumber())); return; }