Commit 40e5d8a0d2dfd184fec77c8aa71d878528a74575
1 parent
043acec8
1.生成线路时去掉下行的'(起点站)' '(终点站)'字样
Showing
2 changed files
with
8 additions
and
0 deletions
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -1185,6 +1185,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -1185,6 +1185,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 1185 | String sleepStr = ""; | 1185 | String sleepStr = ""; |
| 1186 | // 方向 | 1186 | // 方向 |
| 1187 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 1187 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 1188 | + if (directions == 1) { | ||
| 1189 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 1190 | + } | ||
| 1188 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 1191 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 1189 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); | 1192 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 1190 | if(sobje.size()==1) { | 1193 | if(sobje.size()==1) { |
| @@ -1274,6 +1277,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -1274,6 +1277,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 1274 | String sleepStr = ""; | 1277 | String sleepStr = ""; |
| 1275 | // 方向 | 1278 | // 方向 |
| 1276 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 1279 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 1280 | + if (directions == 1) { | ||
| 1281 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 1282 | + } | ||
| 1277 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 1283 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 1278 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); | 1284 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 1279 | if(sobje.size()==1) { | 1285 | if(sobje.size()==1) { |
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| @@ -502,6 +502,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -502,6 +502,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 502 | Integer ver = code2version.get(lineCode); | 502 | Integer ver = code2version.get(lineCode); |
| 503 | if (ver != null) { | 503 | if (ver != null) { |
| 504 | stationNumMap = getLsStationRoute(lineCode, ver); | 504 | stationNumMap = getLsStationRoute(lineCode, ver); |
| 505 | + } else { | ||
| 506 | + stationNumMap = null; | ||
| 505 | } | 507 | } |
| 506 | } | 508 | } |
| 507 | 509 |