Commit 03c442d35b3f1189c7798b8324b1079e1b6ed6bf

Authored by 游瑞烽
1 parent fd0524ed

线路编辑代码修改

src/main/java/com/bsth/entity/LsStationRoute.java
... ... @@ -24,83 +24,100 @@ import java.util.Date;
24 24 })
25 25 })
26 26 public class LsStationRoute {
27   -
  27 +
28 28 //站点路由ID
29 29 @Id
30 30 @GeneratedValue(strategy = GenerationType.IDENTITY)
31 31 private Integer id;
32   -
  32 +
33 33 // 站点路由序号
34 34 private Integer stationRouteCode;
35   -
  35 +
36 36 // 站点编码
37 37 private String stationCode;
38   -
  38 +
39 39 // 站点名称
40 40 private String stationName;
41   -
  41 +
42 42 // 线路编码
43 43 private String lineCode;
44   -
  44 +
45 45 /**
46   - * 站点类型
47   - *
  46 + * 图形类型
  47 + *
  48 + * ------ r:圆形
  49 + *
  50 + * ------ p:多边形
  51 + */
  52 + private String shapesType;
  53 +
  54 + // 圆形半径
  55 + private Integer radius;
  56 +
  57 + // 多边形空间WGS坐标点集合
  58 + private byte[] gPolygonGrid;
  59 +
  60 + // 多边形空间原坐标坐标点集合
  61 + private byte[] bPolygonGrid;
  62 +
  63 + /*** 站点类型
  64 + *
48 65 * ------ B:起点站
49   - *
  66 + *
50 67 * ------ Z:中途站
51   - *
  68 + *
52 69 * ------ E:终点站
53   - *
  70 + *
54 71 * ------ T:停车场
55   - *
  72 + *
56 73 */
57 74 private String stationMark;
58   -
  75 +
59 76 // 站点路由出站序号
60 77 private Integer outStationNmber;
61   -
  78 +
62 79 // 站点路由到站距离
63 80 private Double distances;
64   -
  81 +
65 82 // 站点路由到站时间
66 83 private Double toTime;
67   -
  84 +
68 85 // 首班时间
69 86 private String firstTime;
70   -
  87 +
71 88 // 末班时间
72 89 private String endTime;
73   -
  90 +
74 91 // 站点路由方向
75 92 private Integer directions;
76   -
  93 +
77 94 // 版本号
78 95 private Integer versions;
79   -
  96 +
80 97 // 是否撤销
81 98 private Integer destroy;
82   -
  99 +
83 100 // 描述
84 101 private String descriptions;
85   -
  102 +
86 103 // 创建人
87 104 private Integer createBy;
88   -
  105 +
89 106 // 修改人
90 107 private Integer updateBy;
91   -
  108 +
92 109 // 创建日期
93 110 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
94 111 private Date createDate;
95   -
  112 +
96 113 // 修改日期
97 114 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
98 115 private Date updateDate;
99   -
  116 +
100 117 // 站点信息
101 118 @ManyToOne(fetch = FetchType.LAZY)
102 119 private Station station;
103   -
  120 +
104 121 // 线路信息
105 122 @ManyToOne
106 123 private Line line;
... ... @@ -145,6 +162,38 @@ public class LsStationRoute {
145 162 this.lineCode = lineCode;
146 163 }
147 164  
  165 + public String getShapesType() {
  166 + return shapesType;
  167 + }
  168 +
  169 + public void setShapesType(String shapesType) {
  170 + this.shapesType = shapesType;
  171 + }
  172 +
  173 + public Integer getRadius() {
  174 + return radius;
  175 + }
  176 +
  177 + public void setRadius(Integer radius) {
  178 + this.radius = radius;
  179 + }
  180 +
  181 + public byte[] getgPolygonGrid() {
  182 + return gPolygonGrid;
  183 + }
  184 +
  185 + public void setgPolygonGrid(byte[] gPolygonGrid) {
  186 + this.gPolygonGrid = gPolygonGrid;
  187 + }
  188 +
  189 + public byte[] getbPolygonGrid() {
  190 + return bPolygonGrid;
  191 + }
  192 +
  193 + public void setbPolygonGrid(byte[] bPolygonGrid) {
  194 + this.bPolygonGrid = bPolygonGrid;
  195 + }
  196 +
148 197 public String getStationMark() {
149 198 return stationMark;
150 199 }
... ... @@ -200,7 +249,7 @@ public class LsStationRoute {
200 249 public void setDirections(Integer directions) {
201 250 this.directions = directions;
202 251 }
203   -
  252 +
204 253 public Integer getVersions() {
205 254 return versions;
206 255 }
... ... @@ -208,7 +257,7 @@ public class LsStationRoute {
208 257 public void setVersions(Integer versions) {
209 258 this.versions = versions;
210 259 }
211   -
  260 +
212 261 public Integer getDestroy() {
213 262 return destroy;
214 263 }
... ...
src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
... ... @@ -635,7 +635,7 @@ public class GeoDataServiceImpl implements GeoDataService {
635 635 */
636 636 private void batchInsertStation(final List<CascadeSaveStation> cssList, final int version) {
637 637 //站点
638   - jdbcTemplate.batchUpdate("insert into bsth_c_station(id, code, db_type, b_jwpoints, g_lonx, g_laty) " +
  638 + jdbcTemplate.batchUpdate("insert into bsth_c_station(id, station_code, db_type, b_jwpoints, g_lonx, g_laty) " +
639 639 " values(?,?,?,?,?,?,?,?,?,?,?,ST_GeomFromText(?))", new BatchPreparedStatementSetter() {
640 640 @Override
641 641 public void setValues(PreparedStatement ps, int i) throws SQLException {
... ... @@ -719,7 +719,7 @@ public class GeoDataServiceImpl implements GeoDataService {
719 719  
720 720 //insert 站点
721 721 long sCode = GetUIDAndCode.getStationId();
722   - jdbcTemplate.update("insert into bsth_c_station(id, code, db_type, b_jwpoints, g_lonx, g_laty) " +
  722 + jdbcTemplate.update("insert into bsth_c_station(id, station_code, db_type, b_jwpoints, g_lonx, g_laty) " +
723 723 " values(?,?,?,?,?,?)", sCode, sCode, "b", lng + " " + lat, wgsLoc.getLng(), wgsLoc.getLat());
724 724  
725 725  
... ...
src/main/resources/static/pages/base/geo_data_edit/css/mian.css
... ... @@ -175,9 +175,9 @@ a.clock_enable_version:focus{
175 175 padding: 5px 8px;
176 176 }
177 177 .station_route>ul{
178   - padding: 0 0 20px 30px;
  178 + padding: 0 0 20px 25px;
179 179 font-size: 14px;
180   - width: calc(100% - 38px);
  180 + width: calc(100% - 35px);
181 181 }
182 182  
183 183 .up_down_route_list ul.uk-list>li:nth-child(n+2), .uk-list>li>ul {
... ... @@ -543,7 +543,7 @@ ul.context-menu-list.station-route-ct-menu.context-menu-root {
543 543 }
544 544  
545 545 .road_li_transient .ul_li_input input:first-child{
546   - width: 110px;
  546 + width: 190px;
547 547 margin-left: 2px;
548 548 }
549 549  
... ...
src/main/resources/static/pages/base/geo_data_edit/fragments/f_road_route.html
... ... @@ -83,7 +83,7 @@
83 83 <div class="ul_li_input">
84 84 <form>
85 85 <input class="uk-input" value="{{sectionName}}" autocomplete="off" placeholder="路段名称" name="sectionName">
86   - <input class="uk-input" value="{{crosesRoad}}" autocomplete="off" placeholder="交叉路" name="crosesRoad">
  86 + <!--<input class="uk-input" value="{{crosesRoad}}" autocomplete="off" placeholder="交叉路" name="crosesRoad">-->
87 87 <span uk-icon="icon: location;ratio:.8" title="绘制路段" uk-tooltip class="search_point_icon_btn"></span>
88 88 <span uk-icon="icon: close;" title="取消" uk-tooltip class="cancel_icon_btn"></span>
89 89 </form>
... ...
src/main/resources/static/pages/base/geo_data_edit/js/map.js
... ... @@ -197,7 +197,7 @@ var gb_ct_map = function () {
197 197 return marker;
198 198 }
199 199  
200   - var openStationInfoWin = function (m) {debugger;
  200 + var openStationInfoWin = function (m) {
201 201 //ct_data
202 202 var win = new BMap.InfoWindow(gb_station_route.getTemps()['geo_d_e_station_info_win-temp'](m.ct_data), {offset: new BMap.Size(0, -13)});
203 203 //close event
... ... @@ -348,7 +348,6 @@ var gb_ct_map = function () {
348 348 * @param station
349 349 */
350 350 var editStationBuffer = function (s) {
351   - debugger;
352 351 map_status = 1;
353 352 map.closeInfoWindow();//关闭infoWindow
354 353 gb_station_route.clearFocus();
... ...
src/main/resources/static/pages/base/geo_data_edit/js/road_route.js
... ... @@ -12,12 +12,16 @@ var gb_road_route = function () {
12 12 temps = temp;
13 13  
14 14 //渲染
  15 + if(!road_maps[0])
  16 + road_maps[0] = [];
15 17 if(road_maps[0]){
16 18 var ups = _group(road_maps[0]);
17 19 var upHtmlStr = temps['geo_d_e_road_route-temp']({list: ups, updown: 0});
18 20 $('.up_down_route_list>li:first>.road_route').html(upHtmlStr);
19 21 }
20 22  
  23 + if(!road_maps[1])
  24 + road_maps[1] = [];
21 25 if(road_maps[1]){
22 26 var downs = _group(road_maps[1]);
23 27 var downHtmlStr = temps['geo_d_e_road_route-temp']({list: downs, updown: 1});
... ...
src/main/resources/static/pages/base/geo_data_edit/js/station_route.js
... ... @@ -83,7 +83,6 @@ var gb_station_route = function () {
83 83 // var elem = $('.up_down_route_list>li>.station_route .s_r_item[data-code='+s.stationCode+']');
84 84 var elem = $('.up_down_route_list>li>.station_route .s_r_item[data-id='+s.id+']');
85 85 elem.addClass('ct_active');
86   -debugger;
87 86 if (!isShow(elem)) {
88 87 //定位滚动条
89 88 var cont = $('.up_down_route_list'),
... ... @@ -469,7 +468,6 @@ debugger;
469 468 */
470 469 var addEnd = function (list, _newRCode) {
471 470 updateStationRouteData(list);
472   -debugger;
473 471 var upDown = list[0].directions;
474 472 var wrap = $('.up_down_route_list>li:eq('+upDown+')>.station_route');
475 473 //新增的站点路由
... ...
src/main/resources/static/pages/base/geo_data_edit/js/submit.js
... ... @@ -14,7 +14,6 @@ var gb_data_submit = function () {
14 14 var f = $(this).parents('form');
15 15 var data = f.serializeJSON();
16 16 UIkit.modal.confirm('确定保存【'+data.stationName+'】的缓冲区信息?').then(function() {
17   - debugger;
18 17 if(data.shapesType=='d'){
19 18 var polygon = gb_ct_map.getDrawPolygon();
20 19 if(null == polygon){
... ... @@ -170,13 +169,14 @@ var gb_data_submit = function () {
170 169 $(document).on('click', '#add_line_versions_modal ._submit', function (e) {
171 170 var f = $('form', '#add_line_versions_modal');
172 171 var data = f.serializeJSON();
  172 + debugger;
173 173 data.lineCode = g_line_code;
174   - if(!data.startdate || !data.name){
  174 + if(!data.startDate || !data.name){
175 175 document.getElementsByClassName('reminder_span')[0].style.visibility = 'visible';
176 176 return;
177 177 }
178 178  
179   - $('[name=startDate]', modal).on('input',document.getElementsByClassName('reminder_span')[0].style.visibility = 'hidden');
  179 + $('[name=startDate]', f).on('input',document.getElementsByClassName('reminder_span')[0].style.visibility = 'hidden');
180 180  
181 181 UIkit.modal.confirm('确定线路版本【'+data.name+'】?').then(function() {
182 182 $loadPanel.show();
... ...
src/main/resources/static/pages/base/geo_data_edit/js/version_manage.js
... ... @@ -229,8 +229,8 @@ var gb_version_manage = function () {
229 229 var showMin = "";
230 230 var showHour = "";
231 231 var showYear = Math.floor(tdoa/ 1000 / 60 / 60 / 24 / 365);
232   - var showMonth = Math.floor(tdoa/ 1000 / 60 / 60 / 24 / 30);
233   - var showDay = Math.floor(tdoa/ 1000 / 60 / 60 / 24);
  232 + var showMonth = Math.floor(tdoa/ 1000 / 60 / 60 / 24 / 30 % 12);
  233 + var showDay = Math.floor(tdoa/ 1000 / 60 / 60 / 24 % 30);
234 234 var dateStr = new StringBuffer();
235 235  
236 236 if(showYear >= 1) {
... ...
src/main/resources/static/pages/base/geo_data_edit/main.html
... ... @@ -75,8 +75,8 @@
75 75 <li><a href="javascript:;" id="batch_destroy_station" ><i class="fa fa-trash-o"></i> 撤销站点</a></li>
76 76 <li><a href="javascript:;" id="batch_destroy_section" ><i class="fa fa-trash-o"></i> 撤销路段</a></li>
77 77 <li><a href="javascript:;" id="wrench_down_dis"><i class="fa fa-wrench"></i> 设置站距</a></li>
78   - <li><a href="javascript:;" id="retweet"><i class="fa fa-retweet"></i> 切换上下行走向</a></li>
79   - <li><a href="javascript:;" id="quote_reverse_section"><i class="fa fa-long-arrow-down"></i> 引用反方向路段</a></li>
  78 + <!--<li><a href="javascript:;" id="retweet"><i class="fa fa-retweet"></i> 切换上下行走向</a></li>-->
  79 + <!--<li><a href="javascript:;" id="quote_reverse_section"><i class="fa fa-long-arrow-down"></i> 引用反方向路段</a></li>-->
80 80 </ul>
81 81 </div>
82 82 </div>
... ...
src/main/resources/static/pages/base/line/list.html
... ... @@ -235,7 +235,7 @@
235 235 <a href="/pages/base/lineinformation/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a>
236 236 </td>
237 237 <td>
238   - <a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看</a>
  238 + <!--<a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看</a>-->
239 239 <a href="javascript:window.localStorage.setItem('geo_data_edit_line_code' , '{{obj.lineCode}}');window.localStorage.removeItem('geo_data_edit_line_version');window.location.href='/pages/base/geo_data_edit/uk3_wrap.html';" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a>
240 240 </td>
241 241 <td>
... ...