【单操实训生成定位】

This commit is contained in:
weizhihong 2023-05-05 13:22:26 +08:00
parent 8d4ac98eb9
commit 440d2df836

View File

@ -20,6 +20,17 @@ public enum PropertyValueRule {
public String resolve(Simulation simulation, Object mapElement) {
if (mapElement instanceof Signal) {
return ((Signal) mapElement).getShowName();
} else if (mapElement instanceof Stand) {
boolean upRight = simulation.getBuildParams().getMap().getConfigVO().getUpRight();
Stand stand = (Stand) mapElement;
return stand.getStation().getName() + (Objects.equals(upRight, stand.isRight()) ? "上行站台" : "下行站台");
} else if (mapElement instanceof Section) {
Section section = (Section) mapElement;
if (section.isLogicSection()) {
return section.getParent().getName() + "_" + section.getName();
} else {
return section.getName();
}
} else {
return ((MapNamedElement) mapElement).getName();
}