【增加站台定位】
This commit is contained in:
parent
90ad197305
commit
1286130d5a
@ -13,6 +13,7 @@ import club.joylink.rtss.util.JsonUtils;
|
||||
import club.joylink.rtss.vo.map.MapGraphDataNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapSignalNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.MapStationStandNewVO;
|
||||
import club.joylink.rtss.vo.map.graph.Point;
|
||||
import lombok.Getter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@ -53,6 +54,17 @@ public enum MapLocationRule {
|
||||
return currentSignal.getPosition();
|
||||
});
|
||||
}
|
||||
},
|
||||
STAND_MAP_LOCATION("使用站台定位") {
|
||||
@Override
|
||||
public String doHandle(Simulation simulation, MapElement mapElement) {
|
||||
return calcMapLocation(simulation, () -> {
|
||||
MapGraphDataNewVO mapGraphDataNewVO = simulation.getBuildParams().getMap().getGraphDataNew();
|
||||
MapStationStandNewVO stationStandNewVO = mapGraphDataNewVO.getStationStandList().stream()
|
||||
.filter(s -> s.getCode().equals(mapElement.getCode())).findFirst().get();
|
||||
return stationStandNewVO.getPosition();
|
||||
});
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user