Commit ad04f28b57b2bec25a58f6c21abb98cfa28ec3f2

Authored by 潘钊
2 parents 9474fbf6 0db6cdcb

Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong

Too many changes to show.

To preserve performance only 20 of 40 files are displayed.

src/main/java/com/bsth/controller/geo_data/GeoDataController.java
1 -package com.bsth.controller.geo_data;  
2 -  
3 -import com.bsth.entity.geo_data.GeoRoad;  
4 -import com.bsth.entity.geo_data.GeoStation;  
5 -import com.bsth.service.geo_data.GeoDataService;  
6 -import org.springframework.beans.factory.annotation.Autowired;  
7 -import org.springframework.web.bind.annotation.RequestMapping;  
8 -import org.springframework.web.bind.annotation.RequestMethod;  
9 -import org.springframework.web.bind.annotation.RequestParam;  
10 -import org.springframework.web.bind.annotation.RestController;  
11 -  
12 -import java.util.Map;  
13 -  
14 -/**  
15 - * Created by panzhao on 2017/12/7.  
16 - */  
17 -@RestController  
18 -@RequestMapping("/_geo_data")  
19 -public class GeoDataController {  
20 -  
21 - @Autowired  
22 - GeoDataService geoDataService;  
23 -  
24 - @RequestMapping("findGeoStations")  
25 - public Map<String, Object> findGeoStations(@RequestParam String lineCode){  
26 - return geoDataService.findGeoStations(lineCode);  
27 - }  
28 -  
29 -  
30 - @RequestMapping("findGeoRoad")  
31 - public Map<String, Object> findGeoRoad(@RequestParam String lineCode){  
32 - return geoDataService.findGeoRoad(lineCode);  
33 - }  
34 -  
35 - @RequestMapping(value = "updateBufferInfo",method = RequestMethod.POST)  
36 - public Map<String, Object> updateBufferInfo(GeoStation station){  
37 - return geoDataService.updateBufferInfo(station);  
38 - }  
39 -  
40 - @RequestMapping(value = "updateStationName",method = RequestMethod.POST)  
41 - public Map<String, Object> updateStationName(@RequestParam Map<String, Object> map){  
42 - return geoDataService.updateStationName(map);  
43 - }  
44 -  
45 - @RequestMapping(value = "addNewStationRoute",method = RequestMethod.POST)  
46 - public Map<String, Object> addNewStationRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown  
47 - ,@RequestParam String stationName,@RequestParam Float lat,@RequestParam Float lng,@RequestParam int prevRouteId){  
48 - return geoDataService.addNewStationRoute(lineCode, upDown, versions, stationName, lat, lng, prevRouteId);  
49 - }  
50 -  
51 - @RequestMapping(value = "addNewRoadRoute",method = RequestMethod.POST)  
52 - public Map<String, Object> addNewRoadRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown  
53 - ,@RequestParam String sectionName,@RequestParam String crosesRoad,@RequestParam String coords,@RequestParam int prevRouteId){  
54 - return geoDataService.addNewRoadRoute(lineCode, upDown, versions, sectionName, crosesRoad, coords, prevRouteId);  
55 - }  
56 -  
57 - @RequestMapping(value = "destroyStation",method = RequestMethod.POST)  
58 - public Map<String, Object> destroyStation(GeoStation station){  
59 - return geoDataService.destroyStation(station);  
60 - }  
61 -  
62 - @RequestMapping(value = "updateRoadInfo",method = RequestMethod.POST)  
63 - public Map<String, Object> updateRoadInfo(GeoRoad road){  
64 - return geoDataService.updateRoadInfo(road);  
65 - }  
66 -  
67 - @RequestMapping(value = "destroyRoad",method = RequestMethod.POST)  
68 - public Map<String, Object> destroyRoad(GeoRoad road){  
69 - return geoDataService.destroyRoad(road);  
70 - }  
71 -  
72 - @RequestMapping("findVersionInfo")  
73 - public Map<String, Object> findVersionInfo(@RequestParam String lineCode){  
74 - return geoDataService.findVersionInfo(lineCode);  
75 - } 1 +package com.bsth.controller.geo_data;
  2 +
  3 +import com.bsth.entity.geo_data.GeoRoad;
  4 +import com.bsth.entity.geo_data.GeoStation;
  5 +import com.bsth.service.geo_data.GeoDataService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import java.util.Map;
  13 +
  14 +/**
  15 + * Created by panzhao on 2017/12/7.
  16 + */
  17 +@RestController
  18 +@RequestMapping("/_geo_data")
  19 +public class GeoDataController {
  20 +
  21 + @Autowired
  22 + GeoDataService geoDataService;
  23 +
  24 + @RequestMapping("findGeoStations")
  25 + public Map<String, Object> findGeoStations(@RequestParam String lineCode){
  26 + return geoDataService.findGeoStations(lineCode);
  27 + }
  28 +
  29 +
  30 + @RequestMapping("findGeoRoad")
  31 + public Map<String, Object> findGeoRoad(@RequestParam String lineCode){
  32 + return geoDataService.findGeoRoad(lineCode);
  33 + }
  34 +
  35 + @RequestMapping(value = "updateBufferInfo",method = RequestMethod.POST)
  36 + public Map<String, Object> updateBufferInfo(GeoStation station){
  37 + return geoDataService.updateBufferInfo(station);
  38 + }
  39 +
  40 + @RequestMapping(value = "updateStationName",method = RequestMethod.POST)
  41 + public Map<String, Object> updateStationName(@RequestParam Map<String, Object> map){
  42 + return geoDataService.updateStationName(map);
  43 + }
  44 +
  45 + @RequestMapping(value = "addNewStationRoute",method = RequestMethod.POST)
  46 + public Map<String, Object> addNewStationRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown
  47 + ,@RequestParam String stationName,@RequestParam Float lat,@RequestParam Float lng,@RequestParam int prevRouteId){
  48 + return geoDataService.addNewStationRoute(lineCode, upDown, versions, stationName, lat, lng, prevRouteId);
  49 + }
  50 +
  51 + @RequestMapping(value = "addNewRoadRoute",method = RequestMethod.POST)
  52 + public Map<String, Object> addNewRoadRoute(@RequestParam String lineCode,@RequestParam int versions,@RequestParam int upDown
  53 + ,@RequestParam String sectionName,@RequestParam String crosesRoad,@RequestParam String coords,@RequestParam int prevRouteId){
  54 + return geoDataService.addNewRoadRoute(lineCode, upDown, versions, sectionName, crosesRoad, coords, prevRouteId);
  55 + }
  56 +
  57 + @RequestMapping(value = "destroyStation",method = RequestMethod.POST)
  58 + public Map<String, Object> destroyStation(GeoStation station){
  59 + return geoDataService.destroyStation(station);
  60 + }
  61 +
  62 + @RequestMapping(value = "updateRoadInfo",method = RequestMethod.POST)
  63 + public Map<String, Object> updateRoadInfo(GeoRoad road){
  64 + return geoDataService.updateRoadInfo(road);
  65 + }
  66 +
  67 + @RequestMapping(value = "destroyRoad",method = RequestMethod.POST)
  68 + public Map<String, Object> destroyRoad(GeoRoad road){
  69 + return geoDataService.destroyRoad(road);
  70 + }
  71 +
  72 + @RequestMapping("findVersionInfo")
  73 + public Map<String, Object> findVersionInfo(@RequestParam String lineCode){
  74 + return geoDataService.findVersionInfo(lineCode);
  75 + }
76 } 76 }
77 \ No newline at end of file 77 \ No newline at end of file
src/main/java/com/bsth/controller/schedule/core/TTInfoController.java
@@ -2,16 +2,14 @@ package com.bsth.controller.schedule.core; @@ -2,16 +2,14 @@ package com.bsth.controller.schedule.core;
2 2
3 import com.bsth.common.ResponseCode; 3 import com.bsth.common.ResponseCode;
4 import com.bsth.controller.schedule.BController; 4 import com.bsth.controller.schedule.BController;
5 -import com.bsth.entity.LineVersions;  
6 import com.bsth.entity.schedule.TTInfo; 5 import com.bsth.entity.schedule.TTInfo;
7 -import com.bsth.service.LineVersionsService;  
8 import com.bsth.service.schedule.TTInfoService; 6 import com.bsth.service.schedule.TTInfoService;
9 import com.bsth.service.schedule.exception.ScheduleException; 7 import com.bsth.service.schedule.exception.ScheduleException;
10 -import org.joda.time.DateTime;  
11 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.web.bind.annotation.*; 9 import org.springframework.web.bind.annotation.*;
13 10
14 -import java.util.*; 11 +import java.util.HashMap;
  12 +import java.util.Map;
15 13
16 /** 14 /**
17 * Created by xu on 16/12/20. 15 * Created by xu on 16/12/20.
@@ -21,47 +19,13 @@ import java.util.*; @@ -21,47 +19,13 @@ import java.util.*;
21 public class TTInfoController extends BController<TTInfo, Long> { 19 public class TTInfoController extends BController<TTInfo, Long> {
22 @Autowired 20 @Autowired
23 private TTInfoService ttInfoService; 21 private TTInfoService ttInfoService;
24 - @Autowired  
25 - private LineVersionsService lineVersionsService;  
26 22
27 @RequestMapping(value = "/stationroute/{lineid}", method = RequestMethod.GET) 23 @RequestMapping(value = "/stationroute/{lineid}", method = RequestMethod.GET)
28 public Map<String, Object> getLineStationRouteVersions(@PathVariable(value = "lineid") Integer lineid) { 24 public Map<String, Object> getLineStationRouteVersions(@PathVariable(value = "lineid") Integer lineid) {
29 Map<String, Object> rtn = new HashMap<>(); 25 Map<String, Object> rtn = new HashMap<>();
30 try { 26 try {
31 - List<LineVersions> lineVersionses = lineVersionsService.findByLineCode(lineid);  
32 - Collections.sort(lineVersionses, new Comparator<LineVersions>() {  
33 - @Override  
34 - public int compare(LineVersions o1, LineVersions o2) {  
35 - if (o1.getVersions() > o2.getVersions()) {  
36 - return -1;  
37 - } else if (o1.getVersions() < o2.getVersions()) {  
38 - return 1;  
39 - } else {  
40 - return 0;  
41 - }  
42 - }  
43 - });  
44 -  
45 - // 取最近2条记录  
46 - List<Map<String, Object>> mapList = new ArrayList<>();  
47 - for (LineVersions lv: lineVersionses) {  
48 - String vname = lv.getName();  
49 - String rq = lv.getStartDate() == null ? "未知启用日期" : new DateTime(lv.getStartDate()).toString("YYYY年MM月dd日");  
50 - String sdesc = lv.getStatus() == 0 ? "历史" : (lv.getStatus() == 1 ? "当前" : "待更新");  
51 -  
52 - Map<String, Object> value = new HashMap<>();  
53 - value.put("desc", vname + "-" + rq + "-" + sdesc);  
54 - value.put("version", lv.getVersions());  
55 -  
56 - mapList.add(value);  
57 -  
58 - if (mapList.size() == 2) {  
59 - break;  
60 - }  
61 - }  
62 -  
63 rtn.put("status", ResponseCode.SUCCESS); 27 rtn.put("status", ResponseCode.SUCCESS);
64 - rtn.put("data", mapList); 28 + rtn.put("data", ttInfoService.getLineStationRouteVersions(lineid));
65 29
66 } catch (Exception exp) { 30 } catch (Exception exp) {
67 rtn.put("status", ResponseCode.ERROR); 31 rtn.put("status", ResponseCode.ERROR);
@@ -72,6 +36,25 @@ public class TTInfoController extends BController&lt;TTInfo, Long&gt; { @@ -72,6 +36,25 @@ public class TTInfoController extends BController&lt;TTInfo, Long&gt; {
72 36
73 } 37 }
74 38
  39 + @RequestMapping(value = "/versiondesc/{lineid}/{version}")
  40 + public Map<String, Object> getLineVersionDesc(
  41 + @PathVariable(value = "lineid") Integer lineid,
  42 + @PathVariable(value = "version") Integer version) {
  43 + Map<String, Object> rtn = new HashMap<>();
  44 + try {
  45 + Map<String, String> desc = new HashMap<>();
  46 + desc.put("desc", ttInfoService.getLineVersionDesc(lineid, version));
  47 + rtn.put("status", ResponseCode.SUCCESS);
  48 + rtn.put("data", desc);
  49 +
  50 + } catch (Exception exp) {
  51 + rtn.put("status", ResponseCode.ERROR);
  52 + rtn.put("msg", exp.getMessage());
  53 + }
  54 +
  55 + return rtn;
  56 + }
  57 +
75 @RequestMapping(value = "/validate_name", method = RequestMethod.GET) 58 @RequestMapping(value = "/validate_name", method = RequestMethod.GET)
76 public Map<String, Object> validate_name(@RequestParam Map<String, Object> param) { 59 public Map<String, Object> validate_name(@RequestParam Map<String, Object> param) {
77 Map<String, Object> rtn = new HashMap<>(); 60 Map<String, Object> rtn = new HashMap<>();
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java
@@ -108,10 +108,10 @@ public class TTInfoDetailController extends BController&lt;TTInfoDetail, Long&gt; { @@ -108,10 +108,10 @@ public class TTInfoDetailController extends BController&lt;TTInfoDetail, Long&gt; {
108 } 108 }
109 109
110 @RequestMapping(value = "/zd_tcc", method = RequestMethod.GET) 110 @RequestMapping(value = "/zd_tcc", method = RequestMethod.GET)
111 - public Map<String, Object> getZdAndTccInfo(Integer lineid, Integer xldir) { 111 + public Map<String, Object> getZdAndTccInfo(Integer lineid, Integer xldir, Integer lineversion) {
112 Map<String, Object> rtn = new HashMap<>(); 112 Map<String, Object> rtn = new HashMap<>();
113 try { 113 try {
114 - List<Map<String, Object>> list = ttInfoDetailService.findZdAndTcc(lineid, xldir); 114 + List<Map<String, Object>> list = ttInfoDetailService.findZdAndTcc(lineid, xldir, lineversion);
115 rtn.put("status", ResponseCode.SUCCESS); 115 rtn.put("status", ResponseCode.SUCCESS);
116 rtn.put("data", list); 116 rtn.put("data", list);
117 } catch (Exception exp) { 117 } catch (Exception exp) {
src/main/java/com/bsth/entity/geo_data/GeoLineVersionInfo.java
1 -package com.bsth.entity.geo_data;  
2 -  
3 -import java.util.Date;  
4 -  
5 -/**  
6 - * 线路版本信息  
7 - * Created by panzhao on 2017/12/18.  
8 - */  
9 -public class GeoLineVersionInfo {  
10 - /** ID 主键(唯一标识符) int length(11) */  
11 - private Integer id;  
12 -  
13 - /** 线路版本名字 varchar length(50)  
14 - * 给排版人员选版本使用  
15 - * */  
16 - private String name;  
17 -  
18 - /** 线路ID int length(11) */  
19 - private Integer line;  
20 -  
21 - /** 线路编码 varchar length(50) */  
22 - private String lineCode;  
23 -  
24 - /** 版本号 int length(11) */  
25 - private int versions;  
26 -  
27 - /** 启用日期 timestamp */  
28 - private Date startDate;  
29 -  
30 - /** 终止日期 timestamp */  
31 - private Date endDate;  
32 -  
33 - /** 创建日期 timestamp */  
34 - private Date createDate;  
35 -  
36 - /** 修改日期 timestamp */  
37 - private Date updateDate;  
38 -  
39 - /** 备注 varchar length(50) */  
40 - private String remark;  
41 -  
42 - /** 版本状态 int length(11)  
43 - * 0(历史版本),1(当前版本),2(待更新版本)  
44 - */  
45 - private int status;  
46 -  
47 - /**  
48 - * 是否发布 int length(1)  
49 - * 0(没有),1(发布)  
50 - */  
51 - private int isupdate;  
52 -  
53 - private String lineName;  
54 -  
55 - public Integer getId() {  
56 - return id;  
57 - }  
58 -  
59 - public void setId(Integer id) {  
60 - this.id = id;  
61 - }  
62 -  
63 - public String getName() {  
64 - return name;  
65 - }  
66 -  
67 - public void setName(String name) {  
68 - this.name = name;  
69 - }  
70 -  
71 - public String getLineCode() {  
72 - return lineCode;  
73 - }  
74 -  
75 - public void setLineCode(String lineCode) {  
76 - this.lineCode = lineCode;  
77 - }  
78 -  
79 - public int getVersions() {  
80 - return versions;  
81 - }  
82 -  
83 - public void setVersions(int versions) {  
84 - this.versions = versions;  
85 - }  
86 -  
87 - public Date getStartDate() {  
88 - return startDate;  
89 - }  
90 -  
91 - public void setStartDate(Date startDate) {  
92 - this.startDate = startDate;  
93 - }  
94 -  
95 - public Date getEndDate() {  
96 - return endDate;  
97 - }  
98 -  
99 - public void setEndDate(Date endDate) {  
100 - this.endDate = endDate;  
101 - }  
102 -  
103 - public Date getCreateDate() {  
104 - return createDate;  
105 - }  
106 -  
107 - public void setCreateDate(Date createDate) {  
108 - this.createDate = createDate;  
109 - }  
110 -  
111 - public Date getUpdateDate() {  
112 - return updateDate;  
113 - }  
114 -  
115 - public void setUpdateDate(Date updateDate) {  
116 - this.updateDate = updateDate;  
117 - }  
118 -  
119 - public String getRemark() {  
120 - return remark;  
121 - }  
122 -  
123 - public void setRemark(String remark) {  
124 - this.remark = remark;  
125 - }  
126 -  
127 - public int getStatus() {  
128 - return status;  
129 - }  
130 -  
131 - public void setStatus(int status) {  
132 - this.status = status;  
133 - }  
134 -  
135 - public int getIsupdate() {  
136 - return isupdate;  
137 - }  
138 -  
139 - public void setIsupdate(int isupdate) {  
140 - this.isupdate = isupdate;  
141 - }  
142 -  
143 - public String getLineName() {  
144 - return lineName;  
145 - }  
146 -  
147 - public void setLineName(String lineName) {  
148 - this.lineName = lineName;  
149 - }  
150 -  
151 - public Integer getLine() {  
152 - return line;  
153 - }  
154 -  
155 - public void setLine(Integer line) {  
156 - this.line = line;  
157 - }  
158 -} 1 +package com.bsth.entity.geo_data;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * 线路版本信息
  7 + * Created by panzhao on 2017/12/18.
  8 + */
  9 +public class GeoLineVersionInfo {
  10 + /** ID 主键(唯一标识符) int length(11) */
  11 + private Integer id;
  12 +
  13 + /** 线路版本名字 varchar length(50)
  14 + * 给排版人员选版本使用
  15 + * */
  16 + private String name;
  17 +
  18 + /** 线路ID int length(11) */
  19 + private Integer line;
  20 +
  21 + /** 线路编码 varchar length(50) */
  22 + private String lineCode;
  23 +
  24 + /** 版本号 int length(11) */
  25 + private int versions;
  26 +
  27 + /** 启用日期 timestamp */
  28 + private Date startDate;
  29 +
  30 + /** 终止日期 timestamp */
  31 + private Date endDate;
  32 +
  33 + /** 创建日期 timestamp */
  34 + private Date createDate;
  35 +
  36 + /** 修改日期 timestamp */
  37 + private Date updateDate;
  38 +
  39 + /** 备注 varchar length(50) */
  40 + private String remark;
  41 +
  42 + /** 版本状态 int length(11)
  43 + * 0(历史版本),1(当前版本),2(待更新版本)
  44 + */
  45 + private int status;
  46 +
  47 + /**
  48 + * 是否发布 int length(1)
  49 + * 0(没有),1(发布)
  50 + */
  51 + private int isupdate;
  52 +
  53 + private String lineName;
  54 +
  55 + public Integer getId() {
  56 + return id;
  57 + }
  58 +
  59 + public void setId(Integer id) {
  60 + this.id = id;
  61 + }
  62 +
  63 + public String getName() {
  64 + return name;
  65 + }
  66 +
  67 + public void setName(String name) {
  68 + this.name = name;
  69 + }
  70 +
  71 + public String getLineCode() {
  72 + return lineCode;
  73 + }
  74 +
  75 + public void setLineCode(String lineCode) {
  76 + this.lineCode = lineCode;
  77 + }
  78 +
  79 + public int getVersions() {
  80 + return versions;
  81 + }
  82 +
  83 + public void setVersions(int versions) {
  84 + this.versions = versions;
  85 + }
  86 +
  87 + public Date getStartDate() {
  88 + return startDate;
  89 + }
  90 +
  91 + public void setStartDate(Date startDate) {
  92 + this.startDate = startDate;
  93 + }
  94 +
  95 + public Date getEndDate() {
  96 + return endDate;
  97 + }
  98 +
  99 + public void setEndDate(Date endDate) {
  100 + this.endDate = endDate;
  101 + }
  102 +
  103 + public Date getCreateDate() {
  104 + return createDate;
  105 + }
  106 +
  107 + public void setCreateDate(Date createDate) {
  108 + this.createDate = createDate;
  109 + }
  110 +
  111 + public Date getUpdateDate() {
  112 + return updateDate;
  113 + }
  114 +
  115 + public void setUpdateDate(Date updateDate) {
  116 + this.updateDate = updateDate;
  117 + }
  118 +
  119 + public String getRemark() {
  120 + return remark;
  121 + }
  122 +
  123 + public void setRemark(String remark) {
  124 + this.remark = remark;
  125 + }
  126 +
  127 + public int getStatus() {
  128 + return status;
  129 + }
  130 +
  131 + public void setStatus(int status) {
  132 + this.status = status;
  133 + }
  134 +
  135 + public int getIsupdate() {
  136 + return isupdate;
  137 + }
  138 +
  139 + public void setIsupdate(int isupdate) {
  140 + this.isupdate = isupdate;
  141 + }
  142 +
  143 + public String getLineName() {
  144 + return lineName;
  145 + }
  146 +
  147 + public void setLineName(String lineName) {
  148 + this.lineName = lineName;
  149 + }
  150 +
  151 + public Integer getLine() {
  152 + return line;
  153 + }
  154 +
  155 + public void setLine(Integer line) {
  156 + this.line = line;
  157 + }
  158 +}
src/main/java/com/bsth/entity/geo_data/GeoStation.java
1 -package com.bsth.entity.geo_data;  
2 -  
3 -import com.fasterxml.jackson.annotation.JsonIgnore;  
4 -  
5 -import java.util.List;  
6 -  
7 -/**  
8 - * Created by panzhao on 2017/12/7.  
9 - */  
10 -public class GeoStation {  
11 -  
12 - private int id;  
13 -  
14 - private String stationName;  
15 -  
16 - private String stationRouteCode;  
17 -  
18 - private String lineCode;  
19 -  
20 - private Integer directions;  
21 -  
22 - private String stationCode;  
23 -  
24 - private String stationMark;  
25 -  
26 - private Integer versions;  
27 -  
28 - private Float gLonx;  
29 -  
30 - private Float gLaty;  
31 -  
32 - @JsonIgnore  
33 - private String gPolygonGrid;  
34 -  
35 - private List<String> bdCoords;  
36 -  
37 - private Integer radius;  
38 -  
39 - private String shapesType;  
40 -  
41 - public int getId() {  
42 - return id;  
43 - }  
44 -  
45 - public void setId(int id) {  
46 - this.id = id;  
47 - }  
48 -  
49 - public String getStationName() {  
50 - return stationName;  
51 - }  
52 -  
53 - public void setStationName(String stationName) {  
54 - this.stationName = stationName;  
55 - }  
56 -  
57 - public String getStationRouteCode() {  
58 - return stationRouteCode;  
59 - }  
60 -  
61 - public void setStationRouteCode(String stationRouteCode) {  
62 - this.stationRouteCode = stationRouteCode;  
63 - }  
64 -  
65 - public String getLineCode() {  
66 - return lineCode;  
67 - }  
68 -  
69 - public void setLineCode(String lineCode) {  
70 - this.lineCode = lineCode;  
71 - }  
72 -  
73 - public Integer getDirections() {  
74 - return directions;  
75 - }  
76 -  
77 - public void setDirections(Integer directions) {  
78 - this.directions = directions;  
79 - }  
80 -  
81 - public String getStationCode() {  
82 - return stationCode;  
83 - }  
84 -  
85 - public void setStationCode(String stationCode) {  
86 - this.stationCode = stationCode;  
87 - }  
88 -  
89 - public String getStationMark() {  
90 - return stationMark;  
91 - }  
92 -  
93 - public void setStationMark(String stationMark) {  
94 - this.stationMark = stationMark;  
95 - }  
96 -  
97 - public Float getgLonx() {  
98 - return gLonx;  
99 - }  
100 -  
101 - public void setgLonx(Float gLonx) {  
102 - this.gLonx = gLonx;  
103 - }  
104 -  
105 - public Float getgLaty() {  
106 - return gLaty;  
107 - }  
108 -  
109 - public void setgLaty(Float gLaty) {  
110 - this.gLaty = gLaty;  
111 - }  
112 -  
113 - public String getgPolygonGrid() {  
114 - return gPolygonGrid;  
115 - }  
116 -  
117 - public void setgPolygonGrid(String gPolygonGrid) {  
118 - this.gPolygonGrid = gPolygonGrid;  
119 - }  
120 -  
121 - public Integer getRadius() {  
122 - return radius;  
123 - }  
124 -  
125 - public void setRadius(Integer radius) {  
126 - this.radius = radius;  
127 - }  
128 -  
129 - public String getShapesType() {  
130 - return shapesType;  
131 - }  
132 -  
133 - public void setShapesType(String shapesType) {  
134 - this.shapesType = shapesType;  
135 - }  
136 -  
137 - public List<String> getBdCoords() {  
138 - return bdCoords;  
139 - }  
140 -  
141 - public void setBdCoords(List<String> bdCoords) {  
142 - this.bdCoords = bdCoords;  
143 - }  
144 -  
145 - public Integer getVersions() {  
146 - return versions;  
147 - }  
148 -  
149 - public void setVersions(Integer versions) {  
150 - this.versions = versions;  
151 - } 1 +package com.bsth.entity.geo_data;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonIgnore;
  4 +
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/12/7.
  9 + */
  10 +public class GeoStation {
  11 +
  12 + private int id;
  13 +
  14 + private String stationName;
  15 +
  16 + private String stationRouteCode;
  17 +
  18 + private String lineCode;
  19 +
  20 + private Integer directions;
  21 +
  22 + private String stationCode;
  23 +
  24 + private String stationMark;
  25 +
  26 + private Integer versions;
  27 +
  28 + private Float gLonx;
  29 +
  30 + private Float gLaty;
  31 +
  32 + @JsonIgnore
  33 + private String gPolygonGrid;
  34 +
  35 + private List<String> bdCoords;
  36 +
  37 + private Integer radius;
  38 +
  39 + private String shapesType;
  40 +
  41 + public int getId() {
  42 + return id;
  43 + }
  44 +
  45 + public void setId(int id) {
  46 + this.id = id;
  47 + }
  48 +
  49 + public String getStationName() {
  50 + return stationName;
  51 + }
  52 +
  53 + public void setStationName(String stationName) {
  54 + this.stationName = stationName;
  55 + }
  56 +
  57 + public String getStationRouteCode() {
  58 + return stationRouteCode;
  59 + }
  60 +
  61 + public void setStationRouteCode(String stationRouteCode) {
  62 + this.stationRouteCode = stationRouteCode;
  63 + }
  64 +
  65 + public String getLineCode() {
  66 + return lineCode;
  67 + }
  68 +
  69 + public void setLineCode(String lineCode) {
  70 + this.lineCode = lineCode;
  71 + }
  72 +
  73 + public Integer getDirections() {
  74 + return directions;
  75 + }
  76 +
  77 + public void setDirections(Integer directions) {
  78 + this.directions = directions;
  79 + }
  80 +
  81 + public String getStationCode() {
  82 + return stationCode;
  83 + }
  84 +
  85 + public void setStationCode(String stationCode) {
  86 + this.stationCode = stationCode;
  87 + }
  88 +
  89 + public String getStationMark() {
  90 + return stationMark;
  91 + }
  92 +
  93 + public void setStationMark(String stationMark) {
  94 + this.stationMark = stationMark;
  95 + }
  96 +
  97 + public Float getgLonx() {
  98 + return gLonx;
  99 + }
  100 +
  101 + public void setgLonx(Float gLonx) {
  102 + this.gLonx = gLonx;
  103 + }
  104 +
  105 + public Float getgLaty() {
  106 + return gLaty;
  107 + }
  108 +
  109 + public void setgLaty(Float gLaty) {
  110 + this.gLaty = gLaty;
  111 + }
  112 +
  113 + public String getgPolygonGrid() {
  114 + return gPolygonGrid;
  115 + }
  116 +
  117 + public void setgPolygonGrid(String gPolygonGrid) {
  118 + this.gPolygonGrid = gPolygonGrid;
  119 + }
  120 +
  121 + public Integer getRadius() {
  122 + return radius;
  123 + }
  124 +
  125 + public void setRadius(Integer radius) {
  126 + this.radius = radius;
  127 + }
  128 +
  129 + public String getShapesType() {
  130 + return shapesType;
  131 + }
  132 +
  133 + public void setShapesType(String shapesType) {
  134 + this.shapesType = shapesType;
  135 + }
  136 +
  137 + public List<String> getBdCoords() {
  138 + return bdCoords;
  139 + }
  140 +
  141 + public void setBdCoords(List<String> bdCoords) {
  142 + this.bdCoords = bdCoords;
  143 + }
  144 +
  145 + public Integer getVersions() {
  146 + return versions;
  147 + }
  148 +
  149 + public void setVersions(Integer versions) {
  150 + this.versions = versions;
  151 + }
152 } 152 }
153 \ No newline at end of file 153 \ No newline at end of file
src/main/java/com/bsth/entity/schedule/TTInfo.java
@@ -67,6 +67,10 @@ public class TTInfo extends BEntity { @@ -67,6 +67,10 @@ public class TTInfo extends BEntity {
67 /** 最近备份日期 */ 67 /** 最近备份日期 */
68 private Date lastBackUpDate; 68 private Date lastBackUpDate;
69 69
  70 + /** 线路版本(bsth_c_line_versions表对应字段) */
  71 + @Column(nullable = false)
  72 + private int lineVersion;
  73 +
70 public TTInfo() {} 74 public TTInfo() {}
71 public TTInfo(Object id, Object xlid, Object name, Object nds, Object sds) { 75 public TTInfo(Object id, Object xlid, Object name, Object nds, Object sds) {
72 if (id != null) { 76 if (id != null) {
@@ -109,7 +113,9 @@ public class TTInfo extends BEntity { @@ -109,7 +113,9 @@ public class TTInfo extends BEntity {
109 .setUpdateUser(getUpdateBy() == null ? 0 : getUpdateBy().getId()) 113 .setUpdateUser(getUpdateBy() == null ? 0 : getUpdateBy().getId())
110 .setUpdateUserName(getUpdateBy() == null ? "" : getUpdateBy().getUserName()) 114 .setUpdateUserName(getUpdateBy() == null ? "" : getUpdateBy().getUserName())
111 .setCreateDate(getCreateDate() == null ? 0l : getCreateDate().getTime()) 115 .setCreateDate(getCreateDate() == null ? 0l : getCreateDate().getTime())
112 - .setUpdateDate(getUpdateDate() == null ? 0l : getUpdateDate().getTime()); 116 + .setUpdateDate(getUpdateDate() == null ? 0l : getUpdateDate().getTime())
  117 + .setLineVersion(lineVersion)
  118 + ;
113 119
114 } 120 }
115 121
@@ -216,4 +222,12 @@ public class TTInfo extends BEntity { @@ -216,4 +222,12 @@ public class TTInfo extends BEntity {
216 public void setLastBackUpDate(Date lastBackUpDate) { 222 public void setLastBackUpDate(Date lastBackUpDate) {
217 this.lastBackUpDate = lastBackUpDate; 223 this.lastBackUpDate = lastBackUpDate;
218 } 224 }
  225 +
  226 + public int getLineVersion() {
  227 + return lineVersion;
  228 + }
  229 +
  230 + public void setLineVersion(int lineVersion) {
  231 + this.lineVersion = lineVersion;
  232 + }
219 } 233 }
src/main/java/com/bsth/entity/schedule/TTInfoBackup.java
@@ -36,6 +36,10 @@ public class TTInfoBackup { @@ -36,6 +36,10 @@ public class TTInfoBackup {
36 @Lob 36 @Lob
37 private byte[] backUpInfo; 37 private byte[] backUpInfo;
38 38
  39 + /** 线路版本(bsth_c_line_versions表对应字段) */
  40 + @Column(nullable = false)
  41 + private int lineVersion;
  42 +
39 public Long getId() { 43 public Long getId() {
40 return id; 44 return id;
41 } 45 }
@@ -91,4 +95,12 @@ public class TTInfoBackup { @@ -91,4 +95,12 @@ public class TTInfoBackup {
91 public void setBackUpInfo(byte[] backUpInfo) { 95 public void setBackUpInfo(byte[] backUpInfo) {
92 this.backUpInfo = backUpInfo; 96 this.backUpInfo = backUpInfo;
93 } 97 }
  98 +
  99 + public int getLineVersion() {
  100 + return lineVersion;
  101 + }
  102 +
  103 + public void setLineVersion(int lineVersion) {
  104 + this.lineVersion = lineVersion;
  105 + }
94 } 106 }
src/main/java/com/bsth/entity/schedule/TTInfoDetail.java
@@ -100,6 +100,10 @@ public class TTInfoDetail extends BEntity { @@ -100,6 +100,10 @@ public class TTInfoDetail extends BEntity {
100 /** 备注 */ 100 /** 备注 */
101 private String remark; 101 private String remark;
102 102
  103 + /** 线路版本(bsth_c_line_versions表对应字段) */
  104 + @Column(nullable = false)
  105 + private int lineVersion;
  106 +
103 /** 107 /**
104 * 输出proto生成的builder 108 * 输出proto生成的builder
105 * @return 109 * @return
@@ -126,6 +130,7 @@ public class TTInfoDetail extends BEntity { @@ -126,6 +130,7 @@ public class TTInfoDetail extends BEntity {
126 .setIsFB(isFB == null ? false : isFB) 130 .setIsFB(isFB == null ? false : isFB)
127 .setIsTS(isTS == null ? false : isTS) 131 .setIsTS(isTS == null ? false : isTS)
128 .setRemark(remark == null ? "" : remark) 132 .setRemark(remark == null ? "" : remark)
  133 + .setLineVersion(lineVersion)
129 ; 134 ;
130 } 135 }
131 136
@@ -320,4 +325,12 @@ public class TTInfoDetail extends BEntity { @@ -320,4 +325,12 @@ public class TTInfoDetail extends BEntity {
320 public void setIsTS(Boolean isTS) { 325 public void setIsTS(Boolean isTS) {
321 this.isTS = isTS; 326 this.isTS = isTS;
322 } 327 }
  328 +
  329 + public int getLineVersion() {
  330 + return lineVersion;
  331 + }
  332 +
  333 + public void setLineVersion(int lineVersion) {
  334 + this.lineVersion = lineVersion;
  335 + }
323 } 336 }
src/main/java/com/bsth/service/geo_data/GeoDataService.java
1 -package com.bsth.service.geo_data;  
2 -  
3 -import com.bsth.entity.geo_data.GeoRoad;  
4 -import com.bsth.entity.geo_data.GeoStation;  
5 -  
6 -import java.util.Map;  
7 -  
8 -/**  
9 - * Created by panzhao on 2017/12/7.  
10 - */  
11 -public interface GeoDataService {  
12 -  
13 -  
14 - Map<String, Object> findGeoStations(String lineCode);  
15 -  
16 -  
17 - Map<String, Object> findGeoRoad(String lineCode);  
18 -  
19 - Map<String, Object> updateBufferInfo(GeoStation station);  
20 -  
21 - Map<String, Object> updateStationName(Map<String, Object> map);  
22 -  
23 - Map<String,Object> addNewStationRoute(String lineCode, int upDown,int versions, String stationName, Float lat, Float lng, int prevRouteId);  
24 -  
25 - Map<String,Object> destroyStation(GeoStation station);  
26 -  
27 - Map<String,Object> updateRoadInfo(GeoRoad road);  
28 -  
29 - Map<String,Object> destroyRoad(GeoRoad road);  
30 -  
31 - Map<String,Object> addNewRoadRoute(String lineCode, int upDown, int versions, String sectionName,String crosesRoad, String coords, int prevRouteId);  
32 -  
33 - Map<String,Object> findVersionInfo(String lineCode);  
34 -} 1 +package com.bsth.service.geo_data;
  2 +
  3 +import com.bsth.entity.geo_data.GeoRoad;
  4 +import com.bsth.entity.geo_data.GeoStation;
  5 +
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * Created by panzhao on 2017/12/7.
  10 + */
  11 +public interface GeoDataService {
  12 +
  13 +
  14 + Map<String, Object> findGeoStations(String lineCode);
  15 +
  16 +
  17 + Map<String, Object> findGeoRoad(String lineCode);
  18 +
  19 + Map<String, Object> updateBufferInfo(GeoStation station);
  20 +
  21 + Map<String, Object> updateStationName(Map<String, Object> map);
  22 +
  23 + Map<String,Object> addNewStationRoute(String lineCode, int upDown,int versions, String stationName, Float lat, Float lng, int prevRouteId);
  24 +
  25 + Map<String,Object> destroyStation(GeoStation station);
  26 +
  27 + Map<String,Object> updateRoadInfo(GeoRoad road);
  28 +
  29 + Map<String,Object> destroyRoad(GeoRoad road);
  30 +
  31 + Map<String,Object> addNewRoadRoute(String lineCode, int upDown, int versions, String sectionName,String crosesRoad, String coords, int prevRouteId);
  32 +
  33 + Map<String,Object> findVersionInfo(String lineCode);
  34 +}
src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
1 -package com.bsth.service.geo_data.impl;  
2 -  
3 -import com.bsth.common.ResponseCode;  
4 -import com.bsth.entity.geo_data.GeoLineVersionInfo;  
5 -import com.bsth.entity.geo_data.GeoRoad;  
6 -import com.bsth.entity.geo_data.GeoStation;  
7 -import com.bsth.service.geo_data.GeoDataService;  
8 -import com.bsth.util.GetUIDAndCode;  
9 -import com.bsth.util.TransGPS;  
10 -import com.google.common.base.Splitter;  
11 -import org.slf4j.Logger;  
12 -import org.slf4j.LoggerFactory;  
13 -import org.springframework.beans.factory.annotation.Autowired;  
14 -import org.springframework.jdbc.core.BatchPreparedStatementSetter;  
15 -import org.springframework.jdbc.core.BeanPropertyRowMapper;  
16 -import org.springframework.jdbc.core.JdbcTemplate;  
17 -import org.springframework.jdbc.datasource.DataSourceTransactionManager;  
18 -import org.springframework.stereotype.Service;  
19 -import org.springframework.transaction.TransactionDefinition;  
20 -import org.springframework.transaction.TransactionStatus;  
21 -import org.springframework.transaction.support.DefaultTransactionDefinition;  
22 -  
23 -import java.sql.PreparedStatement;  
24 -import java.sql.SQLException;  
25 -import java.util.*;  
26 -  
27 -/**  
28 - * Created by panzhao on 2017/12/8.  
29 - */  
30 -@Service  
31 -public class GeoDataServiceImpl implements GeoDataService {  
32 -  
33 - @Autowired  
34 - JdbcTemplate jdbcTemplate;  
35 -  
36 - Logger logger = LoggerFactory.getLogger(this.getClass());  
37 -  
38 - @Override  
39 - public Map<String, Object> findGeoStations(String lineCode) {  
40 -  
41 - Map<String, Object> map = new HashMap();  
42 - try {  
43 - String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_stationroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod";  
44 -  
45 -  
46 - List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));  
47 -  
48 - for (GeoStation station : list) {  
49 - if (station.getShapesType().equals("d"))  
50 - station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3));  
51 - }  
52 - map.put("status", ResponseCode.SUCCESS);  
53 - map.put("list", list);  
54 - } catch (Exception e) {  
55 - logger.error("", e);  
56 - map.put("status", ResponseCode.ERROR);  
57 - map.put("msg", "服务器出现异常");  
58 - }  
59 - return map;  
60 - }  
61 -  
62 - @Override  
63 - public Map<String, Object> findGeoRoad(String lineCode) {  
64 - Map<String, Object> map = new HashMap();  
65 - try {  
66 - String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_sectionroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code";  
67 -  
68 -  
69 - List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));  
70 -  
71 - for (GeoRoad road : list) {  
72 - road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));  
73 - }  
74 - map.put("status", ResponseCode.SUCCESS);  
75 - map.put("list", list);  
76 - } catch (Exception e) {  
77 - logger.error("", e);  
78 - map.put("status", ResponseCode.ERROR);  
79 - map.put("msg", "服务器出现异常");  
80 - }  
81 - return map;  
82 - }  
83 -  
84 - /**  
85 - * 编辑缓冲区信息  
86 - *  
87 - * @param station  
88 - * @return  
89 - */  
90 - @Override  
91 - public Map<String, Object> updateBufferInfo(GeoStation station) {  
92 - Map<String, Object> rs = new HashMap<>();  
93 - try {  
94 - //坐标转换  
95 - TransGPS.Location loc = TransGPS.LocationMake(station.getgLonx(), station.getgLaty());  
96 - loc = TransGPS.bd_decrypt(loc);  
97 - loc = TransGPS.transformFromGCJToWGS(loc);  
98 - station.setgLaty(Float.parseFloat(String.valueOf(loc.getLat())));  
99 - station.setgLonx(Float.parseFloat(String.valueOf(loc.getLng())));  
100 -  
101 - String sql;  
102 - String shapesType = station.getShapesType();  
103 - int rsCount = -1;  
104 - if (shapesType.equals("r")) {  
105 - sql = "update bsth_c_station set g_lonx=?, g_laty=?, radius=?,shapes_type='r' where station_cod=?";  
106 - rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getRadius(), station.getStationCode());  
107 - } else if (shapesType.equals("d")) {  
108 - //多边形坐标转换  
109 - String bdPolygon = "POLYGON((" + station.getgPolygonGrid() + "))";  
110 - String wgsPolygon = "POLYGON((" + bdPolygon2Wgs(station.getgPolygonGrid()) + "))";  
111 - sql = "update bsth_c_station set g_lonx=?, g_laty=?,shapes_type='d', radius=null,b_polygon_grid=ST_GeomFromText('" + bdPolygon + "'),g_polygon_grid=ST_GeomFromText('" + wgsPolygon + "') where station_cod=?";  
112 -  
113 - rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getStationCode());  
114 - }  
115 -  
116 - //从数据库里重新查询对象  
117 - if (rsCount > 0) {  
118 - rs.put("station", findOne(station.getId()));  
119 - rs.put("status", ResponseCode.SUCCESS);  
120 - }  
121 -  
122 - } catch (Exception e) {  
123 - logger.error("", e);  
124 - rs.put("status", ResponseCode.ERROR);  
125 - rs.put("msg", "服务器出现异常");  
126 - }  
127 - return rs;  
128 - }  
129 -  
130 - /**  
131 - * 修改站点路由和站点名称  
132 - *  
133 - * @param map  
134 - * @return  
135 - */  
136 - @Override  
137 - public Map<String, Object> updateStationName(Map<String, Object> map) {  
138 - Map<String, Object> rs = new HashMap<>();  
139 -  
140 - //编程式事务  
141 - DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());  
142 - DefaultTransactionDefinition def = new DefaultTransactionDefinition();  
143 - def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);  
144 - TransactionStatus status = tran.getTransaction(def);  
145 - try {  
146 -  
147 - int id = Integer.parseInt(map.get("id").toString());  
148 - String name = map.get("stationName").toString();  
149 - String code = map.get("stationCode").toString();  
150 - //String lineCode = map.get("lineCode").toString();  
151 - //String stationMark = map.get("stationMark").toString();  
152 -  
153 - //更新历史站点路由  
154 - jdbcTemplate.update("update bsth_c_ls_stationroute set station_name=? where id=?", name, id);  
155 - //更新站点  
156 - jdbcTemplate.update("update bsth_c_station set station_name=? where station_cod=?", name, code);  
157 -  
158 - tran.commit(status);  
159 -  
160 - rs.put("station", findOne(id));  
161 - rs.put("status", ResponseCode.SUCCESS);  
162 - } catch (Exception e) {  
163 - tran.rollback(status);  
164 - logger.error("", e);  
165 - rs.put("status", ResponseCode.ERROR);  
166 - rs.put("msg", "服务器出现异常");  
167 - }  
168 - return rs;  
169 - }  
170 -  
171 - @Override  
172 - public Map<String, Object> addNewRoadRoute(String lineCode, int upDown, int versions, String sectionName,String crosesRoad, String coords, int prevRouteId) {  
173 - Map<String, Object> rs = new HashMap<>();  
174 -  
175 - //编程式事务  
176 - DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());  
177 - DefaultTransactionDefinition def = new DefaultTransactionDefinition();  
178 - def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);  
179 - TransactionStatus status = tran.getTransaction(def);  
180 - try {  
181 - //根据站点编码,查询站点ID  
182 - int lineId = jdbcTemplate.queryForObject("select id from bsth_c_line where line_code=" + lineCode, Integer.class);  
183 -  
184 - String sql = "select * from bsth_c_ls_sectionroute where line_code='" + lineCode + "' and line=" + lineId + " and directions=" + upDown + " and destroy=0 and versions=" + versions;  
185 - List<SaveRoadRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveRoadRouteDTO.class));  
186 -  
187 - Collections.sort(routes, new RoadRouteComp());  
188 -  
189 - long sCode = GetUIDAndCode.getSectionId();  
190 - //转wgs  
191 - String wgsCoord = "LINESTRING(" + bdPolygon2Wgs(coords) + ")";  
192 - String bdCooed = "LINESTRING(" + coords + ")";  
193 - //insert 路段  
194 - sql = "insert into bsth_c_section(id, section_code, section_name, croses_road, bsection_vector, gsection_vector, create_date, update_date, versions) " +  
195 - " values(?,?,?,?,ST_GeomFromText('"+bdCooed+"'),ST_GeomFromText('"+wgsCoord+"'),sysdate(),sysdate(),?)";  
196 -  
197 - jdbcTemplate.update(sql, sCode, sCode, sectionName, crosesRoad, 1);  
198 -  
199 -  
200 - SaveRoadRouteDTO srr;  
201 - int currentNo = -1,  
202 - no = 100, step = 100;  
203 -  
204 - if (prevRouteId == -1) {  
205 - //起点站  
206 - currentNo = no;  
207 - no += step;  
208 - }  
209 - //重新排序路由  
210 - for (int i = 0, size = routes.size(); i < size; i++) {  
211 - srr = routes.get(i);  
212 - srr.setSectionrouteCode(no += step);  
213 - if (srr.getId().intValue() == prevRouteId) {  
214 - no += step;  
215 - currentNo = no;  
216 - }  
217 - }  
218 -  
219 - srr = new SaveRoadRouteDTO();  
220 - srr.setLine(lineId);  
221 - srr.setLineCode(lineCode);  
222 - srr.setDirections(upDown);  
223 - srr.setVersions(versions);  
224 -  
225 - srr.setSectionrouteCode(currentNo);  
226 - srr.setSection(sCode);  
227 - srr.setSectionCode(sCode + "");  
228 - srr.setIsRoadeSpeed(0);  
229 - srr.setDestroy(0);  
230 - Date d = new Date();  
231 - srr.setCreateDate(d);  
232 - srr.setUpdateDate(d);  
233 -  
234 - final List<SaveRoadRouteDTO> saveList = routes;  
235 - //insert 新路由 (ID自增)  
236 - jdbcTemplate.update("insert into bsth_c_ls_sectionroute(line_code, section_code, sectionroute_code, directions, line, section, create_date,update_date,versions,destroy,is_roade_speed)" +  
237 - " values(?,?,?,?,?,?,?,?,?,?,?)", srr.getLineCode(), srr.getSectionCode(), srr.getSectionrouteCode(), srr.getDirections(), srr.getLine(), srr.getSection(), srr.getCreateDate(), srr.getUpdateDate(), versions, srr.getDestroy(), srr.getIsRoadeSpeed());  
238 -  
239 - // update 原路由  
240 - jdbcTemplate.batchUpdate("update bsth_c_ls_sectionroute set sectionroute_code=? where id=?"  
241 - , new BatchPreparedStatementSetter() {  
242 - @Override  
243 - public void setValues(PreparedStatement ps, int i) throws SQLException {  
244 - SaveRoadRouteDTO srr = saveList.get(i);  
245 - ps.setInt(1, srr.getSectionrouteCode());  
246 - ps.setInt(2, srr.getId());  
247 - }  
248 -  
249 - @Override  
250 - public int getBatchSize() {  
251 - return saveList.size();  
252 - }  
253 - });  
254 -  
255 - tran.commit(status);  
256 -  
257 - //返回更新之后的数据  
258 - List<GeoRoad> list = findRoadByUpdown(lineCode, upDown, versions);  
259 - rs.put("list", list);  
260 - rs.put("status", ResponseCode.SUCCESS);  
261 - } catch (Exception e) {  
262 - tran.rollback(status);  
263 - logger.error("", e);  
264 - rs.put("status", ResponseCode.ERROR);  
265 - rs.put("msg", "服务器出现异常");  
266 - }  
267 - return rs;  
268 - }  
269 -  
270 - /**  
271 - * 获取线路版本信息  
272 - * @param lineCode  
273 - * @return  
274 - */  
275 - @Override  
276 - public Map<String, Object> findVersionInfo(String lineCode) {  
277 - Map<String, Object> rs = new HashMap<>();  
278 -  
279 - try {  
280 - String sql = "select t1.*,t2.name as line_name from bsth_c_line_versions t1 LEFT JOIN bsth_c_line t2 on t1.line_code=t2.line_code where t1.line_code='"+lineCode+"'";  
281 -  
282 - List<GeoLineVersionInfo> list =  
283 - jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoLineVersionInfo.class));  
284 -  
285 - rs.put("list", list);  
286 - rs.put("status", ResponseCode.SUCCESS);  
287 - } catch (Exception e) {  
288 - logger.error("", e);  
289 - rs.put("status", ResponseCode.ERROR);  
290 - rs.put("msg", "服务器出现异常");  
291 - }  
292 - return rs;  
293 - }  
294 -  
295 - @Override  
296 - public Map<String, Object> addNewStationRoute(String lineCode, int upDown, int versions, String stationName, Float lat, Float lng, int prevRouteId) {  
297 - Map<String, Object> rs = new HashMap<>();  
298 -  
299 - //编程式事务  
300 - DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());  
301 - DefaultTransactionDefinition def = new DefaultTransactionDefinition();  
302 - def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);  
303 - TransactionStatus status = tran.getTransaction(def);  
304 - try {  
305 - //根据线路编码,查询线路ID  
306 - int lineId = jdbcTemplate.queryForObject("select id from bsth_c_line where line_code=" + lineCode, Integer.class);  
307 -  
308 - String sql = "select * from bsth_c_ls_stationroute where line_code='" + lineCode + "' and line=" + lineId + " and directions=" + upDown + " and destroy=0 and versions=" + versions;  
309 - List<SaveStationRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveStationRouteDTO.class));  
310 -  
311 - for (SaveStationRouteDTO s : routes) {  
312 - if (s.getStationName().equals(stationName)) {  
313 -  
314 - rs.put("status", ResponseCode.ERROR);  
315 - rs.put("msg", "重复的站点路由名称!");  
316 - return rs;  
317 - }  
318 - }  
319 - //按路由顺序排列  
320 - Collections.sort(routes, new StationRouteComp());  
321 -  
322 - //转WGS  
323 - TransGPS.Location wgsLoc = TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(String.valueOf(lng)), Double.parseDouble(String.valueOf(lat)))));  
324 -  
325 - //insert 站点  
326 - long sCode = GetUIDAndCode.getStationId();  
327 - jdbcTemplate.update("insert into bsth_c_station(id, station_cod, station_name, db_type, b_jwpoints, g_lonx, g_laty, destroy, radius, shapes_type, versions) " +  
328 - " values(?,?,?,?,?,?,?,?,?,?,?)", sCode, sCode, stationName, "b", lng + " " + lat, wgsLoc.getLng(), wgsLoc.getLat(), 0, 88, "r", 1);  
329 -  
330 -  
331 - SaveStationRouteDTO sr;  
332 - int currentNo = -1,  
333 - no = 100, step = 100;  
334 -  
335 - if (prevRouteId == -1) {  
336 - //起点站  
337 - currentNo = no;  
338 - no += step;  
339 - }  
340 - //重新排序路由  
341 - for (int i = 0, size = routes.size(); i < size; i++) {  
342 - sr = routes.get(i);  
343 - sr.setStationRouteCode(no += step);  
344 - if (sr.getId().intValue() == prevRouteId) {  
345 - no += step;  
346 - currentNo = no;  
347 - }  
348 - }  
349 -  
350 - SaveStationRouteDTO nsr = new SaveStationRouteDTO();  
351 - nsr.setLine(lineId);  
352 - nsr.setLineCode(lineCode);  
353 - nsr.setDirections(upDown);  
354 - nsr.setVersions(versions);  
355 - nsr.setStationRouteCode(currentNo);  
356 - nsr.setStation(sCode);  
357 - nsr.setStationCode(sCode + "");  
358 - nsr.setStationName(stationName);  
359 - nsr.setDistances(0d);  
360 - nsr.setToTime(0d);  
361 - Date d = new Date();  
362 - nsr.setCreateDate(d);  
363 - nsr.setUpdateDate(d);  
364 - nsr.setDestroy(0);  
365 -  
366 - //routes.add(sr);  
367 -  
368 - //重新标记mark  
369 - Collections.sort(routes, new StationRouteComp());  
370 - for (int i = 0, size = routes.size(); i < size; i++) {  
371 - routes.get(i).setStationMark("Z");  
372 - }  
373 - routes.get(0).setStationMark("B");  
374 - routes.get(routes.size() - 1).setStationMark("E");  
375 -  
376 - final List<SaveStationRouteDTO> saveList = routes;  
377 - //insert 新路由 (ID自增)  
378 - jdbcTemplate.update("insert into bsth_c_ls_stationroute(line, station, station_name, station_route_code, line_code, station_code, station_mark, distances, to_time, destroy, versions, create_date, update_date,directions) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"  
379 - , nsr.getLine(), nsr.getStation(), nsr.getStationName(), nsr.getStationRouteCode(), nsr.getLineCode(), nsr.getStationCode(), nsr.getStationMark()  
380 - , nsr.getDistances(), nsr.getToTime(), nsr.getDestroy(), nsr.getVersions(), nsr.getCreateDate(), nsr.getUpdateDate(), nsr.getDirections());  
381 -  
382 - // update 原路由  
383 - jdbcTemplate.batchUpdate("update bsth_c_ls_stationroute set line=?,station=?,station_name=?,station_route_code=?," +  
384 - "line_code=?,station_code=?,station_mark=?,distances=?,to_time=?,destroy=?,versions=?,create_date=?,update_date=?,directions=?" +  
385 - " where id=?"  
386 - , new BatchPreparedStatementSetter() {  
387 - @Override  
388 - public void setValues(PreparedStatement ps, int i) throws SQLException {  
389 - SaveStationRouteDTO sr = saveList.get(i);  
390 - ps.setInt(1, sr.getLine());  
391 - ps.setLong(2, sr.getStation());  
392 - ps.setString(3, sr.getStationName());  
393 - ps.setInt(4, sr.getStationRouteCode());  
394 - ps.setString(5, sr.getLineCode());  
395 - ps.setString(6, sr.getStationCode());  
396 - ps.setString(7, sr.getStationMark());  
397 - ps.setDouble(8, sr.getDistances());  
398 - ps.setDouble(9, sr.getToTime());  
399 - ps.setInt(10, sr.getDestroy());  
400 - ps.setInt(11, sr.getVersions());  
401 - ps.setTimestamp(12, new java.sql.Timestamp(sr.getCreateDate().getTime()));  
402 - ps.setTimestamp(13, new java.sql.Timestamp(sr.getUpdateDate().getTime()));  
403 - ps.setInt(14, sr.getDirections());  
404 - ps.setInt(15, sr.getId());  
405 - }  
406 -  
407 - @Override  
408 - public int getBatchSize() {  
409 - return saveList.size();  
410 - }  
411 - });  
412 -  
413 - tran.commit(status);  
414 -  
415 - //返回更新之后的数据  
416 - List<GeoStation> list = findByUpdown(lineCode, upDown, versions);  
417 -  
418 - rs.put("list", list);  
419 - rs.put("newStationRouteCode", currentNo);  
420 - rs.put("status", ResponseCode.SUCCESS);  
421 - } catch (Exception e) {  
422 - tran.rollback(status);  
423 - logger.error("", e);  
424 - rs.put("status", ResponseCode.ERROR);  
425 - rs.put("msg", "服务器出现异常");  
426 - }  
427 - return rs;  
428 - }  
429 -  
430 - private List<GeoStation> findByUpdown(String lineCode, int upDown, int versions) {  
431 - //返回更新之后的数据  
432 - String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line=" + lineCode + " and directions=" + upDown + " and destroy=0 and versions=" + versions + ") t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod";  
433 - List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));  
434 -  
435 - for (GeoStation station : list) {  
436 - if (station.getShapesType().equals("d"))  
437 - station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3));  
438 - }  
439 - return list;  
440 - }  
441 -  
442 - private List<GeoRoad> findRoadByUpdown(String lineCode, int upDown, int versions) {  
443 - //返回更新之后的数据  
444 - String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line='" + lineCode + "' and directions=" + upDown + " and destroy=0 and versions=" + versions + ") t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code";  
445 - List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));  
446 -  
447 - for (GeoRoad road : list) {  
448 - road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));  
449 - }  
450 - return list;  
451 - }  
452 -  
453 - @Override  
454 - public Map<String, Object> destroyStation(GeoStation station) {  
455 - Map<String, Object> rs = new HashMap<>();  
456 -  
457 - try {  
458 - String sql = "update bsth_c_ls_stationroute set destroy=1 where id=?";  
459 - jdbcTemplate.update(sql, station.getId());  
460 -  
461 - //返回更新之后的数据  
462 - List<GeoStation> list = findByUpdown(station.getLineCode(), station.getDirections(), station.getVersions());  
463 - rs.put("list", list);  
464 - rs.put("status", ResponseCode.SUCCESS);  
465 - } catch (Exception e) {  
466 - logger.error("", e);  
467 - rs.put("status", ResponseCode.ERROR);  
468 - rs.put("msg", "服务器出现异常");  
469 - }  
470 - return rs;  
471 - }  
472 -  
473 - @Override  
474 - public Map<String, Object> destroyRoad(GeoRoad road) {  
475 - Map<String, Object> rs = new HashMap<>();  
476 -  
477 - try {  
478 - String sql = "update bsth_c_ls_sectionroute set destroy=1 where id=?";  
479 - jdbcTemplate.update(sql, road.getId());  
480 -  
481 - //返回更新之后的数据  
482 - List<GeoRoad> list = findRoadByUpdown(road.getLineCode(), road.getDirections(), road.getVersions());  
483 - rs.put("list", list);  
484 - rs.put("status", ResponseCode.SUCCESS);  
485 - } catch (Exception e) {  
486 - logger.error("", e);  
487 - rs.put("status", ResponseCode.ERROR);  
488 - rs.put("msg", "服务器出现异常");  
489 - }  
490 - return rs;  
491 - }  
492 -  
493 - @Override  
494 - public Map<String, Object> updateRoadInfo(GeoRoad road) {  
495 - Map<String, Object> rs = new HashMap<>();  
496 -  
497 - try {  
498 - //坐标转换  
499 - String bdPolyline = "LINESTRING(" + road.getGsectionVector() + ")";  
500 - String wgsPolyline = "LINESTRING(" + bdPolygon2Wgs(road.getGsectionVector()) + ")";  
501 -  
502 - String sql = "update bsth_c_section set section_name=?, croses_road=?, bsection_vector=ST_GeomFromText('" + bdPolyline + "'),gsection_vector=ST_GeomFromText('" + wgsPolyline + "'),update_date=sysdate() where section_code=?";  
503 -  
504 - int rsCount = jdbcTemplate.update(sql, road.getSectionName(), road.getCrosesRoad(), road.getSectionCode());  
505 -  
506 - //从数据库里重新查询对象  
507 - if (rsCount > 0) {  
508 - rs.put("road", findOneRoad(road.getId()));  
509 - rs.put("status", ResponseCode.SUCCESS);  
510 - }  
511 - } catch (Exception e) {  
512 - logger.error("", e);  
513 - rs.put("status", ResponseCode.ERROR);  
514 - rs.put("msg", "服务器出现异常");  
515 - }  
516 - return rs;  
517 - }  
518 -  
519 -  
520 - /**  
521 - * 根据路由ID 获取站点  
522 - *  
523 - * @param id  
524 - * @return  
525 - */  
526 - private GeoStation findOne(int id) {  
527 - String sql = "SELECT t1.*, t2.g_lonx,g_laty,ST_AsText (g_polygon_grid) AS g_polygon_grid,radius,shapes_type FROM (SELECT id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions FROM bsth_c_ls_stationroute WHERE id=" + id + " AND destroy = 0) t1 LEFT JOIN bsth_c_station t2 ON t1.station_code = t2.station_cod";  
528 - List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));  
529 -  
530 - GeoStation s = list.get(0);  
531 - if (s.getShapesType().equals("d"))  
532 - s.setBdCoords(multiWgsToBd(s.getgPolygonGrid(), 9, 3));  
533 -  
534 - return s;  
535 - }  
536 -  
537 - private GeoRoad findOneRoad(int id) {  
538 - String sql = "SELECT t1.*, t2.section_name,t2.croses_road,ST_AsText (t2.gsection_vector) AS gsection_vector FROM (SELECT id,sectionroute_code,directions,line_code,section_code,versions FROM bsth_c_ls_sectionroute WHERE id=" + id + ") t1 LEFT JOIN bsth_c_section t2 ON t1.section_code = t2.section_code";  
539 - List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));  
540 -  
541 - for (GeoRoad road : list) {  
542 - road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));  
543 - }  
544 - return list.size() > 0 ? list.get(0) : null;  
545 - }  
546 -  
547 - private String bdPolygon2Wgs(String bdPolygon) {  
548 - StringBuilder wgsPolygon = new StringBuilder();  
549 - List<String> list = Splitter.on(",").splitToList(bdPolygon);  
550 - String[] array;  
551 -  
552 - TransGPS.Location location;  
553 - for (String p : list) {  
554 - array = p.split(" ");  
555 - location = TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(array[0]), Double.parseDouble(array[1]))));  
556 -  
557 - wgsPolygon.append(location.getLng() + " " + location.getLat() + ",");  
558 - }  
559 -  
560 - if (wgsPolygon.length() > 0) {  
561 - wgsPolygon.deleteCharAt(wgsPolygon.length() - 1);  
562 - }  
563 - return wgsPolygon.toString();  
564 - }  
565 -  
566 - /**  
567 - * wgs 坐标数组转 百度  
568 - *  
569 - * @return  
570 - */  
571 - private List<String> multiWgsToBd(String crdStr, int si, int ei) {  
572 - List<String> bdList = new ArrayList<>();  
573 -  
574 - List<String> gList = Splitter.on(",").splitToList(crdStr.substring(si, crdStr.length() - ei));  
575 - TransGPS.Location location;  
576 - String[] cds;  
577 - for (String gs : gList) {  
578 - cds = gs.split(" ");  
579 - location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]))));  
580 -  
581 - bdList.add(location.getLng() + " " + location.getLat());  
582 - }  
583 - return bdList;  
584 - }  
585 -  
586 - private static class StationRouteComp implements Comparator<SaveStationRouteDTO> {  
587 -  
588 - @Override  
589 - public int compare(SaveStationRouteDTO s1, SaveStationRouteDTO s2) {  
590 - return s1.getStationRouteCode() - s2.getStationRouteCode();  
591 - }  
592 - }  
593 -  
594 - private static class RoadRouteComp implements Comparator<SaveRoadRouteDTO> {  
595 -  
596 - @Override  
597 - public int compare(SaveRoadRouteDTO s1, SaveRoadRouteDTO s2) {  
598 - return s1.getSectionrouteCode() - s2.getSectionrouteCode();  
599 - }  
600 - } 1 +package com.bsth.service.geo_data.impl;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.entity.geo_data.GeoLineVersionInfo;
  5 +import com.bsth.entity.geo_data.GeoRoad;
  6 +import com.bsth.entity.geo_data.GeoStation;
  7 +import com.bsth.service.geo_data.GeoDataService;
  8 +import com.bsth.util.GetUIDAndCode;
  9 +import com.bsth.util.TransGPS;
  10 +import com.google.common.base.Splitter;
  11 +import org.slf4j.Logger;
  12 +import org.slf4j.LoggerFactory;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.jdbc.core.BatchPreparedStatementSetter;
  15 +import org.springframework.jdbc.core.BeanPropertyRowMapper;
  16 +import org.springframework.jdbc.core.JdbcTemplate;
  17 +import org.springframework.jdbc.datasource.DataSourceTransactionManager;
  18 +import org.springframework.stereotype.Service;
  19 +import org.springframework.transaction.TransactionDefinition;
  20 +import org.springframework.transaction.TransactionStatus;
  21 +import org.springframework.transaction.support.DefaultTransactionDefinition;
  22 +
  23 +import java.sql.PreparedStatement;
  24 +import java.sql.SQLException;
  25 +import java.util.*;
  26 +
  27 +/**
  28 + * Created by panzhao on 2017/12/8.
  29 + */
  30 +@Service
  31 +public class GeoDataServiceImpl implements GeoDataService {
  32 +
  33 + @Autowired
  34 + JdbcTemplate jdbcTemplate;
  35 +
  36 + Logger logger = LoggerFactory.getLogger(this.getClass());
  37 +
  38 + @Override
  39 + public Map<String, Object> findGeoStations(String lineCode) {
  40 +
  41 + Map<String, Object> map = new HashMap();
  42 + try {
  43 + String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_stationroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod";
  44 +
  45 +
  46 + List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));
  47 +
  48 + for (GeoStation station : list) {
  49 + if (station.getShapesType().equals("d"))
  50 + station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3));
  51 + }
  52 + map.put("status", ResponseCode.SUCCESS);
  53 + map.put("list", list);
  54 + } catch (Exception e) {
  55 + logger.error("", e);
  56 + map.put("status", ResponseCode.ERROR);
  57 + map.put("msg", "服务器出现异常");
  58 + }
  59 + return map;
  60 + }
  61 +
  62 + @Override
  63 + public Map<String, Object> findGeoRoad(String lineCode) {
  64 + Map<String, Object> map = new HashMap();
  65 + try {
  66 + String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line=" + lineCode + " and destroy=0 and versions in (select DISTINCT versions from bsth_c_sectionroute where line=" + lineCode + " and destroy=0)) t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code";
  67 +
  68 +
  69 + List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));
  70 +
  71 + for (GeoRoad road : list) {
  72 + road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));
  73 + }
  74 + map.put("status", ResponseCode.SUCCESS);
  75 + map.put("list", list);
  76 + } catch (Exception e) {
  77 + logger.error("", e);
  78 + map.put("status", ResponseCode.ERROR);
  79 + map.put("msg", "服务器出现异常");
  80 + }
  81 + return map;
  82 + }
  83 +
  84 + /**
  85 + * 编辑缓冲区信息
  86 + *
  87 + * @param station
  88 + * @return
  89 + */
  90 + @Override
  91 + public Map<String, Object> updateBufferInfo(GeoStation station) {
  92 + Map<String, Object> rs = new HashMap<>();
  93 + try {
  94 + //坐标转换
  95 + TransGPS.Location loc = TransGPS.LocationMake(station.getgLonx(), station.getgLaty());
  96 + loc = TransGPS.bd_decrypt(loc);
  97 + loc = TransGPS.transformFromGCJToWGS(loc);
  98 + station.setgLaty(Float.parseFloat(String.valueOf(loc.getLat())));
  99 + station.setgLonx(Float.parseFloat(String.valueOf(loc.getLng())));
  100 +
  101 + String sql;
  102 + String shapesType = station.getShapesType();
  103 + int rsCount = -1;
  104 + if (shapesType.equals("r")) {
  105 + sql = "update bsth_c_station set g_lonx=?, g_laty=?, radius=?,shapes_type='r' where station_cod=?";
  106 + rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getRadius(), station.getStationCode());
  107 + } else if (shapesType.equals("d")) {
  108 + //多边形坐标转换
  109 + String bdPolygon = "POLYGON((" + station.getgPolygonGrid() + "))";
  110 + String wgsPolygon = "POLYGON((" + bdPolygon2Wgs(station.getgPolygonGrid()) + "))";
  111 + sql = "update bsth_c_station set g_lonx=?, g_laty=?,shapes_type='d', radius=null,b_polygon_grid=ST_GeomFromText('" + bdPolygon + "'),g_polygon_grid=ST_GeomFromText('" + wgsPolygon + "') where station_cod=?";
  112 +
  113 + rsCount = jdbcTemplate.update(sql, station.getgLonx(), station.getgLaty(), station.getStationCode());
  114 + }
  115 +
  116 + //从数据库里重新查询对象
  117 + if (rsCount > 0) {
  118 + rs.put("station", findOne(station.getId()));
  119 + rs.put("status", ResponseCode.SUCCESS);
  120 + }
  121 +
  122 + } catch (Exception e) {
  123 + logger.error("", e);
  124 + rs.put("status", ResponseCode.ERROR);
  125 + rs.put("msg", "服务器出现异常");
  126 + }
  127 + return rs;
  128 + }
  129 +
  130 + /**
  131 + * 修改站点路由和站点名称
  132 + *
  133 + * @param map
  134 + * @return
  135 + */
  136 + @Override
  137 + public Map<String, Object> updateStationName(Map<String, Object> map) {
  138 + Map<String, Object> rs = new HashMap<>();
  139 +
  140 + //编程式事务
  141 + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());
  142 + DefaultTransactionDefinition def = new DefaultTransactionDefinition();
  143 + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
  144 + TransactionStatus status = tran.getTransaction(def);
  145 + try {
  146 +
  147 + int id = Integer.parseInt(map.get("id").toString());
  148 + String name = map.get("stationName").toString();
  149 + String code = map.get("stationCode").toString();
  150 + //String lineCode = map.get("lineCode").toString();
  151 + //String stationMark = map.get("stationMark").toString();
  152 +
  153 + //更新历史站点路由
  154 + jdbcTemplate.update("update bsth_c_ls_stationroute set station_name=? where id=?", name, id);
  155 + //更新站点
  156 + jdbcTemplate.update("update bsth_c_station set station_name=? where station_cod=?", name, code);
  157 +
  158 + tran.commit(status);
  159 +
  160 + rs.put("station", findOne(id));
  161 + rs.put("status", ResponseCode.SUCCESS);
  162 + } catch (Exception e) {
  163 + tran.rollback(status);
  164 + logger.error("", e);
  165 + rs.put("status", ResponseCode.ERROR);
  166 + rs.put("msg", "服务器出现异常");
  167 + }
  168 + return rs;
  169 + }
  170 +
  171 + @Override
  172 + public Map<String, Object> addNewRoadRoute(String lineCode, int upDown, int versions, String sectionName,String crosesRoad, String coords, int prevRouteId) {
  173 + Map<String, Object> rs = new HashMap<>();
  174 +
  175 + //编程式事务
  176 + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());
  177 + DefaultTransactionDefinition def = new DefaultTransactionDefinition();
  178 + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
  179 + TransactionStatus status = tran.getTransaction(def);
  180 + try {
  181 + //根据站点编码,查询站点ID
  182 + int lineId = jdbcTemplate.queryForObject("select id from bsth_c_line where line_code=" + lineCode, Integer.class);
  183 +
  184 + String sql = "select * from bsth_c_ls_sectionroute where line_code='" + lineCode + "' and line=" + lineId + " and directions=" + upDown + " and destroy=0 and versions=" + versions;
  185 + List<SaveRoadRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveRoadRouteDTO.class));
  186 +
  187 + Collections.sort(routes, new RoadRouteComp());
  188 +
  189 + long sCode = GetUIDAndCode.getSectionId();
  190 + //转wgs
  191 + String wgsCoord = "LINESTRING(" + bdPolygon2Wgs(coords) + ")";
  192 + String bdCooed = "LINESTRING(" + coords + ")";
  193 + //insert 路段
  194 + sql = "insert into bsth_c_section(id, section_code, section_name, croses_road, bsection_vector, gsection_vector, create_date, update_date, versions) " +
  195 + " values(?,?,?,?,ST_GeomFromText('"+bdCooed+"'),ST_GeomFromText('"+wgsCoord+"'),sysdate(),sysdate(),?)";
  196 +
  197 + jdbcTemplate.update(sql, sCode, sCode, sectionName, crosesRoad, 1);
  198 +
  199 +
  200 + SaveRoadRouteDTO srr;
  201 + int currentNo = -1,
  202 + no = 100, step = 100;
  203 +
  204 + if (prevRouteId == -1) {
  205 + //起点站
  206 + currentNo = no;
  207 + no += step;
  208 + }
  209 + //重新排序路由
  210 + for (int i = 0, size = routes.size(); i < size; i++) {
  211 + srr = routes.get(i);
  212 + srr.setSectionrouteCode(no += step);
  213 + if (srr.getId().intValue() == prevRouteId) {
  214 + no += step;
  215 + currentNo = no;
  216 + }
  217 + }
  218 +
  219 + srr = new SaveRoadRouteDTO();
  220 + srr.setLine(lineId);
  221 + srr.setLineCode(lineCode);
  222 + srr.setDirections(upDown);
  223 + srr.setVersions(versions);
  224 +
  225 + srr.setSectionrouteCode(currentNo);
  226 + srr.setSection(sCode);
  227 + srr.setSectionCode(sCode + "");
  228 + srr.setIsRoadeSpeed(0);
  229 + srr.setDestroy(0);
  230 + Date d = new Date();
  231 + srr.setCreateDate(d);
  232 + srr.setUpdateDate(d);
  233 +
  234 + final List<SaveRoadRouteDTO> saveList = routes;
  235 + //insert 新路由 (ID自增)
  236 + jdbcTemplate.update("insert into bsth_c_ls_sectionroute(line_code, section_code, sectionroute_code, directions, line, section, create_date,update_date,versions,destroy,is_roade_speed)" +
  237 + " values(?,?,?,?,?,?,?,?,?,?,?)", srr.getLineCode(), srr.getSectionCode(), srr.getSectionrouteCode(), srr.getDirections(), srr.getLine(), srr.getSection(), srr.getCreateDate(), srr.getUpdateDate(), versions, srr.getDestroy(), srr.getIsRoadeSpeed());
  238 +
  239 + // update 原路由
  240 + jdbcTemplate.batchUpdate("update bsth_c_ls_sectionroute set sectionroute_code=? where id=?"
  241 + , new BatchPreparedStatementSetter() {
  242 + @Override
  243 + public void setValues(PreparedStatement ps, int i) throws SQLException {
  244 + SaveRoadRouteDTO srr = saveList.get(i);
  245 + ps.setInt(1, srr.getSectionrouteCode());
  246 + ps.setInt(2, srr.getId());
  247 + }
  248 +
  249 + @Override
  250 + public int getBatchSize() {
  251 + return saveList.size();
  252 + }
  253 + });
  254 +
  255 + tran.commit(status);
  256 +
  257 + //返回更新之后的数据
  258 + List<GeoRoad> list = findRoadByUpdown(lineCode, upDown, versions);
  259 + rs.put("list", list);
  260 + rs.put("status", ResponseCode.SUCCESS);
  261 + } catch (Exception e) {
  262 + tran.rollback(status);
  263 + logger.error("", e);
  264 + rs.put("status", ResponseCode.ERROR);
  265 + rs.put("msg", "服务器出现异常");
  266 + }
  267 + return rs;
  268 + }
  269 +
  270 + /**
  271 + * 获取线路版本信息
  272 + * @param lineCode
  273 + * @return
  274 + */
  275 + @Override
  276 + public Map<String, Object> findVersionInfo(String lineCode) {
  277 + Map<String, Object> rs = new HashMap<>();
  278 +
  279 + try {
  280 + String sql = "select t1.*,t2.name as line_name from bsth_c_line_versions t1 LEFT JOIN bsth_c_line t2 on t1.line_code=t2.line_code where t1.line_code='"+lineCode+"'";
  281 +
  282 + List<GeoLineVersionInfo> list =
  283 + jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoLineVersionInfo.class));
  284 +
  285 + rs.put("list", list);
  286 + rs.put("status", ResponseCode.SUCCESS);
  287 + } catch (Exception e) {
  288 + logger.error("", e);
  289 + rs.put("status", ResponseCode.ERROR);
  290 + rs.put("msg", "服务器出现异常");
  291 + }
  292 + return rs;
  293 + }
  294 +
  295 + @Override
  296 + public Map<String, Object> addNewStationRoute(String lineCode, int upDown, int versions, String stationName, Float lat, Float lng, int prevRouteId) {
  297 + Map<String, Object> rs = new HashMap<>();
  298 +
  299 + //编程式事务
  300 + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());
  301 + DefaultTransactionDefinition def = new DefaultTransactionDefinition();
  302 + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
  303 + TransactionStatus status = tran.getTransaction(def);
  304 + try {
  305 + //根据线路编码,查询线路ID
  306 + int lineId = jdbcTemplate.queryForObject("select id from bsth_c_line where line_code=" + lineCode, Integer.class);
  307 +
  308 + String sql = "select * from bsth_c_ls_stationroute where line_code='" + lineCode + "' and line=" + lineId + " and directions=" + upDown + " and destroy=0 and versions=" + versions;
  309 + List<SaveStationRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveStationRouteDTO.class));
  310 +
  311 + for (SaveStationRouteDTO s : routes) {
  312 + if (s.getStationName().equals(stationName)) {
  313 +
  314 + rs.put("status", ResponseCode.ERROR);
  315 + rs.put("msg", "重复的站点路由名称!");
  316 + return rs;
  317 + }
  318 + }
  319 + //按路由顺序排列
  320 + Collections.sort(routes, new StationRouteComp());
  321 +
  322 + //转WGS
  323 + TransGPS.Location wgsLoc = TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(String.valueOf(lng)), Double.parseDouble(String.valueOf(lat)))));
  324 +
  325 + //insert 站点
  326 + long sCode = GetUIDAndCode.getStationId();
  327 + jdbcTemplate.update("insert into bsth_c_station(id, station_cod, station_name, db_type, b_jwpoints, g_lonx, g_laty, destroy, radius, shapes_type, versions) " +
  328 + " values(?,?,?,?,?,?,?,?,?,?,?)", sCode, sCode, stationName, "b", lng + " " + lat, wgsLoc.getLng(), wgsLoc.getLat(), 0, 88, "r", 1);
  329 +
  330 +
  331 + SaveStationRouteDTO sr;
  332 + int currentNo = -1,
  333 + no = 100, step = 100;
  334 +
  335 + if (prevRouteId == -1) {
  336 + //起点站
  337 + currentNo = no;
  338 + no += step;
  339 + }
  340 + //重新排序路由
  341 + for (int i = 0, size = routes.size(); i < size; i++) {
  342 + sr = routes.get(i);
  343 + sr.setStationRouteCode(no += step);
  344 + if (sr.getId().intValue() == prevRouteId) {
  345 + no += step;
  346 + currentNo = no;
  347 + }
  348 + }
  349 +
  350 + SaveStationRouteDTO nsr = new SaveStationRouteDTO();
  351 + nsr.setLine(lineId);
  352 + nsr.setLineCode(lineCode);
  353 + nsr.setDirections(upDown);
  354 + nsr.setVersions(versions);
  355 + nsr.setStationRouteCode(currentNo);
  356 + nsr.setStation(sCode);
  357 + nsr.setStationCode(sCode + "");
  358 + nsr.setStationName(stationName);
  359 + nsr.setDistances(0d);
  360 + nsr.setToTime(0d);
  361 + Date d = new Date();
  362 + nsr.setCreateDate(d);
  363 + nsr.setUpdateDate(d);
  364 + nsr.setDestroy(0);
  365 +
  366 + //routes.add(sr);
  367 +
  368 + //重新标记mark
  369 + Collections.sort(routes, new StationRouteComp());
  370 + for (int i = 0, size = routes.size(); i < size; i++) {
  371 + routes.get(i).setStationMark("Z");
  372 + }
  373 + routes.get(0).setStationMark("B");
  374 + routes.get(routes.size() - 1).setStationMark("E");
  375 +
  376 + final List<SaveStationRouteDTO> saveList = routes;
  377 + //insert 新路由 (ID自增)
  378 + jdbcTemplate.update("insert into bsth_c_ls_stationroute(line, station, station_name, station_route_code, line_code, station_code, station_mark, distances, to_time, destroy, versions, create_date, update_date,directions) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
  379 + , nsr.getLine(), nsr.getStation(), nsr.getStationName(), nsr.getStationRouteCode(), nsr.getLineCode(), nsr.getStationCode(), nsr.getStationMark()
  380 + , nsr.getDistances(), nsr.getToTime(), nsr.getDestroy(), nsr.getVersions(), nsr.getCreateDate(), nsr.getUpdateDate(), nsr.getDirections());
  381 +
  382 + // update 原路由
  383 + jdbcTemplate.batchUpdate("update bsth_c_ls_stationroute set line=?,station=?,station_name=?,station_route_code=?," +
  384 + "line_code=?,station_code=?,station_mark=?,distances=?,to_time=?,destroy=?,versions=?,create_date=?,update_date=?,directions=?" +
  385 + " where id=?"
  386 + , new BatchPreparedStatementSetter() {
  387 + @Override
  388 + public void setValues(PreparedStatement ps, int i) throws SQLException {
  389 + SaveStationRouteDTO sr = saveList.get(i);
  390 + ps.setInt(1, sr.getLine());
  391 + ps.setLong(2, sr.getStation());
  392 + ps.setString(3, sr.getStationName());
  393 + ps.setInt(4, sr.getStationRouteCode());
  394 + ps.setString(5, sr.getLineCode());
  395 + ps.setString(6, sr.getStationCode());
  396 + ps.setString(7, sr.getStationMark());
  397 + ps.setDouble(8, sr.getDistances());
  398 + ps.setDouble(9, sr.getToTime());
  399 + ps.setInt(10, sr.getDestroy());
  400 + ps.setInt(11, sr.getVersions());
  401 + ps.setTimestamp(12, new java.sql.Timestamp(sr.getCreateDate().getTime()));
  402 + ps.setTimestamp(13, new java.sql.Timestamp(sr.getUpdateDate().getTime()));
  403 + ps.setInt(14, sr.getDirections());
  404 + ps.setInt(15, sr.getId());
  405 + }
  406 +
  407 + @Override
  408 + public int getBatchSize() {
  409 + return saveList.size();
  410 + }
  411 + });
  412 +
  413 + tran.commit(status);
  414 +
  415 + //返回更新之后的数据
  416 + List<GeoStation> list = findByUpdown(lineCode, upDown, versions);
  417 +
  418 + rs.put("list", list);
  419 + rs.put("newStationRouteCode", currentNo);
  420 + rs.put("status", ResponseCode.SUCCESS);
  421 + } catch (Exception e) {
  422 + tran.rollback(status);
  423 + logger.error("", e);
  424 + rs.put("status", ResponseCode.ERROR);
  425 + rs.put("msg", "服务器出现异常");
  426 + }
  427 + return rs;
  428 + }
  429 +
  430 + private List<GeoStation> findByUpdown(String lineCode, int upDown, int versions) {
  431 + //返回更新之后的数据
  432 + String sql = "select t1.*,t2.g_lonx,g_laty,ST_AsText(g_polygon_grid) as g_polygon_grid,radius,shapes_type from (select id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions from bsth_c_ls_stationroute where line=" + lineCode + " and directions=" + upDown + " and destroy=0 and versions=" + versions + ") t1 LEFT JOIN bsth_c_station t2 on t1.station_code=t2.station_cod";
  433 + List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));
  434 +
  435 + for (GeoStation station : list) {
  436 + if (station.getShapesType().equals("d"))
  437 + station.setBdCoords(multiWgsToBd(station.getgPolygonGrid(), 9, 3));
  438 + }
  439 + return list;
  440 + }
  441 +
  442 + private List<GeoRoad> findRoadByUpdown(String lineCode, int upDown, int versions) {
  443 + //返回更新之后的数据
  444 + String sql = "select t1.*,t2.section_name,t2.croses_road,ST_AsText(t2.gsection_vector) as gsection_vector from (select id,sectionroute_code,directions,line_code,section_code,versions from bsth_c_ls_sectionroute where line='" + lineCode + "' and directions=" + upDown + " and destroy=0 and versions=" + versions + ") t1 LEFT JOIN bsth_c_section t2 on t1.section_code=t2.section_code";
  445 + List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));
  446 +
  447 + for (GeoRoad road : list) {
  448 + road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));
  449 + }
  450 + return list;
  451 + }
  452 +
  453 + @Override
  454 + public Map<String, Object> destroyStation(GeoStation station) {
  455 + Map<String, Object> rs = new HashMap<>();
  456 +
  457 + try {
  458 + String sql = "update bsth_c_ls_stationroute set destroy=1 where id=?";
  459 + jdbcTemplate.update(sql, station.getId());
  460 +
  461 + //返回更新之后的数据
  462 + List<GeoStation> list = findByUpdown(station.getLineCode(), station.getDirections(), station.getVersions());
  463 + rs.put("list", list);
  464 + rs.put("status", ResponseCode.SUCCESS);
  465 + } catch (Exception e) {
  466 + logger.error("", e);
  467 + rs.put("status", ResponseCode.ERROR);
  468 + rs.put("msg", "服务器出现异常");
  469 + }
  470 + return rs;
  471 + }
  472 +
  473 + @Override
  474 + public Map<String, Object> destroyRoad(GeoRoad road) {
  475 + Map<String, Object> rs = new HashMap<>();
  476 +
  477 + try {
  478 + String sql = "update bsth_c_ls_sectionroute set destroy=1 where id=?";
  479 + jdbcTemplate.update(sql, road.getId());
  480 +
  481 + //返回更新之后的数据
  482 + List<GeoRoad> list = findRoadByUpdown(road.getLineCode(), road.getDirections(), road.getVersions());
  483 + rs.put("list", list);
  484 + rs.put("status", ResponseCode.SUCCESS);
  485 + } catch (Exception e) {
  486 + logger.error("", e);
  487 + rs.put("status", ResponseCode.ERROR);
  488 + rs.put("msg", "服务器出现异常");
  489 + }
  490 + return rs;
  491 + }
  492 +
  493 + @Override
  494 + public Map<String, Object> updateRoadInfo(GeoRoad road) {
  495 + Map<String, Object> rs = new HashMap<>();
  496 +
  497 + try {
  498 + //坐标转换
  499 + String bdPolyline = "LINESTRING(" + road.getGsectionVector() + ")";
  500 + String wgsPolyline = "LINESTRING(" + bdPolygon2Wgs(road.getGsectionVector()) + ")";
  501 +
  502 + String sql = "update bsth_c_section set section_name=?, croses_road=?, bsection_vector=ST_GeomFromText('" + bdPolyline + "'),gsection_vector=ST_GeomFromText('" + wgsPolyline + "'),update_date=sysdate() where section_code=?";
  503 +
  504 + int rsCount = jdbcTemplate.update(sql, road.getSectionName(), road.getCrosesRoad(), road.getSectionCode());
  505 +
  506 + //从数据库里重新查询对象
  507 + if (rsCount > 0) {
  508 + rs.put("road", findOneRoad(road.getId()));
  509 + rs.put("status", ResponseCode.SUCCESS);
  510 + }
  511 + } catch (Exception e) {
  512 + logger.error("", e);
  513 + rs.put("status", ResponseCode.ERROR);
  514 + rs.put("msg", "服务器出现异常");
  515 + }
  516 + return rs;
  517 + }
  518 +
  519 +
  520 + /**
  521 + * 根据路由ID 获取站点
  522 + *
  523 + * @param id
  524 + * @return
  525 + */
  526 + private GeoStation findOne(int id) {
  527 + String sql = "SELECT t1.*, t2.g_lonx,g_laty,ST_AsText (g_polygon_grid) AS g_polygon_grid,radius,shapes_type FROM (SELECT id,station_name,station_route_code,line_code,station_code,station_mark,versions,directions FROM bsth_c_ls_stationroute WHERE id=" + id + " AND destroy = 0) t1 LEFT JOIN bsth_c_station t2 ON t1.station_code = t2.station_cod";
  528 + List<GeoStation> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoStation.class));
  529 +
  530 + GeoStation s = list.get(0);
  531 + if (s.getShapesType().equals("d"))
  532 + s.setBdCoords(multiWgsToBd(s.getgPolygonGrid(), 9, 3));
  533 +
  534 + return s;
  535 + }
  536 +
  537 + private GeoRoad findOneRoad(int id) {
  538 + String sql = "SELECT t1.*, t2.section_name,t2.croses_road,ST_AsText (t2.gsection_vector) AS gsection_vector FROM (SELECT id,sectionroute_code,directions,line_code,section_code,versions FROM bsth_c_ls_sectionroute WHERE id=" + id + ") t1 LEFT JOIN bsth_c_section t2 ON t1.section_code = t2.section_code";
  539 + List<GeoRoad> list = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(GeoRoad.class));
  540 +
  541 + for (GeoRoad road : list) {
  542 + road.setBdCoords(multiWgsToBd(road.getGsectionVector(), 11, 2));
  543 + }
  544 + return list.size() > 0 ? list.get(0) : null;
  545 + }
  546 +
  547 + private String bdPolygon2Wgs(String bdPolygon) {
  548 + StringBuilder wgsPolygon = new StringBuilder();
  549 + List<String> list = Splitter.on(",").splitToList(bdPolygon);
  550 + String[] array;
  551 +
  552 + TransGPS.Location location;
  553 + for (String p : list) {
  554 + array = p.split(" ");
  555 + location = TransGPS.transformFromGCJToWGS(TransGPS.bd_decrypt(TransGPS.LocationMake(Double.parseDouble(array[0]), Double.parseDouble(array[1]))));
  556 +
  557 + wgsPolygon.append(location.getLng() + " " + location.getLat() + ",");
  558 + }
  559 +
  560 + if (wgsPolygon.length() > 0) {
  561 + wgsPolygon.deleteCharAt(wgsPolygon.length() - 1);
  562 + }
  563 + return wgsPolygon.toString();
  564 + }
  565 +
  566 + /**
  567 + * wgs 坐标数组转 百度
  568 + *
  569 + * @return
  570 + */
  571 + private List<String> multiWgsToBd(String crdStr, int si, int ei) {
  572 + List<String> bdList = new ArrayList<>();
  573 +
  574 + List<String> gList = Splitter.on(",").splitToList(crdStr.substring(si, crdStr.length() - ei));
  575 + TransGPS.Location location;
  576 + String[] cds;
  577 + for (String gs : gList) {
  578 + cds = gs.split(" ");
  579 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]))));
  580 +
  581 + bdList.add(location.getLng() + " " + location.getLat());
  582 + }
  583 + return bdList;
  584 + }
  585 +
  586 + private static class StationRouteComp implements Comparator<SaveStationRouteDTO> {
  587 +
  588 + @Override
  589 + public int compare(SaveStationRouteDTO s1, SaveStationRouteDTO s2) {
  590 + return s1.getStationRouteCode() - s2.getStationRouteCode();
  591 + }
  592 + }
  593 +
  594 + private static class RoadRouteComp implements Comparator<SaveRoadRouteDTO> {
  595 +
  596 + @Override
  597 + public int compare(SaveRoadRouteDTO s1, SaveRoadRouteDTO s2) {
  598 + return s1.getSectionrouteCode() - s2.getSectionrouteCode();
  599 + }
  600 + }
601 } 601 }
602 \ No newline at end of file 602 \ No newline at end of file
src/main/java/com/bsth/service/geo_data/impl/SaveRoadRouteDTO.java
1 -package com.bsth.service.geo_data.impl;  
2 -  
3 -import java.util.Date;  
4 -  
5 -/**  
6 - * Created by panzhao on 2017/12/17.  
7 - */  
8 -public class SaveRoadRouteDTO {  
9 -  
10 - private Integer id;  
11 -  
12 - // 路段路由序号  
13 - private Integer sectionrouteCode;  
14 -  
15 - // 线路编号  
16 - private String lineCode;  
17 -  
18 - // 路段编号  
19 - private String sectionCode;  
20 -  
21 - // 路段路由方向  
22 - private Integer directions;  
23 -  
24 - // 版本号  
25 - private Integer versions;  
26 -  
27 - // 是否撤销  
28 - private Integer destroy;  
29 -  
30 - /** 是否有路段限速数据 <0:分段;1:未分段>*/  
31 - private Integer isRoadeSpeed;  
32 -  
33 - // 描述  
34 - private String descriptions;  
35 -  
36 - // 创建人  
37 - private Integer createBy;  
38 -  
39 - // 修改人  
40 - private Integer updateBy;  
41 -  
42 - // 创建日期  
43 - private Date createDate;  
44 -  
45 - // 修改日期  
46 - private Date updateDate;  
47 -  
48 - // 路段信息  
49 - private long section;  
50 -  
51 - // 线路ID  
52 - private int line;  
53 -  
54 - public Integer getId() {  
55 - return id;  
56 - }  
57 -  
58 - public void setId(Integer id) {  
59 - this.id = id;  
60 - }  
61 -  
62 - public Integer getSectionrouteCode() {  
63 - return sectionrouteCode;  
64 - }  
65 -  
66 - public void setSectionrouteCode(Integer sectionrouteCode) {  
67 - this.sectionrouteCode = sectionrouteCode;  
68 - }  
69 -  
70 - public String getLineCode() {  
71 - return lineCode;  
72 - }  
73 -  
74 - public void setLineCode(String lineCode) {  
75 - this.lineCode = lineCode;  
76 - }  
77 -  
78 - public String getSectionCode() {  
79 - return sectionCode;  
80 - }  
81 -  
82 - public void setSectionCode(String sectionCode) {  
83 - this.sectionCode = sectionCode;  
84 - }  
85 -  
86 - public Integer getDirections() {  
87 - return directions;  
88 - }  
89 -  
90 - public void setDirections(Integer directions) {  
91 - this.directions = directions;  
92 - }  
93 -  
94 - public Integer getVersions() {  
95 - return versions;  
96 - }  
97 -  
98 - public void setVersions(Integer versions) {  
99 - this.versions = versions;  
100 - }  
101 -  
102 - public Integer getDestroy() {  
103 - return destroy;  
104 - }  
105 -  
106 - public void setDestroy(Integer destroy) {  
107 - this.destroy = destroy;  
108 - }  
109 -  
110 - public Integer getIsRoadeSpeed() {  
111 - return isRoadeSpeed;  
112 - }  
113 -  
114 - public void setIsRoadeSpeed(Integer isRoadeSpeed) {  
115 - this.isRoadeSpeed = isRoadeSpeed;  
116 - }  
117 -  
118 - public String getDescriptions() {  
119 - return descriptions;  
120 - }  
121 -  
122 - public void setDescriptions(String descriptions) {  
123 - this.descriptions = descriptions;  
124 - }  
125 -  
126 - public Integer getCreateBy() {  
127 - return createBy;  
128 - }  
129 -  
130 - public void setCreateBy(Integer createBy) {  
131 - this.createBy = createBy;  
132 - }  
133 -  
134 - public Integer getUpdateBy() {  
135 - return updateBy;  
136 - }  
137 -  
138 - public void setUpdateBy(Integer updateBy) {  
139 - this.updateBy = updateBy;  
140 - }  
141 -  
142 - public Date getCreateDate() {  
143 - return createDate;  
144 - }  
145 -  
146 - public void setCreateDate(Date createDate) {  
147 - this.createDate = createDate;  
148 - }  
149 -  
150 - public Date getUpdateDate() {  
151 - return updateDate;  
152 - }  
153 -  
154 - public void setUpdateDate(Date updateDate) {  
155 - this.updateDate = updateDate;  
156 - }  
157 -  
158 - public long getSection() {  
159 - return section;  
160 - }  
161 -  
162 - public void setSection(long section) {  
163 - this.section = section;  
164 - }  
165 -  
166 - public int getLine() {  
167 - return line;  
168 - }  
169 -  
170 - public void setLine(int line) {  
171 - this.line = line;  
172 - }  
173 -} 1 +package com.bsth.service.geo_data.impl;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by panzhao on 2017/12/17.
  7 + */
  8 +public class SaveRoadRouteDTO {
  9 +
  10 + private Integer id;
  11 +
  12 + // 路段路由序号
  13 + private Integer sectionrouteCode;
  14 +
  15 + // 线路编号
  16 + private String lineCode;
  17 +
  18 + // 路段编号
  19 + private String sectionCode;
  20 +
  21 + // 路段路由方向
  22 + private Integer directions;
  23 +
  24 + // 版本号
  25 + private Integer versions;
  26 +
  27 + // 是否撤销
  28 + private Integer destroy;
  29 +
  30 + /** 是否有路段限速数据 <0:分段;1:未分段>*/
  31 + private Integer isRoadeSpeed;
  32 +
  33 + // 描述
  34 + private String descriptions;
  35 +
  36 + // 创建人
  37 + private Integer createBy;
  38 +
  39 + // 修改人
  40 + private Integer updateBy;
  41 +
  42 + // 创建日期
  43 + private Date createDate;
  44 +
  45 + // 修改日期
  46 + private Date updateDate;
  47 +
  48 + // 路段信息
  49 + private long section;
  50 +
  51 + // 线路ID
  52 + private int line;
  53 +
  54 + public Integer getId() {
  55 + return id;
  56 + }
  57 +
  58 + public void setId(Integer id) {
  59 + this.id = id;
  60 + }
  61 +
  62 + public Integer getSectionrouteCode() {
  63 + return sectionrouteCode;
  64 + }
  65 +
  66 + public void setSectionrouteCode(Integer sectionrouteCode) {
  67 + this.sectionrouteCode = sectionrouteCode;
  68 + }
  69 +
  70 + public String getLineCode() {
  71 + return lineCode;
  72 + }
  73 +
  74 + public void setLineCode(String lineCode) {
  75 + this.lineCode = lineCode;
  76 + }
  77 +
  78 + public String getSectionCode() {
  79 + return sectionCode;
  80 + }
  81 +
  82 + public void setSectionCode(String sectionCode) {
  83 + this.sectionCode = sectionCode;
  84 + }
  85 +
  86 + public Integer getDirections() {
  87 + return directions;
  88 + }
  89 +
  90 + public void setDirections(Integer directions) {
  91 + this.directions = directions;
  92 + }
  93 +
  94 + public Integer getVersions() {
  95 + return versions;
  96 + }
  97 +
  98 + public void setVersions(Integer versions) {
  99 + this.versions = versions;
  100 + }
  101 +
  102 + public Integer getDestroy() {
  103 + return destroy;
  104 + }
  105 +
  106 + public void setDestroy(Integer destroy) {
  107 + this.destroy = destroy;
  108 + }
  109 +
  110 + public Integer getIsRoadeSpeed() {
  111 + return isRoadeSpeed;
  112 + }
  113 +
  114 + public void setIsRoadeSpeed(Integer isRoadeSpeed) {
  115 + this.isRoadeSpeed = isRoadeSpeed;
  116 + }
  117 +
  118 + public String getDescriptions() {
  119 + return descriptions;
  120 + }
  121 +
  122 + public void setDescriptions(String descriptions) {
  123 + this.descriptions = descriptions;
  124 + }
  125 +
  126 + public Integer getCreateBy() {
  127 + return createBy;
  128 + }
  129 +
  130 + public void setCreateBy(Integer createBy) {
  131 + this.createBy = createBy;
  132 + }
  133 +
  134 + public Integer getUpdateBy() {
  135 + return updateBy;
  136 + }
  137 +
  138 + public void setUpdateBy(Integer updateBy) {
  139 + this.updateBy = updateBy;
  140 + }
  141 +
  142 + public Date getCreateDate() {
  143 + return createDate;
  144 + }
  145 +
  146 + public void setCreateDate(Date createDate) {
  147 + this.createDate = createDate;
  148 + }
  149 +
  150 + public Date getUpdateDate() {
  151 + return updateDate;
  152 + }
  153 +
  154 + public void setUpdateDate(Date updateDate) {
  155 + this.updateDate = updateDate;
  156 + }
  157 +
  158 + public long getSection() {
  159 + return section;
  160 + }
  161 +
  162 + public void setSection(long section) {
  163 + this.section = section;
  164 + }
  165 +
  166 + public int getLine() {
  167 + return line;
  168 + }
  169 +
  170 + public void setLine(int line) {
  171 + this.line = line;
  172 + }
  173 +}
src/main/java/com/bsth/service/geo_data/impl/SaveStationRouteDTO.java
1 -package com.bsth.service.geo_data.impl;  
2 -  
3 -import java.util.Date;  
4 -  
5 -/**  
6 - * 站点路由 jdbc 入库数据  
7 - * Created by panzhao on 2017/12/14.  
8 - */  
9 -public class SaveStationRouteDTO {  
10 -  
11 - //站点路由ID  
12 - private Integer id;  
13 -  
14 - // 站点路由序号  
15 - private Integer stationRouteCode;  
16 -  
17 - // 站点编码  
18 - private String stationCode;  
19 -  
20 - // 站点名称  
21 - private String stationName;  
22 -  
23 - // 线路编码  
24 - private String lineCode;  
25 -  
26 - /**  
27 - * 站点类型  
28 - *  
29 - * ------ B:起点站  
30 - *  
31 - * ------ Z:中途站  
32 - *  
33 - * ------ E:终点站  
34 - *  
35 - * ------ T:停车场  
36 - *  
37 - */  
38 - private String stationMark;  
39 -  
40 - // 站点路由出站序号  
41 - private Integer outStationNmber;  
42 -  
43 - // 站点路由到站距离  
44 - private Double distances;  
45 -  
46 - // 站点路由到站时间  
47 - private Double toTime;  
48 -  
49 - // 首班时间  
50 - private String firstTime;  
51 -  
52 - // 末班时间  
53 - private String endTime;  
54 -  
55 - // 站点路由方向  
56 - private Integer directions;  
57 -  
58 - // 版本号  
59 - private Integer versions;  
60 -  
61 - // 是否撤销  
62 - private Integer destroy;  
63 -  
64 - // 描述  
65 - private String descriptions;  
66 -  
67 - // 创建人  
68 - private Integer createBy;  
69 -  
70 - // 修改人  
71 - private Integer updateBy;  
72 -  
73 - // 创建日期  
74 - private Date createDate;  
75 -  
76 - // 修改日期  
77 - private Date updateDate;  
78 -  
79 - // 站点ID  
80 - private long station;  
81 -  
82 - // 线路ID  
83 - private int line;  
84 -  
85 - public Integer getId() {  
86 - return id;  
87 - }  
88 -  
89 - public void setId(Integer id) {  
90 - this.id = id;  
91 - }  
92 -  
93 - public Integer getStationRouteCode() {  
94 - return stationRouteCode;  
95 - }  
96 -  
97 - public void setStationRouteCode(Integer stationRouteCode) {  
98 - this.stationRouteCode = stationRouteCode;  
99 - }  
100 -  
101 - public String getStationCode() {  
102 - return stationCode;  
103 - }  
104 -  
105 - public void setStationCode(String stationCode) {  
106 - this.stationCode = stationCode;  
107 - }  
108 -  
109 - public String getStationName() {  
110 - return stationName;  
111 - }  
112 -  
113 - public void setStationName(String stationName) {  
114 - this.stationName = stationName;  
115 - }  
116 -  
117 - public String getLineCode() {  
118 - return lineCode;  
119 - }  
120 -  
121 - public void setLineCode(String lineCode) {  
122 - this.lineCode = lineCode;  
123 - }  
124 -  
125 - public String getStationMark() {  
126 - return stationMark;  
127 - }  
128 -  
129 - public void setStationMark(String stationMark) {  
130 - this.stationMark = stationMark;  
131 - }  
132 -  
133 - public Integer getOutStationNmber() {  
134 - return outStationNmber;  
135 - }  
136 -  
137 - public void setOutStationNmber(Integer outStationNmber) {  
138 - this.outStationNmber = outStationNmber;  
139 - }  
140 -  
141 - public Double getDistances() {  
142 - return distances;  
143 - }  
144 -  
145 - public void setDistances(Double distances) {  
146 - this.distances = distances;  
147 - }  
148 -  
149 - public Double getToTime() {  
150 - return toTime;  
151 - }  
152 -  
153 - public void setToTime(Double toTime) {  
154 - this.toTime = toTime;  
155 - }  
156 -  
157 - public String getFirstTime() {  
158 - return firstTime;  
159 - }  
160 -  
161 - public void setFirstTime(String firstTime) {  
162 - this.firstTime = firstTime;  
163 - }  
164 -  
165 - public String getEndTime() {  
166 - return endTime;  
167 - }  
168 -  
169 - public void setEndTime(String endTime) {  
170 - this.endTime = endTime;  
171 - }  
172 -  
173 - public Integer getDirections() {  
174 - return directions;  
175 - }  
176 -  
177 - public void setDirections(Integer directions) {  
178 - this.directions = directions;  
179 - }  
180 -  
181 - public Integer getVersions() {  
182 - return versions;  
183 - }  
184 -  
185 - public void setVersions(Integer versions) {  
186 - this.versions = versions;  
187 - }  
188 -  
189 - public Integer getDestroy() {  
190 - return destroy;  
191 - }  
192 -  
193 - public void setDestroy(Integer destroy) {  
194 - this.destroy = destroy;  
195 - }  
196 -  
197 - public String getDescriptions() {  
198 - return descriptions;  
199 - }  
200 -  
201 - public void setDescriptions(String descriptions) {  
202 - this.descriptions = descriptions;  
203 - }  
204 -  
205 - public Integer getCreateBy() {  
206 - return createBy;  
207 - }  
208 -  
209 - public void setCreateBy(Integer createBy) {  
210 - this.createBy = createBy;  
211 - }  
212 -  
213 - public Integer getUpdateBy() {  
214 - return updateBy;  
215 - }  
216 -  
217 - public void setUpdateBy(Integer updateBy) {  
218 - this.updateBy = updateBy;  
219 - }  
220 -  
221 - public Date getCreateDate() {  
222 - return createDate;  
223 - }  
224 -  
225 - public void setCreateDate(Date createDate) {  
226 - this.createDate = createDate;  
227 - }  
228 -  
229 - public Date getUpdateDate() {  
230 - return updateDate;  
231 - }  
232 -  
233 - public void setUpdateDate(Date updateDate) {  
234 - this.updateDate = updateDate;  
235 - }  
236 -  
237 - public long getStation() {  
238 - return station;  
239 - }  
240 -  
241 - public void setStation(long station) {  
242 - this.station = station;  
243 - }  
244 -  
245 - public int getLine() {  
246 - return line;  
247 - }  
248 -  
249 - public void setLine(int line) {  
250 - this.line = line;  
251 - }  
252 -} 1 +package com.bsth.service.geo_data.impl;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * 站点路由 jdbc 入库数据
  7 + * Created by panzhao on 2017/12/14.
  8 + */
  9 +public class SaveStationRouteDTO {
  10 +
  11 + //站点路由ID
  12 + private Integer id;
  13 +
  14 + // 站点路由序号
  15 + private Integer stationRouteCode;
  16 +
  17 + // 站点编码
  18 + private String stationCode;
  19 +
  20 + // 站点名称
  21 + private String stationName;
  22 +
  23 + // 线路编码
  24 + private String lineCode;
  25 +
  26 + /**
  27 + * 站点类型
  28 + *
  29 + * ------ B:起点站
  30 + *
  31 + * ------ Z:中途站
  32 + *
  33 + * ------ E:终点站
  34 + *
  35 + * ------ T:停车场
  36 + *
  37 + */
  38 + private String stationMark;
  39 +
  40 + // 站点路由出站序号
  41 + private Integer outStationNmber;
  42 +
  43 + // 站点路由到站距离
  44 + private Double distances;
  45 +
  46 + // 站点路由到站时间
  47 + private Double toTime;
  48 +
  49 + // 首班时间
  50 + private String firstTime;
  51 +
  52 + // 末班时间
  53 + private String endTime;
  54 +
  55 + // 站点路由方向
  56 + private Integer directions;
  57 +
  58 + // 版本号
  59 + private Integer versions;
  60 +
  61 + // 是否撤销
  62 + private Integer destroy;
  63 +
  64 + // 描述
  65 + private String descriptions;
  66 +
  67 + // 创建人
  68 + private Integer createBy;
  69 +
  70 + // 修改人
  71 + private Integer updateBy;
  72 +
  73 + // 创建日期
  74 + private Date createDate;
  75 +
  76 + // 修改日期
  77 + private Date updateDate;
  78 +
  79 + // 站点ID
  80 + private long station;
  81 +
  82 + // 线路ID
  83 + private int line;
  84 +
  85 + public Integer getId() {
  86 + return id;
  87 + }
  88 +
  89 + public void setId(Integer id) {
  90 + this.id = id;
  91 + }
  92 +
  93 + public Integer getStationRouteCode() {
  94 + return stationRouteCode;
  95 + }
  96 +
  97 + public void setStationRouteCode(Integer stationRouteCode) {
  98 + this.stationRouteCode = stationRouteCode;
  99 + }
  100 +
  101 + public String getStationCode() {
  102 + return stationCode;
  103 + }
  104 +
  105 + public void setStationCode(String stationCode) {
  106 + this.stationCode = stationCode;
  107 + }
  108 +
  109 + public String getStationName() {
  110 + return stationName;
  111 + }
  112 +
  113 + public void setStationName(String stationName) {
  114 + this.stationName = stationName;
  115 + }
  116 +
  117 + public String getLineCode() {
  118 + return lineCode;
  119 + }
  120 +
  121 + public void setLineCode(String lineCode) {
  122 + this.lineCode = lineCode;
  123 + }
  124 +
  125 + public String getStationMark() {
  126 + return stationMark;
  127 + }
  128 +
  129 + public void setStationMark(String stationMark) {
  130 + this.stationMark = stationMark;
  131 + }
  132 +
  133 + public Integer getOutStationNmber() {
  134 + return outStationNmber;
  135 + }
  136 +
  137 + public void setOutStationNmber(Integer outStationNmber) {
  138 + this.outStationNmber = outStationNmber;
  139 + }
  140 +
  141 + public Double getDistances() {
  142 + return distances;
  143 + }
  144 +
  145 + public void setDistances(Double distances) {
  146 + this.distances = distances;
  147 + }
  148 +
  149 + public Double getToTime() {
  150 + return toTime;
  151 + }
  152 +
  153 + public void setToTime(Double toTime) {
  154 + this.toTime = toTime;
  155 + }
  156 +
  157 + public String getFirstTime() {
  158 + return firstTime;
  159 + }
  160 +
  161 + public void setFirstTime(String firstTime) {
  162 + this.firstTime = firstTime;
  163 + }
  164 +
  165 + public String getEndTime() {
  166 + return endTime;
  167 + }
  168 +
  169 + public void setEndTime(String endTime) {
  170 + this.endTime = endTime;
  171 + }
  172 +
  173 + public Integer getDirections() {
  174 + return directions;
  175 + }
  176 +
  177 + public void setDirections(Integer directions) {
  178 + this.directions = directions;
  179 + }
  180 +
  181 + public Integer getVersions() {
  182 + return versions;
  183 + }
  184 +
  185 + public void setVersions(Integer versions) {
  186 + this.versions = versions;
  187 + }
  188 +
  189 + public Integer getDestroy() {
  190 + return destroy;
  191 + }
  192 +
  193 + public void setDestroy(Integer destroy) {
  194 + this.destroy = destroy;
  195 + }
  196 +
  197 + public String getDescriptions() {
  198 + return descriptions;
  199 + }
  200 +
  201 + public void setDescriptions(String descriptions) {
  202 + this.descriptions = descriptions;
  203 + }
  204 +
  205 + public Integer getCreateBy() {
  206 + return createBy;
  207 + }
  208 +
  209 + public void setCreateBy(Integer createBy) {
  210 + this.createBy = createBy;
  211 + }
  212 +
  213 + public Integer getUpdateBy() {
  214 + return updateBy;
  215 + }
  216 +
  217 + public void setUpdateBy(Integer updateBy) {
  218 + this.updateBy = updateBy;
  219 + }
  220 +
  221 + public Date getCreateDate() {
  222 + return createDate;
  223 + }
  224 +
  225 + public void setCreateDate(Date createDate) {
  226 + this.createDate = createDate;
  227 + }
  228 +
  229 + public Date getUpdateDate() {
  230 + return updateDate;
  231 + }
  232 +
  233 + public void setUpdateDate(Date updateDate) {
  234 + this.updateDate = updateDate;
  235 + }
  236 +
  237 + public long getStation() {
  238 + return station;
  239 + }
  240 +
  241 + public void setStation(long station) {
  242 + this.station = station;
  243 + }
  244 +
  245 + public int getLine() {
  246 + return line;
  247 + }
  248 +
  249 + public void setLine(int line) {
  250 + this.line = line;
  251 + }
  252 +}
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
@@ -867,15 +867,17 @@ public class CulateMileageServiceImpl implements CulateMileageService{ @@ -867,15 +867,17 @@ public class CulateMileageServiceImpl implements CulateMileageService{
867 if (cts != null && cts.size() > 0) { 867 if (cts != null && cts.size() > 0) {
868 for(ChildTaskPlan c : cts){ 868 for(ChildTaskPlan c : cts){
869 if(c.getCcId()==null){ 869 if(c.getCcId()==null){
870 - if(item.equals("其他")){  
871 - if(c.isDestroy() &&  
872 - ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)||  
873 - (c.getDestroyReason()==null?"": c.getDestroyReason()).equals("")))  
874 - sum = Arith.add(sum, c.getMileage());  
875 - }else{  
876 - if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item))  
877 - sum = Arith.add(sum, c.getMileage());  
878 - } 870 + if(c.getMileageType().equals("service")){
  871 + if(item.equals("其他")){
  872 + if(c.isDestroy() &&
  873 + ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)||
  874 + (c.getDestroyReason()==null?"": c.getDestroyReason()).equals("")))
  875 + sum = Arith.add(sum, c.getMileage());
  876 + }else{
  877 + if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item))
  878 + sum = Arith.add(sum, c.getMileage());
  879 + }
  880 + }
879 } 881 }
880 } 882 }
881 } 883 }
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -1773,27 +1773,28 @@ public class ReportServiceImpl implements ReportService{ @@ -1773,27 +1773,28 @@ public class ReportServiceImpl implements ReportService{
1773 while (it.hasNext()) { 1773 while (it.hasNext()) {
1774 ChildTaskPlan childTaskPlan = it.next(); 1774 ChildTaskPlan childTaskPlan = it.next();
1775 if (childTaskPlan.isDestroy()) { 1775 if (childTaskPlan.isDestroy()) {
1776 - String destroyReason = "";  
1777 - if (childTaskPlan.getDestroyReason() == null) {  
1778 - destroyReason = "其他";  
1779 - } else if (childTaskPlan.getDestroyReason().equals("")) {  
1780 - destroyReason = "其他";  
1781 - } else {  
1782 - destroyReason = childTaskPlan.getDestroyReason();  
1783 - }  
1784 - Map<String, Object> newMap = new HashMap<String, Object>();  
1785 - newMap.put("nr", destroyReason);  
1786 - newMap.put("lp", scheduleRealInfo.getLpName());  
1787 - newMap.put("nbbm", scheduleRealInfo.getClZbh());  
1788 - newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName());  
1789 - newMap.put("dz", childTaskPlan.getStartStationName());  
1790 - newMap.put("sj", childTaskPlan.getStartDate());  
1791 - newMap.put("gzf", " ");  
1792 - newMap.put("lbbc", 0);  
1793 - newMap.put("lblc", childTaskPlan.getMileage());  
1794 - newMap.put("jyqp", childTaskPlan.getRemarks());  
1795 - list.add(newMap);  
1796 - 1776 + if(childTaskPlan.getMileageType().equals("service")){
  1777 + String destroyReason = "";
  1778 + if (childTaskPlan.getDestroyReason() == null) {
  1779 + destroyReason = "其他";
  1780 + } else if (childTaskPlan.getDestroyReason().equals("")) {
  1781 + destroyReason = "其他";
  1782 + } else {
  1783 + destroyReason = childTaskPlan.getDestroyReason();
  1784 + }
  1785 + Map<String, Object> newMap = new HashMap<String, Object>();
  1786 + newMap.put("nr", destroyReason);
  1787 + newMap.put("lp", scheduleRealInfo.getLpName());
  1788 + newMap.put("nbbm", scheduleRealInfo.getClZbh());
  1789 + newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName());
  1790 + newMap.put("dz", childTaskPlan.getStartStationName());
  1791 + newMap.put("sj", childTaskPlan.getStartDate());
  1792 + newMap.put("gzf", " ");
  1793 + newMap.put("lbbc", 0);
  1794 + newMap.put("lblc", childTaskPlan.getMileage());
  1795 + newMap.put("jyqp", childTaskPlan.getRemarks());
  1796 + list.add(newMap);
  1797 + }
1797 } 1798 }
1798 } 1799 }
1799 } 1800 }
src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
@@ -54,5 +54,5 @@ public interface TTInfoDetailService extends BService&lt;TTInfoDetail, Long&gt; { @@ -54,5 +54,5 @@ public interface TTInfoDetailService extends BService&lt;TTInfoDetail, Long&gt; {
54 54
55 Map<String, Object> skbDetailMxSave(Map<String, Object> map); 55 Map<String, Object> skbDetailMxSave(Map<String, Object> map);
56 56
57 - List<Map<String, Object>> findZdAndTcc(int lineid, int xldir); 57 + List<Map<String, Object>> findZdAndTcc(int lineid, int xldir, int lineversion);
58 } 58 }
src/main/java/com/bsth/service/schedule/TTInfoService.java
@@ -3,6 +3,9 @@ package com.bsth.service.schedule; @@ -3,6 +3,9 @@ package com.bsth.service.schedule;
3 import com.bsth.entity.schedule.TTInfo; 3 import com.bsth.entity.schedule.TTInfo;
4 import com.bsth.service.schedule.exception.ScheduleException; 4 import com.bsth.service.schedule.exception.ScheduleException;
5 5
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
6 /** 9 /**
7 * Created by xu on 16/5/12. 10 * Created by xu on 16/5/12.
8 */ 11 */
@@ -14,4 +17,8 @@ public interface TTInfoService extends BService&lt;TTInfo, Long&gt; { @@ -14,4 +17,8 @@ public interface TTInfoService extends BService&lt;TTInfo, Long&gt; {
14 17
15 void backUp(Long ttInfoId) throws ScheduleException; 18 void backUp(Long ttInfoId) throws ScheduleException;
16 19
  20 + List<Map<String, Object>> getLineStationRouteVersions(Integer lineId);
  21 +
  22 + String getLineVersionDesc(Integer lineId, Integer version);
  23 +
17 } 24 }
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -94,17 +94,17 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -94,17 +94,17 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
94 * @param xldir 线路上下行 94 * @param xldir 线路上下行
95 * @return 95 * @return
96 */ 96 */
97 - public List<Map<String, Object>> findZdAndTcc(int lineid, int xldir) { 97 + public List<Map<String, Object>> findZdAndTcc(int lineid, int xldir, int lineversion) {
98 String sql = "select * from " + 98 String sql = "select * from " +
99 "(" + 99 "(" +
100 - "select station_code as zcode, station_name as zname, concat(station_name, '(站点)') as aname from bsth_c_stationroute " +  
101 - "where destroy = 0 and line = ? and directions = ? " + 100 + "select station_code as zcode, station_name as zname, concat(station_name, '(站点)') as aname from bsth_c_ls_stationroute " +
  101 + "where destroy = 0 and line = ? and directions = ? and versions = ? " +
102 "union all " + 102 "union all " +
103 "select park_code as zcode, park_name as zname, concat(park_name, '(停车场)') as aname from bsth_c_car_park " + 103 "select park_code as zcode, park_name as zname, concat(park_name, '(停车场)') as aname from bsth_c_car_park " +
104 "where destroy = 0 " + 104 "where destroy = 0 " +
105 ") a "; 105 ") a ";
106 106
107 - return jdbcTemplate.queryForList(sql, lineid, xldir); 107 + return jdbcTemplate.queryForList(sql, lineid, xldir, lineversion);
108 } 108 }
109 109
110 @Override 110 @Override
src/main/java/com/bsth/service/schedule/impl/TTInfoServiceImpl.java
1 package com.bsth.service.schedule.impl; 1 package com.bsth.service.schedule.impl;
2 2
  3 +import com.bsth.entity.LineVersions;
3 import com.bsth.entity.schedule.TTInfo; 4 import com.bsth.entity.schedule.TTInfo;
4 import com.bsth.entity.schedule.TTInfoBackup; 5 import com.bsth.entity.schedule.TTInfoBackup;
5 import com.bsth.entity.schedule.TTInfoDetail; 6 import com.bsth.entity.schedule.TTInfoDetail;
6 import com.bsth.repository.schedule.TTInfoBackupRepository; 7 import com.bsth.repository.schedule.TTInfoBackupRepository;
7 import com.bsth.repository.schedule.TTInfoDetailRepository; 8 import com.bsth.repository.schedule.TTInfoDetailRepository;
8 import com.bsth.repository.schedule.TTInfoRepository; 9 import com.bsth.repository.schedule.TTInfoRepository;
  10 +import com.bsth.service.LineVersionsService;
9 import com.bsth.service.schedule.TTInfoService; 11 import com.bsth.service.schedule.TTInfoService;
10 import com.bsth.service.schedule.exception.ScheduleException; 12 import com.bsth.service.schedule.exception.ScheduleException;
11 import com.bsth.service.schedule.utils.TimeTableProto; 13 import com.bsth.service.schedule.utils.TimeTableProto;
12 import org.apache.commons.lang3.StringUtils; 14 import org.apache.commons.lang3.StringUtils;
  15 +import org.joda.time.DateTime;
13 import org.slf4j.Logger; 16 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory; 17 import org.slf4j.LoggerFactory;
15 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,10 +24,7 @@ import org.springframework.util.CollectionUtils; @@ -21,10 +24,7 @@ import org.springframework.util.CollectionUtils;
21 24
22 import java.io.PrintWriter; 25 import java.io.PrintWriter;
23 import java.io.StringWriter; 26 import java.io.StringWriter;
24 -import java.util.Date;  
25 -import java.util.HashMap;  
26 -import java.util.List;  
27 -import java.util.Map; 27 +import java.util.*;
28 28
29 /** 29 /**
30 * Created by xu on 16/12/20. 30 * Created by xu on 16/12/20.
@@ -40,6 +40,8 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI @@ -40,6 +40,8 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI
40 private TTInfoDetailRepository ttInfoDetailRepository; 40 private TTInfoDetailRepository ttInfoDetailRepository;
41 @Autowired 41 @Autowired
42 private TTInfoBackupRepository ttInfoBackupRepository; 42 private TTInfoBackupRepository ttInfoBackupRepository;
  43 + @Autowired
  44 + private LineVersionsService lineVersionsService;
43 45
44 @Override 46 @Override
45 public void validate_name(TTInfo ttInfo) throws ScheduleException { 47 public void validate_name(TTInfo ttInfo) throws ScheduleException {
@@ -137,7 +139,70 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI @@ -137,7 +139,70 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI
137 } 139 }
138 140
139 @Override 141 @Override
140 - @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED) 142 + public List<Map<String, Object>> getLineStationRouteVersions(Integer lineId) {
  143 + // 获取线路版本
  144 + List<LineVersions> lineVersionsList = lineVersionsService.findByLineCode(lineId);
  145 + // 按照version版本降序排序
  146 + Collections.sort(lineVersionsList, new Comparator<LineVersions>() {
  147 + @Override
  148 + public int compare(LineVersions o1, LineVersions o2) {
  149 + if (o1.getVersions() > o2.getVersions()) {
  150 + return -1;
  151 + } else if (o1.getVersions() < o2.getVersions()) {
  152 + return 1;
  153 + } else {
  154 + return 0;
  155 + }
  156 + }
  157 + });
  158 +
  159 + // 取最开始的2条记录
  160 + List<Map<String, Object>> mapList = new ArrayList<>();
  161 + for (LineVersions lv: lineVersionsList) {
  162 + String vname = lv.getName();
  163 + String rq = lv.getStartDate() == null ? "未知启用日期" : new DateTime(lv.getStartDate()).toString("YYYY年MM月dd日");
  164 + String sdesc = lv.getStatus() == 0 ? "历史" : (lv.getStatus() == 1 ? "当前" : "待更新");
  165 +
  166 + Map<String, Object> value = new HashMap<>();
  167 + value.put("desc", vname + "-" + rq + "-" + sdesc);
  168 + value.put("version", lv.getVersions());
  169 +
  170 + mapList.add(value);
  171 +
  172 + if (mapList.size() == 2) {
  173 + break;
  174 + }
  175 + }
  176 +
  177 + return mapList;
  178 + }
  179 +
  180 + @Override
  181 + public String getLineVersionDesc(Integer lineId, Integer version) {
  182 + // 查找指定版本,并判定
  183 + Map<String, Object> param = new HashMap<>();
  184 + param.put("line_eq", lineId);
  185 + param.put("versions_eq", version);
  186 + List<LineVersions> lineVersionsList = (List<LineVersions>) lineVersionsService.list(param);
  187 +
  188 + LineVersions lv;
  189 + if (CollectionUtils.isEmpty(lineVersionsList)) {
  190 + return "未知版本";
  191 + } else if (lineVersionsList.size() > 1) {
  192 + return "重复版本";
  193 + } else {
  194 + lv = lineVersionsList.get(0);
  195 + }
  196 +
  197 + String vname = lv.getName();
  198 + String rq = lv.getStartDate() == null ? "未知启用日期" : new DateTime(lv.getStartDate()).toString("YYYY年MM月dd日");
  199 + String sdesc = lv.getStatus() == 0 ? "历史" : (lv.getStatus() == 1 ? "当前" : "待更新");
  200 +
  201 + return String.format("%s-%s-%s", vname, rq, sdesc);
  202 + }
  203 +
  204 + @Override
  205 + @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.REPEATABLE_READ)
141 public void backUp(Long ttInfoId) throws ScheduleException { 206 public void backUp(Long ttInfoId) throws ScheduleException {
142 LOG.info(">>>>>>开始备份时刻表<<<<<<"); 207 LOG.info(">>>>>>开始备份时刻表<<<<<<");
143 208
@@ -165,6 +230,7 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI @@ -165,6 +230,7 @@ public class TTInfoServiceImpl extends BServiceImpl&lt;TTInfo, Long&gt; implements TTI
165 ttInfoBackup.setXlName(ttInfo.getXl().getName()); 230 ttInfoBackup.setXlName(ttInfo.getXl().getName());
166 ttInfoBackup.setTtInfo(ttInfoId); 231 ttInfoBackup.setTtInfo(ttInfoId);
167 ttInfoBackup.setTtInfoName(ttInfo.getName()); 232 ttInfoBackup.setTtInfoName(ttInfo.getName());
  233 + ttInfoBackup.setLineVersion(ttInfo.getLineVersion());
168 ttInfoBackup.setBackUpDate(backupdate); 234 ttInfoBackup.setBackUpDate(backupdate);
169 ttInfoBackup.setBackUpInfo(backupbytes); 235 ttInfoBackup.setBackUpInfo(backupbytes);
170 236
src/main/java/com/bsth/service/schedule/utils/TimeTableProto.java
@@ -268,6 +268,15 @@ public final class TimeTableProto { @@ -268,6 +268,15 @@ public final class TimeTableProto {
268 */ 268 */
269 com.bsth.service.schedule.utils.TimeTableProto.TTInfoDetailOrBuilder getBcInfoOrBuilder( 269 com.bsth.service.schedule.utils.TimeTableProto.TTInfoDetailOrBuilder getBcInfoOrBuilder(
270 int index); 270 int index);
  271 +
  272 + /**
  273 + * <pre>
  274 + * 线路版本
  275 + * </pre>
  276 + *
  277 + * <code>uint32 lineVersion = 18;</code>
  278 + */
  279 + int getLineVersion();
271 } 280 }
272 /** 281 /**
273 * Protobuf type {@code timetable.TTInfo} 282 * Protobuf type {@code timetable.TTInfo}
@@ -298,6 +307,7 @@ public final class TimeTableProto { @@ -298,6 +307,7 @@ public final class TimeTableProto {
298 createDate_ = 0L; 307 createDate_ = 0L;
299 updateDate_ = 0L; 308 updateDate_ = 0L;
300 bcInfo_ = java.util.Collections.emptyList(); 309 bcInfo_ = java.util.Collections.emptyList();
  310 + lineVersion_ = 0;
301 } 311 }
302 312
303 @java.lang.Override 313 @java.lang.Override
@@ -421,6 +431,11 @@ public final class TimeTableProto { @@ -421,6 +431,11 @@ public final class TimeTableProto {
421 input.readMessage(com.bsth.service.schedule.utils.TimeTableProto.TTInfoDetail.parser(), extensionRegistry)); 431 input.readMessage(com.bsth.service.schedule.utils.TimeTableProto.TTInfoDetail.parser(), extensionRegistry));
422 break; 432 break;
423 } 433 }
  434 + case 144: {
  435 +
  436 + lineVersion_ = input.readUInt32();
  437 + break;
  438 + }
424 } 439 }
425 } 440 }
426 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 441 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -914,6 +929,19 @@ public final class TimeTableProto { @@ -914,6 +929,19 @@ public final class TimeTableProto {
914 return bcInfo_.get(index); 929 return bcInfo_.get(index);
915 } 930 }
916 931
  932 + public static final int LINEVERSION_FIELD_NUMBER = 18;
  933 + private int lineVersion_;
  934 + /**
  935 + * <pre>
  936 + * 线路版本
  937 + * </pre>
  938 + *
  939 + * <code>uint32 lineVersion = 18;</code>
  940 + */
  941 + public int getLineVersion() {
  942 + return lineVersion_;
  943 + }
  944 +
917 private byte memoizedIsInitialized = -1; 945 private byte memoizedIsInitialized = -1;
918 public final boolean isInitialized() { 946 public final boolean isInitialized() {
919 byte isInitialized = memoizedIsInitialized; 947 byte isInitialized = memoizedIsInitialized;
@@ -977,6 +1005,9 @@ public final class TimeTableProto { @@ -977,6 +1005,9 @@ public final class TimeTableProto {
977 for (int i = 0; i < bcInfo_.size(); i++) { 1005 for (int i = 0; i < bcInfo_.size(); i++) {
978 output.writeMessage(17, bcInfo_.get(i)); 1006 output.writeMessage(17, bcInfo_.get(i));
979 } 1007 }
  1008 + if (lineVersion_ != 0) {
  1009 + output.writeUInt32(18, lineVersion_);
  1010 + }
980 } 1011 }
981 1012
982 public int getSerializedSize() { 1013 public int getSerializedSize() {
@@ -1045,6 +1076,10 @@ public final class TimeTableProto { @@ -1045,6 +1076,10 @@ public final class TimeTableProto {
1045 size += com.google.protobuf.CodedOutputStream 1076 size += com.google.protobuf.CodedOutputStream
1046 .computeMessageSize(17, bcInfo_.get(i)); 1077 .computeMessageSize(17, bcInfo_.get(i));
1047 } 1078 }
  1079 + if (lineVersion_ != 0) {
  1080 + size += com.google.protobuf.CodedOutputStream
  1081 + .computeUInt32Size(18, lineVersion_);
  1082 + }
1048 memoizedSize = size; 1083 memoizedSize = size;
1049 return size; 1084 return size;
1050 } 1085 }
@@ -1095,6 +1130,8 @@ public final class TimeTableProto { @@ -1095,6 +1130,8 @@ public final class TimeTableProto {
1095 == other.getUpdateDate()); 1130 == other.getUpdateDate());
1096 result = result && getBcInfoList() 1131 result = result && getBcInfoList()
1097 .equals(other.getBcInfoList()); 1132 .equals(other.getBcInfoList());
  1133 + result = result && (getLineVersion()
  1134 + == other.getLineVersion());
1098 return result; 1135 return result;
1099 } 1136 }
1100 1137
@@ -1147,6 +1184,8 @@ public final class TimeTableProto { @@ -1147,6 +1184,8 @@ public final class TimeTableProto {
1147 hash = (37 * hash) + BCINFO_FIELD_NUMBER; 1184 hash = (37 * hash) + BCINFO_FIELD_NUMBER;
1148 hash = (53 * hash) + getBcInfoList().hashCode(); 1185 hash = (53 * hash) + getBcInfoList().hashCode();
1149 } 1186 }
  1187 + hash = (37 * hash) + LINEVERSION_FIELD_NUMBER;
  1188 + hash = (53 * hash) + getLineVersion();
1150 hash = (29 * hash) + unknownFields.hashCode(); 1189 hash = (29 * hash) + unknownFields.hashCode();
1151 memoizedHashCode = hash; 1190 memoizedHashCode = hash;
1152 return hash; 1191 return hash;
@@ -1315,6 +1354,8 @@ public final class TimeTableProto { @@ -1315,6 +1354,8 @@ public final class TimeTableProto {
1315 } else { 1354 } else {
1316 bcInfoBuilder_.clear(); 1355 bcInfoBuilder_.clear();
1317 } 1356 }
  1357 + lineVersion_ = 0;
  1358 +
1318 return this; 1359 return this;
1319 } 1360 }
1320 1361
@@ -1364,6 +1405,7 @@ public final class TimeTableProto { @@ -1364,6 +1405,7 @@ public final class TimeTableProto {
1364 } else { 1405 } else {
1365 result.bcInfo_ = bcInfoBuilder_.build(); 1406 result.bcInfo_ = bcInfoBuilder_.build();
1366 } 1407 }
  1408 + result.lineVersion_ = lineVersion_;
1367 result.bitField0_ = to_bitField0_; 1409 result.bitField0_ = to_bitField0_;
1368 onBuilt(); 1410 onBuilt();
1369 return result; 1411 return result;
@@ -1487,6 +1529,9 @@ public final class TimeTableProto { @@ -1487,6 +1529,9 @@ public final class TimeTableProto {
1487 } 1529 }
1488 } 1530 }
1489 } 1531 }
  1532 + if (other.getLineVersion() != 0) {
  1533 + setLineVersion(other.getLineVersion());
  1534 + }
1490 onChanged(); 1535 onChanged();
1491 return this; 1536 return this;
1492 } 1537 }
@@ -2790,6 +2835,44 @@ public final class TimeTableProto { @@ -2790,6 +2835,44 @@ public final class TimeTableProto {
2790 } 2835 }
2791 return bcInfoBuilder_; 2836 return bcInfoBuilder_;
2792 } 2837 }
  2838 +
  2839 + private int lineVersion_ ;
  2840 + /**
  2841 + * <pre>
  2842 + * 线路版本
  2843 + * </pre>
  2844 + *
  2845 + * <code>uint32 lineVersion = 18;</code>
  2846 + */
  2847 + public int getLineVersion() {
  2848 + return lineVersion_;
  2849 + }
  2850 + /**
  2851 + * <pre>
  2852 + * 线路版本
  2853 + * </pre>
  2854 + *
  2855 + * <code>uint32 lineVersion = 18;</code>
  2856 + */
  2857 + public Builder setLineVersion(int value) {
  2858 +
  2859 + lineVersion_ = value;
  2860 + onChanged();
  2861 + return this;
  2862 + }
  2863 + /**
  2864 + * <pre>
  2865 + * 线路版本
  2866 + * </pre>
  2867 + *
  2868 + * <code>uint32 lineVersion = 18;</code>
  2869 + */
  2870 + public Builder clearLineVersion() {
  2871 +
  2872 + lineVersion_ = 0;
  2873 + onChanged();
  2874 + return this;
  2875 + }
2793 public final Builder setUnknownFields( 2876 public final Builder setUnknownFields(
2794 final com.google.protobuf.UnknownFieldSet unknownFields) { 2877 final com.google.protobuf.UnknownFieldSet unknownFields) {
2795 return this; 2878 return this;
@@ -3103,6 +3186,15 @@ public final class TimeTableProto { @@ -3103,6 +3186,15 @@ public final class TimeTableProto {
3103 */ 3186 */
3104 com.google.protobuf.ByteString 3187 com.google.protobuf.ByteString
3105 getRemarkBytes(); 3188 getRemarkBytes();
  3189 +
  3190 + /**
  3191 + * <pre>
  3192 + * 线路版本
  3193 + * </pre>
  3194 + *
  3195 + * <code>uint32 lineVersion = 20;</code>
  3196 + */
  3197 + int getLineVersion();
3106 } 3198 }
3107 /** 3199 /**
3108 * Protobuf type {@code timetable.TTInfoDetail} 3200 * Protobuf type {@code timetable.TTInfoDetail}
@@ -3135,6 +3227,7 @@ public final class TimeTableProto { @@ -3135,6 +3227,7 @@ public final class TimeTableProto {
3135 isFB_ = false; 3227 isFB_ = false;
3136 isTS_ = false; 3228 isTS_ = false;
3137 remark_ = ""; 3229 remark_ = "";
  3230 + lineVersion_ = 0;
3138 } 3231 }
3139 3232
3140 @java.lang.Override 3233 @java.lang.Override
@@ -3267,6 +3360,11 @@ public final class TimeTableProto { @@ -3267,6 +3360,11 @@ public final class TimeTableProto {
3267 remark_ = s; 3360 remark_ = s;
3268 break; 3361 break;
3269 } 3362 }
  3363 + case 160: {
  3364 +
  3365 + lineVersion_ = input.readUInt32();
  3366 + break;
  3367 + }
3270 } 3368 }
3271 } 3369 }
3272 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3370 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3827,6 +3925,19 @@ public final class TimeTableProto { @@ -3827,6 +3925,19 @@ public final class TimeTableProto {
3827 } 3925 }
3828 } 3926 }
3829 3927
  3928 + public static final int LINEVERSION_FIELD_NUMBER = 20;
  3929 + private int lineVersion_;
  3930 + /**
  3931 + * <pre>
  3932 + * 线路版本
  3933 + * </pre>
  3934 + *
  3935 + * <code>uint32 lineVersion = 20;</code>
  3936 + */
  3937 + public int getLineVersion() {
  3938 + return lineVersion_;
  3939 + }
  3940 +
3830 private byte memoizedIsInitialized = -1; 3941 private byte memoizedIsInitialized = -1;
3831 public final boolean isInitialized() { 3942 public final boolean isInitialized() {
3832 byte isInitialized = memoizedIsInitialized; 3943 byte isInitialized = memoizedIsInitialized;
@@ -3896,6 +4007,9 @@ public final class TimeTableProto { @@ -3896,6 +4007,9 @@ public final class TimeTableProto {
3896 if (!getRemarkBytes().isEmpty()) { 4007 if (!getRemarkBytes().isEmpty()) {
3897 com.google.protobuf.GeneratedMessageV3.writeString(output, 19, remark_); 4008 com.google.protobuf.GeneratedMessageV3.writeString(output, 19, remark_);
3898 } 4009 }
  4010 + if (lineVersion_ != 0) {
  4011 + output.writeUInt32(20, lineVersion_);
  4012 + }
3899 } 4013 }
3900 4014
3901 public int getSerializedSize() { 4015 public int getSerializedSize() {
@@ -3969,6 +4083,10 @@ public final class TimeTableProto { @@ -3969,6 +4083,10 @@ public final class TimeTableProto {
3969 if (!getRemarkBytes().isEmpty()) { 4083 if (!getRemarkBytes().isEmpty()) {
3970 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, remark_); 4084 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, remark_);
3971 } 4085 }
  4086 + if (lineVersion_ != 0) {
  4087 + size += com.google.protobuf.CodedOutputStream
  4088 + .computeUInt32Size(20, lineVersion_);
  4089 + }
3972 memoizedSize = size; 4090 memoizedSize = size;
3973 return size; 4091 return size;
3974 } 4092 }
@@ -4025,6 +4143,8 @@ public final class TimeTableProto { @@ -4025,6 +4143,8 @@ public final class TimeTableProto {
4025 == other.getIsTS()); 4143 == other.getIsTS());
4026 result = result && getRemark() 4144 result = result && getRemark()
4027 .equals(other.getRemark()); 4145 .equals(other.getRemark());
  4146 + result = result && (getLineVersion()
  4147 + == other.getLineVersion());
4028 return result; 4148 return result;
4029 } 4149 }
4030 4150
@@ -4078,6 +4198,8 @@ public final class TimeTableProto { @@ -4078,6 +4198,8 @@ public final class TimeTableProto {
4078 getIsTS()); 4198 getIsTS());
4079 hash = (37 * hash) + REMARK_FIELD_NUMBER; 4199 hash = (37 * hash) + REMARK_FIELD_NUMBER;
4080 hash = (53 * hash) + getRemark().hashCode(); 4200 hash = (53 * hash) + getRemark().hashCode();
  4201 + hash = (37 * hash) + LINEVERSION_FIELD_NUMBER;
  4202 + hash = (53 * hash) + getLineVersion();
4081 hash = (29 * hash) + unknownFields.hashCode(); 4203 hash = (29 * hash) + unknownFields.hashCode();
4082 memoizedHashCode = hash; 4204 memoizedHashCode = hash;
4083 return hash; 4205 return hash;
@@ -4245,6 +4367,8 @@ public final class TimeTableProto { @@ -4245,6 +4367,8 @@ public final class TimeTableProto {
4245 4367
4246 remark_ = ""; 4368 remark_ = "";
4247 4369
  4370 + lineVersion_ = 0;
  4371 +
4248 return this; 4372 return this;
4249 } 4373 }
4250 4374
@@ -4286,6 +4410,7 @@ public final class TimeTableProto { @@ -4286,6 +4410,7 @@ public final class TimeTableProto {
4286 result.isFB_ = isFB_; 4410 result.isFB_ = isFB_;
4287 result.isTS_ = isTS_; 4411 result.isTS_ = isTS_;
4288 result.remark_ = remark_; 4412 result.remark_ = remark_;
  4413 + result.lineVersion_ = lineVersion_;
4289 onBuilt(); 4414 onBuilt();
4290 return result; 4415 return result;
4291 } 4416 }
@@ -4394,6 +4519,9 @@ public final class TimeTableProto { @@ -4394,6 +4519,9 @@ public final class TimeTableProto {
4394 remark_ = other.remark_; 4519 remark_ = other.remark_;
4395 onChanged(); 4520 onChanged();
4396 } 4521 }
  4522 + if (other.getLineVersion() != 0) {
  4523 + setLineVersion(other.getLineVersion());
  4524 + }
4397 onChanged(); 4525 onChanged();
4398 return this; 4526 return this;
4399 } 4527 }
@@ -5651,6 +5779,44 @@ public final class TimeTableProto { @@ -5651,6 +5779,44 @@ public final class TimeTableProto {
5651 onChanged(); 5779 onChanged();
5652 return this; 5780 return this;
5653 } 5781 }
  5782 +
  5783 + private int lineVersion_ ;
  5784 + /**
  5785 + * <pre>
  5786 + * 线路版本
  5787 + * </pre>
  5788 + *
  5789 + * <code>uint32 lineVersion = 20;</code>
  5790 + */
  5791 + public int getLineVersion() {
  5792 + return lineVersion_;
  5793 + }
  5794 + /**
  5795 + * <pre>
  5796 + * 线路版本
  5797 + * </pre>
  5798 + *
  5799 + * <code>uint32 lineVersion = 20;</code>
  5800 + */
  5801 + public Builder setLineVersion(int value) {
  5802 +
  5803 + lineVersion_ = value;
  5804 + onChanged();
  5805 + return this;
  5806 + }
  5807 + /**
  5808 + * <pre>
  5809 + * 线路版本
  5810 + * </pre>
  5811 + *
  5812 + * <code>uint32 lineVersion = 20;</code>
  5813 + */
  5814 + public Builder clearLineVersion() {
  5815 +
  5816 + lineVersion_ = 0;
  5817 + onChanged();
  5818 + return this;
  5819 + }
5654 public final Builder setUnknownFields( 5820 public final Builder setUnknownFields(
5655 final com.google.protobuf.UnknownFieldSet unknownFields) { 5821 final com.google.protobuf.UnknownFieldSet unknownFields) {
5656 return this; 5822 return this;
@@ -5719,7 +5885,7 @@ public final class TimeTableProto { @@ -5719,7 +5885,7 @@ public final class TimeTableProto {
5719 descriptor; 5885 descriptor;
5720 static { 5886 static {
5721 java.lang.String[] descriptorData = { 5887 java.lang.String[] descriptorData = {
5722 - "\n\017timetable.proto\022\ttimetable\"\332\002\n\006TTInfo\022" + 5888 + "\n\017timetable.proto\022\ttimetable\"\357\002\n\006TTInfo\022" +
5723 "\n\n\002id\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022\n\n\002xl\030\003 \001(\r\022\016\n" + 5889 "\n\n\002id\030\001 \001(\004\022\014\n\004name\030\002 \001(\t\022\n\n\002xl\030\003 \001(\r\022\016\n" +
5724 "\006xlName\030\004 \001(\t\022\r\n\005xlDir\030\005 \001(\t\022\014\n\004qyrq\030\006 \001" + 5890 "\006xlName\030\004 \001(\t\022\r\n\005xlDir\030\005 \001(\t\022\014\n\004qyrq\030\006 \001" +
5725 "(\004\022\033\n\023isEnableDisTemplate\030\007 \001(\010\022\020\n\010isCan" + 5891 "(\004\022\033\n\023isEnableDisTemplate\030\007 \001(\010\022\020\n\010isCan" +
@@ -5728,16 +5894,17 @@ public final class TimeTableProto { @@ -5728,16 +5894,17 @@ public final class TimeTableProto {
5728 "erName\030\014 \001(\t\022\022\n\nupdateUser\030\r \001(\r\022\026\n\016upda" + 5894 "erName\030\014 \001(\t\022\022\n\nupdateUser\030\r \001(\r\022\026\n\016upda" +
5729 "teUserName\030\016 \001(\t\022\022\n\ncreateDate\030\017 \001(\004\022\022\n\n" + 5895 "teUserName\030\016 \001(\t\022\022\n\ncreateDate\030\017 \001(\004\022\022\n\n" +
5730 "updateDate\030\020 \001(\004\022\'\n\006bcInfo\030\021 \003(\0132\027.timet" + 5896 "updateDate\030\020 \001(\004\022\'\n\006bcInfo\030\021 \003(\0132\027.timet" +
5731 - "able.TTInfoDetail\"\246\002\n\014TTInfoDetail\022\n\n\002id",  
5732 - "\030\001 \001(\004\022\n\n\002xl\030\002 \001(\r\022\016\n\006xlName\030\003 \001(\t\022\n\n\002lp" +  
5733 - "\030\004 \001(\004\022\016\n\006lpName\030\005 \001(\t\022\014\n\004fcno\030\006 \001(\r\022\r\n\005" +  
5734 - "xlDir\030\007 \001(\t\022\017\n\007qdzCode\030\010 \001(\t\022\017\n\007qdzName\030" +  
5735 - "\t \001(\t\022\017\n\007zdzCode\030\n \001(\t\022\017\n\007zdzName\030\013 \001(\t\022" +  
5736 - "\014\n\004fcsj\030\014 \001(\t\022\013\n\003bcs\030\r \001(\r\022\014\n\004jhlc\030\016 \001(\001" +  
5737 - "\022\014\n\004bcsj\030\017 \001(\r\022\016\n\006bcType\030\020 \001(\t\022\014\n\004isFB\030\021" +  
5738 - " \001(\010\022\014\n\004isTS\030\022 \001(\010\022\016\n\006remark\030\023 \001(\tB1\n\037co" +  
5739 - "m.bsth.service.schedule.utilsB\016TimeTable" +  
5740 - "Protob\006proto3" 5897 + "able.TTInfoDetail\022\023\n\013lineVersion\030\022 \001(\r\"\273",
  5898 + "\002\n\014TTInfoDetail\022\n\n\002id\030\001 \001(\004\022\n\n\002xl\030\002 \001(\r\022" +
  5899 + "\016\n\006xlName\030\003 \001(\t\022\n\n\002lp\030\004 \001(\004\022\016\n\006lpName\030\005 " +
  5900 + "\001(\t\022\014\n\004fcno\030\006 \001(\r\022\r\n\005xlDir\030\007 \001(\t\022\017\n\007qdzC" +
  5901 + "ode\030\010 \001(\t\022\017\n\007qdzName\030\t \001(\t\022\017\n\007zdzCode\030\n " +
  5902 + "\001(\t\022\017\n\007zdzName\030\013 \001(\t\022\014\n\004fcsj\030\014 \001(\t\022\013\n\003bc" +
  5903 + "s\030\r \001(\r\022\014\n\004jhlc\030\016 \001(\001\022\014\n\004bcsj\030\017 \001(\r\022\016\n\006b" +
  5904 + "cType\030\020 \001(\t\022\014\n\004isFB\030\021 \001(\010\022\014\n\004isTS\030\022 \001(\010\022" +
  5905 + "\016\n\006remark\030\023 \001(\t\022\023\n\013lineVersion\030\024 \001(\rB1\n\037" +
  5906 + "com.bsth.service.schedule.utilsB\016TimeTab" +
  5907 + "leProtob\006proto3"
5741 }; 5908 };
5742 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 5909 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
5743 new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 5910 new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -5756,13 +5923,13 @@ public final class TimeTableProto { @@ -5756,13 +5923,13 @@ public final class TimeTableProto {
5756 internal_static_timetable_TTInfo_fieldAccessorTable = new 5923 internal_static_timetable_TTInfo_fieldAccessorTable = new
5757 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 5924 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
5758 internal_static_timetable_TTInfo_descriptor, 5925 internal_static_timetable_TTInfo_descriptor,
5759 - new java.lang.String[] { "Id", "Name", "Xl", "XlName", "XlDir", "Qyrq", "IsEnableDisTemplate", "IsCancel", "RuleDays", "SpecialDays", "CreateUser", "CreateUserName", "UpdateUser", "UpdateUserName", "CreateDate", "UpdateDate", "BcInfo", }); 5926 + new java.lang.String[] { "Id", "Name", "Xl", "XlName", "XlDir", "Qyrq", "IsEnableDisTemplate", "IsCancel", "RuleDays", "SpecialDays", "CreateUser", "CreateUserName", "UpdateUser", "UpdateUserName", "CreateDate", "UpdateDate", "BcInfo", "LineVersion", });
5760 internal_static_timetable_TTInfoDetail_descriptor = 5927 internal_static_timetable_TTInfoDetail_descriptor =
5761 getDescriptor().getMessageTypes().get(1); 5928 getDescriptor().getMessageTypes().get(1);
5762 internal_static_timetable_TTInfoDetail_fieldAccessorTable = new 5929 internal_static_timetable_TTInfoDetail_fieldAccessorTable = new
5763 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 5930 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
5764 internal_static_timetable_TTInfoDetail_descriptor, 5931 internal_static_timetable_TTInfoDetail_descriptor,
5765 - new java.lang.String[] { "Id", "Xl", "XlName", "Lp", "LpName", "Fcno", "XlDir", "QdzCode", "QdzName", "ZdzCode", "ZdzName", "Fcsj", "Bcs", "Jhlc", "Bcsj", "BcType", "IsFB", "IsTS", "Remark", }); 5932 + new java.lang.String[] { "Id", "Xl", "XlName", "Lp", "LpName", "Fcno", "XlDir", "QdzCode", "QdzName", "ZdzCode", "ZdzName", "Fcsj", "Bcs", "Jhlc", "Bcsj", "BcType", "IsFB", "IsTS", "Remark", "LineVersion", });
5766 } 5933 }
5767 5934
5768 // @@protoc_insertion_point(outer_class_scope) 5935 // @@protoc_insertion_point(outer_class_scope)
src/main/resources/static/pages/base/geo_data_edit/css/mian.css
1 -/* ^_^ baidu map hide logo */  
2 -.anchorBL, .anchorBL, .amap-logo, .amap-copyright {  
3 - display: none;  
4 -}  
5 -  
6 -html,body{  
7 - height: 100%;  
8 -}  
9 -.ct_page{  
10 - padding: 0;  
11 - height: 100%;  
12 -}  
13 -  
14 -div#map_wrap{  
15 - height: 100%;  
16 -}  
17 -  
18 -.main_left_panel{  
19 - position: absolute;  
20 - z-index: 999;  
21 - height: calc(100% - 20px);  
22 - width: 310px;  
23 - background: #fffffff5;  
24 - top: 7px;  
25 - left: 5px;  
26 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
27 -}  
28 -.main_lt_search_panel{  
29 - position: absolute;  
30 - z-index: 99;  
31 - top: 10px;  
32 - left: 330px;  
33 -}  
34 -.main_rt_tools_panel{  
35 - position: absolute;  
36 - z-index: 99;  
37 - top: 20px;  
38 - right: 77px;  
39 - background: #ffffff;  
40 - box-shadow: -5px 4px 15px rgba(90, 90, 90, 0.48);  
41 - padding: 0 12px;  
42 - text-align: center;  
43 - border-radius: 7px;  
44 - height: 28px;  
45 -}  
46 -  
47 -.main_rt_tools_panel>._icon{  
48 - margin: 0 9px;  
49 -}  
50 -.search_input{  
51 - width: 250px;  
52 - height: 42px;  
53 -}  
54 -  
55 -.search_input::placeholder{  
56 - color: grey;  
57 - font-size: 12px;  
58 -}  
59 -  
60 -._line_info{  
61 - width: 100%;  
62 - height: 80px;  
63 - background: white;  
64 - box-shadow: 0px -2px 15px rgba(90, 90, 90, 0.48);  
65 -}  
66 -  
67 -._line_name{  
68 - padding: 10px 0 0 15px;  
69 - font-weight: 600;  
70 - font-family: 微软雅黑;  
71 - font-size: 18px;  
72 - color: #484848;  
73 - position: relative;  
74 -}  
75 -  
76 -._version_dropdown_wrap{  
77 - padding: 4px 0 0 15px;  
78 -}  
79 -._version_text{  
80 - font-size: 14px;  
81 - color: #0aae0a;  
82 -}  
83 -._version_dropdown_wrap li.uk-active>a{  
84 - color: #0aae0a;  
85 -}  
86 -.uk-nav-header:not(:first-child) {  
87 - margin-top: 10px;  
88 -}  
89 -.add_line_version_icon{  
90 - position: absolute;  
91 - right: 18px;  
92 - top: 10px;  
93 -}  
94 -.clock_enable_version{  
95 - padding: 4px 0 0 15px;  
96 - font-size: 13px;  
97 - color: #ef4f4f;  
98 -}  
99 -  
100 -.clock_enable_version>a.uk-icon{  
101 - vertical-align: top;  
102 - margin-top: 6px;  
103 -}  
104 -._route_info_wrap{  
105 - height: calc(100% - 90px);  
106 - padding-top: 10px;  
107 -}  
108 -  
109 -._route_info_wrap .uk-tab>li>a{  
110 - padding: 9px 5px;  
111 -}  
112 -._route_info_wrap>ul.uk-tab{  
113 - padding-left: 10px;  
114 - margin-bottom: 0;  
115 -}  
116 -.rt_show_version_txt{  
117 - position: absolute;  
118 - right: 7px;  
119 - bottom: 7px;  
120 - font-size: 12px;  
121 -}  
122 -.rt_show_version_txt{  
123 - position: absolute;  
124 - right: 7px;  
125 - bottom: 7px;  
126 - font-size: 12px;  
127 - padding: 5px 8px;  
128 -}  
129 -.station_route>ul{  
130 - padding: 0 0 0 30px;  
131 - font-size: 14px;  
132 - width: calc(100% - 38px);  
133 -}  
134 -  
135 -.up_down_route_list ul.uk-list>li:nth-child(n+2), .uk-list>li>ul {  
136 - margin-top: 0;  
137 -}  
138 -  
139 -.station_route>ul>li>a{  
140 - color: #434343;  
141 - overflow: hidden;  
142 - text-overflow: ellipsis;  
143 - white-space: nowrap;  
144 - display: inline-block;  
145 - width: calc(100% - 53px);  
146 - padding: 4px 0;  
147 - vertical-align: middle;+0982/  
148 -}  
149 -  
150 -.ct_route_badge{  
151 - font-size: 11px;  
152 - height: 18px;  
153 - border-radius: 5px;  
154 - vertical-align: top;  
155 - margin-top: 1px;  
156 - padding: 0 4px;  
157 - margin-right: 3px;  
158 - min-width: 18px;  
159 -}  
160 -  
161 -.up_down_route_list>li:nth-of-type(2) .ct_route_badge{  
162 - background: #fb6464;  
163 -}  
164 -  
165 -.ct_route_badge.start{  
166 - margin-left: 0px;  
167 -}  
168 -.ct_route_badge.end{  
169 - margin-left: 0px;  
170 -}  
171 -.road_route{  
172 - padding-left: 30px;  
173 - width: calc(100% - 25px);  
174 - font-size: 14px;  
175 - color: #242424;  
176 - border-top: 1px solid #d5d5d5;  
177 - padding-top: 0;  
178 -}  
179 -._route_info_wrap>ul.uk-switcher{  
180 - overflow: auto;  
181 - height: calc(100% - 62px);  
182 - margin-bottom: 0;  
183 - position: relative;  
184 - padding-top: 20px;  
185 - margin-top: 0 !important;  
186 -}  
187 -  
188 -.pos_tb_icon{  
189 - position: absolute;  
190 - bottom: 15px;  
191 - right: 15px;  
192 -}  
193 -.ct_route_badge_wrap{  
194 - display: inline-block;  
195 - width: 48px;  
196 - text-align: right;  
197 - vertical-align: top;  
198 - margin-top: 3px;  
199 -}  
200 -  
201 -.road_route>ul li a{  
202 - color: #242424;  
203 - width: 100%;  
204 - display: block;  
205 - padding-left: 8px;  
206 -}  
207 -  
208 -.road_route>ul{  
209 - border-left: 1px solid #cbcbcb;  
210 - padding-left: 0;  
211 - padding-top: 10px;  
212 -}  
213 -  
214 -span.sub_name {  
215 - font-size: 12px;  
216 - color: #777676;  
217 - margin-left: 5px;  
218 -}  
219 -  
220 -.road_route>ul>li{  
221 - width: calc(100% - 10px);  
222 - overflow: hidden;  
223 - text-overflow: ellipsis;  
224 - white-space: nowrap;  
225 - display: inline-block;  
226 -}  
227 -  
228 -#map_wrap img {  
229 - max-width: none;  
230 -}  
231 -  
232 -ul.uk-list.station_info_win {  
233 - font-size: 14px;  
234 - padding-left: 5px;  
235 -}  
236 -  
237 -.uk-list.station_info_win>li:nth-child(n+2), .uk-list.station_info_win>li>ul {  
238 - margin-top: 7px;  
239 -}  
240 -  
241 -ul.uk-list.station_info_win>li.s_name{  
242 - font-size: 16px;  
243 - font-weight: 600;  
244 - color: #e15428;  
245 -}  
246 -  
247 -.up_down_route_list li.ct_active{  
248 - background: #91d9fa;  
249 -}  
250 -  
251 -.up_down_route_list li.ct_active.f_r_a{  
252 - background: #fff;  
253 -}  
254 -  
255 -.up_down_route_list li.ct_active.f_r_a>a{  
256 - background: #91d9fa;  
257 -}  
258 -  
259 -.road_route .uk-list ul{  
260 - padding-left: 0;  
261 -}  
262 -  
263 -.road_route>ul>li>ul>li{  
264 - padding-left: 22px;  
265 -}  
266 -  
267 -.ct_coord_str{  
268 - max-height: 300px;  
269 - overflow: auto;  
270 -}  
271 -  
272 -ul.context-menu-list.station-route-ct-menu.context-menu-root {  
273 - font-size: 14px;  
274 - width: 170px !important;  
275 - min-width: 70px;  
276 - border: 1px solid #d2d2d2;  
277 - overflow: hidden;  
278 - border-radius: 0;  
279 - background: #fff;  
280 - color: #666;  
281 - box-shadow: 0 5px 12px rgba(0,0,0,.15);  
282 -}  
283 -  
284 -.main_left_panel_m_layer{  
285 - position: absolute;  
286 - z-index: 10000;  
287 - height: calc(100% - 20px);  
288 - width: 300px;  
289 - background: #ffffff85;  
290 - top: 7px;  
291 - left: 5px;  
292 - display: none;  
293 -}  
294 -  
295 -.buffer_edit_panel{  
296 - position: absolute;  
297 - top: 5px;  
298 - width: 390px;  
299 - height: 120px;  
300 - background: #ffffff;  
301 - left: calc(50% - 170px);  
302 - z-index: 999;  
303 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
304 - display: none;  
305 -}  
306 -.buffer_edit_body{  
307 - padding: 5px 0 0 15px;  
308 -}  
309 -  
310 -.buffer_edit_body>.name{  
311 - font-weight: 600;  
312 - color: #E91E63;  
313 - margin-bottom: 0;  
314 -}  
315 -  
316 -.buffer_edit_body .ct_row .uk-inline{  
317 - width: 175px;  
318 - height: 30px;  
319 - margin-right: 7px;  
320 -}  
321 -  
322 -.buffer_edit_body .ct_row{  
323 - margin-top: 12px;  
324 -}  
325 -  
326 -.buffer_edit_body .ct_row .uk-inline:last-child{  
327 - margin-right: 0;  
328 -}  
329 -  
330 -.buffer_edit_body .ct_row .uk-inline input{  
331 - height: 30px;  
332 -}  
333 -  
334 -.buffer_edit_body .ct_row .uk-form-icon-flip {  
335 - font-size: 12px;  
336 -}  
337 -  
338 -.buffer_edit_body .ct_row .uk-inline.btns{  
339 - text-align: right;  
340 -}  
341 -.buffer_edit_body .ct_row .uk-inline.btns .uk-button{  
342 - padding: 0 15px;  
343 - height: 28px;  
344 - line-height: 28px;  
345 - vertical-align: top;  
346 - margin-top: 2px;  
347 -}  
348 -  
349 -.loading{  
350 - height: 100%;  
351 - text-align: center;  
352 - position: absolute;  
353 - z-index: 10000;  
354 - top: 0;  
355 - left: 0;  
356 - width: 100%;  
357 - background: #ffffff78;  
358 - display: flex;  
359 -}  
360 -  
361 -.loading>div{  
362 - margin: auto;  
363 - margin-top: calc(25% - 100px);  
364 - background: #f9d56c;  
365 - padding: 12px;  
366 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
367 -}  
368 -  
369 -.loading>div>span{  
370 - vertical-align: top;  
371 - margin-top: -6px;  
372 - margin-right: 5px;  
373 - font-size: 14px;  
374 -}  
375 -.uk-modal{  
376 - z-index: 10001;  
377 -}  
378 -  
379 -.ct_route_badge.polygon{  
380 -  
381 -}  
382 -  
383 -.shapes_type>div.uk-inline:nth-of-type(2){  
384 - width: 80px;  
385 - margin-right: 0;  
386 -}  
387 -  
388 -.shapes_type>div.uk-inline:first-child{  
389 - width: 84px;  
390 -}  
391 -  
392 -.shapes_type>div.uk-inline:first-child select{  
393 - height: 30px;  
394 -}  
395 -  
396 -.shapes_type.st_d>div.uk-inline:nth-of-type(2){  
397 - display: none;  
398 -}  
399 -  
400 -.shapes_type.st_d>div.uk-inline:first-child{  
401 - width: 167px;  
402 -}  
403 -  
404 -.draw_polygon_switch{  
405 - display: none;  
406 -}  
407 -  
408 -.shapes_type.st_d>div.uk-inline:first-child select{  
409 - width: 107px;  
410 -}  
411 -  
412 -.shapes_type.st_d .draw_polygon_switch{  
413 - display: inline-block;  
414 - font-size: 12px;  
415 - vertical-align: bottom;  
416 - margin-left: 5px;  
417 -}  
418 -  
419 -.shapes_type.st_d .draw_polygon_switch>a{  
420 - color: red;  
421 -}  
422 -  
423 -.ul_li_input{  
424 - display: inline-block;  
425 - padding: 4px 0;  
426 - width: calc(100% - 53px);  
427 - background: #f7f7f7;  
428 -}  
429 -  
430 -.ul_li_input input{  
431 - width: 140px;  
432 - height: 28px;  
433 - margin-left: 5px;  
434 -}  
435 -  
436 -.save_icon_btn{  
437 - color: #2121d1;  
438 - margin-right: 4px;  
439 -}  
440 -  
441 -.ul_li_input .uk-icon:hover{  
442 - background: #dfdfdf;  
443 -}  
444 -  
445 -.station_li_transient .ct_route_badge{  
446 - background: #ddcd3f;  
447 - vertical-align: middle;  
448 -}  
449 -  
450 -.station_li_transient .search_point_icon_btn{  
451 - color: #FF9800;  
452 - margin-right: 5px;  
453 -}  
454 -  
455 -.station_route ._edit_name .ct_route_badge{  
456 - vertical-align: middle;  
457 -}  
458 -  
459 -.add_station_search_point_wrap{  
460 - width: 390px;  
461 - height: 126px;  
462 - position: absolute;  
463 - top: 10px;  
464 - left: calc(50% - 200px);  
465 - z-index: 999;  
466 - background: #ffface;  
467 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
468 -}  
469 -  
470 -.add_station_search_point_wrap ._title {  
471 - text-align: center;  
472 - font-size: 17px;  
473 - color: #2b2b2b;  
474 - padding: 2px 0 0 0;  
475 - font-weight: 600;  
476 -}  
477 -  
478 -.add_station_search_point_wrap .buffer_edit_body .ct_row {  
479 - margin-top: 8px;  
480 -}  
481 -  
482 -.road_edit_panel{  
483 - position: absolute;  
484 - z-index: 999;  
485 - top: 10px;  
486 - left: calc(50% - 190px);  
487 - width: 380px;  
488 - background: #fff;  
489 - height: 120px;  
490 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
491 -}  
492 -  
493 -.road_li_transient .ul_li_input input:first-child{  
494 - width: 110px;  
495 - margin-left: 2px;  
496 -}  
497 -  
498 -.road_li_transient .ul_li_input input:nth-of-type(2){  
499 - width: 100px;  
500 - margin-left: 0;  
501 - font-size: 12px;  
502 -}  
503 -  
504 -.bks_list li.road_li_transient{  
505 - margin-left: -15px;  
506 -}  
507 -  
508 -.road_li_transient .search_point_icon_btn {  
509 - color: #FF9800;  
510 - margin-right: 5px;  
511 -}  
512 -  
513 -.road_li_transient .ul_li_input{  
514 - width: 100%;  
515 -  
516 -}  
517 -  
518 -.road_li_transient .ul_li_input input{  
519 - color: #c5862a;  
520 -}  
521 -  
522 -  
523 -.add_road_search_point_wrap{  
524 - width: 390px;  
525 - height: 120px;  
526 - position: absolute;  
527 - top: 10px;  
528 - left: calc(50% - 200px);  
529 - z-index: 999;  
530 - background: #ffface;  
531 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
532 -}  
533 -  
534 -.add_road_search_point_wrap ._title {  
535 - text-align: center;  
536 - font-size: 17px;  
537 - color: #2b2b2b;  
538 - padding: 2px 0 0 0;  
539 - font-weight: 600;  
540 -}  
541 -  
542 -.add_road_search_point_wrap .buffer_edit_body .ct_row {  
543 - margin-top: 8px;  
544 -}  
545 -  
546 -.draw_polyline_switch{  
547 - display: inline-block;  
548 - font-size: 12px;  
549 - vertical-align: bottom;  
550 - margin-left: 5px;  
551 -}  
552 -  
553 -.draw_polyline_switch>a{  
554 - color: red;  
555 -}  
556 -  
557 -.ct_search_input::placeholder{  
558 - font-size: 13px;  
559 -}  
560 -  
561 -.ct_search_result>ul.s_list ._title{  
562 - display: block;  
563 - color: #009688;  
564 - font-size: 14px;  
565 -}  
566 -  
567 -.ct_search_result>ul.s_list ._address{  
568 - font-size: 12px;  
569 -}  
570 -  
571 -.ct_s_i_wrap{  
572 - box-shadow: 0px 4px 12px rgba(145, 145, 145, 0.48);  
573 -}  
574 -  
575 -.ct_search_result{  
576 - background: #fff;  
577 - margin-top: 10px;  
578 - box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);  
579 - max-width: 300px;  
580 -}  
581 -  
582 -.ct_search_result .s_list>li{  
583 - padding: 5px 15px;  
584 - cursor: pointer;  
585 - margin-top: 0;  
586 -  
587 - overflow: hidden;  
588 - text-overflow: ellipsis;  
589 - white-space: nowrap;  
590 -}  
591 -  
592 -.ct_search_result .s_list>li:hover{  
593 - background: #e1e1e1;  
594 -}  
595 -  
596 -.ct_search_result ._empty{  
597 - font-size: 12px;  
598 - color: #656464;  
599 -}  
600 -  
601 -.ct_search_result .uk-icon{  
602 - cursor: pointer;  
603 -}  
604 -  
605 -.main_lt_search_panel .uk-form-icon:not(a):not(button):not(input){  
606 - pointer-events: auto;  
607 -}  
608 -  
609 -#add_line_versions_modal form.uk-form-horizontal .uk-form-label{  
610 - width: 100px !important;  
611 -}  
612 -  
613 -#add_line_versions_modal form.uk-form-horizontal .uk-form-controls{  
614 - margin-left: 115px; 1 +/* ^_^ baidu map hide logo */
  2 +.anchorBL, .anchorBL, .amap-logo, .amap-copyright {
  3 + display: none;
  4 +}
  5 +
  6 +html,body{
  7 + height: 100%;
  8 +}
  9 +.ct_page{
  10 + padding: 0;
  11 + height: 100%;
  12 +}
  13 +
  14 +div#map_wrap{
  15 + height: 100%;
  16 +}
  17 +
  18 +.main_left_panel{
  19 + position: absolute;
  20 + z-index: 999;
  21 + height: calc(100% - 20px);
  22 + width: 310px;
  23 + background: #fffffff5;
  24 + top: 7px;
  25 + left: 5px;
  26 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  27 +}
  28 +.main_lt_search_panel{
  29 + position: absolute;
  30 + z-index: 99;
  31 + top: 10px;
  32 + left: 330px;
  33 +}
  34 +.main_rt_tools_panel{
  35 + position: absolute;
  36 + z-index: 99;
  37 + top: 20px;
  38 + right: 77px;
  39 + background: #ffffff;
  40 + box-shadow: -5px 4px 15px rgba(90, 90, 90, 0.48);
  41 + padding: 0 12px;
  42 + text-align: center;
  43 + border-radius: 7px;
  44 + height: 28px;
  45 +}
  46 +
  47 +.main_rt_tools_panel>._icon{
  48 + margin: 0 9px;
  49 +}
  50 +.search_input{
  51 + width: 250px;
  52 + height: 42px;
  53 +}
  54 +
  55 +.search_input::placeholder{
  56 + color: grey;
  57 + font-size: 12px;
  58 +}
  59 +
  60 +._line_info{
  61 + width: 100%;
  62 + height: 80px;
  63 + background: white;
  64 + box-shadow: 0px -2px 15px rgba(90, 90, 90, 0.48);
  65 +}
  66 +
  67 +._line_name{
  68 + padding: 10px 0 0 15px;
  69 + font-weight: 600;
  70 + font-family: 微软雅黑;
  71 + font-size: 18px;
  72 + color: #484848;
  73 + position: relative;
  74 +}
  75 +
  76 +._version_dropdown_wrap{
  77 + padding: 4px 0 0 15px;
  78 +}
  79 +._version_text{
  80 + font-size: 14px;
  81 + color: #0aae0a;
  82 +}
  83 +._version_dropdown_wrap li.uk-active>a{
  84 + color: #0aae0a;
  85 +}
  86 +.uk-nav-header:not(:first-child) {
  87 + margin-top: 10px;
  88 +}
  89 +.add_line_version_icon{
  90 + position: absolute;
  91 + right: 18px;
  92 + top: 10px;
  93 +}
  94 +.clock_enable_version{
  95 + padding: 4px 0 0 15px;
  96 + font-size: 13px;
  97 + color: #ef4f4f;
  98 +}
  99 +
  100 +.clock_enable_version>a.uk-icon{
  101 + vertical-align: top;
  102 + margin-top: 6px;
  103 +}
  104 +._route_info_wrap{
  105 + height: calc(100% - 90px);
  106 + padding-top: 10px;
  107 +}
  108 +
  109 +._route_info_wrap .uk-tab>li>a{
  110 + padding: 9px 5px;
  111 +}
  112 +._route_info_wrap>ul.uk-tab{
  113 + padding-left: 10px;
  114 + margin-bottom: 0;
  115 +}
  116 +.rt_show_version_txt{
  117 + position: absolute;
  118 + right: 7px;
  119 + bottom: 7px;
  120 + font-size: 12px;
  121 +}
  122 +.rt_show_version_txt{
  123 + position: absolute;
  124 + right: 7px;
  125 + bottom: 7px;
  126 + font-size: 12px;
  127 + padding: 5px 8px;
  128 +}
  129 +.station_route>ul{
  130 + padding: 0 0 0 30px;
  131 + font-size: 14px;
  132 + width: calc(100% - 38px);
  133 +}
  134 +
  135 +.up_down_route_list ul.uk-list>li:nth-child(n+2), .uk-list>li>ul {
  136 + margin-top: 0;
  137 +}
  138 +
  139 +.station_route>ul>li>a{
  140 + color: #434343;
  141 + overflow: hidden;
  142 + text-overflow: ellipsis;
  143 + white-space: nowrap;
  144 + display: inline-block;
  145 + width: calc(100% - 53px);
  146 + padding: 4px 0;
  147 + vertical-align: middle;+0982/
  148 +}
  149 +
  150 +.ct_route_badge{
  151 + font-size: 11px;
  152 + height: 18px;
  153 + border-radius: 5px;
  154 + vertical-align: top;
  155 + margin-top: 1px;
  156 + padding: 0 4px;
  157 + margin-right: 3px;
  158 + min-width: 18px;
  159 +}
  160 +
  161 +.up_down_route_list>li:nth-of-type(2) .ct_route_badge{
  162 + background: #fb6464;
  163 +}
  164 +
  165 +.ct_route_badge.start{
  166 + margin-left: 0px;
  167 +}
  168 +.ct_route_badge.end{
  169 + margin-left: 0px;
  170 +}
  171 +.road_route{
  172 + padding-left: 30px;
  173 + width: calc(100% - 25px);
  174 + font-size: 14px;
  175 + color: #242424;
  176 + border-top: 1px solid #d5d5d5;
  177 + padding-top: 0;
  178 +}
  179 +._route_info_wrap>ul.uk-switcher{
  180 + overflow: auto;
  181 + height: calc(100% - 62px);
  182 + margin-bottom: 0;
  183 + position: relative;
  184 + padding-top: 20px;
  185 + margin-top: 0 !important;
  186 +}
  187 +
  188 +.pos_tb_icon{
  189 + position: absolute;
  190 + bottom: 15px;
  191 + right: 15px;
  192 +}
  193 +.ct_route_badge_wrap{
  194 + display: inline-block;
  195 + width: 48px;
  196 + text-align: right;
  197 + vertical-align: top;
  198 + margin-top: 3px;
  199 +}
  200 +
  201 +.road_route>ul li a{
  202 + color: #242424;
  203 + width: 100%;
  204 + display: block;
  205 + padding-left: 8px;
  206 +}
  207 +
  208 +.road_route>ul{
  209 + border-left: 1px solid #cbcbcb;
  210 + padding-left: 0;
  211 + padding-top: 10px;
  212 +}
  213 +
  214 +span.sub_name {
  215 + font-size: 12px;
  216 + color: #777676;
  217 + margin-left: 5px;
  218 +}
  219 +
  220 +.road_route>ul>li{
  221 + width: calc(100% - 10px);
  222 + overflow: hidden;
  223 + text-overflow: ellipsis;
  224 + white-space: nowrap;
  225 + display: inline-block;
  226 +}
  227 +
  228 +#map_wrap img {
  229 + max-width: none;
  230 +}
  231 +
  232 +ul.uk-list.station_info_win {
  233 + font-size: 14px;
  234 + padding-left: 5px;
  235 +}
  236 +
  237 +.uk-list.station_info_win>li:nth-child(n+2), .uk-list.station_info_win>li>ul {
  238 + margin-top: 7px;
  239 +}
  240 +
  241 +ul.uk-list.station_info_win>li.s_name{
  242 + font-size: 16px;
  243 + font-weight: 600;
  244 + color: #e15428;
  245 +}
  246 +
  247 +.up_down_route_list li.ct_active{
  248 + background: #91d9fa;
  249 +}
  250 +
  251 +.up_down_route_list li.ct_active.f_r_a{
  252 + background: #fff;
  253 +}
  254 +
  255 +.up_down_route_list li.ct_active.f_r_a>a{
  256 + background: #91d9fa;
  257 +}
  258 +
  259 +.road_route .uk-list ul{
  260 + padding-left: 0;
  261 +}
  262 +
  263 +.road_route>ul>li>ul>li{
  264 + padding-left: 22px;
  265 +}
  266 +
  267 +.ct_coord_str{
  268 + max-height: 300px;
  269 + overflow: auto;
  270 +}
  271 +
  272 +ul.context-menu-list.station-route-ct-menu.context-menu-root {
  273 + font-size: 14px;
  274 + width: 170px !important;
  275 + min-width: 70px;
  276 + border: 1px solid #d2d2d2;
  277 + overflow: hidden;
  278 + border-radius: 0;
  279 + background: #fff;
  280 + color: #666;
  281 + box-shadow: 0 5px 12px rgba(0,0,0,.15);
  282 +}
  283 +
  284 +.main_left_panel_m_layer{
  285 + position: absolute;
  286 + z-index: 10000;
  287 + height: calc(100% - 20px);
  288 + width: 300px;
  289 + background: #ffffff85;
  290 + top: 7px;
  291 + left: 5px;
  292 + display: none;
  293 +}
  294 +
  295 +.buffer_edit_panel{
  296 + position: absolute;
  297 + top: 5px;
  298 + width: 390px;
  299 + height: 120px;
  300 + background: #ffffff;
  301 + left: calc(50% - 170px);
  302 + z-index: 999;
  303 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  304 + display: none;
  305 +}
  306 +.buffer_edit_body{
  307 + padding: 5px 0 0 15px;
  308 +}
  309 +
  310 +.buffer_edit_body>.name{
  311 + font-weight: 600;
  312 + color: #E91E63;
  313 + margin-bottom: 0;
  314 +}
  315 +
  316 +.buffer_edit_body .ct_row .uk-inline{
  317 + width: 175px;
  318 + height: 30px;
  319 + margin-right: 7px;
  320 +}
  321 +
  322 +.buffer_edit_body .ct_row{
  323 + margin-top: 12px;
  324 +}
  325 +
  326 +.buffer_edit_body .ct_row .uk-inline:last-child{
  327 + margin-right: 0;
  328 +}
  329 +
  330 +.buffer_edit_body .ct_row .uk-inline input{
  331 + height: 30px;
  332 +}
  333 +
  334 +.buffer_edit_body .ct_row .uk-form-icon-flip {
  335 + font-size: 12px;
  336 +}
  337 +
  338 +.buffer_edit_body .ct_row .uk-inline.btns{
  339 + text-align: right;
  340 +}
  341 +.buffer_edit_body .ct_row .uk-inline.btns .uk-button{
  342 + padding: 0 15px;
  343 + height: 28px;
  344 + line-height: 28px;
  345 + vertical-align: top;
  346 + margin-top: 2px;
  347 +}
  348 +
  349 +.loading{
  350 + height: 100%;
  351 + text-align: center;
  352 + position: absolute;
  353 + z-index: 10000;
  354 + top: 0;
  355 + left: 0;
  356 + width: 100%;
  357 + background: #ffffff78;
  358 + display: flex;
  359 +}
  360 +
  361 +.loading>div{
  362 + margin: auto;
  363 + margin-top: calc(25% - 100px);
  364 + background: #f9d56c;
  365 + padding: 12px;
  366 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  367 +}
  368 +
  369 +.loading>div>span{
  370 + vertical-align: top;
  371 + margin-top: -6px;
  372 + margin-right: 5px;
  373 + font-size: 14px;
  374 +}
  375 +.uk-modal{
  376 + z-index: 10001;
  377 +}
  378 +
  379 +.ct_route_badge.polygon{
  380 +
  381 +}
  382 +
  383 +.shapes_type>div.uk-inline:nth-of-type(2){
  384 + width: 80px;
  385 + margin-right: 0;
  386 +}
  387 +
  388 +.shapes_type>div.uk-inline:first-child{
  389 + width: 84px;
  390 +}
  391 +
  392 +.shapes_type>div.uk-inline:first-child select{
  393 + height: 30px;
  394 +}
  395 +
  396 +.shapes_type.st_d>div.uk-inline:nth-of-type(2){
  397 + display: none;
  398 +}
  399 +
  400 +.shapes_type.st_d>div.uk-inline:first-child{
  401 + width: 167px;
  402 +}
  403 +
  404 +.draw_polygon_switch{
  405 + display: none;
  406 +}
  407 +
  408 +.shapes_type.st_d>div.uk-inline:first-child select{
  409 + width: 107px;
  410 +}
  411 +
  412 +.shapes_type.st_d .draw_polygon_switch{
  413 + display: inline-block;
  414 + font-size: 12px;
  415 + vertical-align: bottom;
  416 + margin-left: 5px;
  417 +}
  418 +
  419 +.shapes_type.st_d .draw_polygon_switch>a{
  420 + color: red;
  421 +}
  422 +
  423 +.ul_li_input{
  424 + display: inline-block;
  425 + padding: 4px 0;
  426 + width: calc(100% - 53px);
  427 + background: #f7f7f7;
  428 +}
  429 +
  430 +.ul_li_input input{
  431 + width: 140px;
  432 + height: 28px;
  433 + margin-left: 5px;
  434 +}
  435 +
  436 +.save_icon_btn{
  437 + color: #2121d1;
  438 + margin-right: 4px;
  439 +}
  440 +
  441 +.ul_li_input .uk-icon:hover{
  442 + background: #dfdfdf;
  443 +}
  444 +
  445 +.station_li_transient .ct_route_badge{
  446 + background: #ddcd3f;
  447 + vertical-align: middle;
  448 +}
  449 +
  450 +.station_li_transient .search_point_icon_btn{
  451 + color: #FF9800;
  452 + margin-right: 5px;
  453 +}
  454 +
  455 +.station_route ._edit_name .ct_route_badge{
  456 + vertical-align: middle;
  457 +}
  458 +
  459 +.add_station_search_point_wrap{
  460 + width: 390px;
  461 + height: 126px;
  462 + position: absolute;
  463 + top: 10px;
  464 + left: calc(50% - 200px);
  465 + z-index: 999;
  466 + background: #ffface;
  467 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  468 +}
  469 +
  470 +.add_station_search_point_wrap ._title {
  471 + text-align: center;
  472 + font-size: 17px;
  473 + color: #2b2b2b;
  474 + padding: 2px 0 0 0;
  475 + font-weight: 600;
  476 +}
  477 +
  478 +.add_station_search_point_wrap .buffer_edit_body .ct_row {
  479 + margin-top: 8px;
  480 +}
  481 +
  482 +.road_edit_panel{
  483 + position: absolute;
  484 + z-index: 999;
  485 + top: 10px;
  486 + left: calc(50% - 190px);
  487 + width: 380px;
  488 + background: #fff;
  489 + height: 120px;
  490 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  491 +}
  492 +
  493 +.road_li_transient .ul_li_input input:first-child{
  494 + width: 110px;
  495 + margin-left: 2px;
  496 +}
  497 +
  498 +.road_li_transient .ul_li_input input:nth-of-type(2){
  499 + width: 100px;
  500 + margin-left: 0;
  501 + font-size: 12px;
  502 +}
  503 +
  504 +.bks_list li.road_li_transient{
  505 + margin-left: -15px;
  506 +}
  507 +
  508 +.road_li_transient .search_point_icon_btn {
  509 + color: #FF9800;
  510 + margin-right: 5px;
  511 +}
  512 +
  513 +.road_li_transient .ul_li_input{
  514 + width: 100%;
  515 +
  516 +}
  517 +
  518 +.road_li_transient .ul_li_input input{
  519 + color: #c5862a;
  520 +}
  521 +
  522 +
  523 +.add_road_search_point_wrap{
  524 + width: 390px;
  525 + height: 120px;
  526 + position: absolute;
  527 + top: 10px;
  528 + left: calc(50% - 200px);
  529 + z-index: 999;
  530 + background: #ffface;
  531 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  532 +}
  533 +
  534 +.add_road_search_point_wrap ._title {
  535 + text-align: center;
  536 + font-size: 17px;
  537 + color: #2b2b2b;
  538 + padding: 2px 0 0 0;
  539 + font-weight: 600;
  540 +}
  541 +
  542 +.add_road_search_point_wrap .buffer_edit_body .ct_row {
  543 + margin-top: 8px;
  544 +}
  545 +
  546 +.draw_polyline_switch{
  547 + display: inline-block;
  548 + font-size: 12px;
  549 + vertical-align: bottom;
  550 + margin-left: 5px;
  551 +}
  552 +
  553 +.draw_polyline_switch>a{
  554 + color: red;
  555 +}
  556 +
  557 +.ct_search_input::placeholder{
  558 + font-size: 13px;
  559 +}
  560 +
  561 +.ct_search_result>ul.s_list ._title{
  562 + display: block;
  563 + color: #009688;
  564 + font-size: 14px;
  565 +}
  566 +
  567 +.ct_search_result>ul.s_list ._address{
  568 + font-size: 12px;
  569 +}
  570 +
  571 +.ct_s_i_wrap{
  572 + box-shadow: 0px 4px 12px rgba(145, 145, 145, 0.48);
  573 +}
  574 +
  575 +.ct_search_result{
  576 + background: #fff;
  577 + margin-top: 10px;
  578 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  579 + max-width: 300px;
  580 +}
  581 +
  582 +.ct_search_result .s_list>li{
  583 + padding: 5px 15px;
  584 + cursor: pointer;
  585 + margin-top: 0;
  586 +
  587 + overflow: hidden;
  588 + text-overflow: ellipsis;
  589 + white-space: nowrap;
  590 +}
  591 +
  592 +.ct_search_result .s_list>li:hover{
  593 + background: #e1e1e1;
  594 +}
  595 +
  596 +.ct_search_result ._empty{
  597 + font-size: 12px;
  598 + color: #656464;
  599 +}
  600 +
  601 +.ct_search_result .uk-icon{
  602 + cursor: pointer;
  603 +}
  604 +
  605 +.main_lt_search_panel .uk-form-icon:not(a):not(button):not(input){
  606 + pointer-events: auto;
  607 +}
  608 +
  609 +#add_line_versions_modal form.uk-form-horizontal .uk-form-label{
  610 + width: 100px !important;
  611 +}
  612 +
  613 +#add_line_versions_modal form.uk-form-horizontal .uk-form-controls{
  614 + margin-left: 115px;
615 } 615 }
616 \ No newline at end of file 616 \ No newline at end of file