移动授权计算bug修改
This commit is contained in:
parent
28f992fb7c
commit
8d3cfc90ba
@ -128,19 +128,6 @@ public class ZCLogicLoop {
|
||||
if (headPosition.getSection().isFault()) {
|
||||
endList.add(new MovementAuthority.End(headPosition.getSection(), MovementAuthority.EndType.FAULT_SECTION));
|
||||
}
|
||||
// 前方列车
|
||||
VirtualRealityTrain frontTrain = this.queryFrontTrain(train, trainList);
|
||||
if (Objects.nonNull(frontTrain)) {
|
||||
Section baseSection;
|
||||
if (Objects.equals(frontTrain.isRight(), train.isRight())) {
|
||||
baseSection = frontTrain.calculateTailPosition().getSection();
|
||||
} else {
|
||||
baseSection = frontTrain.getHeadPosition().getSection();
|
||||
}
|
||||
endList.add(new MovementAuthority.End(frontTrain,
|
||||
MovementAuthority.EndType.FRONT_TRAIN,
|
||||
baseSection));
|
||||
}
|
||||
int count = 0;
|
||||
while (count < 50) {
|
||||
++count;
|
||||
@ -202,6 +189,19 @@ public class ZCLogicLoop {
|
||||
|
||||
section = temp;
|
||||
}
|
||||
// 前方列车
|
||||
VirtualRealityTrain frontTrain = this.queryFrontTrain(train, trainList);
|
||||
if (Objects.nonNull(frontTrain)) {
|
||||
Section baseSection;
|
||||
if (Objects.equals(frontTrain.isRight(), train.isRight())) {
|
||||
baseSection = frontTrain.calculateTailPosition().getSection();
|
||||
} else {
|
||||
baseSection = frontTrain.getHeadPosition().getSection();
|
||||
}
|
||||
endList.add(new MovementAuthority.End(frontTrain,
|
||||
MovementAuthority.EndType.FRONT_TRAIN,
|
||||
baseSection));
|
||||
}
|
||||
return endList;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user