Commit d003db3fc09978e116d37e346186a54416a6ca05

Authored by 娄高锋
2 parents 7c288996 00469210

Merge branch 'pudong_jdk8' of 192.168.168.201:panzhaov5/bsth_control into pudong_jdk8

Showing 27 changed files with 1693 additions and 262 deletions
src/main/java/com/bsth/controller/LineController.java
@@ -136,4 +136,14 @@ public class LineController extends BaseController<Line, Integer> { @@ -136,4 +136,14 @@ public class LineController extends BaseController<Line, Integer> {
136 public Map<String, Object> remove(Integer id){ 136 public Map<String, Object> remove(Integer id){
137 return service.remove(id); 137 return service.remove(id);
138 } 138 }
  139 +
  140 + /**
  141 + * 查询外部行业编码是否有更新
  142 + * @param id
  143 + * @return
  144 + */
  145 + @RequestMapping(value ="/getLineMatchStationIsUpdate" , method = RequestMethod.GET)
  146 + public Map<String, Object> getLineMatchStationIsUpdate(@RequestParam(defaultValue = "id") Integer id){
  147 + return service.getLineMatchStationIsUpdate(id);
  148 + }
139 } 149 }
src/main/java/com/bsth/controller/StationRouteController.java
@@ -60,7 +60,7 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer @@ -60,7 +60,7 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
60 /** 60 /**
61 * @Description :TODO(查询路段信息) 61 * @Description :TODO(查询路段信息)
62 * 62 *
63 - * @param map <line.id_eq:线路ID; directions_eq:方向> 63 + * @param id
64 * 64 *
65 * @return Map<String, Object> 65 * @return Map<String, Object>
66 */ 66 */
@@ -231,7 +231,7 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer @@ -231,7 +231,7 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
231 public Map<String, Object> upddis(@RequestParam Map<String, Object> map) { 231 public Map<String, Object> upddis(@RequestParam Map<String, Object> map) {
232 return service.upddis(map); 232 return service.upddis(map);
233 } 233 }
234 - 234 +
235 /** 235 /**
236 * 236 *
237 * @Title: findCacheStationRoute 237 * @Title: findCacheStationRoute
@@ -258,4 +258,44 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer @@ -258,4 +258,44 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
258 int dir = Integer.parseInt(map.get("dir").toString()); 258 int dir = Integer.parseInt(map.get("dir").toString());
259 return service.findCachePoint(lineId, dir); 259 return service.findCachePoint(lineId, dir);
260 } 260 }
  261 +
  262 +
  263 + /**
  264 + * 查询博协站点
  265 + * @param map
  266 + * @return
  267 + */
  268 + @RequestMapping(value = "/findMatchStation", method = RequestMethod.GET)
  269 + public Map<String, Object> findMatchStation(@RequestParam Map<String, Object> map){
  270 + return service.findMatchStation(map);
  271 + }
  272 +
  273 + /**
  274 + * 批量修改行业编码
  275 + * @param map
  276 + * @return
  277 + */
  278 + @RequestMapping(value = "/updIndustryCode",method = RequestMethod.POST)
  279 + public Map<String, Object> updIndustryCode(@RequestParam Map<String, Object> map) {
  280 + return service.updIndustryCode(map);
  281 + }
  282 +
  283 + /**
  284 + * 匹配外部站点行业编码
  285 + * @param map
  286 + * @return
  287 + */
  288 + @RequestMapping(value = "/matchIndustryCode",method = RequestMethod.POST)
  289 + public Map<String, Object> matchIndustryCode(@RequestParam Map<String, Object> map) {
  290 + return service.matchIndustryCode(map);
  291 + }
  292 + /**
  293 + * 匹配附近站点行业编码
  294 + * @param map
  295 + * @return
  296 + */
  297 + @RequestMapping(value = "/matchNearbyStation",method = RequestMethod.GET)
  298 + public Map<String, Object> matchNearbyStation(@RequestParam Map<String, Object> map) {
  299 + return service.matchNearbyStation(map);
  300 + }
261 } 301 }
src/main/java/com/bsth/entity/StationMatchData.java 0 → 100644
  1 +package com.bsth.entity;
  2 +
  3 +/**
  4 + * @author YouRuiFeng
  5 + * @Description: TODO(站点匹配数据类)
  6 + * @date 2020/12/29/029 11:19
  7 + */
  8 +public class StationMatchData {
  9 + // 博协站点编码
  10 + private String StopId;
  11 + // 经过的线路列表
  12 + private String LineList;
  13 + // 城建坐标点
  14 + private String CityCoordinate;
  15 + // 百度经纬度坐标
  16 + private String bJwpoints;
  17 + // 站点地理位置WGS坐标经度
  18 + private Float gLonx;
  19 +
  20 + // 站点地理位置WGS坐标纬度
  21 + private Float gLaty;
  22 + // 线路名称
  23 + private String RoadLine;
  24 + // 上海市线路编码
  25 + private String LineStandardCode;
  26 + // 站点名称
  27 + private String StationName;
  28 + private String stationName2;
  29 + // 站点行业编码
  30 + private String StationStandardCode;
  31 + // 上下行
  32 + private int UpStream;
  33 + // 站级,路由顺序
  34 + private String LevelId;
  35 + // 站点类型(B起点站,Z中途站,E终点站)
  36 + private String StationType;
  37 + // 站点朝向
  38 + private String PathDirection;
  39 +
  40 + public String getStopId() {
  41 + return StopId;
  42 + }
  43 +
  44 + public void setStopId(String stopId) {
  45 + StopId = stopId;
  46 + }
  47 +
  48 + public String getLineList() {
  49 + return LineList;
  50 + }
  51 +
  52 + public void setLineList(String lineList) {
  53 + LineList = lineList;
  54 + }
  55 +
  56 + public String getCityCoordinate() {
  57 + return CityCoordinate;
  58 + }
  59 +
  60 + public void setCityCoordinate(String cityCoordinate) {
  61 + CityCoordinate = cityCoordinate;
  62 + }
  63 +
  64 + public String getbJwpoints() {
  65 + return bJwpoints;
  66 + }
  67 +
  68 + public void setbJwpoints(String bJwpoints) {
  69 + this.bJwpoints = bJwpoints;
  70 + }
  71 +
  72 + public Float getgLonx() {
  73 + return gLonx;
  74 + }
  75 +
  76 + public void setgLonx(Float gLonx) {
  77 + this.gLonx = gLonx;
  78 + }
  79 +
  80 + public Float getgLaty() {
  81 + return gLaty;
  82 + }
  83 +
  84 + public void setgLaty(Float gLaty) {
  85 + this.gLaty = gLaty;
  86 + }
  87 +
  88 + public String getRoadLine() {
  89 + return RoadLine;
  90 + }
  91 +
  92 + public void setRoadLine(String roadLine) {
  93 + RoadLine = roadLine;
  94 + }
  95 +
  96 + public String getLineStandardCode() {
  97 + return LineStandardCode;
  98 + }
  99 +
  100 + public void setLineStandardCode(String lineStandardCode) {
  101 + LineStandardCode = lineStandardCode;
  102 + }
  103 +
  104 + public String getStationName() {
  105 + return StationName;
  106 + }
  107 +
  108 + public void setStationName(String stationName) {
  109 + StationName = stationName;
  110 + }
  111 +
  112 + public String getStationName2() {
  113 + return stationName2;
  114 + }
  115 +
  116 + public void setStationName2(String stationName2) {
  117 + this.stationName2 = stationName2;
  118 + }
  119 +
  120 + public String getStationStandardCode() {
  121 + return StationStandardCode;
  122 + }
  123 +
  124 + public void setStationStandardCode(String stationStandardCode) {
  125 + StationStandardCode = stationStandardCode;
  126 + }
  127 +
  128 + public int getUpStream() {
  129 + return UpStream;
  130 + }
  131 +
  132 + public void setUpStream(int upStream) {
  133 + UpStream = upStream;
  134 + }
  135 +
  136 + public String getLevelId() {
  137 + return LevelId;
  138 + }
  139 +
  140 + public void setLevelId(String levelId) {
  141 + LevelId = levelId;
  142 + }
  143 +
  144 + public String getStationType() {
  145 + return StationType;
  146 + }
  147 +
  148 + public void setStationType(String stationType) {
  149 + StationType = stationType;
  150 + }
  151 +
  152 + public String getPathDirection() {
  153 + return PathDirection;
  154 + }
  155 +
  156 + public void setPathDirection(String pathDirection) {
  157 + PathDirection = pathDirection;
  158 + }
  159 +}
src/main/java/com/bsth/entity/sys/CompanyAuthority.java
1 package com.bsth.entity.sys; 1 package com.bsth.entity.sys;
2 2
3 import javax.persistence.*; 3 import javax.persistence.*;
  4 +import java.io.Serializable;
4 5
5 /** 6 /**
6 * Created by panzhao on 2016/11/22. 7 * Created by panzhao on 2016/11/22.
7 */ 8 */
8 @Entity 9 @Entity
9 @Table(name = "bsth_c_sys_company_auth") 10 @Table(name = "bsth_c_sys_company_auth")
10 -public class CompanyAuthority { 11 +public class CompanyAuthority implements Serializable {
11 12
12 @Id 13 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY) 14 @GeneratedValue(strategy = GenerationType.IDENTITY)
src/main/java/com/bsth/entity/sys/Role.java
1 package com.bsth.entity.sys; 1 package com.bsth.entity.sys;
2 2
  3 +import java.io.Serializable;
3 import java.util.Date; 4 import java.util.Date;
4 import java.util.LinkedHashSet; 5 import java.util.LinkedHashSet;
5 import java.util.Set; 6 import java.util.Set;
@@ -18,7 +19,7 @@ import org.hibernate.annotations.Formula; @@ -18,7 +19,7 @@ import org.hibernate.annotations.Formula;
18 19
19 @Entity 20 @Entity
20 @Table(name = "bsth_c_sys_role") 21 @Table(name = "bsth_c_sys_role")
21 -public class Role { 22 +public class Role implements Serializable {
22 23
23 @Id 24 @Id
24 @GeneratedValue(strategy = GenerationType.IDENTITY) 25 @GeneratedValue(strategy = GenerationType.IDENTITY)
src/main/java/com/bsth/entity/sys/SysUser.java
@@ -3,6 +3,7 @@ package com.bsth.entity.sys; @@ -3,6 +3,7 @@ package com.bsth.entity.sys;
3 import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 3 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 4
5 import javax.persistence.*; 5 import javax.persistence.*;
  6 +import java.io.Serializable;
6 import java.util.Date; 7 import java.util.Date;
7 import java.util.LinkedHashSet; 8 import java.util.LinkedHashSet;
8 import java.util.Set; 9 import java.util.Set;
@@ -15,7 +16,7 @@ import java.util.Set; @@ -15,7 +16,7 @@ import java.util.Set;
15 @NamedAttributeNode("roles") 16 @NamedAttributeNode("roles")
16 }) 17 })
17 }) 18 })
18 -public class SysUser { 19 +public class SysUser implements Serializable {
19 20
20 @Id 21 @Id
21 @GeneratedValue(strategy = GenerationType.IDENTITY) 22 @GeneratedValue(strategy = GenerationType.IDENTITY)
src/main/java/com/bsth/repository/StationRouteRepository.java
@@ -208,7 +208,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -208,7 +208,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
208 @Modifying 208 @Modifying
209 @Query(value="UPDATE bsth_c_stationroute SET " + 209 @Query(value="UPDATE bsth_c_stationroute SET " +
210 "destroy = ?2 WHERE id = ?1", nativeQuery=true) 210 "destroy = ?2 WHERE id = ?1", nativeQuery=true)
211 - public void stationRouteIsDestroyUpd(Integer stationRouteId, Integer destroy); 211 + void stationRouteIsDestroyUpd(Integer stationRouteId, Integer destroy);
212 212
213 213
214 /** 214 /**
@@ -458,15 +458,15 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -458,15 +458,15 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
458 458
459 @Modifying 459 @Modifying
460 @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line = ?1 ", nativeQuery=true) 460 @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line = ?1 ", nativeQuery=true)
461 - public void stationRouteDir(Integer line); 461 + void stationRouteDir(Integer line);
462 462
463 @Modifying 463 @Modifying
464 @Query(value="update bsth_c_stationroute set distances =?2 where id = ?1 ", nativeQuery=true) 464 @Query(value="update bsth_c_stationroute set distances =?2 where id = ?1 ", nativeQuery=true)
465 - public void upddis(Integer id,Double dis); 465 + void upddis(Integer id,Double dis);
466 466
467 @Modifying 467 @Modifying
468 @Query(value="UPDATE bsth_c_stationroute set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true) 468 @Query(value="UPDATE bsth_c_stationroute set station_route_code = (station_route_code+10) where line = ?1 and directions = ?2 and station_route_code >=?3 and destroy = 0", nativeQuery=true)
469 - public void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod); 469 + void stationUpdStationRouteCode(Integer line,Integer dir,Integer routeCod);
470 470
471 /** 471 /**
472 * 更新路线前撤销线路原有站点 472 * 更新路线前撤销线路原有站点
@@ -476,11 +476,11 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -476,11 +476,11 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
476 */ 476 */
477 @Modifying 477 @Modifying
478 @Query(value="UPDATE bsth_c_stationroute set destroy = 1 where line = ?1 and directions = ?2", nativeQuery=true) 478 @Query(value="UPDATE bsth_c_stationroute set destroy = 1 where line = ?1 and directions = ?2", nativeQuery=true)
479 - public void stationRouteUpdDestroy(Integer line,Integer dir); 479 + void stationRouteUpdDestroy(Integer line,Integer dir);
480 480
481 @Modifying 481 @Modifying
482 @Query(value="UPDATE bsth_c_stationroute set destroy = 1 where id = ?1", nativeQuery=true) 482 @Query(value="UPDATE bsth_c_stationroute set destroy = 1 where id = ?1", nativeQuery=true)
483 - public void stationRouteIsDestroyUpdBatch(Integer ids); 483 + void stationRouteIsDestroyUpdBatch(Integer ids);
484 484
485 /** 485 /**
486 * 486 *
@@ -490,7 +490,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -490,7 +490,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
490 */ 490 */
491 @Modifying 491 @Modifying
492 @Query(value="insert into (select * from bsth_c_stationroute_cache where line = ?1 and directions = ?2) bsth_c_stationroute", nativeQuery=true) 492 @Query(value="insert into (select * from bsth_c_stationroute_cache where line = ?1 and directions = ?2) bsth_c_stationroute", nativeQuery=true)
493 - public void stationRouteUpdate(Integer line,Integer dir); 493 + void stationRouteUpdate(Integer line,Integer dir);
494 494
495 // 更具线路批量撤销 495 // 更具线路批量撤销
496 @Modifying 496 @Modifying
@@ -501,4 +501,10 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -501,4 +501,10 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
501 @Modifying 501 @Modifying
502 @Query(value="delete from StationRoute sr where sr.line.id = ?1 and sr.lineCode = ?2") 502 @Query(value="delete from StationRoute sr where sr.line.id = ?1 and sr.lineCode = ?2")
503 void batchDelete(Integer lineId, String lineCode); 503 void batchDelete(Integer lineId, String lineCode);
  504 +
  505 +
  506 + // 批量修改站点行业编码
  507 + @Modifying
  508 + @Query(value="update bsth_c_stationroute set industry_code =?2 where id = ?1 ", nativeQuery=true)
  509 + void updIndustryCode(Integer id,String IndustryCode);
504 } 510 }
src/main/java/com/bsth/security/util/SecurityUtils.java
1 -package com.bsth.security.util;  
2 -  
3 -import com.bsth.entity.sys.Role;  
4 -import com.bsth.entity.sys.SecurityUser;  
5 -import com.bsth.entity.sys.SysUser;  
6 -import org.slf4j.Logger;  
7 -import org.slf4j.LoggerFactory;  
8 -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;  
9 -import org.springframework.security.core.GrantedAuthority;  
10 -import org.springframework.security.core.authority.SimpleGrantedAuthority;  
11 -import org.springframework.security.core.context.SecurityContext;  
12 -import org.springframework.security.core.context.SecurityContextHolder;  
13 -  
14 -import javax.servlet.http.HttpServletRequest;  
15 -import java.util.ArrayList;  
16 -import java.util.List;  
17 -import java.util.Set;  
18 -  
19 -/**  
20 - * @author PanZhao  
21 - * @ClassName: SecurityUtils  
22 - * @date 2016年3月30日 上午11:28:24  
23 - */  
24 -public class SecurityUtils {  
25 -  
26 - static Logger logger = LoggerFactory.getLogger(SecurityUtils.class);  
27 -  
28 - /**  
29 - * @return SysUser 返回类型  
30 - * @throws  
31 - * @Title: getCurrentUser  
32 - * @Description: TODO(获取当前用户)  
33 - */  
34 - public static SysUser getCurrentUser() {  
35 - SysUser user = null;  
36 - try {  
37 - user = (SysUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();  
38 - } catch (Exception e) {  
39 - logger.error("", e);  
40 - }  
41 - return user;  
42 - }  
43 -  
44 - public static void login(SysUser user, HttpServletRequest request) {  
45 - SecurityUser securityUser = new SecurityUser(user);  
46 - SecurityContext sContext = SecurityContextHolder.getContext();  
47 -  
48 - List<GrantedAuthority> grantedAuths = new ArrayList<>();  
49 - Set<Role> set = user.getRoles();  
50 - for(Role r : set){  
51 - grantedAuths.add(new SimpleGrantedAuthority(r.getCodeName()));  
52 - }  
53 -  
54 - sContext.setAuthentication(new UsernamePasswordAuthenticationToken(securityUser, securityUser.getAuthorities(), grantedAuths));  
55 - request.getSession(true).setAttribute("SPRING_SECURITY_CONTEXT", sContext);  
56 - }  
57 -} 1 +package com.bsth.security.util;
  2 +
  3 +import com.bsth.entity.sys.Role;
  4 +import com.bsth.entity.sys.SecurityUser;
  5 +import com.bsth.entity.sys.SysUser;
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
  8 +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
  9 +import org.springframework.security.core.GrantedAuthority;
  10 +import org.springframework.security.core.authority.SimpleGrantedAuthority;
  11 +import org.springframework.security.core.context.SecurityContext;
  12 +import org.springframework.security.core.context.SecurityContextHolder;
  13 +
  14 +import javax.servlet.http.HttpServletRequest;
  15 +import java.util.ArrayList;
  16 +import java.util.List;
  17 +import java.util.Set;
  18 +
  19 +/**
  20 + * @author PanZhao
  21 + * @ClassName: SecurityUtils
  22 + * @date 2016年3月30日 上午11:28:24
  23 + */
  24 +public class SecurityUtils {
  25 +
  26 + static Logger logger = LoggerFactory.getLogger(SecurityUtils.class);
  27 +
  28 + /**
  29 + * @return SysUser 返回类型
  30 + * @throws
  31 + * @Title: getCurrentUser
  32 + * @Description: TODO(获取当前用户)
  33 + */
  34 + public static SysUser getCurrentUser() {
  35 + SysUser user = null;
  36 + try {
  37 + user = (SysUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
  38 + } catch (Exception e) {
  39 + logger.error("", e);
  40 + }
  41 + return user;
  42 + }
  43 +
  44 + public static void login(SysUser user, HttpServletRequest request) {
  45 + SecurityUser securityUser = new SecurityUser(user);
  46 + SecurityContext sContext = SecurityContextHolder.getContext();
  47 +
  48 + List<GrantedAuthority> grantedAuths = new ArrayList<>();
  49 + Set<Role> set = user.getRoles();
  50 + for(Role r : set){
  51 + grantedAuths.add(new SimpleGrantedAuthority(r.getCodeName()));
  52 + }
  53 +
  54 + sContext.setAuthentication(new UsernamePasswordAuthenticationToken(securityUser, securityUser.getAuthorities(), grantedAuths));
  55 + request.getSession(true).setAttribute("SPRING_SECURITY_CONTEXT", sContext);
  56 + }
  57 +}
src/main/java/com/bsth/service/LineService.java
@@ -37,6 +37,8 @@ public interface LineService extends BaseService&lt;Line, Integer&gt; { @@ -37,6 +37,8 @@ public interface LineService extends BaseService&lt;Line, Integer&gt; {
37 Map<String, Object> update(Line l); 37 Map<String, Object> update(Line l);
38 38
39 Map<String,Object> remove(Integer id); 39 Map<String,Object> remove(Integer id);
40 - 40 +
41 Map<String, Boolean> lineNature(); 41 Map<String, Boolean> lineNature();
  42 +
  43 + Map<String,Object> getLineMatchStationIsUpdate(Integer id);
42 } 44 }
src/main/java/com/bsth/service/StationRouteService.java
@@ -156,5 +156,12 @@ public interface StationRouteService extends BaseService&lt;StationRoute, Integer&gt; @@ -156,5 +156,12 @@ public interface StationRouteService extends BaseService&lt;StationRoute, Integer&gt;
156 */ 156 */
157 List<Map<String, Object>> findCachePoint(int lineId, int dir); 157 List<Map<String, Object>> findCachePoint(int lineId, int dir);
158 158
  159 + Map<String, Object> findMatchStation(Map<String, Object> map);
  160 +
  161 + Map<String, Object> updIndustryCode(Map<String, Object> map);
  162 +
  163 + Map<String, Object> matchIndustryCode(Map<String, Object> map);
  164 +
  165 + Map<String, Object> matchNearbyStation(Map<String, Object> map);
159 166
160 } 167 }
src/main/java/com/bsth/service/impl/LineServiceImpl.java
@@ -2,16 +2,22 @@ package com.bsth.service.impl; @@ -2,16 +2,22 @@ package com.bsth.service.impl;
2 2
3 import com.bsth.common.ResponseCode; 3 import com.bsth.common.ResponseCode;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
  5 +import com.bsth.entity.StationMatchData;
5 import com.bsth.repository.LineRepository; 6 import com.bsth.repository.LineRepository;
6 import com.bsth.service.LineService; 7 import com.bsth.service.LineService;
  8 +import com.bsth.util.db.DBUtils_station;
  9 +import org.apache.commons.lang3.StringUtils;
7 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.jdbc.core.JdbcTemplate; 11 import org.springframework.jdbc.core.JdbcTemplate;
9 import org.springframework.jdbc.core.RowMapper; 12 import org.springframework.jdbc.core.RowMapper;
10 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
11 import org.springframework.transaction.annotation.Transactional; 14 import org.springframework.transaction.annotation.Transactional;
12 15
  16 +import java.sql.Connection;
  17 +import java.sql.PreparedStatement;
13 import java.sql.ResultSet; 18 import java.sql.ResultSet;
14 import java.sql.SQLException; 19 import java.sql.SQLException;
  20 +import java.util.ArrayList;
15 import java.util.HashMap; 21 import java.util.HashMap;
16 import java.util.List; 22 import java.util.List;
17 import java.util.Map; 23 import java.util.Map;
@@ -156,4 +162,37 @@ public class LineServiceImpl extends BaseServiceImpl&lt;Line, Integer&gt; implements L @@ -156,4 +162,37 @@ public class LineServiceImpl extends BaseServiceImpl&lt;Line, Integer&gt; implements L
156 } 162 }
157 return map; 163 return map;
158 } 164 }
  165 +
  166 + @Override
  167 + public Map<String, Object> getLineMatchStationIsUpdate(Integer id){
  168 + Map<String, Object> map = new HashMap<>();
  169 + Line l = repository.findById(id).get();
  170 + Connection conn = null;
  171 + PreparedStatement ps = null;
  172 + ResultSet rs = null;
  173 +
  174 + List<StationMatchData> listMD = new ArrayList<>();
  175 + String sql = "select `type` from roadline where RoadLine =\""+l.getName()+"\"";
  176 + if(!StringUtils.isEmpty(l.getShanghaiLinecode())){
  177 + sql += " or LineStandardCode=\""+l.getShanghaiLinecode()+"\"";
  178 + }
  179 + try {
  180 + conn = DBUtils_station.getConnection();
  181 + ps = conn.prepareStatement(sql);
  182 +// int stauts = ps.executeQuery().getInt(1);
  183 + String stauts = "0";
  184 + rs = ps.executeQuery();
  185 + while (rs.next()) {
  186 + stauts = rs.getString("type");
  187 + }
  188 + map.put("status",ResponseCode.SUCCESS);
  189 + map.put("data",stauts);
  190 + }catch(Exception e){
  191 + logger.error(e.toString(), e);
  192 + map.put("status",ResponseCode.ERROR);
  193 + }finally {
  194 + DBUtils_station.close(rs, ps, conn);
  195 + }
  196 + return map;
  197 + }
159 } 198 }
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
@@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode; @@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
5 import com.bsth.entity.LsStationRoute; 5 import com.bsth.entity.LsStationRoute;
6 import com.bsth.entity.Station; 6 import com.bsth.entity.Station;
  7 +import com.bsth.entity.StationMatchData;
7 import com.bsth.entity.StationRoute; 8 import com.bsth.entity.StationRoute;
8 import com.bsth.entity.StationRouteCache; 9 import com.bsth.entity.StationRouteCache;
9 import com.bsth.entity.search.CustomerSpecs; 10 import com.bsth.entity.search.CustomerSpecs;
@@ -16,23 +17,34 @@ import com.bsth.repository.StationRouteRepository; @@ -16,23 +17,34 @@ import com.bsth.repository.StationRouteRepository;
16 import com.bsth.service.StationRouteService; 17 import com.bsth.service.StationRouteService;
17 import com.bsth.util.ExcelUtil; 18 import com.bsth.util.ExcelUtil;
18 import com.bsth.util.FTPClientUtils; 19 import com.bsth.util.FTPClientUtils;
  20 +import com.bsth.util.Geo.Circle;
19 import com.bsth.util.Geo.GeoUtils; 21 import com.bsth.util.Geo.GeoUtils;
20 import com.bsth.util.Geo.Point; 22 import com.bsth.util.Geo.Point;
  23 +import com.bsth.util.JWDUtil;
21 import com.bsth.util.PackTarGZUtils; 24 import com.bsth.util.PackTarGZUtils;
  25 +import com.bsth.util.TransGPS;
22 import com.bsth.util.db.DBUtils_MS; 26 import com.bsth.util.db.DBUtils_MS;
  27 +import com.bsth.util.db.DBUtils_station;
23 import com.google.common.base.Splitter; 28 import com.google.common.base.Splitter;
  29 +import org.apache.commons.lang3.StringUtils;
24 import org.springframework.beans.factory.annotation.Autowired; 30 import org.springframework.beans.factory.annotation.Autowired;
25 import org.springframework.data.domain.Sort; 31 import org.springframework.data.domain.Sort;
26 import org.springframework.data.domain.Sort.Direction; 32 import org.springframework.data.domain.Sort.Direction;
27 import org.springframework.stereotype.Service; 33 import org.springframework.stereotype.Service;
28 import org.springframework.transaction.annotation.Transactional; 34 import org.springframework.transaction.annotation.Transactional;
  35 +import org.springframework.web.bind.annotation.RequestParam;
29 36
30 import javax.servlet.http.HttpServletResponse; 37 import javax.servlet.http.HttpServletResponse;
31 import java.io.ByteArrayInputStream; 38 import java.io.ByteArrayInputStream;
32 import java.io.File; 39 import java.io.File;
33 import java.io.InputStream; 40 import java.io.InputStream;
  41 +import java.sql.Connection;
  42 +import java.sql.PreparedStatement;
  43 +import java.sql.ResultSet;
34 import java.text.DecimalFormat; 44 import java.text.DecimalFormat;
35 import java.util.ArrayList; 45 import java.util.ArrayList;
  46 +import java.util.Collections;
  47 +import java.util.Comparator;
36 import java.util.HashMap; 48 import java.util.HashMap;
37 import java.util.Iterator; 49 import java.util.Iterator;
38 import java.util.List; 50 import java.util.List;
@@ -1297,7 +1309,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ @@ -1297,7 +1309,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1297 /** 1309 /**
1298 * @Description :TODO(查询缓存路由) 1310 * @Description :TODO(查询缓存路由)
1299 * 1311 *
1300 - * @param map (line.id_eq:线路ID; directions_eq:方向) 1312 + * @param (lineId:线路ID; dir:方向)
1301 * 1313 *
1302 * @return List<Map<String, Object>> 1314 * @return List<Map<String, Object>>
1303 */ 1315 */
@@ -1418,4 +1430,348 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ @@ -1418,4 +1430,348 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1418 } 1430 }
1419 return staitonRouteList; 1431 return staitonRouteList;
1420 } 1432 }
  1433 +
  1434 +
  1435 + @Override
  1436 + public Map<String, Object> findMatchStation(Map<String, Object> map){
  1437 + Map<String, Object> rsMap = new HashMap<>();
  1438 + Connection conn = null;
  1439 + PreparedStatement ps = null;
  1440 + ResultSet rs = null;
  1441 +
  1442 + try{
  1443 + int lineId = Integer.parseInt(map.get("lineId").toString());
  1444 + int dir = Integer.parseInt(map.get("dir").toString());
  1445 + Line line = lineRepository.findById(lineId).get();
  1446 + String lineName = line.getName();
  1447 + String shanghaiCode = (line.getShanghaiLinecode() == null || line.getShanghaiLinecode().equals(""))?"0":line.getShanghaiLinecode();
  1448 + List<StationRoute> lists = repository.findByLine(lineId,dir);
  1449 + rsMap.put("station",lists);
  1450 +
  1451 + List<StationMatchData> listMD = new ArrayList<>();
  1452 + String sql = "select * from roadlinestop WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\" ORDER BY RoadLine,LineStandardCode,UpStream,LevelId";
  1453 +
  1454 + conn = DBUtils_station.getConnection();
  1455 + ps = conn.prepareStatement(sql);
  1456 + rs = ps.executeQuery();
  1457 + while(rs.next()){
  1458 + StationMatchData arr = new StationMatchData();
  1459 + arr.setRoadLine(rs.getString("RoadLine"));
  1460 + arr.setLineStandardCode(rs.getString("LineStandardCode"));
  1461 + arr.setStationName(rs.getString("StationName"));
  1462 + arr.setStationStandardCode(rs.getString("StationStandardCode"));
  1463 + arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
  1464 + arr.setLevelId(rs.getString("LevelId"));
  1465 + arr.setStationType(rs.getString("StationType"));
  1466 +
  1467 + listMD.add(arr);
  1468 + }
  1469 + if(listMD.size() > 0){
  1470 + List<StationMatchData> listMDUp = new ArrayList<>();
  1471 + List<StationMatchData> listMDDown = new ArrayList<>();
  1472 + for(StationMatchData smd:listMD){
  1473 + if(smd.getUpStream() == 0){
  1474 + listMDUp.add(smd);
  1475 + } else
  1476 + listMDDown.add(smd);
  1477 + }
  1478 +
  1479 + Collections.sort(listMDUp, new Comparator<StationMatchData>() {
  1480 + public int compare(StationMatchData station1, StationMatchData station2) {
  1481 + return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
  1482 + }
  1483 + });
  1484 + Collections.sort(listMDDown, new Comparator<StationMatchData>() {
  1485 + public int compare(StationMatchData station1, StationMatchData station2) {
  1486 + return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
  1487 + }
  1488 + });
  1489 + Map<String, List<StationMatchData>> smdMap = new HashMap<>();
  1490 + if(listMDUp!= null && listMDUp.size()>0){
  1491 +
  1492 + smdMap.put(listMDUp.get(0).getStationName()+"-"+listMDUp.get(listMDUp.size()-1).getStationName(),listMDUp);
  1493 + }
  1494 + if(listMDDown!= null && listMDDown.size()>0) {
  1495 + smdMap.put(listMDDown.get(0).getStationName() + "-" + listMDDown.get(listMDDown.size() - 1).getStationName(), listMDDown);
  1496 + }
  1497 + rsMap.put("mStation",smdMap);
  1498 + } else {
  1499 + rsMap.put("mStation",null);
  1500 + }
  1501 +
  1502 + rsMap.put("status",ResponseCode.SUCCESS);
  1503 + }catch(Exception e){
  1504 + logger.error(e.toString(), e);
  1505 + rsMap.put("status",ResponseCode.ERROR);
  1506 + return rsMap;
  1507 + }finally {
  1508 + DBUtils_station.close(rs, ps, conn);
  1509 + return rsMap;
  1510 + }
  1511 + }
  1512 +
  1513 + @Override
  1514 + @Transactional
  1515 + public Map<String, Object> updIndustryCode(Map<String, Object> map) {
  1516 + Map<String, Object> rs = new HashMap<>();
  1517 + try{
  1518 + Iterator it = map.entrySet().iterator();
  1519 + while(it.hasNext()){
  1520 + java.util.Map.Entry entry = (java.util.Map.Entry)it.next();
  1521 + Integer id = Integer.parseInt(entry.getKey().toString().split("_")[1]); //返回对应的键
  1522 + String industryCode = entry.getValue().toString(); //返回对应的值
  1523 + repository.updIndustryCode(id, industryCode);
  1524 + }
  1525 + rs.put("status", ResponseCode.SUCCESS);
  1526 + }catch(Exception e){
  1527 + logger.error("", e);
  1528 + rs.put("status", ResponseCode.ERROR);
  1529 + }finally {
  1530 + return rs;
  1531 + }
  1532 + }
  1533 +
  1534 + @Override
  1535 + @Transactional
  1536 + public Map<String, Object> matchIndustryCode(Map<String, Object> map) {
  1537 + Map<String, Object> rsMap = new HashMap<>();
  1538 + Connection conn = null;
  1539 + PreparedStatement ps = null;
  1540 + ResultSet rs = null;
  1541 +
  1542 + try{
  1543 + int lineId = 0;
  1544 + if(map.get("lineId") != null){
  1545 + lineId = Integer.parseInt(map.get("lineId").toString());
  1546 + } else {
  1547 + rsMap.put("status","lineIdIsNull");
  1548 + return rsMap;
  1549 + }
  1550 +
  1551 + Line line = lineRepository.findById(lineId).get();
  1552 + String lineName = line.getName();
  1553 + String shanghaiCode = (line.getShanghaiLinecode() == null || line.getShanghaiLinecode().equals(""))?"codeNull":line.getShanghaiLinecode();
  1554 + List<StationRoute> listsUp = repository.findByLine(lineId,0);
  1555 + List<StationRoute> listsDown = repository.findByLine(lineId,1);
  1556 +
  1557 + List<StationMatchData> listMD = new ArrayList<>();
  1558 + String sql = "select * from roadlinestop WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\" ";
  1559 +
  1560 + conn = DBUtils_station.getConnection();
  1561 + ps = conn.prepareStatement(sql);
  1562 + rs = ps.executeQuery();
  1563 + while(rs.next()){
  1564 + StationMatchData arr = new StationMatchData();
  1565 + arr.setRoadLine(rs.getString("RoadLine"));
  1566 + arr.setLineStandardCode(rs.getString("LineStandardCode"));
  1567 + arr.setStationName(rs.getString("StationName"));
  1568 + arr.setStationStandardCode(rs.getString("StationStandardCode"));
  1569 + arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
  1570 + arr.setLevelId(rs.getString("LevelId"));
  1571 + arr.setStationType(rs.getString("StationType"));
  1572 +
  1573 + listMD.add(arr);
  1574 + }
  1575 + if(listMD.size() > 0){
  1576 + List<StationMatchData> listMDUp = new ArrayList<>();
  1577 + List<StationMatchData> listMDDown = new ArrayList<>();
  1578 + for(StationMatchData smd:listMD){
  1579 + if(smd.getUpStream() == 0){
  1580 + listMDUp.add(smd);
  1581 + } else
  1582 + listMDDown.add(smd);
  1583 + }
  1584 +
  1585 + Collections.sort(listMDUp, new Comparator<StationMatchData>() {
  1586 + public int compare(StationMatchData station1, StationMatchData station2) {
  1587 + return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
  1588 + }
  1589 + });
  1590 + Collections.sort(listMDDown, new Comparator<StationMatchData>() {
  1591 + public int compare(StationMatchData station1, StationMatchData station2) {
  1592 + return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
  1593 + }
  1594 + });
  1595 +
  1596 +// if(listMDUp != null && !listMDUp.equals("null") && listMDUp.size() > 0)
  1597 +// rsMap.put("upMatch",matchDir(listsUp,listMDUp));
  1598 +//
  1599 +// if(listMDDown != null && !listMDDown.equals("null") && listMDDown.size() > 0)
  1600 +// rsMap.put("downMatch", matchDir(listsDown,listMDDown));
  1601 +
  1602 + List<StationRoute> matcheUp = matchDir(listsUp,listMDUp);
  1603 + List<StationRoute> matcheDown = new ArrayList<>();
  1604 + if(matcheUp.size() <= 0){
  1605 + matcheUp = matchDir(listsUp,listMDDown);
  1606 + matcheDown = matchDir(listsDown,listMDUp);
  1607 + } else {
  1608 + matcheDown = matchDir(listsDown,listMDDown);
  1609 + }
  1610 + String sqlUpdate = "update roadline set `type`=0 WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\"";
  1611 +
  1612 + conn = DBUtils_station.getConnection();
  1613 + ps = conn.prepareStatement(sqlUpdate);
  1614 + int stauts = ps.executeUpdate();
  1615 + rsMap.put("upMatch",matcheUp);
  1616 + rsMap.put("downMatch",matcheDown);
  1617 + rsMap.put("typeIsUpdate",stauts);
  1618 + }
  1619 +
  1620 + rsMap.put("status",ResponseCode.SUCCESS);
  1621 + }catch(Exception e){
  1622 + logger.error(e.toString(), e);
  1623 + rsMap.put("status",ResponseCode.ERROR);
  1624 + return rsMap;
  1625 + }finally {
  1626 + DBUtils_station.close(rs, ps, conn);
  1627 + }
  1628 + return rsMap;
  1629 + }
  1630 +
  1631 + public List<StationRoute> matchDir(List<StationRoute> stations, List<StationMatchData> stationMDs){
  1632 + int size = 0;
  1633 + int pps1 = 0;
  1634 +
  1635 + List<StationRoute> listMactah = new ArrayList<>();
  1636 + if(stationMDs != null && !stationMDs.equals("null") && stationMDs.size() > 0) {
  1637 + if(stationMDs.size() <= stations.size()){
  1638 + size = stationMDs.size();
  1639 + }
  1640 + for (int i = 0; i < size; i++) {
  1641 + if (stations.get(i).getStationName().indexOf(stationMDs.get(i).getStationName()) != -1 || stationMDs.get(i).getStationName().indexOf(stations.get(i).getStationName()) != -1 ) {
  1642 + pps1++;
  1643 + }
  1644 + }
  1645 + String stationB = stations.get(0).getStationName();
  1646 + if((pps1>2 || stationB.indexOf(stationMDs.get(0).getStationName()) != -1 || stations.get(stations.size()-1).getStationName().indexOf(stationMDs.get(stationMDs.size()-1).getStationName()) != -1 || stationMDs.get(0).getStationName().indexOf(stationB) != -1 || stationMDs.get(stationMDs.size()-1).getStationName().indexOf(stations.get(stations.size()-1).getStationName()) != -1 ) ){
  1647 + matchCode(stations,stationMDs,listMactah);
  1648 + } else if(stations.get(1).getStationName().indexOf(stationMDs.get(1).getStationName()) != -1 && stations.get(2).getStationName().indexOf(stationMDs.get(2).getStationName()) != -1 && stations.get(3).getStationName().indexOf(stationMDs.get(3).getStationName()) != -1 ){
  1649 + matchCode(stations,stationMDs,listMactah);
  1650 + }
  1651 + repository.saveAll(listMactah);
  1652 + }
  1653 + return listMactah;
  1654 + }
  1655 +
  1656 + public void matchCode(List<StationRoute> stationRoutes,List<StationMatchData> stationMatchData, List<StationRoute> listMactah){
  1657 + int listsSize = stationRoutes.size();
  1658 + if(listsSize > 0 && stationMatchData.size() > 0){
  1659 + if(stationMatchData.size() == listsSize){
  1660 + for (int i=0; i<listsSize; i++) {
  1661 + if(!StringUtils.isEmpty(stationMatchData.get(i).getStationStandardCode())){
  1662 + stationRoutes.get(i).setIndustryCode(stationMatchData.get(i).getStationStandardCode());
  1663 + listMactah.add(stationRoutes.get(i));
  1664 + }
  1665 + }
  1666 + } else {
  1667 + Map<String,String> smdMap = new HashMap<>();
  1668 + for (int i=0; i<listsSize; i++) {
  1669 +
  1670 + String name = stationRoutes.get(i).getStationName();
  1671 + String names[] = null;
  1672 + if(name.indexOf("(") != -1){
  1673 + names = name.split("(");
  1674 + } else if(name.indexOf("(") != -1){
  1675 + names = name.split("\\(");
  1676 + }
  1677 +
  1678 + for (StationMatchData smd:stationMatchData) {
  1679 + smdMap.put(smd.getStationName(),smd.getStationStandardCode());
  1680 + String stationName =smd.getStationName();
  1681 + String stationName2 =smd.getStationName2();
  1682 + String industryCode =smd.getStationStandardCode();
  1683 + if(StringUtils.isEmpty(industryCode)){
  1684 + continue;
  1685 + }
  1686 + if(names != null && names.length > 1){
  1687 +// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (stationName.indexOf(names[0]) != -1 || stationName.indexOf(names[1].substring(0,names[1].length()-1)) != -1 || stationName2.indexOf(names[0]) != -1 || stationName2.indexOf(names[1].substring(0,names[1].length()-1)) != -1)){
  1688 + if((stationName.indexOf(names[0]) != -1 || stationName.indexOf(names[1].substring(0,names[1].length()-1)) != -1 || stationName2.indexOf(names[0]) != -1 || stationName2.indexOf(names[1].substring(0,names[1].length()-1)) != -1)){
  1689 + stationRoutes.get(i).setIndustryCode(industryCode);
  1690 + listMactah.add(stationRoutes.get(i));
  1691 + break;
  1692 + }
  1693 + }else {
  1694 +// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (stationName.indexOf(name) != -1 || stationName2.indexOf(name) != -1)){
  1695 + if(stationName.indexOf(name) != -1 || stationName2.indexOf(name) != -1){
  1696 +// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (name.equals(stationName) || name.equals(stationName2))){
  1697 +
  1698 + stationRoutes.get(i).setIndustryCode(industryCode);
  1699 + listMactah.add(stationRoutes.get(i));
  1700 + break;
  1701 + }
  1702 + }
  1703 + }
  1704 + }
  1705 + }
  1706 + }
  1707 + }
  1708 +
  1709 +
  1710 + @Override
  1711 + public Map<String, Object> matchNearbyStation(@RequestParam Map<String, Object> map) {
  1712 + Map<String, Object> rsMap = new HashMap<>();
  1713 + Connection conn = null;
  1714 + PreparedStatement ps = null;
  1715 + ResultSet rs = null;
  1716 +
  1717 + try{
  1718 + //stationGlaty: 31.360653
  1719 + //stationGlonx
  1720 +
  1721 + double laty ,lonx;
  1722 + if(map.get("stationGlaty") != null && map.get("stationGlonx") != null){
  1723 + laty = Double.parseDouble(map.get("stationGlaty").toString());
  1724 + lonx = Double.parseDouble(map.get("stationGlonx").toString());
  1725 + } else {
  1726 + rsMap.put("status","gpsIsNull");
  1727 + return rsMap;
  1728 + }
  1729 +
  1730 + List<StationMatchData> listMD = new ArrayList<>();
  1731 + String sql = "select * from roadstop where StationStandardCode != ''";
  1732 +
  1733 + conn = DBUtils_station.getConnection();
  1734 + ps = conn.prepareStatement(sql);
  1735 + rs = ps.executeQuery();
  1736 + while(rs.next()){
  1737 + StationMatchData arr = new StationMatchData();
  1738 + arr.setStopId(rs.getString("StopId"));
  1739 + arr.setLineList(rs.getString("LineList"));
  1740 + arr.setCityCoordinate(rs.getString("CityCoordinate"));
  1741 + arr.setStationName(rs.getString("StationName"));
  1742 + arr.setStationStandardCode(rs.getString("StationStandardCode"));
  1743 + listMD.add(arr);
  1744 + }
  1745 +
  1746 + List<StationMatchData> rsList = new ArrayList<>();
  1747 + Point point = new Point(lonx, laty);
  1748 + for (StationMatchData s : listMD) {
  1749 + String libraryPointstr = s.getCityCoordinate();
  1750 + String points[] = libraryPointstr.toString().split(",");
  1751 + if(points.length > 1){
  1752 + Map map_2 = JWDUtil.ConvertSHToJW(Double.parseDouble(points[0]), Double.parseDouble(points[1]));
  1753 +
  1754 +
  1755 + Point center = new Point(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
  1756 + // 在60m内认为是同一个站点
  1757 + Circle circle = new Circle(center, 200);
  1758 + // 匹配到了用数据库中的点替换
  1759 + if (GeoUtils.isPointInCircle(point, circle)) {
  1760 + TransGPS.Location location = TransGPS.LocationMake(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
  1761 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
  1762 + s.setbJwpoints(location.getLng()+" "+location.getLat());
  1763 + rsList.add(s);
  1764 + }
  1765 + }
  1766 + }
  1767 + rsMap.put("matchList",rsList);
  1768 + rsMap.put("status",ResponseCode.SUCCESS);
  1769 + }catch(Exception e){
  1770 + logger.error(e.toString(), e);
  1771 + rsMap.put("status",ResponseCode.ERROR);
  1772 + }finally {
  1773 + DBUtils_station.close(rs, ps, conn);
  1774 + return rsMap;
  1775 + }
  1776 + }
1421 } 1777 }
src/main/java/com/bsth/util/db/DBUtils_station.java 0 → 100644
  1 +package com.bsth.util.db;
  2 +
  3 +import com.bsth.data.BasicData;
  4 +import com.bsth.data.forecast.entity.ArrivalEntity;
  5 +import com.bsth.entity.StationMatchData;
  6 +import com.mchange.v2.c3p0.DataSources;
  7 +import org.apache.log4j.Logger;
  8 +
  9 +import javax.sql.DataSource;
  10 +import java.io.FileNotFoundException;
  11 +import java.io.IOException;
  12 +import java.sql.Connection;
  13 +import java.sql.PreparedStatement;
  14 +import java.sql.ResultSet;
  15 +import java.sql.SQLException;
  16 +import java.sql.Statement;
  17 +import java.util.ArrayList;
  18 +import java.util.Calendar;
  19 +import java.util.HashMap;
  20 +import java.util.List;
  21 +import java.util.Map;
  22 +import java.util.Properties;
  23 +
  24 +/**
  25 + * 站点行业编码库库连接池
  26 + * @author YouRuiFeng
  27 + *
  28 + */
  29 +//@Component
  30 +public class DBUtils_station {
  31 +
  32 + private static String url = null;
  33 +
  34 + private static String username = null;
  35 +
  36 + private static String pwd = null;
  37 +
  38 + private static DataSource ds_pooled;
  39 +
  40 + static Logger logger = Logger.getLogger(DBUtils_station.class);
  41 +
  42 + static {
  43 + Properties env = new Properties();
  44 +
  45 + try {
  46 + env.load(DBUtils_station.class.getClassLoader().getResourceAsStream("station-jdbc.properties"));
  47 + // 1. 加载驱动类
  48 + Class.forName(env.getProperty("station.mysql.driver"));
  49 +
  50 + url = env.getProperty("station.mysql.url");
  51 + username = env.getProperty("station.mysql.username");
  52 + pwd = env.getProperty("station.mysql.password");
  53 +
  54 + // 设置连接数据库的配置信息
  55 + DataSource ds_unpooled = DataSources.unpooledDataSource(url,
  56 + username, pwd);
  57 +
  58 + Map<String, Object> pool_conf = new HashMap<String, Object>();
  59 + // 设置最大连接数
  60 + pool_conf.put("maxPoolSize", 10);
  61 +
  62 + pool_conf.put("testConnectionOnCheckout", false);
  63 + //异步检测连接的有效性
  64 + pool_conf.put("testConnectionOnCheckin", true);
  65 + //30秒检测一次
  66 + pool_conf.put("idleConnectionTestPeriod", 30);
  67 + ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf);
  68 + } catch (FileNotFoundException e) {
  69 + logger.error(e.toString());
  70 + e.printStackTrace();
  71 + } catch (IOException e) {
  72 + logger.error(e.toString());
  73 + e.printStackTrace();
  74 + } catch (ClassNotFoundException e) {
  75 + logger.error(e.toString());
  76 + e.printStackTrace();
  77 + } catch (SQLException e) {
  78 + logger.error(e.toString());
  79 + e.printStackTrace();
  80 + }
  81 + }
  82 +
  83 + /**
  84 + * 获取连接对象
  85 + */
  86 + public static Connection getConnection() throws SQLException {
  87 + return ds_pooled.getConnection();
  88 + }
  89 +
  90 + /**
  91 + * 释放连接池资源
  92 + */
  93 + public static void clearup() {
  94 + if (ds_pooled != null) {
  95 + try {
  96 + DataSources.destroy(ds_pooled);
  97 + } catch (SQLException e) {
  98 + logger.error(e.toString());
  99 + e.printStackTrace();
  100 + }
  101 + }
  102 + }
  103 +
  104 + /**
  105 + * 资源关闭
  106 + *
  107 + * @param rs
  108 + * @param stmt
  109 + * @param conn
  110 + */
  111 + public static void close(ResultSet rs, Statement stmt, Connection conn) {
  112 + if (rs != null) {
  113 + try {
  114 + rs.close();
  115 + } catch (SQLException e) {
  116 + logger.error(e.toString());
  117 + e.printStackTrace();
  118 + }
  119 + }
  120 +
  121 + if (stmt != null) {
  122 + try {
  123 + stmt.close();
  124 + } catch (SQLException e) {
  125 + logger.error(e.toString());
  126 + e.printStackTrace();
  127 + }
  128 + }
  129 +
  130 + if (conn != null) {
  131 + try {
  132 + conn.close();
  133 + } catch (SQLException e) {
  134 + logger.error(e.toString());
  135 + e.printStackTrace();
  136 + }
  137 + }
  138 + }
  139 +
  140 + public static DataSource getDataSource(){
  141 + return ds_pooled;
  142 + }
  143 +
  144 +
  145 + public static void main(String[] args) {
  146 + Connection conn = null;
  147 + PreparedStatement ps = null;
  148 + ResultSet rs = null;
  149 +
  150 + /*List<StationMatchData> listMD = new ArrayList<>();
  151 + String sql = "select * from roadlinestop ORDER BY RoteLine,LineStandardCode,UpStream,LevelId";
  152 + try{
  153 + conn = DBUtils_station.getConnection();
  154 + ps = conn.prepareStatement(sql);
  155 + rs = ps.executeQuery();
  156 + while(rs.next()){
  157 + StationMatchData arr = new StationMatchData();
  158 + arr.setRoadLine(rs.getString("RoadLine"));
  159 + arr.setLineStandardCode(rs.getString("LineStandardCode"));
  160 + arr.setStationName(rs.getString("StationName"));
  161 + arr.setStationStandardCode(rs.getString("StationStandardCode"));
  162 + arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
  163 + arr.setLevelId(rs.getString("LevelId"));
  164 + arr.setStationType(rs.getString("StationType"));
  165 +
  166 + listMD.add(arr);
  167 + }
  168 + Map<String, Map<String, List<StationMatchData>>> mapsMD = new HashMap<>();
  169 + for (StationMatchData s:listMD) {
  170 + String key = s.getRoadLine()+"_"+s.getLineStandardCode();
  171 + int dir = s.getUpStream();
  172 + if(mapsMD.containsKey(key)){
  173 + Map<String, List<StationMatchData>> map = mapsMD.get(key);
  174 + if(mapsMD.containsKey(dir)){
  175 + List<StationMatchData> lists = map.get(dir);
  176 + lists.add(s);
  177 + } else {
  178 + List<StationMatchData> lists = new ArrayList<>();
  179 + lists.add(s);
  180 + map.put(dir+"",lists);
  181 + }
  182 + } else {
  183 + Map<String, List<StationMatchData>> map = new HashMap<>();
  184 + List<StationMatchData> lists = new ArrayList<>();
  185 + lists.add(s);
  186 + map.put(dir+"",lists);
  187 + mapsMD.put(key,map);
  188 + }
  189 + }
  190 + System.out.println(mapsMD);
  191 + }catch(Exception e){
  192 + logger.error("", e);
  193 + }finally {
  194 + DBUtils_station.close(rs, ps, conn);
  195 + }*/
  196 + }
  197 +}
src/main/resources/static/pages/base/stationroute/add_select.html
@@ -170,7 +170,7 @@ $(&#39;#add_select_mobal&#39;).on(&#39;AddSelectMobal.show&#39;, function(e,map_,drw,ajaxd_,stat @@ -170,7 +170,7 @@ $(&#39;#add_select_mobal&#39;).on(&#39;AddSelectMobal.show&#39;, function(e,map_,drw,ajaxd_,stat
170 // 打开绘制工具 170 // 打开绘制工具
171 drw.openDrawingManager(); 171 drw.openDrawingManager();
172 // map_.localtionPoint(stationName); 172 // map_.localtionPoint(stationName);
173 - fun.editMapStatus(); 173 + fun.editMapStatus(stationObj.getAddStation().dir);
174 } 174 }
175 // 查询是否存在输入的站点名称 175 // 查询是否存在输入的站点名称
176 /* ajaxd_.getLikeStationName(stationName,function(data) { 176 /* ajaxd_.getLikeStationName(stationName,function(data) {
src/main/resources/static/pages/base/stationroute/batch_update_industryCode.html 0 → 100644
  1 +<!-- 设置站点行业编码 -->
  2 +<div class="modal fade" id="batch_update_industryCode_mobal" tabindex="-1" role="basic" aria-hidden="true">
  3 + <div class="modal-dialog" style="width: 800px!important;">
  4 + <div class="modal-content">
  5 + <div class="modal-header">
  6 + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
  7 + <h4 class="modal-title">设置站点行业编码 </h4>
  8 + </div>
  9 + <div class="modal-body">
  10 + <form class="form-horizontal" action="/" method="post" id="stationForm" role="form">
  11 + <div class="portlet-body">
  12 + <div style="margin-top: 5px;display:flex;flex-direction:row">
  13 + <text>外部匹配站点方向选择:</text>
  14 + <select id="matchDir"></select>
  15 + </div>
  16 + <div class="table-container " style="margin-top: 10px;display:flex;flex-direction:row">
  17 + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_mStation">
  18 + <thead>
  19 + <tr role="row" class="heading">
  20 + <th width="50%" colspan="3" >外部匹配站点</th>
  21 + <!--<th width="50%" colspan="3" >系统站点</th>-->
  22 + </tr>
  23 + <tr role="row" >
  24 + <th width="5%">站序</th>
  25 + <th width="30%">站点名称</th>
  26 + <th width="15%">行业编码</th>
  27 + <!--<th width="16%">站点序号</th>-->
  28 + <!--<th width="16%">站点名称</th>-->
  29 + <!--<th width="16%">行业编码</th>-->
  30 + </tr>
  31 + </thead>
  32 + <tbody></tbody>
  33 + </table>
  34 + <!-- alert-danger 组件START -->
  35 + <!--<div class="alert alert-danger display-hide" id="tzbcAlert">-->
  36 + <!--<button class="close" data-close="alert"></button>-->
  37 + <!--您的输入有误,请检查下面的输入项-->
  38 + <!--</div>-->
  39 +
  40 + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_station" style="margin-left: 10px;">
  41 + <thead>
  42 + <tr role="row" >
  43 + <th width="50%" colspan="3" >系统站点</th>
  44 + </tr>
  45 + <tr role="row" class="heading">
  46 + <th width="5%">站序</th>
  47 + <th width="30%">站点名称</th>
  48 + <th width="15%">行业编码</th>
  49 + </tr>
  50 + </thead>
  51 + <tbody></tbody>
  52 + </table>
  53 + </div>
  54 + </div>
  55 + </form>
  56 + </div>
  57 + <div class="modal-footer">
  58 + <button type="button" class="btn default" data-dismiss="modal">取消</button>
  59 + <button type="button" class="btn btn-primary" id="saveStation">保存</button>
  60 + </div>
  61 + </div>
  62 + </div>
  63 +</div>
  64 +<script type="text/html" id="mStation_temp">
  65 +{{each list as obj i }}
  66 + <tr role="row" class="filter">
  67 + <td>
  68 + {{obj.levelId}}
  69 + </td>
  70 + <td>
  71 + {{obj.stationName}}
  72 + </td>
  73 + <td>
  74 + <input type="text" class="form-control form-filter input-sm" value="{{obj.stationStandardCode}}" readonly>
  75 + </td>
  76 + <!--<td>-->
  77 + <!--{{obj.zj}}-->
  78 + <!--</td>-->
  79 + <!--<td>-->
  80 + <!--{{obj.stationName}}-->
  81 + <!--</td>-->
  82 + <!--<td>-->
  83 + <!--{{if obj.zj > 0}}-->
  84 + <!--<input type="text" class="form-control form-filter input-sm" name="dis_{{obj.stationRouteId}}" value="{{obj.industryCode}}">-->
  85 + <!--{{/if}}-->
  86 + <!--</td>-->
  87 + </tr>
  88 +{{/each}}
  89 +</script>
  90 +<script type="text/html" id="station_temp">
  91 +{{each list as obj i }}
  92 + <tr role="row" class="filter">
  93 + <td>
  94 + {{++i}}
  95 + </td>
  96 + <td>
  97 + {{obj.stationName}}
  98 + </td>
  99 + <td>
  100 + <input type="text" class="form-control form-filter input-sm" name="dis_{{obj.id}}" value="{{obj.industryCode}}">
  101 + </td>
  102 + </tr>
  103 +{{/each}}
  104 +</script>
  105 +<script type="text/javascript">
  106 +$('#batch_update_industryCode_mobal').on('batch_update_industryCodeMobal.show', function(e,map,gd,dir,lineId,pf){
  107 + var mStationMap = {};
  108 + setTimeout(function(){
  109 + // 加载延迟200毫秒显示mobal
  110 + $('#batch_update_industryCode_mobal').modal({show : true,backdrop: 'static', keyboard: false});
  111 + },200);
  112 + // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
  113 + $('#batch_update_industryCode_mobal').on('show.bs.modal', function () {
  114 + $get('/stationroute/findMatchStation',{'lineId':lineId,'dir':dir},function (rs) {
  115 +
  116 + if(rs.status=='SUCCESS'){
  117 + mStationMap = rs.mStation;
  118 + if(mStationMap){
  119 + var options = "",isOne=true;
  120 + for(var key in mStationMap){
  121 + options += '<option value="'+key+'">'+key+'</option>';
  122 +
  123 + if(isOne){
  124 + var tbodyHtml = template('mStation_temp',{list:mStationMap[key]});
  125 + $('#datatable_mStation tbody').html(tbodyHtml);
  126 + isOne=false;
  127 + }
  128 + }
  129 + $('#matchDir').html(options);
  130 + }else{
  131 + $('#datatable_mStation').addClass('hidden');
  132 + $('#matchDir').html('<option value="0"> 没有匹配到外部数据... </option>');
  133 + }
  134 + var tbodyHtml = template('station_temp',{list:rs.station});
  135 + // 把渲染好的模版html文本追加到表格中
  136 + $('#datatable_station tbody').html(tbodyHtml);
  137 + }else if(rs.status=='ERROR'){
  138 + layer.msg("数据有误请重新尝试......");
  139 + }
  140 + });
  141 + });
  142 + $('#matchDir').on('change',function (e,data) {
  143 + var tbodyHtml = template('mStation_temp',{list:mStationMap[$('#matchDir option:selected').val()]});
  144 + $('#datatable_mStation tbody').html(tbodyHtml);
  145 + });
  146 + // 获取表单元素
  147 + var form = $('#stationForm');
  148 + // 错误提示元素
  149 + var tzbcAlert = $('#tzbcAlert', form);
  150 + // 下一步点击事件
  151 + $('#saveStation').on('click', function() {
  152 + form.submit();// 表单提交
  153 + });
  154 + // 表单验证
  155 + form.validate({
  156 + errorElement : 'span',
  157 + errorClass : 'help-block help-block-error',
  158 + focusInvalid : false,
  159 + rules : {
  160 + },
  161 + invalidHandler : function(event, validator) {
  162 + tzbcAlert.show();
  163 + App.scrollTo(reladplusname, -200);
  164 + },
  165 + highlight : function(element) {
  166 + $(element).closest('.form-group').addClass('has-error');
  167 + },
  168 + unhighlight : function(element) {
  169 + $(element).closest('.form-group').removeClass('has-error');
  170 + },
  171 + success : function(label) {
  172 + label.closest('.form-group').removeClass('has-error');
  173 + },
  174 + submitHandler : function(f) {
  175 + // 获取表单内容,并序列化
  176 + var params = form.serializeJSON();
  177 + $post('/stationroute/updIndustryCode',params,function(data) {
  178 + // 隐藏错误提示
  179 + tzbcAlert.hide();
  180 + // 隐藏 reladplus_mobal 弹出层
  181 + $('#batch_update_industryCode_mobal').modal('hide');
  182 + if(data.status=='SUCCESS') {
  183 + map.clearMarkAndOverlays();
  184 + // 刷新左边树
  185 + pf.resjtreeDate(lineId,dir);
  186 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
  187 + gd.getSectionRouteInfo(lineId,dir,function(data) {
  188 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  189 + pf.linePanlThree(lineId,data,dir);
  190 + });
  191 + // 弹出添加成功提示消息
  192 + layer.msg('修改成功...');
  193 + }else {
  194 + // 弹出添加失败提示消息
  195 + layer.msg('修改失败...');
  196 + }
  197 + });
  198 + }
  199 + });
  200 +});
  201 +</script>
0 \ No newline at end of file 202 \ No newline at end of file
src/main/resources/static/pages/base/stationroute/css/bmap_base.css
@@ -25,17 +25,35 @@ html,body{ @@ -25,17 +25,35 @@ html,body{
25 .rm3_image { 25 .rm3_image {
26 width: 120px; 26 width: 120px;
27 height: 26px; 27 height: 26px;
28 -  
29 } 28 }
30 29
  30 +.esc_edit_div{
  31 + position: absolute;
  32 + z-index: 99;
  33 + height: 41px;
  34 + top: 30px;
  35 + margin-left: 680px;
  36 + background: #ff2949;
  37 + /*box-shadow: 5px 1px 5px rgba(90, 90, 90, 0.48);*/
  38 +}
  39 +.esc_edit_btn{
  40 + /*width: 38px;*/
  41 + height: 41px;
  42 + background: #ff2949;
  43 + color: #fff;
  44 + border:none;
  45 + top: 0;
  46 + outline: 0px;
  47 +}
31 .search_panel{ 48 .search_panel{
32 position: absolute; 49 position: absolute;
33 z-index: 99; 50 z-index: 99;
34 height: 41px; 51 height: 41px;
35 top: 30px; 52 top: 30px;
36 - left: 500px; 53 + margin-left: 410px;
  54 + /*left: 500px;*/
37 background: #fff1f0; 55 background: #fff1f0;
38 - padding: 0px; 56 + /*padding: 0px;*/
39 box-shadow: 5px 1px 5px rgba(90, 90, 90, 0.48); 57 box-shadow: 5px 1px 5px rgba(90, 90, 90, 0.48);
40 } 58 }
41 59
@@ -103,6 +121,12 @@ html,body{ @@ -103,6 +121,12 @@ html,body{
103 padding: 0 0 0 15px; 121 padding: 0 0 0 15px;
104 } 122 }
105 123
  124 +.match_station{
  125 + position: absolute;
  126 + right: 10px;
  127 + top: 10px;
  128 +}
  129 +
106 .help-block{ 130 .help-block{
107 color:#000; 131 color:#000;
108 font-size: 15px; 132 font-size: 15px;
@@ -112,8 +136,9 @@ html,body{ @@ -112,8 +136,9 @@ html,body{
112 background: #ff8355; 136 background: #ff8355;
113 color: #fff; 137 color: #fff;
114 font-size: 12px; 138 font-size: 12px;
115 - margin: 0 5px 0 0; 139 + margin: 0 5px 3px 0;
116 border: 1px solid transparent; 140 border: 1px solid transparent;
  141 + /*margin-top: 3px;*/
117 } 142 }
118 143
119 .BMap_pop { 144 .BMap_pop {
src/main/resources/static/pages/base/stationroute/edit_select.html
@@ -121,7 +121,7 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed @@ -121,7 +121,7 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed
121 // 打开绘制工具 121 // 打开绘制工具
122 drw.openDrawingManager(); 122 drw.openDrawingManager();
123 map_.localtionPoint(editStationName+"公交站点"); 123 map_.localtionPoint(editStationName+"公交站点");
124 - fun.editMapStatus(); 124 + // fun.editMapStatus();
125 }else if(params.editselect==1){ 125 }else if(params.editselect==1){
126 WorldsBMap.localSearchFromAdreesToPoint(editStationName+"公交站点", function (Points) { 126 WorldsBMap.localSearchFromAdreesToPoint(editStationName+"公交站点", function (Points) {
127 if (Points) { 127 if (Points) {
@@ -134,7 +134,7 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed @@ -134,7 +134,7 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed
134 editStationObj.setEitdStationName(editStationName); 134 editStationObj.setEitdStationName(editStationName);
135 map_.editShapes(editStationObj); 135 map_.editShapes(editStationObj);
136 }); 136 });
137 - fun.editMapStatus(); 137 + // fun.editMapStatus();
138 }else if(params.editselect==2){ 138 }else if(params.editselect==2){
139 editStationObj.setEitdStation(Station); 139 editStationObj.setEitdStation(Station);
140 editStationObj.setEitdStationName(editStationName); 140 editStationObj.setEitdStationName(editStationName);
@@ -145,9 +145,9 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed @@ -145,9 +145,9 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed
145 // 编辑图形 145 // 编辑图形
146 // map_.editShapes(editStationName,stationShapesTypeV,mindex); 146 // map_.editShapes(editStationName,stationShapesTypeV,mindex);
147 map_.editShapes(editStationObj); 147 map_.editShapes(editStationObj);
148 - fun.editMapStatus();  
149 } 148 }
150 - } 149 + fun.editMapStatus(editStationObj.getEitdStation().stationRoutedirections);
  150 + }
151 }); 151 });
152 }) 152 })
153 </script> 153 </script>
154 \ No newline at end of file 154 \ No newline at end of file
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
@@ -30,151 +30,166 @@ var GetAjaxData = function(){ @@ -30,151 +30,166 @@ var GetAjaxData = function(){
30 30
31 var ajaxData = { 31 var ajaxData = {
32 32
33 - // 系统规划保存请求  
34 - collectionSave : function (params,callback) {  
35 -  
36 - $post('/station/collectionSave',params,function(rd) {  
37 -  
38 - callback && callback(rd);  
39 -  
40 - });  
41 -  
42 - },  
43 -  
44 - // 树数据获取  
45 - getStation : function(id_,dir_,callback) {  
46 - var treeDateJson = [];  
47 - $get('/stationroute/findStations',{'line.id_eq' : id_ , 'directions_eq' : dir_},function(resultdata) {  
48 - treeDateJson = createTreeData(resultdata);  
49 - callback && callback(treeDateJson);  
50 - });  
51 - },  
52 - getzdlyInfo : function(params,callback) {  
53 - $get('/stationroute/all',params,function(result) {  
54 - callback && callback(result);  
55 - });  
56 - },  
57 - // 查询线路某方向下所有站点的中心百度坐标  
58 - getStationRoutePoint : function(id_,dir_,callback) {  
59 - $get('/stationroute/getStationRouteList',{lineId:id_,direction:dir_},function(result) {  
60 - callback && callback(result);  
61 - });  
62 - },  
63 -  
64 - // 查询是否有已存在站点名称  
65 - getLikeStationName : function (stationName,callback) {  
66 - $get('/station/all', {stationName_eq: stationName}, function(array){  
67 - callback && callback(array);  
68 - });  
69 - },  
70 -  
71 - // 查询站点编码  
72 - getStationCode : function(callback) {  
73 - $get('/station/getStationCode',null,function(stationCode) {  
74 - if(stationCode>0) {  
75 - callback && callback(stationCode);  
76 - }  
77 - });  
78 - },  
79 - // 查询路段编码  
80 - getSectionCode : function(callback) {  
81 - $get('/section/getSectionCode',null,function(sectionCode) {  
82 - callback && callback(sectionCode);  
83 - });  
84 - },  
85 - findUpStationRouteCode : function(lineId,diraction,stationRouteCode,callback) {  
86 - $get('/stationroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,stationRouteCode:stationRouteCode},function(result) {  
87 - callback && callback(result);  
88 - });  
89 - },  
90 - findUpSectionRouteCode : function(lineId,diraction,sectionRouteCode,callback) {  
91 - $get('/sectionroute/findUpSectionRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {  
92 - callback && callback(result);  
93 - });  
94 - },  
95 - // 新增站点保存  
96 - stationSave : function(station,callback) {  
97 - $post('/station/stationSave',station,function(data) {  
98 - callback && callback(data);  
99 - });  
100 - },  
101 - // 站点更新  
102 - stationUpdate : function(station,callback) {  
103 - $post('/station/stationUpdate',station,function(data) {  
104 - callback && callback(data);  
105 - });  
106 - },  
107 -  
108 - // 撤销站点  
109 - stationRouteIsDestroy : function(stationRoute,callback) {  
110 -  
111 - $post('/stationroute/stationRouteIsDestroy',stationRoute,function(data) {  
112 -  
113 - callback && callback(data);  
114 -  
115 - })  
116 -  
117 - },  
118 -  
119 - // 编辑线路走向保存  
120 - sectionUpdate:function(section,callback) {  
121 - $post('/section/sectionUpdate',section,function(data) {  
122 - callback && callback(data);  
123 - })  
124 - },  
125 - // 生成线路走向  
126 - sectionSave:function(section,callback){  
127 - $post('/section/sectionSave',section,function(data) {  
128 - callback && callback(data);  
129 - })  
130 - },  
131 -  
132 - // 获取线路名称  
133 - getIdLineName : function (id,callback) {  
134 -  
135 - $get('/line/' + id ,null, function(result){  
136 -  
137 - callback && callback(result);  
138 -  
139 - });  
140 -  
141 - },  
142 -  
143 - // 查询站点信息  
144 - getStationRouteInfo : function(lineId,direction,callback) {  
145 - $get('/stationroute/all',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) {  
146 - callback && callback(resultdata);  
147 - });  
148 - },  
149 -  
150 - // 查询路段信息  
151 - getSectionRouteInfo : function(lineId,direction,callback) {  
152 - $get('/sectionroute/findSection',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) {  
153 - callback && callback(resultdata);  
154 - });  
155 - },  
156 - // 根据ID查询路段信息.  
157 - getSectionRouteInfoById : function(sectionRouteId,callback){  
158 - $get('/sectionroute/findSectionRouteInfoFormId',{'id':sectionRouteId},function(r) {  
159 - return callback && callback(r);  
160 - });  
161 - },  
162 -  
163 - // 手动规划线路保存  
164 - manualSave : function(params,callback) {  
165 -  
166 - // 保存  
167 - $post('/station/manualSave',params,function(rd) {  
168 -  
169 - callback && callback(rd);  
170 -  
171 - });  
172 -  
173 - }  
174 -  
175 -  
176 - }  
177 - 33 + // 系统规划保存请求
  34 + collectionSave : function (params,callback) {
  35 +
  36 + $post('/station/collectionSave',params,function(rd) {
  37 +
  38 + callback && callback(rd);
  39 +
  40 + });
  41 +
  42 + },
  43 +
  44 + // 树数据获取
  45 + getStation : function(id_,dir_,callback) {
  46 + var treeDateJson = [];
  47 + $get('/stationroute/findStations',{'line.id_eq' : id_ , 'directions_eq' : dir_},function(resultdata) {
  48 + treeDateJson = createTreeData(resultdata);
  49 + callback && callback(treeDateJson);
  50 + });
  51 + // $.ajax({
  52 + // type: "GET",
  53 + // async:false,
  54 + // url: '/stationroute/findStations',
  55 + // data: {'line.id_eq' : id_ , 'directions_eq' : dir_},
  56 + // success: function(resultdata){
  57 + // treeDateJson = createTreeData(resultdata);
  58 + // callback && callback(treeDateJson);
  59 + // }
  60 + // });
  61 + },
  62 + getzdlyInfo : function(params,callback) {
  63 + $get('/stationroute/all',params,function(result) {
  64 + callback && callback(result);
  65 + });
  66 + },
  67 + // 查询线路某方向下所有站点的中心百度坐标
  68 + getStationRoutePoint : function(id_,dir_,callback) {
  69 + $get('/stationroute/getStationRouteList',{lineId:id_,direction:dir_},function(result) {
  70 + callback && callback(result);
  71 + });
  72 + },
  73 +
  74 + // 查询是否有已存在站点名称
  75 + getLikeStationName : function (stationName,callback) {
  76 + $get('/station/all', {stationName_eq: stationName}, function(array){
  77 + callback && callback(array);
  78 + });
  79 + },
  80 +
  81 + // 查询站点编码
  82 + getStationCode : function(callback) {
  83 + $get('/station/getStationCode',null,function(stationCode) {
  84 + if(stationCode>0) {
  85 + callback && callback(stationCode);
  86 + }
  87 + });
  88 + },
  89 + // 查询路段编码
  90 + getSectionCode : function(callback) {
  91 + $get('/section/getSectionCode',null,function(sectionCode) {
  92 + callback && callback(sectionCode);
  93 + });
  94 + },
  95 + findUpStationRouteCode : function(lineId,diraction,stationRouteCode,callback) {
  96 + $get('/stationroute/findUpStationRouteCode',{lineId:lineId,direction:diraction,stationRouteCode:stationRouteCode},function(result) {
  97 + callback && callback(result);
  98 + });
  99 + },
  100 + findUpSectionRouteCode : function(lineId,diraction,sectionRouteCode,callback) {
  101 + $get('/sectionroute/findUpSectionRouteCode',{lineId:lineId,direction:diraction,sectionRouteCode:sectionRouteCode},function(result) {
  102 + callback && callback(result);
  103 + });
  104 + },
  105 + // 新增站点保存
  106 + stationSave : function(station,callback) {
  107 + $post('/station/stationSave',station,function(data) {
  108 + callback && callback(data);
  109 + });
  110 + },
  111 + // 站点更新
  112 + stationUpdate : function(station,callback) {
  113 + $post('/station/stationUpdate',station,function(data) {
  114 + callback && callback(data);
  115 + });
  116 + },
  117 +
  118 + // 撤销站点
  119 + stationRouteIsDestroy : function(stationRoute,callback) {
  120 +
  121 + $post('/stationroute/stationRouteIsDestroy',stationRoute,function(data) {
  122 +
  123 + callback && callback(data);
  124 +
  125 + })
  126 +
  127 + },
  128 +
  129 + // 编辑线路走向保存
  130 + sectionUpdate:function(section,callback) {
  131 + $post('/section/sectionUpdate',section,function(data) {
  132 + callback && callback(data);
  133 + })
  134 + },
  135 + // 生成线路走向
  136 + sectionSave:function(section,callback){
  137 + $post('/section/sectionSave',section,function(data) {
  138 + callback && callback(data);
  139 + })
  140 + },
  141 +
  142 + // 获取线路名称
  143 + getIdLineName : function (id,callback) {
  144 + $get('/line/' + id ,null, function(result){
  145 + callback && callback(result);
  146 + });
  147 + },
  148 + // 查询外部行业编码是否有更新
  149 + getLineMatchStationIsUpdate : function (id,callback) {
  150 + $get('/line/getLineMatchStationIsUpdate' ,{"id":id}, function(result){
  151 + callback && callback(result);
  152 + });
  153 + },
  154 + // 查询外部行业编码是否有更新
  155 + matchIndustryCode : function (lineId,callback) {
  156 + $post('/stationroute/matchIndustryCode' ,{"lineId":lineId}, function(result){
  157 + callback && callback(result);
  158 + });
  159 + },
  160 +
  161 + // 查询站点信息
  162 + getStationRouteInfo : function(lineId,direction,callback) {
  163 + $get('/stationroute/all',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) {
  164 + callback && callback(resultdata);
  165 + });
  166 + },
  167 +
  168 + // 查询路段信息
  169 + getSectionRouteInfo : function(lineId,direction,callback) {
  170 + $get('/sectionroute/findSection',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) {
  171 + callback && callback(resultdata);
  172 + });
  173 + },
  174 + // 根据ID查询路段信息.
  175 + getSectionRouteInfoById : function(sectionRouteId,callback){
  176 + $get('/sectionroute/findSectionRouteInfoFormId',{'id':sectionRouteId},function(r) {
  177 + return callback && callback(r);
  178 + });
  179 + },
  180 +
  181 + // 手动规划线路保存
  182 + manualSave : function(params,callback) {
  183 +
  184 + // 保存
  185 + $post('/station/manualSave',params,function(rd) {
  186 +
  187 + callback && callback(rd);
  188 +
  189 + });
  190 +
  191 + }
  192 + };
178 return ajaxData; 193 return ajaxData;
179 194
180 }(); 195 }();
181 \ No newline at end of file 196 \ No newline at end of file
src/main/resources/static/pages/base/stationroute/js/stationroute-list-events.js
@@ -112,7 +112,7 @@ $(function(){ @@ -112,7 +112,7 @@ $(function(){
112 // 加载其它规划选择弹出层mobal页面 112 // 加载其它规划选择弹出层mobal页面
113 $.get('tzzj.html', function(m){ 113 $.get('tzzj.html', function(m){
114 $(pjaxContainer).append(m); 114 $(pjaxContainer).append(m);
115 - $('#tzzj_mobal').trigger('tzzjMobal.show', [WorldsBMap,GetAjaxData,directionUpValue,Line.id,PublicFunctions,rd[0].children[0].children]); 115 + $('#tzzj_mobal').trigger('tzzjMobal.show', [WorldsBMap,GetAjaxData,0,Line.id,PublicFunctions,rd[0].children[0].children]);
116 }); 116 });
117 }); 117 });
118 }) 118 })
@@ -123,11 +123,11 @@ $(function(){ @@ -123,11 +123,11 @@ $(function(){
123 // 加载其它规划选择弹出层mobal页面 123 // 加载其它规划选择弹出层mobal页面
124 $.get('tzzj.html', function(m){ 124 $.get('tzzj.html', function(m){
125 $(pjaxContainer).append(m); 125 $(pjaxContainer).append(m);
126 - $('#tzzj_mobal').trigger('tzzjMobal.show', [WorldsBMap,GetAjaxData,directionDownValue,Line.id,PublicFunctions,rd[0].children[0].children]); 126 + $('#tzzj_mobal').trigger('tzzjMobal.show', [WorldsBMap,GetAjaxData,1,Line.id,PublicFunctions,rd[0].children[0].children]);
127 }); 127 });
128 }); 128 });
129 - })  
130 - 129 + });
  130 +
131 $('#quoteDown').on('click',function() { 131 $('#quoteDown').on('click',function() {
132 // 弹出提示层. 132 // 弹出提示层.
133 var index = layer.load(1, { 133 var index = layer.load(1, {
@@ -147,6 +147,23 @@ $(function(){ @@ -147,6 +147,23 @@ $(function(){
147 var params = {'lineId':Line.id ,'dir':0,'toDir':1}; 147 var params = {'lineId':Line.id ,'dir':0,'toDir':1};
148 quote(params,index); 148 quote(params,index);
149 }); 149 });
  150 +
  151 + $('#batchUpdateIndustryCode').on('click',function() {
  152 + var Line = LineObj.getLineObj();
  153 + // 加载其它规划选择弹出层mobal页面
  154 + $.get('batch_update_industryCode.html', function(m){
  155 + $(pjaxContainer).append(m);
  156 + $('#batch_update_industryCode_mobal').trigger('batch_update_industryCodeMobal.show', [WorldsBMap,GetAjaxData,0,Line.id,PublicFunctions]);
  157 + });
  158 + });
  159 + $('#batchDowndateIndustryCode').on('click',function() {
  160 + var Line = LineObj.getLineObj();
  161 + // 加载其它规划选择弹出层mobal页面
  162 + $.get('batch_update_industryCode.html', function(m){
  163 + $(pjaxContainer).append(m);
  164 + $('#batch_update_industryCode_mobal').trigger('batch_update_industryCodeMobal.show', [WorldsBMap,GetAjaxData,1,Line.id,PublicFunctions]);
  165 + });
  166 + });
150 167
151 function quote(params,index) { 168 function quote(params,index) {
152 $post('/sectionroute/quoteSection',params,function(data) { 169 $post('/sectionroute/quoteSection',params,function(data) {
@@ -275,5 +292,59 @@ $(function(){ @@ -275,5 +292,59 @@ $(function(){
275 $('.defeat-scroll').css('overflow','auto'); 292 $('.defeat-scroll').css('overflow','auto');
276 }).on('mouseleave',function() { 293 }).on('mouseleave',function() {
277 $('.defeat-scroll').css('overflow','hidden'); 294 $('.defeat-scroll').css('overflow','hidden');
278 - }); 295 + });
  296 +
  297 + $(".match_station_bnt").on("click",function () {
  298 + var index = layer.open({
  299 + title: '提示',
  300 + content:'是否匹配外部上下行站点行业编码!',
  301 + // type: 1,
  302 + // area: ['600px', '360px'],
  303 + // scrollbar: false,
  304 +
  305 + btn:['确定','取消'],
  306 + yes: function(index){
  307 + var lineId = LineObj.getLineObj().id;
  308 + GetAjaxData.matchIndustryCode(lineId,function (rs) {
  309 + // $post("/stationroute/matchIndustryCode",{"lineId":lineId},function (rs) {
  310 + if(rs.status == "SUCCESS"){
  311 + var map = new Map();
  312 + var upMatch = rs.upMatch, downMatch = rs.downMatch;
  313 + if(upMatch !=null && upMatch.length>0){
  314 + map.set("up",upMatch);
  315 + }
  316 + if(downMatch !=null && downMatch.length>0){
  317 + map.set("down",downMatch);
  318 + }
  319 + if(map.size>0){
  320 + $('.portlet-title .match_station').addClass('hidden');
  321 + PublicFunctions.resjtreeDate(lineId,0);
  322 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
  323 + GetAjaxData.getSectionRouteInfo(lineId,0,function(data) {
  324 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  325 + PublicFunctions.linePanlThree(lineId,data,0);
  326 + });
  327 + $('#stationDown').removeClass('active');
  328 + $('#stationDown').removeClass('in');
  329 + $('#stationDown').addClass('fade');
  330 + $('#stationUp').addClass('active in');
  331 + $('#downLine').parent().removeClass('active');
  332 + $('#upLine').parent().addClass('active');
  333 + $.get('match_station_industryCode.html', function(m){
  334 + $(pjaxContainer).append(m);
  335 + $('#match_station_industryCode_mobal').trigger('match_station_industryCodeMobal.show', map);
  336 + });
  337 + } else {
  338 + layer.msg("没有匹配到外部站点数据,请手动添加!")
  339 + }
  340 + } else
  341 + layer.msg("匹配出错,请手动添加!")
  342 + });
  343 + layer.close(index);
  344 + },
  345 + btn2:function(){
  346 + layer.closeAll(index); //关闭当前窗口
  347 + }
  348 + });
  349 + })
279 }); 350 });
280 \ No newline at end of file 351 \ No newline at end of file
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
@@ -431,11 +431,11 @@ var PublicFunctions = function () { @@ -431,11 +431,11 @@ var PublicFunctions = function () {
431 }, 431 },
432 432
433 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */ 433 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
434 - linePanlThree : function(lineId,data,direction) { 434 + linePanlThree : function(lineId,data,direction,callback) {
435 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */ 435 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
  436 + var polyline_center;
436 GetAjaxData.getStationRoutePoint(lineId,direction,function(resultdata) { 437 GetAjaxData.getStationRoutePoint(lineId,direction,function(resultdata) {
437 WorldsBMap.clearMarkAndOverlays(); 438 WorldsBMap.clearMarkAndOverlays();
438 - var polyline_center;  
439 // 如果站点路由数据不为空 439 // 如果站点路由数据不为空
440 if(resultdata.length>0) { 440 if(resultdata.length>0) {
441 var ceter_index = Math.round(resultdata.length / 2); 441 var ceter_index = Math.round(resultdata.length / 2);
@@ -452,8 +452,10 @@ var PublicFunctions = function () { @@ -452,8 +452,10 @@ var PublicFunctions = function () {
452 var dataLen = data.length; 452 var dataLen = data.length;
453 // 如果大于零 453 // 如果大于零
454 if(dataLen>0) { 454 if(dataLen>0) {
455 - WorldsBMap.drawingUpline01(polyline_center,data); 455 + WorldsBMap.drawingUpline01(data);
  456 + // WorldsBMap.drawingUpline01(polyline_center,data);
456 } 457 }
  458 + callback && callback(polyline_center);
457 }); 459 });
458 }, 460 },
459 /** 加载树 @param:<lineId:线路ID;diraction:方向(0:上行;1:下行)> */ 461 /** 加载树 @param:<lineId:线路ID;diraction:方向(0:上行;1:下行)> */
@@ -498,14 +500,22 @@ var PublicFunctions = function () { @@ -498,14 +500,22 @@ var PublicFunctions = function () {
498 } 500 }
499 }, 501 },
500 // 地图处于编辑状态 502 // 地图处于编辑状态
501 - editMapStatus : function () { 503 + editMapStatus : function (dir) {
502 WorldsBMap.setMap_status(1); 504 WorldsBMap.setMap_status(1);
503 - $('.protlet-box-layer').show(); 505 + // 有方向就显示退出编辑模式按钮
  506 + if(dir!=null && dir!='null'){
  507 + WorldsBMap.setDir(dir);
  508 + $('#esc_edit_div').show();
  509 + }
  510 + $('.protlet-box-layer').show();
504 }, 511 },
505 // 地图处于编辑状态 512 // 地图处于编辑状态
506 editMapStatusRemove : function () { 513 editMapStatusRemove : function () {
507 WorldsBMap.setMap_status(0); 514 WorldsBMap.setMap_status(0);
508 $('.protlet-box-layer').hide(); 515 $('.protlet-box-layer').hide();
  516 + $('#esc_edit_div').hide();
  517 + // 退出绘画模式
  518 + WorldsBMap.exitDrawStatus();
509 }, 519 },
510 // 选项鎖死解除 520 // 选项鎖死解除
511 editAChangeCssRemoveDisabled : function() { 521 editAChangeCssRemoveDisabled : function() {
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
@@ -27,7 +27,7 @@ window.WorldsBMap = function () { @@ -27,7 +27,7 @@ window.WorldsBMap = function () {
27 /** WorldsBMap 全局变量定义 mapBValue:地图对象; road_win_show_p:信息窗口打开状态的路段, 27 /** WorldsBMap 全局变量定义 mapBValue:地图对象; road_win_show_p:信息窗口打开状态的路段,
28 * sectionArray: 路段集合,stationArray: 站点集合 28 * sectionArray: 路段集合,stationArray: 站点集合
29 * map_status:地图编辑状态,drawingManager:绘画工具, topOverlay:置顶视图*/ 29 * map_status:地图编辑状态,drawingManager:绘画工具, topOverlay:置顶视图*/
30 - var mapBValue = '', iseditStatus = false, road_win_show_p = '', editPolyline = '', 30 + var mapBValue = '', iseditStatus = false, road_win_show_p = '', editPolyline = '', matchStation = '',dir = 0,
31 sectionArray = [], stationArray = new Map(), 31 sectionArray = [], stationArray = new Map(),
32 map_status = 0,drawingManager,topOverlay; 32 map_status = 0,drawingManager,topOverlay;
33 33
@@ -106,6 +106,12 @@ window.WorldsBMap = function () { @@ -106,6 +106,12 @@ window.WorldsBMap = function () {
106 getmapBValue: function () { 106 getmapBValue: function () {
107 return mapBValue; 107 return mapBValue;
108 }, 108 },
  109 + getDir:function(){
  110 + return dir;
  111 + },
  112 + setDir:function (dirx) {
  113 + dir = dirx;
  114 + },
109 setMap_status : function (i) { 115 setMap_status : function (i) {
110 map_status = i; 116 map_status = i;
111 }, 117 },
@@ -260,6 +266,51 @@ window.WorldsBMap = function () { @@ -260,6 +266,51 @@ window.WorldsBMap = function () {
260 '<button class="info_win_btn" id="editStation" onclick="WorldsBMap.editStation(' + objStation.stationRouteId+','+objStation.stationRoutedirections + ')">修改</button>' + 266 '<button class="info_win_btn" id="editStation" onclick="WorldsBMap.editStation(' + objStation.stationRouteId+','+objStation.stationRoutedirections + ')">修改</button>' +
261 '<button class="info_win_btn" onclick="WorldsBMap.destroyStation('+ objStation.stationRouteId + ','+objStation.stationRouteLine+','+objStation.stationRoutedirections+')">撤销</button>' + 267 '<button class="info_win_btn" onclick="WorldsBMap.destroyStation('+ objStation.stationRouteId + ','+objStation.stationRouteLine+','+objStation.stationRoutedirections+')">撤销</button>' +
262 '<button class="info_win_btn" id="addBetweenStationRoad" onclick="WorldsBMap.addBetweenStationRoad(' + objStation.stationRouteId + ')">添加站点间路段</button>' + 268 '<button class="info_win_btn" id="addBetweenStationRoad" onclick="WorldsBMap.addBetweenStationRoad(' + objStation.stationRouteId + ')">添加站点间路段</button>' +
  269 + '<button class="info_win_btn" id="editIndustryCode" onclick="WorldsBMap.editIndustryCode(' + objStation.stationRouteId + ')">匹配周边站点行业编码</button>' +
  270 + '</div>';
  271 +
  272 + // 创建信息窗口
  273 + var infoWindow_target = new BMap.InfoWindow(htm, opts);
  274 + setTimeout(function () {
  275 + //开启信息窗口
  276 + mapBValue.openInfoWindow(infoWindow_target, point);
  277 + }, 100);
  278 + // 将地图的中心点更改为给定的点。
  279 + mapBValue.panTo(point);
  280 + }
  281 + },
  282 +
  283 + // 打开匹配博协站点信息窗口
  284 + openMatchStationInfoWin : function (objStation) {
  285 + // 将视图切换到指定的缩放等级,中心点坐标不变。注意:当有信息窗口在地图上打开时,地图缩放将保证信息窗口所在的坐标位置不动。(自1.2新增)
  286 + if (objStation) {
  287 + matchStation = objStation;
  288 + // 获取中心坐标点字符串分割
  289 + var BJwpoints = objStation.bJwpoints.split(' ');
  290 + // 中心坐标点
  291 + var point = new BMap.Point(BJwpoints[0], BJwpoints[1]);
  292 + var width = WorldsBMap.strGetLength(objStation.stationName) * 11;
  293 + // 信息窗口参数属性
  294 + var opts = {
  295 + // 信息窗口宽度
  296 + width: (width < 240 ? 240 : width),
  297 + // 信息窗口高度
  298 + // height: shapes=="r" ?380:350,
  299 + // 信息窗位置偏移值。
  300 + offset: new BMap.Size(10,-20),
  301 + //设置不允许信窗发送短息
  302 + enableMessage: false,
  303 + //是否开启点击地图关闭信息窗口
  304 + enableCloseOnClick: false,
  305 + // 是否开启信息窗口打开时地图自动移动(默认开启)。(自 1.1 新增)
  306 + enableAutoPan: false
  307 + };
  308 +
  309 + var htm = '<span style="color: #ff8355;font-size: 20px; overflow: hidden; white-space: nowrap; text-overflow:ellipsis;display: -webkit-box; -webkit-box-orient: vertical;">' + objStation.stationName + '</span>' +
  310 + '<span class="help-block" >行业编号:' + (objStation.stationStandardCode == null ? "":objStation.stationStandardCode)+ '</span>' +
  311 + '<span class="help-block" >经过线路:' + objStation.lineList + '</span>' +
  312 + // '<div>' + '<button class="info_win_btn" onclick="WorldsBMap.citeIndustryCode(' + objStation + ')">应用此站点行业编码</button>' +
  313 + '<div>' + '<button class="info_win_btn" onclick="WorldsBMap.citeIndustryCode(' + objStation.stationRouteId + ')">应用此站点行业编码</button>' +
263 '</div>'; 314 '</div>';
264 315
265 // 创建信息窗口 316 // 创建信息窗口
@@ -421,8 +472,10 @@ window.WorldsBMap = function () { @@ -421,8 +472,10 @@ window.WorldsBMap = function () {
421 }, 472 },
422 473
423 // 画路段走向 474 // 画路段走向
424 - drawingUpline01: function (polyline_center, datas) {  
425 - if (polyline_center && datas) { 475 + drawingUpline01: function (datas) {
  476 + // drawingUpline01: function (polyline_center, datas) {
  477 + if (datas) {
  478 + // if (polyline_center && datas) {
426 // 编辑路段数据 479 // 编辑路段数据
427 sectionArray = []; 480 sectionArray = [];
428 for (var d = 0; d < datas.length; d++) { 481 for (var d = 0; d < datas.length; d++) {
@@ -470,7 +523,7 @@ window.WorldsBMap = function () { @@ -470,7 +523,7 @@ window.WorldsBMap = function () {
470 sectionArray.push(polyUpline01); 523 sectionArray.push(polyUpline01);
471 } 524 }
472 // mapBValue.setCenter(polyline_center); 525 // mapBValue.setCenter(polyline_center);
473 - mapBValue.panTo(polyline_center); 526 + // mapBValue.panTo(polyline_center);
474 // mapBValue.setZoom(14); 527 // mapBValue.setZoom(14);
475 // 禁止覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增) 528 // 禁止覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增)
476 // polyUpline01.disableMassClear(); 529 // polyUpline01.disableMassClear();
@@ -775,7 +828,8 @@ window.WorldsBMap = function () { @@ -775,7 +828,8 @@ window.WorldsBMap = function () {
775 transit.search(poiOne, poiTwo); 828 transit.search(poiOne, poiTwo);
776 transit.disableAutoViewport(); 829 transit.disableAutoViewport();
777 // 地图编辑状态 830 // 地图编辑状态
778 - PublicFunctions.editMapStatus(); 831 + debugger;
  832 + PublicFunctions.editMapStatus(stationRouteFinish.stationRoutedirections);
779 } else { 833 } else {
780 layer.msg("您选择的站点后没有站点了,不能生成站点间路段!") 834 layer.msg("您选择的站点后没有站点了,不能生成站点间路段!")
781 } 835 }
@@ -784,6 +838,83 @@ window.WorldsBMap = function () { @@ -784,6 +838,83 @@ window.WorldsBMap = function () {
784 }); 838 });
785 839
786 }, 840 },
  841 + // 匹配外部站点行业编码
  842 + editIndustryCode: function (stationId) {
  843 + var station = stationArray[stationId];
  844 + $.get('/stationroute/matchNearbyStation',station,function (data) {
  845 + if(data.status == "SUCCESS"){
  846 + // 关闭信息窗口
  847 + mapBValue.closeInfoWindow();
  848 + var list = data.matchList,
  849 + i = 1;
  850 + // for (var s in list) {
  851 + if(list.length <= 0){
  852 + layer.msg("很遗憾没有匹配到站点!!!");
  853 + return;
  854 + }
  855 +
  856 + // 进入编辑状态
  857 + PublicFunctions.editMapStatus(station.stationRoutedirections);
  858 + list.forEach(function (s) {
  859 + s.stationRouteId = station.stationRouteId;
  860 + s.directions = station.stationRoutedirections;
  861 + s.lineId = station.stationRouteLine;
  862 + var BJwpointsArray = s.bJwpoints.split(' ');
  863 + var stationNameChangePoint = new BMap.Point(BJwpointsArray[0], BJwpointsArray[1]);
  864 + var marker_stargt2 = new BMap.Marker(stationNameChangePoint);
  865 +
  866 + var label = new BMap.Label(i++,{offset:new BMap.Size(i>9?0:4,0)});
  867 + label.setStyle({border :"0", color : "white",backgroundColor:"rgba(0,0,0,0)"});
  868 + marker_stargt2.setLabel(label);
  869 + marker_stargt2.addEventListener('click', function () {
  870 + WorldsBMap.openMatchStationInfoWin(s);
  871 + });
  872 +
  873 + // 将标注添加到地图中
  874 + mapBValue.addOverlay(marker_stargt2);
  875 + });
  876 + var BJwpoints = station.stationJwpoints.split(' ');
  877 + mapBValue.centerAndZoom(new BMap.Point(BJwpoints[0], BJwpoints[1]), 18);
  878 + layer.msg("为您匹配到"+list.length+"个站点,选择红点标记的点,进行匹配!");
  879 + }
  880 + });
  881 + },
  882 + // 应用行业编码
  883 + citeIndustryCode: function (stationRouteId) {
  884 + if(matchStation.stationRouteId == stationRouteId){
  885 + var station = matchStation;
  886 + var keys = "dis_"+station.stationRouteId;
  887 + var params = {};
  888 + // var params = new Map();
  889 + params[keys] = station.stationStandardCode;
  890 + // params.set(keys,station.stationStandardCode);
  891 + $.post('/stationroute/updIndustryCode',params,function (data) {
  892 + Bmap.closeMobleSetClean(station);
  893 + if(data.status == "SUCCESS"){
  894 + layer.msg("应用成功!!")
  895 + }else {
  896 + layer.msg("应用失败....")
  897 + }
  898 + });
  899 + }
  900 + },
  901 + // 清楚覆盖物,定位站点
  902 + closeMobleSetClean: function(station) {
  903 + var dir = station.directions;
  904 + var lineId = station.lineId; // map.clearMarkAndOverlays();
  905 +
  906 + Bmap.clearMarkAndOverlays();
  907 + // 刷新左边树
  908 + PublicFunctions.resjtreeDate(lineId,dir);
  909 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
  910 + GetAjaxData.getSectionRouteInfo(lineId,dir,function(data1) {
  911 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  912 + PublicFunctions.linePanlThree(lineId,data1,dir);
  913 + });
  914 +
  915 + // 退出编辑状态
  916 + PublicFunctions.editMapStatusRemove();
  917 + },
787 // 定位路段 918 // 定位路段
788 focusSection: function(sectionRoudId) { 919 focusSection: function(sectionRoudId) {
789 for (var i = 0, p; p = sectionArray[i++];) { 920 for (var i = 0, p; p = sectionArray[i++];) {
@@ -794,11 +925,11 @@ window.WorldsBMap = function () { @@ -794,11 +925,11 @@ window.WorldsBMap = function () {
794 } 925 }
795 }, 926 },
796 // 路段编辑 927 // 路段编辑
797 - editSection : function(sectionRoudId) { 928 + editSection : function(sectionRoudId,dir) {
798 layer.confirm('进入编辑状态', { 929 layer.confirm('进入编辑状态', {
799 btn : [ '确定','返回' ], icon: 3, title:'提示' 930 btn : [ '确定','返回' ], icon: 3, title:'提示'
800 }, function() { 931 }, function() {
801 - PublicFunctions.editMapStatus(); 932 + PublicFunctions.editMapStatus(dir);
802 layer.msg('双击保存路段'); 933 layer.msg('双击保存路段');
803 var p; 934 var p;
804 for (var i = 0; p = sectionArray[i++];) { 935 for (var i = 0; p = sectionArray[i++];) {
@@ -836,7 +967,7 @@ window.WorldsBMap = function () { @@ -836,7 +967,7 @@ window.WorldsBMap = function () {
836 }); 967 });
837 }); 968 });
838 }, 969 },
839 - // 添加在路段之后 970 + // 添加第一个路段
840 addSection : function(stecion) { 971 addSection : function(stecion) {
841 PublicFunctions.editMapStatus(); 972 PublicFunctions.editMapStatus();
842 // 把数据填充到模版中 973 // 把数据填充到模版中
@@ -918,7 +1049,7 @@ window.WorldsBMap = function () { @@ -918,7 +1049,7 @@ window.WorldsBMap = function () {
918 },1000); 1049 },1000);
919 }); 1050 });
920 }, 1051 },
921 - // 添加第一个路段 1052 + // 添加在路段之后
922 addSectionAfter : function(sectionRoudId) { 1053 addSectionAfter : function(sectionRoudId) {
923 //order = after before; 1054 //order = after before;
924 var beforeSection; 1055 var beforeSection;
@@ -1054,6 +1185,7 @@ window.WorldsBMap = function () { @@ -1054,6 +1185,7 @@ window.WorldsBMap = function () {
1054 // 打开路段信息窗口 1185 // 打开路段信息窗口
1055 openSectionInfoWin : function(p) { 1186 openSectionInfoWin : function(p) {
1056 var section = p.data; 1187 var section = p.data;
  1188 + var dir = section.sectionrouteDirections;
1057 var width = WorldsBMap.strGetLength(section.sectionName) * 10; 1189 var width = WorldsBMap.strGetLength(section.sectionName) * 10;
1058 // 信息窗口参数属性 1190 // 信息窗口参数属性
1059 var opts = { 1191 var opts = {
@@ -1073,7 +1205,7 @@ window.WorldsBMap = function () { @@ -1073,7 +1205,7 @@ window.WorldsBMap = function () {
1073 '<span class="help-block" >路段序号:' + section.sectionrouteCode + '</span>' + 1205 '<span class="help-block" >路段序号:' + section.sectionrouteCode + '</span>' +
1074 '<span class="help-block" >版本号&nbsp&nbsp:' + section.versions + '</span>' + 1206 '<span class="help-block" >版本号&nbsp&nbsp:' + section.versions + '</span>' +
1075 '<div >' + 1207 '<div >' +
1076 - '<button class="info_win_btn" id="editStation" onclick="WorldsBMap.editSection(' + section.sectionrouteId + ')">修改</button>' + 1208 + '<button class="info_win_btn" id="editStation" onclick="WorldsBMap.editSection(' + section.sectionrouteId +','+dir+ ')">修改</button>' +
1077 '<button class="info_win_btn" id="addBetweenStationRoad" onclick="WorldsBMap.destroySection('+ section.sectionrouteId + ','+section.sectionrouteLine+','+section.sectionrouteDirections+')">撤销</button>' + 1209 '<button class="info_win_btn" id="addBetweenStationRoad" onclick="WorldsBMap.destroySection('+ section.sectionrouteId + ','+section.sectionrouteLine+','+section.sectionrouteDirections+')">撤销</button>' +
1078 '<button class="info_win_btn" id="addSectionAfter" onclick="WorldsBMap.addSectionAfter('+section.sectionrouteId+')">添加路段(之后)</button>' + 1210 '<button class="info_win_btn" id="addSectionAfter" onclick="WorldsBMap.addSectionAfter('+section.sectionrouteId+')">添加路段(之后)</button>' +
1079 '</div>'; 1211 '</div>';
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
@@ -36,36 +36,75 @@ $(function(){ @@ -36,36 +36,75 @@ $(function(){
36 fillOpacity : 0.6,//填充的透明度,取值范围0 - 1。 36 fillOpacity : 0.6,//填充的透明度,取值范围0 - 1。
37 strokeStyle : 'solid' //边线的样式,solid或dashed。 37 strokeStyle : 'solid' //边线的样式,solid或dashed。
38 }; 38 };
39 - 39 +
40 // 等候500毫秒执行 40 // 等候500毫秒执行
41 setTimeout(function(){ 41 setTimeout(function(){
42 - 42 +
43 /** 初始化线路对象,这里只初始化线路Id属性 @param:<id:线路ID> @return:Line */ 43 /** 初始化线路对象,这里只初始化线路Id属性 @param:<id:线路ID> @return:Line */
44 var Line = LineObj.init(id); 44 var Line = LineObj.init(id);
45 - 45 +
46 /** 初始化线路标题 @param:<Line.id:线路ID> */ 46 /** 初始化线路标题 @param:<Line.id:线路ID> */
47 PublicFunctions.setTiteText(Line.id); 47 PublicFunctions.setTiteText(Line.id);
48 - 48 +
49 /** 初始化地图对象map @return:Map对象 */ 49 /** 初始化地图对象map @return:Map对象 */
50 var map_ = WorldsBMap.init(); 50 var map_ = WorldsBMap.init();
51 - 51 +
52 /** 初始化绘图工具类 @param:<map_:map对象;styleOptions:绘图样式对象> @return:DrawingManager对象 */ 52 /** 初始化绘图工具类 @param:<map_:map对象;styleOptions:绘图样式对象> @return:DrawingManager对象 */
53 var drawingManager_ = DrawingManagerObj.init(map_,styleOptions); 53 var drawingManager_ = DrawingManagerObj.init(map_,styleOptions);
54 - 54 +
55 /** 初始化上行树 @param:<Line.id:线路Id;0:上行> */ 55 /** 初始化上行树 @param:<Line.id:线路Id;0:上行> */
56 PublicFunctions.TreeUpOrDown(Line.id,'0'); 56 PublicFunctions.TreeUpOrDown(Line.id,'0');
57 - 57 +
58 /** 初始化下行树 @param:<Line.id:线路Id;1:下行> */ 58 /** 初始化下行树 @param:<Line.id:线路Id;1:下行> */
59 PublicFunctions.TreeUpOrDown(Line.id,'1'); 59 PublicFunctions.TreeUpOrDown(Line.id,'1');
60 - 60 +
61 /** 查询路段信息 @param:<Line.id:线路Id;dir:方向> @return:data:路段数据 */ 61 /** 查询路段信息 @param:<Line.id:线路Id;dir:方向> @return:data:路段数据 */
62 GetAjaxData.getSectionRouteInfo(Line.id,dir,function(data) { 62 GetAjaxData.getSectionRouteInfo(Line.id,dir,function(data) {
63 - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */  
64 - PublicFunctions.linePanlThree(Line.id,data,dir);  
65 - 63 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  64 + PublicFunctions.linePanlThree(Line.id,data,dir,function (polyline_center) {
  65 + var map = WorldsBMap.getmapBValue();
  66 + map.panTo(polyline_center);
  67 + });
  68 +
66 }); 69 });
  70 +
  71 + GetAjaxData.getLineMatchStationIsUpdate(Line.id,function (data) {
  72 + if(data.status=='SUCCESS' && data.data == "1"){
  73 + $('.portlet-title .match_station').removeClass('hidden');
  74 + }
  75 + });
  76 +
  77 + $('#esc_edit_div').on('click',function () {
  78 + var index = layer.open({
  79 + title: '退出提示',
  80 + content:'退出编辑模式后,当前没有保存的所有操作将被还原,确定要退出吗!',
  81 + // type: 1,
  82 + // area: ['600px', '360px'],
  83 + // scrollbar: false,
  84 +
  85 + btn:['确定','取消'],
  86 + yes: function(index){
  87 +
  88 + // 刷新左边树
  89 + // PublicFunctions.resjtreeDate(Line.id,dir);
  90 + var dir = WorldsBMap.getDir();
  91 + // 查询路段信息 @param:<Line.id:线路Id;delBatch.dir:方向> @return:data:路段数据
  92 + GetAjaxData.getSectionRouteInfo(Line.id,dir,function(data) {
  93 + // 在地图上画出线路走向 @param:<Line.id:线路Id;delBatch.dir:方向;data:路段数据>
  94 + PublicFunctions.linePanlThree(Line.id,data,dir);
  95 + });
  96 + PublicFunctions.editMapStatusRemove();
  97 + layer.msg("已退出编辑模式!");
  98 + layer.close(index);
  99 + },
  100 + btn2:function(){
  101 + layer.closeAll(index); //关闭当前窗口
  102 + layer.msg("您没有退出编辑模式,请继续完成您未完成的操作!")
  103 + }
  104 + });
  105 + });
67 },500); 106 },500);
68 - 107 +
69 }else { 108 }else {
70 109
71 // 缺少ID 110 // 缺少ID
src/main/resources/static/pages/base/stationroute/list.html
@@ -16,7 +16,11 @@ @@ -16,7 +16,11 @@
16 </button > 16 </button >
17 </div> 17 </div>
18 </div> 18 </div>
19 - 19 + <div class="esc_edit_div" id="esc_edit_div" style="display: none">
  20 + <button class="esc_edit_btn" >退出编辑模式
  21 + </button >
  22 + </div>
  23 + <!-- 搜索下拉框-->
20 <div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;z-index: 199;"></div> 24 <div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;z-index: 199;"></div>
21 <!-- 路径规划路段 --> 25 <!-- 路径规划路段 -->
22 <input class="hand" id="routePlanning" /> 26 <input class="hand" id="routePlanning" />
@@ -27,6 +31,11 @@ @@ -27,6 +31,11 @@
27 <div class="caption"> 31 <div class="caption">
28 <!-- 途径站点 --> 32 <!-- 途径站点 -->
29 </div> 33 </div>
  34 + <div class="match_station hidden">
  35 + <!--<div class="match_station hidden">-->
  36 + <a class="match_station_bnt ">检测到外部站点行业编码有更新</a>
  37 + </div>
  38 +
30 <!--<div class="tools"> 39 <!--<div class="tools">
31 <a href="javascript:;" class="collapse" data-original-title="" title=""> </a> 40 <a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
32 </div>--> 41 </div>-->
@@ -94,6 +103,10 @@ @@ -94,6 +103,10 @@
94 </li> 103 </li>
95 <li class="divider"> </li> 104 <li class="divider"> </li>
96 <li> 105 <li>
  106 + <a href="javascript:;" id="batchUpdateIndustryCode"><i class="fa fa-wrench"></i> 设置站点行业编码</a>
  107 + </li>
  108 + <li class="divider"> </li>
  109 + <li>
97 <a href="javascript:;" id="quoteDown"><i class="fa fa-long-arrow-down"></i> 引用下行路段</a> 110 <a href="javascript:;" id="quoteDown"><i class="fa fa-long-arrow-down"></i> 引用下行路段</a>
98 </li> 111 </li>
99 <!-- <li class="divider"> </li> 112 <!-- <li class="divider"> </li>
@@ -198,6 +211,10 @@ @@ -198,6 +211,10 @@
198 </li> 211 </li>
199 <li class="divider"> </li> 212 <li class="divider"> </li>
200 <li> 213 <li>
  214 + <a href="javascript:;" id="batchDowndateIndustryCode"><i class="fa fa-wrench"></i> 设置站点行业编码</a>
  215 + </li>
  216 + <li class="divider"> </li>
  217 + <li>
201 <a href="javascript:;" id="quoteUp"><i class="fa fa-long-arrow-up"></i> 引用上行路段</a> 218 <a href="javascript:;" id="quoteUp"><i class="fa fa-long-arrow-up"></i> 引用上行路段</a>
202 </li> 219 </li>
203 <!-- <li> 220 <!-- <li>
src/main/resources/static/pages/base/stationroute/match_station_industryCode.html 0 → 100644
  1 +<!-- 设置站点行业编码 -->
  2 +<div class="modal fade" id="match_station_industryCode_mobal" tabindex="-1" role="basic" aria-hidden="true">
  3 + <div class="modal-dialog" style="width: 800px!important;">
  4 + <div class="modal-content">
  5 + <div class="modal-header">
  6 + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
  7 + <h4 class="modal-title">已匹配站点行业编码列表 </h4>
  8 + </div>
  9 + <div class="modal-body">
  10 + <div class="portlet-body">
  11 + <div class="table-container " style="margin-top: 10px;display:flex;flex-direction:row">
  12 + <table class="table table-striped table-bordered table-hover table-checkable" id="table_mStationUp">
  13 + <thead>
  14 + <tr role="row" class="heading">
  15 + <th width="50%" colspan="3" >上行站点列表</th>
  16 + </tr>
  17 + <tr role="row" >
  18 + <th width="5%">站序</th>
  19 + <th width="30%">站点名称</th>
  20 + <th width="15%">行业编码</th>
  21 + </tr>
  22 + </thead>
  23 + <tbody></tbody>
  24 + </table>
  25 +
  26 + <table class="table table-striped table-bordered table-hover table-checkable" id="table_mStationDown" style="margin-left: 10px;">
  27 + <thead>
  28 + <tr role="row" >
  29 + <th width="50%" colspan="3" >下行站点列表</th>
  30 + </tr>
  31 + <tr role="row" class="heading">
  32 + <th width="5%">站序</th>
  33 + <th width="30%">站点名称</th>
  34 + <th width="15%">行业编码</th>
  35 + </tr>
  36 + </thead>
  37 + <tbody></tbody>
  38 + </table>
  39 + </div>
  40 + </div>
  41 + </div>
  42 + </div>
  43 + </div>
  44 +</div>
  45 +<script type="text/html" id="mStationUp_temp">
  46 +{{each list as obj i }}
  47 + <tr role="row" class="filter">
  48 + <td>
  49 + </td>
  50 + <td>
  51 + {{obj.stationName}}
  52 + </td>
  53 + <td>
  54 + {{obj.industryCode}}
  55 + </td>
  56 + </tr>
  57 +{{/each}}
  58 +</script>
  59 +<script type="text/html" id="mStationDown_temp">
  60 +{{each list as obj i }}
  61 + <tr role="row" class="filter">
  62 + <td>
  63 + </td>
  64 + <td>
  65 + {{obj.stationName}}
  66 + </td>
  67 + <td>
  68 + {{obj.industryCode}}
  69 + </td>
  70 + </tr>
  71 +{{/each}}
  72 +</script>
  73 +<script type="text/javascript">
  74 +$('#match_station_industryCode_mobal').on('match_station_industryCodeMobal.show', function(e,data){
  75 + var mStationMap = {};
  76 + setTimeout(function(){
  77 + // 加载延迟200毫秒显示mobal
  78 + $('#match_station_industryCode_mobal').modal({show : true,backdrop: 'static', keyboard: false});
  79 + },200);
  80 + // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
  81 + $('#match_station_industryCode_mobal').on('show.bs.modal', function () {
  82 + var tbodyHtml = template('mStationUp_temp',{list:data.get("up")});
  83 + $('#table_mStationUp tbody').html(tbodyHtml);
  84 + var tbodyHtml = template('mStationDown_temp',{list:data.get("down")});
  85 + $('#table_mStationDown tbody').html(tbodyHtml);
  86 + });
  87 +
  88 +});
  89 +</script>
0 \ No newline at end of file 90 \ No newline at end of file
src/main/resources/static/pages/base/stationroute/tzzj.html
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_bctz"> 18 <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_bctz">
19 <thead> 19 <thead>
20 <tr role="row" class="heading"> 20 <tr role="row" class="heading">
21 - <th width="1%"></th> 21 + <!--<th width="1%"></th>-->
22 <th width="33%">站点序号</th> 22 <th width="33%">站点序号</th>
23 <th width="33%">站点路由</th> 23 <th width="33%">站点路由</th>
24 <th width="33%">站距(米/单位)</th> 24 <th width="33%">站距(米/单位)</th>
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <script type="text/html" id="tzzj_temp"> 40 <script type="text/html" id="tzzj_temp">
41 {{each list as obj i }} 41 {{each list as obj i }}
42 <tr role="row" class="filter"> 42 <tr role="row" class="filter">
43 - <td></td> 43 + <!--<td></td>-->
44 <td> 44 <td>
45 <!--<input type="text" readonly class="form-control form-filter input-sm" value="{{i+1}}">--> 45 <!--<input type="text" readonly class="form-control form-filter input-sm" value="{{i+1}}">-->
46 {{i+1}} 46 {{i+1}}
@@ -116,7 +116,6 @@ $(&#39;#tzzj_mobal&#39;).on(&#39;tzzjMobal.show&#39;, function(e,map,gd,dir,lineid,pf,rd){ @@ -116,7 +116,6 @@ $(&#39;#tzzj_mobal&#39;).on(&#39;tzzjMobal.show&#39;, function(e,map,gd,dir,lineid,pf,rd){
116 map.clearMarkAndOverlays(); 116 map.clearMarkAndOverlays();
117 // 刷新左边树 117 // 刷新左边树
118 pf.resjtreeDate(lineid,dir); 118 pf.resjtreeDate(lineid,dir);
119 - pf.resjtreeDate(lineid,dir);  
120 /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */ 119 /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
121 gd.getSectionRouteInfo(lineid,dir,function(data) { 120 gd.getSectionRouteInfo(lineid,dir,function(data) {
122 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */ 121 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
src/main/resources/static/pages/scheduleApp/module/common/main.js
@@ -280,7 +280,7 @@ ScheduleApp.factory( @@ -280,7 +280,7 @@ ScheduleApp.factory(
280 280
281 var output = []; 281 var output = [];
282 if (!rejection.status) { 282 if (!rejection.status) {
283 - alert("我擦,后台返回连个状态码都没返回,见鬼了,服务器可能重启了"); 283 + // alert("我擦,后台返回连个状态码都没返回,见鬼了,服务器可能重启了");
284 } else if (rejection.status == -1) { 284 } else if (rejection.status == -1) {
285 // 服务器断开了 285 // 服务器断开了
286 // alert("貌似服务端连接不上"); 286 // alert("貌似服务端连接不上");
src/main/resources/station-jdbc.properties 0 → 100644
  1 +station.mysql.driver= com.mysql.jdbc.Driver
  2 +station.mysql.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  3 +station.mysql.username= root
  4 +station.mysql.password= root
  5 +
  6 +#station.mysql.driver= com.mysql.jdbc.Driver
  7 +#station.mysql.url= jdbc:mysql://10.10.200.121:3306/station?useUnicode=true&characterEncoding=utf-8
  8 +#station.mysql.username= station
  9 +#station.mysql.password= station@jsp
  10 +
  11 +#station.mysql.driver= com.mysql.jdbc.Driver
  12 +#station.mysql.url= jdbc:mysql://10.10.200.148:3306/station?useUnicode=true&characterEncoding=utf-8
  13 +#station.mysql.username= station
  14 +#station.mysql.password= station@jsp