Commit 7aa231c802bf61f75c297584635ba414008561b2

Authored by 潘钊
1 parent 692e166b

update...

src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
1 1 package com.bsth.data.car_out_info;
2 2  
3 3 import com.bsth.data.BasicData;
  4 +import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
  5 +import com.bsth.data.gpsdata_v2.entity.StationRoute;
4 6 import com.bsth.data.schedule.DayOfSchedule;
5 7 import com.bsth.data.schedule.ScheduleComparator;
6 8 import com.bsth.entity.realcontrol.ScheduleRealInfo;
... ... @@ -166,6 +168,11 @@ public class CarOutInfoHandler {
166 168 * @param list
167 169 * @return
168 170 */
  171 + private static String[] fls = new String[]{"in","out","ldks","venting","major"};
  172 + private static List<String> clearTypes;
  173 + static {
  174 + clearTypes = Arrays.asList(fls);
  175 + }
169 176 private ScheduleRealInfo[] nexts(List<ScheduleRealInfo> list) {
170 177 ScheduleRealInfo[] array = new ScheduleRealInfo[3];
171 178 Collections.sort(list, schDFSJComparator);
... ... @@ -181,11 +188,16 @@ public class CarOutInfoHandler {
181 188 continue;
182 189  
183 190 //进场、出场、2点间空驶
184   - if (sch.getBcType().equals("in")
185   - || sch.getBcType().equals("out")
186   - || sch.getBcType().equals("ldks"))
  191 + if (clearTypes.contains(sch.getBcType()))
187 192 continue;
188 193  
  194 + //区间
  195 + if (sch.getBcType().equals("region")){
  196 + //是否起点发出
  197 + if(!isStartOut(sch))
  198 + continue;
  199 + }
  200 +
189 201 //有实发实达时间的
190 202 if (StringUtils.isNotEmpty(sch.getFcsjActual())
191 203 || StringUtils.isNotEmpty(sch.getZdsjActual()))
... ... @@ -199,4 +211,30 @@ public class CarOutInfoHandler {
199 211 }
200 212 return array;
201 213 }
  214 +
  215 + private static StationRouteComp sComp = new StationRouteComp();
  216 + private boolean isStartOut(ScheduleRealInfo sch) {
  217 + try{
  218 + List<StationRoute> list = GeoCacheData.getStationRoute(sch.getXlBm(), Integer.parseInt(sch.getXlDir()));
  219 +
  220 + if(null == list && list.size() == 0)
  221 + return false;
  222 + //排序
  223 + Collections.sort(list, sComp);
  224 +
  225 + if(sch.getQdzName().equals(list.get(0).getName()))
  226 + return true;
  227 + }catch (Exception e){
  228 + logger.error("", e);
  229 + }
  230 + return false;
  231 + }
  232 +
  233 + private static class StationRouteComp implements Comparator<StationRoute> {
  234 +
  235 + @Override
  236 + public int compare(StationRoute s1, StationRoute s2) {
  237 + return s1.getRouteSort() - s2.getRouteSort();
  238 + }
  239 + }
202 240 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -1252,6 +1252,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1252 1252  
1253 1253 //入库
1254 1254 dayOfSchedule.save(sch);
  1255 + //重新计算当前执行班次
  1256 + dayOfSchedule.reCalcExecPlan(sch.getClZbh());
1255 1257 rs.put("status", ResponseCode.SUCCESS);
1256 1258 rs.put("t", sch);
1257 1259  
... ...
src/main/resources/static/pages/base/geo_data_edit/css/mian.css
... ... @@ -604,4 +604,12 @@ ul.context-menu-list.station-route-ct-menu.context-menu-root {
604 604  
605 605 .main_lt_search_panel .uk-form-icon:not(a):not(button):not(input){
606 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;
607 615 }
608 616 \ No newline at end of file
... ...
src/main/resources/static/pages/base/geo_data_edit/fragments/f_road_route.html
... ... @@ -26,13 +26,13 @@
26 26 <li>交叉路名: {{crosesRoad}}</li>
27 27 <li>路段编号:{{sectionCode}}</li>
28 28 <li>路由序号:{{sectionrouteCode}}</li>
29   - <li>坐标:
  29 + <!--<li>坐标:
30 30 <div class="ct_coord_str">
31 31 {{each bdCoords as coord i}}
32 32 <code>{{coord}}</code><br>
33 33 {{/each}}
34 34 </div>
35   - </li>
  35 + </li>-->
36 36 </ul>
37 37 </script>
38 38  
... ...
src/main/resources/static/pages/base/geo_data_edit/js/road_route.js
... ... @@ -126,6 +126,8 @@ var gb_road_route = function () {
126 126  
127 127 var addPrevId;//添加路段路由的上一个路由ID
128 128 var insert_road_before = function (road) {
  129 + isPrevEnd();
  130 +
129 131 //在之前插入路段
130 132 var cell = getRoadLI(road);
131 133  
... ... @@ -137,6 +139,8 @@ var gb_road_route = function () {
137 139 };
138 140  
139 141 var insert_road_after = function (road) {
  142 + isPrevEnd();
  143 +
140 144 //在之后插入路段
141 145 var cell = getRoadLI(road);
142 146  
... ... @@ -152,6 +156,11 @@ var gb_road_route = function () {
152 156 add_road(addCell);
153 157 };
154 158  
  159 + var isPrevEnd = function () {
  160 + if($('.up_down_route_list>li:eq('+r.directions+')>.road_route .road_li_transient').length > 0)
  161 + return UIkit.notification("你需要完成上一个路段新增!", {status: 'danger'});
  162 + };
  163 +
155 164 var add_road = function (cell) {
156 165 gb_ct_map.closeInfoWin();
157 166 //焦点
... ...
src/main/resources/static/pages/base/geo_data_edit/js/station_route.js
... ... @@ -158,13 +158,6 @@ var gb_station_route = function () {
158 158 if(event.keyCode == "13")
159 159 $('.search_point_icon_btn', addCell).trigger('click');
160 160 });
161   -
162   - /*//上一个站点的ID
163   - var $prev = addCell.prev('.s_r_item');
164   - if($prev.length > 0)
165   - addPrevId = $prev.data('id');
166   - else
167   - addPrevId = -1;*/
168 161 };
169 162  
170 163 var prevs = function (that, clazz) {
... ...
src/main/resources/static/pages/base/geo_data_edit/main.html
... ... @@ -25,7 +25,7 @@
25 25 <div class="_line_info">
26 26 <div class="_line_name">
27 27 <span></span>
28   - <a uk-icon="icon: plus" class="add_line_version_icon" title="添加一个新的线路版本" uk-tooltip></a>
  28 + <a uk-icon="icon: plus" class="add_line_version_icon" title="新增一个线路走向版本" uk-tooltip></a>
29 29 </div>
30 30 <div class="_version_dropdown_wrap">
31 31 <a class="_version_text"></a>
... ... @@ -84,6 +84,40 @@
84 84 </div>
85 85 </div>
86 86  
  87 +<div id="add_line_versions_modal" uk-modal>
  88 + <div class="uk-modal-dialog uk-modal-body">
  89 + <button class="uk-modal-close-default" type="button" uk-close></button>
  90 + <h2 class="uk-modal-title">新增线路走向版本</h2>
  91 +
  92 + <form class="uk-form-horizontal uk-margin-large">
  93 + <div class="uk-margin">
  94 + <label class="uk-form-label" for="form-horizontal-select">原因</label>
  95 + <div class="uk-form-controls">
  96 + <select class="uk-select" id="form-horizontal-select">
  97 + <option>线路改道</option>
  98 + </select>
  99 + </div>
  100 + </div>
  101 +
  102 + <div class="uk-margin">
  103 + <label class="uk-form-label" for="form-horizontal-text">启用时间</label>
  104 + <div class="uk-form-controls">
  105 + <input class="uk-input" id="form-horizontal-text" type="text" placeholder="启用改版本走向的时间">
  106 + </div>
  107 + </div>
  108 +
  109 + <div class="uk-margin">
  110 + <div class="uk-form-label">继承</div>
  111 + <div class="uk-form-controls uk-form-controls-text">
  112 + <label><input class="uk-radio" type="radio" name="radio1"> Option 01</label><br>
  113 + <label><input class="uk-radio" type="radio" name="radio1"> Option 02</label>
  114 + </div>
  115 + </div>
  116 +
  117 + </form>
  118 + </div>
  119 +</div>
  120 +
87 121 <script id="geo_d_e_search_result-temp" type="text/html">
88 122 <ul class="s_list uk-list">
89 123 {{each list as obj i}}
... ... @@ -191,6 +225,9 @@
191 225 e.stopPropagation();
192 226 return false;
193 227 });
  228 +
  229 + //$('#add_line_versions_modal').
  230 + //UIkit.modal('#add_line_versions_modal').show();
194 231 </script>
195 232  
196 233 <!--- js -->
... ...
src/main/resources/static/pages/base/line/list.html
... ... @@ -347,7 +347,7 @@
347 347 <a href="/pages/base/lineinformation/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a>
348 348 </td>
349 349 <td>
350   - <a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a>
  350 + <a href="javascript:window.localStorage.setItem('geo_data_edit_line_code' , '{{obj.lineCode}}');window.location.href='/pages/base/geo_data_edit/uk3_wrap.html';" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a>
351 351 </td>
352 352 <td>
353 353 <a href="details.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a>
... ...