Commit 8f5b535b8dc305b55ba5f54b83e1c8ae25a0a5a1

Authored by 李强
1 parent 78b0511f

基础信息bug修复

src/main/java/com/bsth/entity/Station.java
... ... @@ -97,7 +97,16 @@ public class Station {
97 97  
98 98 // 版本号
99 99 private Integer versions;
100   -
  100 +
  101 + /** 是否有电子站牌 这里是老调度系统的原始字段,暂时保留该字段。 */
  102 + private Integer isHaveLed;
  103 +
  104 + /** 是否有候车亭 这里是老调度系统的原始字段,暂时保留该字段。*/
  105 + private Integer isHaveShelter;
  106 +
  107 + /** 是否港湾式公交站 这里是老调度系统的原始字段,暂时保留该字段。*/
  108 + private Integer isHarbourStation;
  109 +
101 110 // 描述
102 111 private String descriptions;
103 112  
... ... @@ -115,6 +124,30 @@ public class Station {
115 124 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
116 125 private Date updateDate;
117 126  
  127 + public Integer getIsHaveLed() {
  128 + return isHaveLed;
  129 + }
  130 +
  131 + public void setIsHaveLed(Integer isHaveLed) {
  132 + this.isHaveLed = isHaveLed;
  133 + }
  134 +
  135 + public Integer getIsHaveShelter() {
  136 + return isHaveShelter;
  137 + }
  138 +
  139 + public void setIsHaveShelter(Integer isHaveShelter) {
  140 + this.isHaveShelter = isHaveShelter;
  141 + }
  142 +
  143 + public Integer getIsHarbourStation() {
  144 + return isHarbourStation;
  145 + }
  146 +
  147 + public void setIsHarbourStation(Integer isHarbourStation) {
  148 + this.isHarbourStation = isHarbourStation;
  149 + }
  150 +
118 151 public String getAddr() {
119 152 return addr;
120 153 }
... ...
src/main/java/com/bsth/repository/CarParkRepository.java
... ... @@ -33,9 +33,9 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{
33 33  
34 34 "?6 , str_to_date(?7,'%Y-%m-%d %H:%i:%s') , ?8 , ?9 , ?10," +
35 35  
36   - "str_to_date(?11,'%Y-%m-%d %H:%i:%s'), ?12 ,?13,GeomFromText(?14), ?15, " +
  36 + "str_to_date(?11,'%Y-%m-%d %H:%i:%s'), ?12 ,?13,ST_GeomFromText(?14), ?15, " +
37 37  
38   - "?16, GeomFromText(?17), ?18,?19)", nativeQuery=true)
  38 + "?16, ST_GeomFromText(?17), ?18,?19)", nativeQuery=true)
39 39 public void carParkSave(Double area,String company,String parkCode,String parkName,
40 40  
41 41 String brancheCompany,Integer createBy,String createDate,String descriptions,Integer destroy,
... ... @@ -91,8 +91,8 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{
91 91 "versions = ?12 , " +
92 92 "b_center_point = ?13 , " +
93 93 "g_center_point = ?14 , " +
94   - "b_park_point = GeomFromText(?15) , " +
95   - "g_park_point = GeomFromText(?16) , " +
  94 + "b_park_point = ST_GeomFromText(?15) , " +
  95 + "g_park_point = ST_GeomFromText(?16) , " +
96 96 "db_type = ?17 , " +
97 97 "radius = ?18 , " +
98 98 "shapes_type = ?19 " +
... ...
src/main/java/com/bsth/repository/SectionRepository.java
... ... @@ -83,33 +83,32 @@ public interface SectionRepository extends BaseRepository<Section, Integer> {
83 83 @Transactional
84 84 @Modifying
85 85 @Query(value="UPDATE bsth_c_section SET " +
86   - "gsection_vector = ST_GeomFromText(?2) , " +
87   - "bsection_vector = ST_GeomFromText(?3)," +
88   - "section_code = ?4," +
89   - "section_name = ?5," +
90   - "croses_road = ?6," +
91   - "end_node = ?7," +
92   - "start_node = ?8," +
93   - "middle_node = ?9," +
94   - "section_type = ?10," +
95   - "csection_vector = ?11," +
96   - "road_coding = ?12," +
97   - "section_distance = ?13," +
98   - "section_time = ?14," +
99   - "db_type = ?15," +
100   - "speed_limit = ?16," +
101   - "descriptions = ?17," +
102   - "versions = ?18," +
103   - "create_by = ?19," +
104   - "create_date = str_to_date(?20,'%Y-%m-%d %H:%i:%s')," +
105   - "update_by = ?21," +
106   - "update_date = str_to_date(?22,'%Y-%m-%d %H:%i:%s')" +
  86 + " gsection_vector = ST_GeomFromText(?2) , " +
  87 + " bsection_vector = ST_GeomFromText(?3)," +
  88 + " section_code = ?4," +
  89 + " section_name = ?5," +
  90 + " croses_road = ?6," +
  91 + " end_node = ?7," +
  92 + " start_node = ?8," +
  93 + " middle_node = ?9," +
  94 + " section_type = ?10," +
  95 + " road_coding = ?11," +
  96 + " section_distance = ?12," +
  97 + " section_time = ?13," +
  98 + " db_type = ?14," +
  99 + " speed_limit = ?15," +
  100 + " descriptions = ?16," +
  101 + " versions = ?17," +
  102 + " create_by = ?18," +
  103 + " create_date = str_to_date(?19,'%Y-%m-%d %H:%i:%s')," +
  104 + " update_by = ?20," +
  105 + " update_date = str_to_date(?21,'%Y-%m-%d %H:%i:%s')" +
107 106 " WHERE id = ?1", nativeQuery=true)
108 107 public void sectionUpdate(Integer sectionId,String gsectionVector,String bsectionVector,String sectionCode,String sectionName,
109 108  
110 109 String crosesRoad,String endNode,String startNode,String middleNode,String sectionType,
111 110  
112   - String csectionVector,String roadCoding,Double sectionDistance,Double sectionTime,String dbType,
  111 + String roadCoding,Double sectionDistance,Double sectionTime,String dbType,
113 112  
114 113 Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate,
115 114  
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -69,7 +69,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int
69 69 "r.versions AS versions," +
70 70 "r.descriptions AS descriptions" +
71 71 " FROM bsth_c_sectionroute r where r.line = ?1 and r.directions = ?2 and r.destroy=0 ) a " +
72   - " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id", nativeQuery=true)
  72 + " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id order by a.sectionrouteCode asc", nativeQuery=true)
73 73 List<Object[]> getSectionRoute(int lineId, int directions);
74 74  
75 75  
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -110,9 +110,12 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
110 110 *
111 111 * @return List<Object[]>
112 112 */
113   - @Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" +
  113 + /*@Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" +
114 114 "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " +
115   - "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)
  115 + "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)*/
  116 + @Query(value = "SELECT s.b_jwpoints,s.station_name,r.station_route_code FROM (" +
  117 + "SELECT b.station,b.station_route_code FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " +
  118 + "LEFT JOIN bsth_c_station s on r.station = s.id order by r.station_route_code asc", nativeQuery=true)
116 119 List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction);
117 120  
118 121 /**
... ...
src/main/java/com/bsth/service/impl/CarParkServiceImpl.java
... ... @@ -75,9 +75,19 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
75 75  
76 76 }
77 77  
78   - bParkPoint = "POLYGON((" + bParkPoint +"))";
  78 + if(bParkPoint.equals(""))
  79 + bParkPoint = null;
  80 + else
  81 + bParkPoint = "POLYGON((" + bParkPoint +"))";
  82 +
  83 + if(gParkPoint.equals(""))
  84 + gParkPoint = null;
  85 + else
  86 + gParkPoint = "POLYGON((" + gParkPoint +"))";
79 87  
80   - gParkPoint = "POLYGON((" + gParkPoint +"))";
  88 + /*bParkPoint = "POLYGON((" + bParkPoint +"))";
  89 +
  90 + gParkPoint = "POLYGON((" + gParkPoint +"))";*/
81 91  
82 92 // 地理位置中心点(百度坐标)
83 93 String bCenterPoint = map.get("bCenterPoint").equals("") ? "" : map.get("bCenterPoint").toString();
... ... @@ -93,7 +103,7 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
93 103  
94 104 }
95 105  
96   - String gCenterPoint = "";
  106 + String gCenterPoint = null;
97 107  
98 108 if(bJwpointsArray.length>0) {
99 109  
... ... @@ -147,6 +157,9 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
147 157 // 修改人
148 158 Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString());
149 159  
  160 +
  161 +
  162 +
150 163 carParkRepository.carParkSave(area, company, parkCode, parkName,
151 164  
152 165 brancheCompany, createBy, createDate, descriptions, destroy,
... ... @@ -296,7 +309,7 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
296 309  
297 310 }
298 311  
299   - String gCenterPoint = "";
  312 + String gCenterPoint =null;
300 313  
301 314 if(bJwpointsArray.length>0) {
302 315  
... ... @@ -337,10 +350,18 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
337 350 }
338 351  
339 352 }
  353 + if(bParkPoint.equals(""))
  354 + bParkPoint = null;
  355 + else
  356 + bParkPoint = "POLYGON((" + bParkPoint +"))";
  357 +
  358 + if(gParkPoint.equals(""))
  359 + gParkPoint = null;
  360 + else
  361 + gParkPoint = "POLYGON((" + gParkPoint +"))";
  362 + /*bParkPoint = "POLYGON((" + bParkPoint +"))";
340 363  
341   - bParkPoint = "POLYGON((" + bParkPoint +"))";
342   -
343   - gParkPoint = "POLYGON((" + gParkPoint +"))";
  364 + gParkPoint = "POLYGON((" + gParkPoint +"))";*/
344 365  
345 366 // 编码
346 367 String parkCode = map.get("parkCode").equals("") ? "" : map.get("parkCode").toString();
... ...
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
... ... @@ -213,10 +213,11 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
213 213  
214 214 String sectionType="";
215 215  
216   - String csectionVector="";
  216 + // String csectionVector="";
217 217  
218 218 // 更新
219   - repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);
  219 + /*repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);*/
  220 + repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);
220 221  
221 222 SectionRoute route = new SectionRoute();
222 223  
... ... @@ -393,7 +394,7 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
393 394  
394 395 String sectionType="";
395 396  
396   - String csectionVector="";
  397 + String csectionVector=null;
397 398  
398 399 Integer id = Integer.valueOf(sectionCode);
399 400  
... ...
src/main/java/com/bsth/service/impl/StationServiceImpl.java
... ... @@ -977,9 +977,9 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
977 977  
978 978 }
979 979  
980   - bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
  980 + /* bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
981 981  
982   - gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
  982 + gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";*/
983 983  
984 984 // 是否撤销
985 985 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
... ...
src/main/java/com/bsth/util/Geo/SHCJ2BDJW.java
... ... @@ -25,9 +25,11 @@ public class SHCJ2BDJW {
25 25  
26 26 ResultSet rs = null;
27 27  
28   - String sqlSelect = "SELECT b.SHAPESTRING as SHAPE , b.id as ID FROM jjwgps_t_gjldb b where SHAPESTRING is not null order by b.ldbh asc ";
  28 + /*String sqlSelect = "SELECT b.SHAPESTRING as SHAPE , b.id as ID FROM jjwgps_t_gjldb b where SHAPESTRING is not null order by b.ldbh asc ";*/
  29 + /*String sqlSelect = "select s.id,s.descriptions from bsth_c_station s order by s.id asc ";*/
  30 + String sqlSelect = "SELECT s.id,s.descriptions FROM bsth_c_section s order by s.id asc ";
29 31  
30   - String sqlUpdate = "UPDATE jjwgps_t_gjldb SET bdjw = GeomFromText(?),SHAPE = GeomFromText(?) where id = ?";
  32 + String sqlUpdate = "UPDATE bsth_c_section SET csection_vector = ST_GeomFromText(?) , bsection_vector=ST_GeomFromText(?) , gsection_vector=ST_GeomFromText(?) where id = ?";
31 33  
32 34 List<Map<String, Object>> list = new ArrayList<>();
33 35  
... ... @@ -42,9 +44,9 @@ public class SHCJ2BDJW {
42 44  
43 45 Map<String, Object> map = new HashMap<String, Object>();
44 46  
45   - map.put("shape", rs.getString("SHAPE"));
  47 + map.put("descriptions", rs.getString("descriptions"));
46 48  
47   - map.put("id", rs.getInt("ID"));
  49 + map.put("id", rs.getInt("id"));
48 50  
49 51 list.add(map);
50 52 }
... ... @@ -52,15 +54,29 @@ public class SHCJ2BDJW {
52 54 for(int i =0;i<list.size();i++) {
53 55  
54 56 Map<String, Object> temp = list.get(i);
55   -
56   - String lineString = temp.get("shape").toString();
57   - /*String lineString = "LINESTRING (13532.5305161702 -3677.63275264995, 13433.22401617 -3881.74765264988)";*/
58   -
  57 + // POINT (8229.30921617 -933.16425265)
  58 + String lineString = temp.get("descriptions").toString();
  59 + int id = Integer.parseInt(temp.get("id").toString());
59 60  
60 61 String arrayP[] = lineString.substring(lineString.indexOf("(")+1, lineString.length()-1).split(", ");
61   -
62   - int id = Integer.parseInt(temp.get("id").toString());
63   - String geometry = "";
  62 + /*String arrayP[] = lineString.substring(lineString.indexOf("(")+1, lineString.length()-1).split(" ");
  63 + String b_jwpoints = "";
  64 + Float g_lonx=0.0f,g_laty=0.0f,x=0.0f,y=0.0f;*/
  65 +
  66 + /*Double lng = Double.parseDouble(arrayP[0]);
  67 + Double lat = Double.parseDouble(arrayP[1]);
  68 + x = Float.parseFloat(arrayP[0]);
  69 + y = Float.parseFloat(arrayP[1]);
  70 + // WGS84
  71 + Map map_2 = JWDUtil.ConvertSHToJW(lng,lat);
  72 + g_lonx = Float.parseFloat(map_2.get("x").toString());
  73 + g_laty = Float.parseFloat(map_2.get("y").toString());
  74 + Location location = TransGPS.LocationMake(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
  75 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
  76 + b_jwpoints = (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);*/
  77 + //b_jwpoints = (location.getLng()) + " " + (location.getLat());
  78 +
  79 + String csection_vector="",bsection_vector="",gsection_vector="";
64 80  
65 81 for(int k =0;k<arrayP.length;k++) {
66 82  
... ... @@ -76,28 +92,42 @@ public class SHCJ2BDJW {
76 92  
77 93 location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
78 94  
79   - if(k==arrayP.length-1)
80   - geometry = geometry + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);
81   - else
82   - geometry = geometry + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624) + ",";
  95 + if(k==arrayP.length-1) {
  96 + bsection_vector = bsection_vector + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);
  97 + csection_vector = csection_vector + arrayXY[0] + " " + arrayXY[1];
  98 + gsection_vector = gsection_vector + map_2.get("x").toString() + " " + map_2.get("y").toString();
  99 + }else {
  100 + bsection_vector = bsection_vector + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624) + ",";
  101 + csection_vector = csection_vector + arrayXY[0] + " " + arrayXY[1] +",";
  102 + gsection_vector = gsection_vector + map_2.get("x").toString() + " " + map_2.get("y").toString()+",";
  103 + }
83 104  
84 105  
85 106 }
86 107  
87 108 ps = null;
88   -
89   - geometry = "LINESTRING(" + geometry +")";
  109 + bsection_vector = "LINESTRING(" + bsection_vector +")";
  110 + csection_vector = "LINESTRING(" + csection_vector +")";
  111 + gsection_vector = "LINESTRING(" + gsection_vector +")";
90 112  
91 113 ps = conn.prepareStatement(sqlUpdate);
92 114  
93   - ps.setString(1, geometry);
94   -
95   - ps.setString(2, lineString);
96   -
97   - ps.setInt(3, id);
98   -
  115 + // String sqlUpdate = "UPDATE bsth_c_section SET csection_vector = ? , bsection_vector=? , gsection_vector=? where id = ?";
  116 + ps.setString(1, csection_vector);
  117 + ps.setString(2, bsection_vector);
  118 + ps.setString(3, gsection_vector);
  119 + ps.setInt(4, id);
  120 +
  121 + //int stauts = ps.executeUpdate();
  122 + // String sqlUpdate = "UPDATE bsth_c_station SET b_jwpoints = ?1 , g_lonx=?2 , g_laty=?3 , x = ?4 , y = ?5 where id = ?6";
  123 + /*ps.setString(1, b_jwpoints);
  124 + ps.setFloat(2, g_lonx);
  125 + ps.setFloat(3, g_laty);
  126 + ps.setFloat(4, x);
  127 + ps.setFloat(5, y);
  128 + ps.setFloat(6, id);*/
99 129 int stauts = ps.executeUpdate();
100   -
  130 + System.out.println(stauts);
101 131 }
102 132  
103 133 } catch (SQLException e) {
... ...
src/main/resources/static/pages/base/carpark/js/carpark-positions-function.js
... ... @@ -59,11 +59,11 @@ var PublicFunctions = function () {
59 59  
60 60 var shapesV = '';
61 61  
62   - if(r[0].carParkShapesType='d') {
  62 + if(r[0].carParkShapesType=='d') {
63 63  
64 64 shapesV = '多边形';
65 65  
66   - }else if(r[0].carParkShapesType='r') {
  66 + }else if(r[0].carParkShapesType=='r') {
67 67  
68 68 shapesV = '圆形';
69 69  
... ...
src/main/resources/static/pages/base/carpark/js/carpark-positions-map.js
... ... @@ -326,7 +326,6 @@ var CarParkPWorldsBMap = function () {
326 326  
327 327 // 编辑图形
328 328 editShapes : function(stationShapesTypeV,mindex) {
329   -
330 329 // 关闭信息窗口
331 330 marker.closeInfoWindow();
332 331  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -438,10 +438,10 @@ var PublicFunctions = function () {
438 438 // 刷行左边树
439 439 PublicFunctions.resjtreeDate(Line.id,stationRouteDirections);
440 440  
441   - /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */
  441 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
442 442 GetAjaxData.getSectionRouteInfo(Line.id,stationRouteDirections,function(data) {
443 443  
444   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  444 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
445 445 PublicFunctions.linePanlThree(Line.id,data,stationRouteDirections);
446 446  
447 447 });
... ... @@ -594,8 +594,45 @@ var PublicFunctions = function () {
594 594 $('#descriptionsTextarea').val(Section.descriptions);
595 595  
596 596 },
  597 + //lineId,data,direction
  598 + treeSectionClick: function(lineId,data,direction){
  599 + /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
  600 + WorldsBMap.clearMarkAndOverlays();
  601 + // 编辑路段数据
  602 + for(var d= 0; d<data.length;d++){
  603 +
  604 + // 地图折线坐标点集合
  605 + var polylineArray = [];
  606 + // 获取路段折线坐标字符串
  607 + var sectionBsectionVectorStr = data[d].sectionBsectionVector;
  608 +
  609 + if(sectionBsectionVectorStr==null) {
  610 +
  611 + continue;
  612 +
  613 + }
  614 +
  615 + // 切割段折线坐标字符串
  616 + var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1);
  617 +
  618 + // 分割折线坐标字符串
  619 + var lineArray = tempStr.split(',');
  620 +
  621 + for(var i = 0;i<lineArray.length;i++) {
  622 +
  623 + polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
  624 +
  625 + }
  626 + var index = parseInt(polylineArray.length/2);
  627 + var center = polylineArray[index];
  628 + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
  629 + WorldsBMap.drawingUpline(polylineArray,center);
  630 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  631 + WorldsBMap.drawingUpStationPoint(center,data[d].name,d+1);
  632 + }
  633 + },
597 634  
598   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  635 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
599 636 linePanlThree : function(lineId,data,direction) {
600 637  
601 638 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
... ... @@ -603,18 +640,26 @@ var PublicFunctions = function () {
603 640  
604 641 WorldsBMap.clearMarkAndOverlays();
605 642  
  643 + var ceter_index = Math.round(resultdata.length / 2);
  644 +
  645 + var ceterPointsStr = resultdata[ceter_index].bJwpoints;
  646 +
  647 + var ceterPointsArray = ceterPointsStr.split(' ');
  648 +
  649 + var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  650 +
606 651 // 路段数据长度
607 652 var dataLen = data.length;
608   -
  653 + //debugger;
609 654 // 如果大于零
610 655 if(dataLen>0) {
611 656  
612   - // 地图折线坐标点集合
613   - var polylineArray = [];
614   -
615 657 // 编辑路段数据
616 658 for(var d= 0; d<dataLen;d++){
617 659  
  660 + // 地图折线坐标点集合
  661 + var polylineArray = [];
  662 +
618 663 // 获取路段折线坐标字符串
619 664 var sectionBsectionVectorStr = data[d].sectionBsectionVector;
620 665  
... ... @@ -636,11 +681,11 @@ var PublicFunctions = function () {
636 681  
637 682 }
638 683  
  684 + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
  685 + WorldsBMap.drawingUpline(polylineArray,polyline_center);
  686 +
639 687 }
640 688  
641   - /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
642   - WorldsBMap.drawingUpline(polylineArray,resultdata);
643   -
644 689 // 如果站点路由数据不为空
645 690 if(resultdata.length>0) {
646 691  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -651,10 +651,9 @@ var WorldsBMap = function () {
651 651 },
652 652  
653 653 // 在地图上画出上行线路走向
654   - drawingUpline : function (polylineArray,resultdata) {
655   -
656   - WorldsBMap.clearMarkAndOverlays();
  654 + drawingUpline : function (polylineArray,polyline_center) {
657 655  
  656 + /*WorldsBMap.clearMarkAndOverlays();*/
658 657 polyUpline = '';
659 658  
660 659 // 创建线路走向
... ... @@ -663,13 +662,13 @@ var WorldsBMap = function () {
663 662 // 把折线添加到地图上
664 663 mapBValue.addOverlay(polyUpline);
665 664  
666   - var ceter_index = Math.round(resultdata.length / 2);
  665 + /*var ceter_index = Math.round(resultdata.length / 2);
667 666  
668 667 var ceterPointsStr = resultdata[ceter_index].bJwpoints;
669 668  
670 669 var ceterPointsArray = ceterPointsStr.split(' ');
671 670  
672   - var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  671 + var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);*/
673 672  
674 673 var PanOptions_ ={noAnimation :true};
675 674  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
... ... @@ -62,10 +62,10 @@ $(function(){
62 62 /** 初始化下行树 @param:<Line.id:线路Id;0:下行> */
63 63 PublicFunctions.TreeUpOrDown(Line.id,'1');
64 64  
65   - /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */
  65 + /** 查询路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
66 66 GetAjaxData.getSectionRouteInfo(Line.id,'0',function(data) {
67 67  
68   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  68 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
69 69 PublicFunctions.linePanlThree(Line.id,data,'0');
70 70  
71 71 });
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-treedata.js
... ... @@ -57,8 +57,10 @@ var StationTreeData = function(){
57 57 // 线路ID
58 58 var Line = LineObj.getLineObj();
59 59  
  60 + /*// 百度地图画路段
  61 + PublicFunctions.linePanlThree(Line.id,polylineArray,dire_);*/
60 62 // 百度地图画路段
61   - PublicFunctions.linePanlThree(Line.id,polylineArray,dire_);
  63 + PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
62 64  
63 65 }
64 66  
... ... @@ -151,7 +153,8 @@ var StationTreeData = function(){
151 153 var polylineArray_ = [edtste];
152 154  
153 155 // 百度地图画路段
154   - PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections);
  156 + // PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections);
  157 + PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
155 158  
156 159 parmasObj();
157 160  
... ...