Merge remote-tracking branch 'origin/test' into ci-restruct

This commit is contained in:
walker-sheng 2021-09-10 18:15:36 +08:00
commit b723ae88d1
3 changed files with 10 additions and 7 deletions

View File

@ -615,7 +615,7 @@ public class AtsTrainLoadService {
SimulationDataRepository repository = simulation.getRepository(); SimulationDataRepository repository = simulation.getRepository();
int loadedNum = 0; int loadedNum = 0;
for (TrainLoadParam2 trainLoadParam2 : trainLoadList) { for (TrainLoadParam2 trainLoadParam2 : trainLoadList) {
if (loadedNum > num) { if (loadedNum == num) {
break; break;
} }
TripPlan tripPlan = trainLoadParam2.getTripPlan(); TripPlan tripPlan = trainLoadParam2.getTripPlan();

View File

@ -292,17 +292,17 @@ public class ATPLogicLoop {
switch (activity) { switch (activity) {
case PARK: // 停靠 case PARK: // 停靠
train.nextParkedTrainActivity(); train.nextParkedTrainActivity();
if (train.isAtoOn()) {
atoService.closeATO(train);
train.setAutoOpenATO(true);
}
break; break;
case OPEN_DOOR: // 开门 case OPEN_DOOR: // 开门
if (train.isAtoOn() && !train.getDoorMode().equals(VirtualRealityTrain.DoorMode.MM)) { // 不是自动开门 if (!train.getDoorMode().equals(VirtualRealityTrain.DoorMode.MM)) { // 不是自动开门
this.atoService.syncOpenDoor(simulation, train); this.atoService.syncOpenDoor(simulation, train);
} }
if (this.isAllDoorOpen(simulation, train)) { if (this.isAllDoorOpen(simulation, train)) {
train.nextParkedTrainActivity(); train.nextParkedTrainActivity();
if (train.isAtoOn()) {
atoService.closeATO(train);
train.setAutoOpenATO(true);
}
} }
break; break;
case BOARD: // 乘客乘降 case BOARD: // 乘客乘降
@ -317,6 +317,9 @@ public class ATPLogicLoop {
// } // }
// 可以关门 // 可以关门
// this.atoService.syncCloseDoor(simulation, train); // this.atoService.syncCloseDoor(simulation, train);
if (train.getDoorMode().equals(VirtualRealityTrain.DoorMode.AA)) { // 自动关门
this.atoService.syncCloseDoor(simulation, train);
}
if (this.isAllDoorClose(simulation, train)) { if (this.isAllDoorClose(simulation, train)) {
train.nextParkedTrainActivity(); train.nextParkedTrainActivity();
} }

View File

@ -293,7 +293,7 @@ public class ATPService {
log.warn(String.format("列车[%s]未停止,不能操作车门", train.getGroupNumber())); log.warn(String.format("列车[%s]未停止,不能操作车门", train.getGroupNumber()));
return; return;
} }
if (!train.getDoorMode().isAuto(right)) { if (!train.getDoorMode().isAuto(open)) {
log.warn(String.format("列车[%s]门模式自动,不能操作车门", train.getGroupNumber())); log.warn(String.format("列车[%s]门模式自动,不能操作车门", train.getGroupNumber()));
return; return;
} }