Commit 80a9a8f44157ab60a5a16fdbe68d1bb0eb7ffc1d
1 parent
d56180d5
1.生成线路时去掉下行的'(起点站)' '(终点站)'字样
Showing
1 changed file
with
6 additions
and
0 deletions
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -710,6 +710,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -710,6 +710,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 710 | String sleepStr = ""; | 710 | String sleepStr = ""; |
| 711 | // 方向 | 711 | // 方向 |
| 712 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 712 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 713 | + if (directions == 1) { | ||
| 714 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 715 | + } | ||
| 713 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 716 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 714 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); | 717 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); |
| 715 | if(sobje.size()==1) { | 718 | if(sobje.size()==1) { |
| @@ -799,6 +802,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -799,6 +802,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 799 | String sleepStr = ""; | 802 | String sleepStr = ""; |
| 800 | // 方向 | 803 | // 方向 |
| 801 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 804 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 805 | + if (directions == 1) { | ||
| 806 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 807 | + } | ||
| 802 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 808 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 803 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); | 809 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); |
| 804 | if(sobje.size()==1) { | 810 | if(sobje.size()==1) { |