Commit ba9f3d9331255ac55b233c7ca1931838f41d6a50
1 parent
08ed2bb2
1.生成线路时去掉下行的'(起点站)' '(终点站)'字样
Showing
2 changed files
with
8 additions
and
1 deletions
src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
| @@ -117,7 +117,7 @@ public class CarOutInfoHandler { | @@ -117,7 +117,7 @@ public class CarOutInfoHandler { | ||
| 117 | //删除 | 117 | //删除 |
| 118 | jdbcTemplate.update("delete from bsth_t_clfcxxb"); | 118 | jdbcTemplate.update("delete from bsth_t_clfcxxb"); |
| 119 | //重新写入 | 119 | //重新写入 |
| 120 | - jdbcTemplate.batchUpdate("insert into bsth_t_clfcxxb(rq, line_code, line_name, lp_name, lp_sn, dfsj, nbbm, cph, bc_type, end_station_name, updown, jGh, jName, remarks, sn)" + | 120 | + jdbcTemplate.batchUpdate("insert into bsth_t_clfcxxb(rq, line_code, line_name, lp_name, lp_sn, dfsj, nbbm, cph, bc_type, end_station_name, updown, jGh, jName, remarks, sn, sch)" + |
| 121 | " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() { | 121 | " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() { |
| 122 | @Override | 122 | @Override |
| 123 | public void setValues(PreparedStatement ps, int i) throws SQLException { | 123 | public void setValues(PreparedStatement ps, int i) throws SQLException { |
| @@ -137,6 +137,7 @@ public class CarOutInfoHandler { | @@ -137,6 +137,7 @@ public class CarOutInfoHandler { | ||
| 137 | ps.setString(13, sch.getjName()); | 137 | ps.setString(13, sch.getjName()); |
| 138 | ps.setString(14, sch.getRemarks()); | 138 | ps.setString(14, sch.getRemarks()); |
| 139 | ps.setInt(15, sch.getFcpSn()); | 139 | ps.setInt(15, sch.getFcpSn()); |
| 140 | + ps.setLong(16, sch.getId()); | ||
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | @Override | 143 | @Override |
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) { |