列车图例显示位置调整

This commit is contained in:
tiger_zhou 2023-05-04 14:06:36 +08:00
parent c78ff9dda1
commit 6825eb02bd

View File

@ -21,21 +21,17 @@ public class InOutBoundService implements CalculateDiagram{
@Override
public Optional<StationDiagram> calculate(Simulation simulation, TrainInfo trainInfo, VirtualRealityTrain train, SortDiagramStation diagramStation){
if(trainInfo.isInbound()){
StationDiagram sd = new StationDiagram(train);
sd.setShowTrainDiagram(false);
return Optional.of(sd);
}
Station nextStation = train.getNextStation();
// SectionPosition headPos = train.getHeadPosition();
SectionPosition tailPos = train.getTailPosition();
Station startStation = diagramStation.findFirstNotDepotStation(train.isRight());
if(Objects.isNull(nextStation)){
if(trainInfo.isInbound() || Objects.isNull(nextStation)){
StationDiagram sd = new StationDiagram(train);
sd.setShowTrainDiagram(false);
log.debug("列车[{}] 出库 方向[{}]",train.getGroupNumber(),train.isRight());
return Optional.of(sd);
} else if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) {
}
// SectionPosition headPos = train.getHeadPosition();
SectionPosition tailPos = train.getTailPosition();
Station startStation = diagramStation.findFirstNotDepotStation(train.isRight());
if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) {
//列车入库车尾离开站台轨
StationDiagram sd = new StationDiagram(train);
sd.setShowTrainDiagram(false);