Commit c02624299f6040ba7690eebcb466483b8762931e

Authored by 潘钊
1 parent 73d9e104

update...

src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
@@ -688,10 +688,11 @@ public class GeoDataServiceImpl implements GeoDataService { @@ -688,10 +688,11 @@ public class GeoDataServiceImpl implements GeoDataService {
688 //重新排序路由 688 //重新排序路由
689 for (int i = 0, size = routes.size(); i < size; i++) { 689 for (int i = 0, size = routes.size(); i < size; i++) {
690 sr = routes.get(i); 690 sr = routes.get(i);
691 - sr.setStationRouteCode(no += step); 691 + sr.setStationRouteCode(no);
  692 + no += step;
692 if (sr.getId().intValue() == prevRouteId) { 693 if (sr.getId().intValue() == prevRouteId) {
693 - no += step;  
694 currentNo = no; 694 currentNo = no;
  695 + no += step;
695 } 696 }
696 } 697 }
697 698
@@ -817,11 +818,22 @@ public class GeoDataServiceImpl implements GeoDataService { @@ -817,11 +818,22 @@ public class GeoDataServiceImpl implements GeoDataService {
817 String sql = "update bsth_c_ls_stationroute set destroy=1 where id=?"; 818 String sql = "update bsth_c_ls_stationroute set destroy=1 where id=?";
818 jdbcTemplate.update(sql, station.getId()); 819 jdbcTemplate.update(sql, station.getId());
819 820
820 - //重新排序路由,标记mark 821 + /**
  822 + * ########## 重新排序路由,标记mark #########
  823 + */
821 sql = "select * from bsth_c_ls_stationroute where line_code='" + station.getLineCode() + "' and directions=" + station.getDirections() + " and destroy=0 and versions=" + station.getVersions(); 824 sql = "select * from bsth_c_ls_stationroute where line_code='" + station.getLineCode() + "' and directions=" + station.getDirections() + " and destroy=0 and versions=" + station.getVersions();
822 List<SaveStationRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveStationRouteDTO.class)); 825 List<SaveStationRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveStationRouteDTO.class));
823 Collections.sort(routes, new StationRouteComp()); 826 Collections.sort(routes, new StationRouteComp());
824 827
  828 + int no = 0,
  829 + step = 100;
  830 + SaveStationRouteDTO sr;
  831 + //重新排序路由
  832 + for (int i = 0, size = routes.size(); i < size; i++) {
  833 + sr = routes.get(i);
  834 + sr.setStationRouteCode(no += step);
  835 + }
  836 +
825 for (int i = 0, size = routes.size(); i < size; i++) { 837 for (int i = 0, size = routes.size(); i < size; i++) {
826 routes.get(i).setStationMark("Z"); 838 routes.get(i).setStationMark("Z");
827 } 839 }
src/main/resources/static/pages/base/geo_data_edit/js/map.js
@@ -320,8 +320,10 @@ var gb_ct_map = function () { @@ -320,8 +320,10 @@ var gb_ct_map = function () {
320 break; 320 break;
321 } 321 }
322 } 322 }
  323 + var point = new BMap.Point(p.ct_data.cp.longitude, p.ct_data.cp.latitude);
  324 + openRoadInfoWin(p, point);
323 325
324 - openRoadInfoWin(p, new BMap.Point(p.ct_data.cp.longitude, p.ct_data.cp.latitude)); 326 + map.setCenter(point);
325 }; 327 };
326 328
327 var exitEditBufferStatus = function (s) { 329 var exitEditBufferStatus = function (s) {