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();
int loadedNum = 0;
for (TrainLoadParam2 trainLoadParam2 : trainLoadList) {
if (loadedNum > num) {
if (loadedNum == num) {
break;
}
TripPlan tripPlan = trainLoadParam2.getTripPlan();

View File

@ -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();
}

View File

@ -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;
}