Commit 41dbae8432d85cacdb0b1aedfcb2db6f2602f87a

Authored by 潘钊
1 parent a107ec2d

update

src/main/java/com/bsth/data/gpsdata/GpsRealData.java
... ... @@ -66,7 +66,7 @@ public class GpsRealData implements CommandLineRunner {
66 66 @Override
67 67 public void run(String... arg0) throws Exception {
68 68 logger.info("gpsDataLoader,20,5");
69   - //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 30, TimeUnit.SECONDS);
  69 + //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS);
70 70 }
71 71  
72 72 public void put(GpsEntity gps) {
... ...
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
... ... @@ -181,7 +181,7 @@ public class InOutStationSignalHandle extends SignalHandle{
181 181 //持久化
182 182 dayOfSchedule.save(sch);
183 183 //下发调度指令
184   - //directiveService.send60Dispatch(next, doneSum, "到站@系统");
  184 + directiveService.send60Dispatch(next, doneSum, "到站@系统");
185 185  
186 186 //准备执行下一个班次
187 187 if (next != null) {
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -130,12 +130,12 @@ public class DayOfSchedule implements CommandLineRunner {
130 130 public void run(String... arg0) throws Exception {
131 131 basicDataLoader.loadAllData();
132 132 //从数据库恢复排班
133   - dataRecovery();
  133 + //dataRecovery();
134 134  
135 135 //翻班线程
136 136 Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
137 137 //入库
138   - Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
  138 +// Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
139 139 //首班出场指令补发器
140 140 // Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS);
141 141 //班次误点扫描
... ...
src/main/resources/static/real_control_v2/css/line_schedule.css
... ... @@ -685,15 +685,17 @@ label.destroy-sch small{
685 685 border-bottom: 0;
686 686 }
687 687  
688   -i.add-temp-sch-icon{
689   - float: right;
690   - font-size: 18px;
691   - cursor: pointer;
692   - color: #4592b8;
693   - margin: 10px 15px 0;
  688 +.add-temp-sch-icon{
  689 + float: right;
  690 + margin: 0 3px 0;
  691 + padding: 0;
  692 + font-size: 13px;
  693 + text-decoration: underline;
694 694 }
695   -i.add-temp-sch-icon:hover{
696   - color: #2d7091;
  695 +
  696 +.add-temp-lp-icon{
  697 + cursor: pointer;
  698 + margin-left: 5px;
697 699 }
698 700  
699 701  
... ... @@ -1046,4 +1048,20 @@ i.signal_state_icon.uk-icon-question-circle{
1046 1048 i.signal_state_icon.uk-icon-reply{
1047 1049 color: #4134e3 !important;
1048 1050 box-shadow: none;
  1051 +}
  1052 +
  1053 +.child-task-status{
  1054 + float: right;
  1055 + font-size: 13px;
  1056 +}
  1057 +
  1058 +.child-task-status.fail{
  1059 + color: red;
  1060 + text-shadow: red 0px 0px 20px;
  1061 +}
  1062 +
  1063 +.child-task-status.fail span.calc-detail{
  1064 + font-family: Consolas,monospace,serif;
  1065 + white-space: nowrap;
  1066 + font-size: 14px;
1049 1067 }
1050 1068 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
... ... @@ -18,13 +18,17 @@
18 18 <div class="uk-form-row">
19 19 <label class="uk-form-label" style="width: 50px;">路牌</label>
20 20 <div class="uk-form-controls" style="margin-left: 51px;">
21   - <select name="lpName"></select>
  21 + <select name="lpName" style="width: 120px;"></select>
  22 + <i class="uk-icon-plus add-temp-lp-icon" title="临加路牌" data-uk-tooltip></i>
22 23 </div>
23 24 </div>
24 25 </div>
25 26 <div class="uk-width-1-3">
26 27 <div class="uk-form-row">
27   - <i class="uk-icon-plus add-temp-sch-icon" title="新增临加班次" data-uk-tooltip></i>
  28 + <!--<i class="uk-icon-plus add-temp-sch-icon" title="新增临加班次" data-uk-tooltip></i>-->
  29 + <!--<button class="uk-button uk-button-primary add-temp-sch-icon">临加班次</button>-->
  30 + <!--<a class="uk-button add-temp-sch-icon"><i class="uk-icon-plus"></i> 临加班次</a>-->
  31 + <a class="uk-button uk-button-link add-temp-sch-icon" > 临加班次</a>
28 32 </div>
29 33 </div>
30 34 </div>
... ... @@ -51,7 +55,9 @@
51 55 </div>
52 56  
53 57 <div class="uk-panel uk-panel-box uk-panel-box-secondary" style="padding-bottom: 0;">
54   - <h3 class="uk-panel-title">子任务列表</h3>
  58 + <h3 class="uk-panel-title" id="childTaskTitle">
  59 + 子任务列表
  60 + </h3>
55 61 <div class="ct_table_wrap ct_table_no_border" style="height: 142px;">
56 62 <div class="ct_table sub-task-table">
57 63 <div class="ct_table_head">
... ... @@ -131,6 +137,12 @@
131 137 </dl>
132 138 {{/each}}
133 139 </script>
  140 +
  141 + <script id="sub_task-fail-status-temp" type="text/html">
  142 + <div class="child-task-status fail"><i class="uk-icon-times-circle"></i> 营运里程 与主任务不符,请检查子任务
  143 + <span class="calc-detail">{{calcs}}</span></div>
  144 + </script>
  145 +
134 146 <script>
135 147 (function () {
136 148 var modal_opts = {center: false, bgclose: false, modal: false}
... ... @@ -218,7 +230,7 @@
218 230 if (opts && opts.sch) {
219 231 selectedDl(opts.sch);
220 232 }
221   - }
  233 + };
222 234  
223 235 //刷新子任务表格
224 236 var sub_task_update = function () {
... ... @@ -230,7 +242,30 @@
230 242 tbody.html(htmlStr);
231 243 //字典转换
232 244 dictionaryUtils.transformDom($('.nt-dictionary', tbody));
233   - }
  245 +
  246 + //检查子任务营运里程
  247 + $('#childTaskTitle .child-task-status', modal).remove();
  248 + var i = 0;
  249 + if(sch.cTasks.length == 0)
  250 + return;
  251 + var sum=0, calcs='';
  252 + $.each(sch.cTasks, function () {
  253 + if(this.mileageType=='service'){
  254 + sum = gb_common.accAdd(sum, this.mileage);
  255 + calcs += (' + ' + this.mileage);
  256 + i ++;
  257 + }
  258 + });
  259 + //公里与主任务不符合
  260 + if(sum != sch.jhlc){
  261 + if(i > 1)
  262 + calcs += ('='+sum);
  263 + calcs += (' ≠ ' + sch.jhlc);
  264 + calcs = calcs.substr(3);
  265 + var htmlStr = template('sub_task-fail-status-temp', {calcs: calcs});
  266 + $('#childTaskTitle', modal).append(htmlStr);
  267 + }
  268 + };
234 269  
235 270 //新增临加
236 271 var add_temp_sch = function () {
... ... @@ -241,7 +276,7 @@
241 276 open_modal(folder + '/add_temp_sch.html', {
242 277 sch: sch
243 278 }, modal_opts);
244   - }
  279 + };
245 280  
246 281 //删除临加班次
247 282 var remove_sch = function () {
... ...