| | |
| | | @Component |
| | | public class NavigateUtils { |
| | | |
| | | public synchronized List<NavigateNode> calcByStationId(Integer startStationId, Integer endStationId) { |
| | | public synchronized List<NavigateNode> calcByStationId(int lev, Integer startStationId, Integer endStationId) { |
| | | NavigateSolution navigateSolution = new NavigateSolution(); |
| | | List<List<NavigateNode>> stationMap = navigateSolution.getStationMap(); |
| | | List<List<NavigateNode>> stationMap = navigateSolution.getStationMap(lev); |
| | | |
| | | NavigateNode startNode = navigateSolution.findStationNavigateNode(stationMap, startStationId); |
| | | if (startNode == null){ |
| | |
| | | return fitlerList; |
| | | } |
| | | |
| | | public synchronized List<NavigateNode> calcByTrackSiteNo(Integer startTrackSiteNo, Integer endTrackSiteNo) { |
| | | public synchronized List<NavigateNode> calcByTrackSiteNo(int lev, Integer startTrackSiteNo, Integer endTrackSiteNo) { |
| | | NavigateSolution navigateSolution = new NavigateSolution(); |
| | | List<List<NavigateNode>> rgvTrackMap = navigateSolution.getRgvTrackMap(); |
| | | List<List<NavigateNode>> rgvTrackMap = navigateSolution.getRgvTrackMap(lev); |
| | | |
| | | NavigateNode startNode = navigateSolution.findTrackSiteNoNavigateNode(rgvTrackMap, startTrackSiteNo); |
| | | if (startNode == null){ |
| | |
| | | return fitlerList; |
| | | } |
| | | |
| | | public synchronized List<NavigateNode> findLiftStationList(int lev) { |
| | | NavigateSolution navigateSolution = new NavigateSolution(); |
| | | List<List<NavigateNode>> stationMap = navigateSolution.getStationMap(lev); |
| | | |
| | | List<NavigateNode> liftStationList = new ArrayList<>(); |
| | | for (List<NavigateNode> navigateNodes : stationMap) { |
| | | for (NavigateNode navigateNode : navigateNodes) { |
| | | String nodeType = navigateNode.getNodeType(); |
| | | if(nodeType == null){ |
| | | continue; |
| | | } |
| | | if(!nodeType.equals("devp")){ |
| | | continue; |
| | | } |
| | | JSONObject valuObject = JSON.parseObject(navigateNode.getNodeValue()); |
| | | if(valuObject == null){ |
| | | continue; |
| | | } |
| | | if (valuObject.containsKey("liftNo")) { |
| | | liftStationList.add(navigateNode); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return liftStationList; |
| | | } |
| | | } |