Commit e706c5195c6c57ed5e1a68dc8be95d953a3f2885

Authored by 徐烜
2 parents 00c78304 d1c098ed

Update

src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
... ... @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 60 for (String nbbm : keys) {
61 61 Collections.sort(listMap.get(nbbm), comp);
62 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63   - /*if(nbbm.equals("W9G-013"))
  63 + /*if(nbbm.equals("W7C-001"))
64 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 65 }
66 66  
... ... @@ -150,8 +150,6 @@ public class GpsDataRecovery implements ApplicationContextAware {
150 150 CircleQueue<GpsEntity> prevs;
151 151 boolean task;
152 152 for (GpsEntity gps : list) {
153   - /*if(gps.getTimestamp() > 1491951840000L)
154   - System.out.print("");*/
155 153  
156 154 //是否有任务
157 155  
... ...
src/main/java/com/bsth/data/safe_driv/SafeDrivDataLoadThread.java
... ... @@ -88,7 +88,7 @@ public class SafeDrivDataLoadThread extends Thread{
88 88 httpClient.close();
89 89 response.close();
90 90 } catch (Exception e) {
91   - logger.error("", e);
  91 + logger.error(e.getMessage());
92 92 }
93 93 }
94 94 }
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -148,7 +148,7 @@ public class DayOfSchedule implements CommandLineRunner {
148 148 //dataRecovery();
149 149  
150 150 //翻班线程
151   - Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
  151 +// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
152 152 //入库
153 153 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS);
154 154 //班次误点扫描
... ... @@ -242,13 +242,11 @@ public class DayOfSchedule implements CommandLineRunner {
242 242 //计算“起点站应到”时间
243 243 schAttrCalculator.calcQdzTimePlan(lpScheduleMap.get(lineCode + "_" + lp));
244 244 }
245   - /*Set<String> cars = searchAllCars(list);
  245 + Set<String> cars = searchAllCars(list);
246 246 for (String nbbm : cars) {
247   - //计算“起点站应到”时间
248   - schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm));
249 247 //车辆 ——> 要执行的班次对照
250 248 reCalcExecPlan(nbbm);
251   - }*/
  249 + }
252 250  
253 251 // 页面 翻班通知
254 252 //sendUtils.shiftSchedule(lineCode);
... ... @@ -267,14 +265,14 @@ public class DayOfSchedule implements CommandLineRunner {
267 265 /**
268 266 * @Title: searchAllCars
269 267 * @Description: TODO(搜索班次集合中的车辆)
270   -
  268 + */
271 269 private Set<String> searchAllCars(List<ScheduleRealInfo> list) {
272 270 Set<String> cars = new HashSet<>();
273 271 for (ScheduleRealInfo sch : list)
274 272 cars.add(sch.getClZbh());
275 273  
276 274 return cars;
277   - }*/
  275 + }
278 276  
279 277 /**
280 278 * @Title: searchAllCars
... ... @@ -334,12 +332,16 @@ public class DayOfSchedule implements CommandLineRunner {
334 332 }
335 333  
336 334 //清理路牌对照
  335 + List<String> lprms = new ArrayList<>();
337 336 Set<String> lps = lpScheduleMap.keySet();
338 337 for(String lp : lps){
339 338 if(lp.indexOf(lineCode + "_") != -1)
340   - lpScheduleMap.removeAll(lp);
  339 + lprms.add(lp);
341 340 }
342 341  
  342 + for(String lp : lprms)
  343 + lpScheduleMap.removeAll(lp);
  344 +
343 345 logger.info(lineCode + "排班清理 " + count);
344 346 }
345 347  
... ... @@ -690,6 +692,7 @@ public class DayOfSchedule implements CommandLineRunner {
690 692  
691 693 nbbmScheduleMap.remove(sch.getClZbh(), sch);
692 694 id2SchedulMap.remove(sch.getId());
  695 + lpScheduleMap.remove(sch.getXlBm() + "_" + sch.getLpName(), sch);
693 696 //return sch;
694 697 }
695 698  
... ... @@ -705,6 +708,10 @@ public class DayOfSchedule implements CommandLineRunner {
705 708 return schAttrCalculator.updateQdzTimePlan(list);
706 709 }
707 710  
  711 + public List<ScheduleRealInfo> updateQdzTimePlan(ScheduleRealInfo sch) {
  712 + return updateQdzTimePlan(sch.getXlBm() + "_" + sch.getLpName());
  713 + }
  714 +
708 715 /**
709 716 * @Title: doneSum
710 717 * @Description: TODO(已完成班次总数)
... ... @@ -893,7 +900,9 @@ public class DayOfSchedule implements CommandLineRunner {
893 900 }
894 901  
895 902 public void reCalcExecPlan(String nbbm){
896   - carExecutePlanMap.put(nbbm, schAttrCalculator.calcCurrentExecSch(nbbmScheduleMap.get(nbbm)));
  903 + List<ScheduleRealInfo> list = nbbmScheduleMap.get(nbbm);
  904 + Collections.sort(list, schFCSJComparator);
  905 + carExecutePlanMap.put(nbbm, schAttrCalculator.calcCurrentExecSch(list));
897 906 }
898 907  
899 908 /**
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -364,7 +364,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
364 364 t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix));
365 365 t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix));
366 366  
367   - //计算班次实际时间
  367 + //计算班次实际执行时间
368 368 schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t);
369 369 if (t.getZdsjT() < t.getFcsjT()) {
370 370 rs.put("status", ResponseCode.ERROR);
... ... @@ -379,7 +379,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
379 379 dayOfSchedule.put(t);
380 380  
381 381 //更新起点应到时间
382   - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t.getClZbh());
  382 + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t);
383 383  
384 384 //重新计算车辆当前执行班次
385 385 dayOfSchedule.reCalcExecPlan(t.getClZbh());
... ... @@ -419,7 +419,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
419 419 if(rs.get("status").equals(ResponseCode.SUCCESS)){
420 420 dayOfSchedule.delete(sch);
421 421 //更新起点应到时间
422   - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh());
  422 + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch);
423 423 rs.put("ts", ts);
424 424 rs.put("delete", sch);
425 425 }
... ... @@ -642,7 +642,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
642 642  
643 643 //计算里程和班次数,并放入Map里
644 644 map = new HashMap<String, Object>();
645   - map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos));
  645 + map.put("jhlc",Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos)));
646 646 map.put("remMileage",culateMieageService.culateLbgl(lists));
647 647 map.put("addMileage", culateMieageService.culateLjgl(lists));
648 648 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
... ... @@ -1433,7 +1433,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1433 1433 double jccgl=culateService.culateJccgl(lists);
1434 1434 double ljgl=culateService.culateLjgl(lists);
1435 1435  
1436   - map.put("jhlc", culateService.culateJhgl(list)); //计划里程
  1436 + map.put("jhlc", Arith.add(culateService.culateJhgl(list),culateService.culateJhJccgl(list))); //计划里程
1437 1437 map.put("remMileage", culateService.culateLbgl(list)); //烂班公里
1438 1438 map.put("addMileage", ljgl); //临加公里
1439 1439 map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里
... ... @@ -3906,7 +3906,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3906 3906  
3907 3907 //计算里程和班次数,并放入Map里
3908 3908 map = new HashMap<String, Object>();
3909   - map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos));
  3909 + map.put("jhlc", Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos)));
3910 3910 map.put("remMileage",culateMieageService.culateLbgl(lists));
3911 3911 map.put("addMileage", culateMieageService.culateLjgl(lists));
3912 3912 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
... ...
src/main/resources/static/real_control_v2/css/line_schedule_table.css 0 → 100644
  1 +
  2 +.electron-waybill-table{
  3 + height: 100%;
  4 +}
  5 +
  6 +.electron-waybill-table dl{
  7 + font-size: 0;
  8 + white-space: nowrap;
  9 + overflow: hidden;
  10 + text-overflow: ellipsis;
  11 +}
  12 +
  13 +.electron-waybill-table dt,
  14 +.electron-waybill-table dd{
  15 + display: inline-block;
  16 + font-size: 14px;
  17 + white-space: nowrap;
  18 + overflow: hidden;
  19 + text-overflow: ellipsis;
  20 + border-right: 1px solid;
  21 + text-indent: 5px;
  22 + height: 37px;
  23 +}
  24 +.electron-waybill-table dt:nth-of-type(1),
  25 +.electron-waybill-table dd:nth-of-type(1){
  26 + width: 50px;
  27 + text-align: center;
  28 +}
  29 +.electron-waybill-table dt:nth-of-type(2),
  30 +.electron-waybill-table dd:nth-of-type(2){
  31 + width: 55px;
  32 + text-align: center;
  33 +}
  34 +.electron-waybill-table dt:nth-of-type(3),
  35 +.electron-waybill-table dd:nth-of-type(3){
  36 + width: calc(2% + 66px);
  37 +}
  38 +.electron-waybill-table dt:nth-of-type(4),
  39 +.electron-waybill-table dd:nth-of-type(4){
  40 + width: 10%;
  41 +}
  42 +.electron-waybill-table dt:nth-of-type(5),
  43 +.electron-waybill-table dd:nth-of-type(5){
  44 + width: 10%;
  45 +}
  46 +.electron-waybill-table dt:nth-of-type(6),
  47 +.electron-waybill-table dd:nth-of-type(6){
  48 + width: calc(13% + 18px);
  49 +}
  50 +.electron-waybill-table dt:nth-of-type(7),
  51 +.electron-waybill-table dd:nth-of-type(7){
  52 + width: calc(10% + 10px);
  53 +}
  54 +.electron-waybill-table dt:nth-of-type(8),
  55 +.electron-waybill-table dd:nth-of-type(8){
  56 + width: calc(51% - 233px);
  57 +}
  58 +.electron-waybill-table dt:nth-of-type(9),
  59 +.electron-waybill-table dd:nth-of-type(9){
  60 + width: 65px;
  61 +}
  62 +
  63 +
  64 +
  65 +.electron-waybill-table .electron-waybill-header{
  66 + color: #cfd2da;
  67 +}
  68 +
  69 +.electron-waybill-table .electron-waybill-header dl{
  70 + border-bottom: 1px solid #979494;
  71 + height: 38px;
  72 + line-height: 38px;
  73 + margin-bottom: 0;
  74 + margin-top: 0;
  75 +}
  76 +.electron-waybill-table .electron-waybill-header dl dt{
  77 +
  78 +}
  79 +
  80 +
  81 +.electron-waybill-table .electron-waybill-body{
  82 + color: #cfd2da;
  83 + height: calc(100% - 39px);
  84 + overflow: hidden;
  85 + position: relative;
  86 +}
  87 +
  88 +.electron-waybill-table .electron-waybill-body dl{
  89 + height: 38px;
  90 + line-height: 38px;
  91 + margin-bottom: 0;
  92 + margin-top: 0;
  93 +}
  94 +
  95 +.electron-waybill-table .electron-waybill-body dl:nth-child(1n+2){
  96 + border-top: 1px solid;
  97 +}
  98 +
  99 +.electron-waybill-table .electron-waybill-body dl:last-child{
  100 + border-bottom: 1px solid;
  101 +}
  102 +
  103 +.electron-waybill-table dt,
  104 +.electron-waybill-table dd,
  105 +.electron-waybill-table .electron-waybill-body dl:nth-child(1n+2),
  106 +.electron-waybill-table .electron-waybill-body dl:last-child{
  107 + border-color: #363a44;
  108 +}
  109 +
  110 +.electron-waybill-table .electron-waybill-body dl:nth-child(odd){
  111 +
  112 +}
  113 +
  114 +.electron-waybill-table .electron-waybill-body dl:nth-child(even){
  115 + /*background: #434753;*/
  116 +}
  117 +
  118 +.electron-waybill-table .uk-badge{
  119 + padding: 0 1px 0 1px;
  120 + text-indent: 0;
  121 + font-family: 华文细黑;
  122 +}
  123 +
  124 +
  125 +
  126 +.electron-waybill-table .ps-container:hover > .ps-scrollbar-y-rail:hover,
  127 +.electron-waybill-table .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail{
  128 + background-color: #484848;
  129 +}
  130 +
  131 +.electron-waybill-table .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y {
  132 + background-color: #fff;
  133 + }
0 134 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -1058,4 +1058,79 @@ span.late-badge {
1058 1058  
1059 1059 dl.intimity span.late-badge{
1060 1060 color: #fbfbfb;
1061   -}
1062 1061 \ No newline at end of file
  1062 +}
  1063 +
  1064 +/** badge tooltip */
  1065 +.uk-badge.c_task:hover,
  1066 +.uk-badge.sch_region:hover{
  1067 + background-image: none;
  1068 + background: #38b3e1;
  1069 + border: 1px solid #7ebad1;
  1070 +}
  1071 +
  1072 +.uk-badge.out:hover{
  1073 + background-image: none;
  1074 + background: #8fc650;
  1075 + border: 1px solid #949f86;
  1076 +}
  1077 +
  1078 +.uk-badge.in:hover{
  1079 + background-image: none;
  1080 + background: #fabc64;
  1081 + border: 1px solid #a68c67;
  1082 +}
  1083 +
  1084 +.qtip.sch-badge-tip{
  1085 + max-width: 500px;
  1086 +}
  1087 +
  1088 +.tip_task_list {
  1089 + width: 460px;
  1090 + margin-bottom: -10px;
  1091 +}
  1092 +.tip_task_list dl{
  1093 + font-size: 0;
  1094 + border-bottom: 1px solid #e6e6e6;
  1095 + margin: 0;
  1096 +}
  1097 +.tip_task_list dl:last-child{
  1098 + border-bottom: none;
  1099 +}
  1100 +.tip_task_list dl dt,
  1101 +.tip_task_list dl dd{
  1102 + display: inline-block;
  1103 + font-size: 13px;
  1104 + white-space: nowrap;
  1105 + overflow: hidden;
  1106 + text-overflow: ellipsis;
  1107 + height: 24px;
  1108 + line-height: 24px;
  1109 +}
  1110 +
  1111 +.tip_task_list dl dt:nth-of-type(1), .tip_task_list dl dd:nth-of-type(1){
  1112 + width: 19%;
  1113 +}
  1114 +.tip_task_list dl dt:nth-of-type(2), .tip_task_list dl dd:nth-of-type(2){
  1115 + width: 12%;
  1116 +}
  1117 +.tip_task_list dl dt:nth-of-type(3), .tip_task_list dl dd:nth-of-type(3){
  1118 + width: 28%;
  1119 +}
  1120 +.tip_task_list dl dt:nth-of-type(4), .tip_task_list dl dd:nth-of-type(4){
  1121 + width: 28%;
  1122 +}
  1123 +.tip_task_list dl dt:nth-of-type(5), .tip_task_list dl dd:nth-of-type(5){
  1124 + width: 13%;
  1125 +}
  1126 +
  1127 +.tip_task_list dl.service{
  1128 + color: blue;
  1129 +}
  1130 +.tip_task_list dl.service.destroy{
  1131 + color: red;
  1132 +}
  1133 +
  1134 +.tip_task_list dl span{
  1135 + margin: 0;
  1136 + width: auto;
  1137 +}
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/badge_tooltip.html 0 → 100644
  1 +<div>
  2 + <script id="sch-table-task-tootip-temp" type="text/html">
  3 + <div class="tl-tip-panel">
  4 + <div class="tip_task_list">
  5 + <dl>
  6 + <dt>类型</dt>
  7 + <dt>里程</dt>
  8 + <dt>起点</dt>
  9 + <dt>终点</dt>
  10 + <dt>备注</dt>
  11 + </dl>
  12 + {{each tasks as t i}}
  13 + <dl class="{{t.mileageType}} {{if t.destroy}}destroy{{/if}}">
  14 + <dd>
  15 + {{if t.mileageType=="service"}}
  16 + 营运
  17 + {{else if t.mileageType=="empty"}}
  18 + 空驶
  19 + {{/if}}
  20 + {{if t.destroy}}
  21 + <span>(烂班)</span>
  22 + {{else if t.type2==2}}
  23 + <span>(进场)</span>
  24 + {{else if t.type2==3}}
  25 + <span>(出场)</span>
  26 + {{/if}}
  27 + </dd>
  28 + <dd>
  29 + {{t.mileage}}
  30 + </dd>
  31 + <dd title="{{t.startStationName}}">{{t.startStationName}}</dd>
  32 + <dd title="{{t.endStationName}}">{{t.endStationName}}</dd>
  33 + <dd title="{{t.remarks}}">{{t.remarks}}</dd>
  34 + </dl>
  35 + {{/each}}
  36 + </div>
  37 + </div>
  38 + </script>
  39 +
  40 +
  41 + <script id="sch-table-region-tootip-temp" type="text/html">
  42 + <div class="tl-tip-panel">
  43 + <div style="font-size: 13px;">
  44 + 由 {{qdzName}} 发往 {{zdzName}}
  45 + </div>
  46 + </div>
  47 + </script>
  48 +
  49 + <script id="sch-table-out-tootip-temp" type="text/html">
  50 + <div class="tl-tip-panel">
  51 + <div style="font-size: 13px;">
  52 + {{qdzName}} 出场至 {{zdzName}}
  53 + </div>
  54 + </div>
  55 + </script>
  56 +
  57 + <script id="sch-table-in-tootip-temp" type="text/html">
  58 + <div class="tl-tip-panel">
  59 + <div style="font-size: 13px;">
  60 + 进 {{zdzName}}
  61 + </div>
  62 + </div>
  63 + </script>
  64 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_inpark.html
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <div style="width: 100%;padding-left: 1%;">
8 8 <div class="sub-task-card">
9   - <div class="uk-panel uk-panel-box uk-panel-box-primary">
  9 + <div class="uk-panel uk-panel-box uk-panel-box-primary twins_task_panel">
10 10 <div class="uk-panel-badge uk-badge">营运</div>
11 11 <h3 class="uk-panel-title">线路上站点间</h3>
12 12 <form class="uk-form uk-form-horizontal inpark_form" service_form>
... ... @@ -105,7 +105,7 @@
105 105 </div>
106 106 </div>
107 107 <div class="uk-width-7-10 pl5">
108   - <select name="startStation" disabled></select>
  108 + <select name="startStation" ></select>
109 109 </div>
110 110 </div>
111 111 <div class="uk-grid">
... ... @@ -352,6 +352,9 @@
352 352 var e =$('#globalRemarks', modal);
353 353 e.val(e.val() + $(this).val() + ',');
354 354 });
  355 +
  356 + //根据主任务状态,复子任务
  357 + updateTwinsTaskBySch(sch);
355 358 });
356 359  
357 360 function allValidSuccess() {
... ... @@ -579,6 +582,22 @@
579 582 btmDrawer.data('name', id).data('url', url).trigger('drawer_show');
580 583 }
581 584 }
  585 +
  586 +
  587 + function updateTwinsTaskBySch(sch) {
  588 + //主任务是烂班
  589 + if(sch.destroy){
  590 + serviceForm.prepend('<input type="hidden" name="destroy" value="true">');
  591 + $('[name=mileage]', serviceForm).val(sch.jhlcOrig).attr('disabled', 'disabled');
  592 + $('.twins_task_panel .uk-badge', modal).addClass('uk-badge-danger').text('烂班');
  593 + //终点禁选
  594 + $('select[name=endStation]', serviceForm).attr('disabled', 'disabled');
  595 + //开始结束时间禁选
  596 +
  597 + //空驶起点
  598 + $('select[name=startStation]', emptyForm).val(sch.qdzCode);
  599 + }
  600 + }
582 601 })();
583 602 </script>
584 603 </div>
585 604 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_oil.html
... ... @@ -6,7 +6,7 @@
6 6  
7 7 <div class="uk-grid">
8 8 <div class="uk-width-1-3">
9   - <form class="uk-form uk-form-horizontal c_task_form">
  9 + <form class="uk-form uk-form-horizontal c_task_form twins_task_form">
10 10 <input type="hidden" name="type1" value="正常">
11 11 <input type="hidden" name="type2" value="1">
12 12 <input type="hidden" name="mileageType" value="service">
... ... @@ -189,6 +189,7 @@
189 189 $(modal).on('init', function (e, data) {
190 190 e.stopPropagation();
191 191 sch = data.sch;
  192 +
192 193 oilId = sch.xlBm + '_oil_station';
193 194 lineInfo = gb_data_basic.codeToLine[sch.xlBm];
194 195  
... ... @@ -242,6 +243,9 @@
242 243 }, {center: false, bgclose: false, modal: false});
243 244 });
244 245 });
  246 +
  247 + //根据主任务状态,复子任务
  248 + updateTwinsTaskBySch(sch);
245 249 });
246 250  
247 251 var dataArray = [];
... ... @@ -274,7 +278,7 @@
274 278 }
275 279 else{
276 280 //营运子任务不写备注
277   - if(data.mileageType == 'service' && !data.destroy)
  281 + if(data.mileageType == 'service')
278 282 data.remarks = '';
279 283 gb_common.$post('/childTask', data, function (rs) {
280 284 notify_succ('子任务添加成功');
... ... @@ -450,6 +454,23 @@
450 454 $('.inout_reason_tags>span.active', modal).removeClass('active');
451 455 $(this).addClass('active');
452 456 });
  457 +
  458 +
  459 + function updateTwinsTaskBySch(sch) {
  460 + //主任务是烂班
  461 + if(sch.destroy){
  462 + var f = $('.twins_task_form', modal);
  463 + $('.uk-badge', f).addClass('uk-badge-danger').text('烂班');
  464 + $('.uk-panel-box', f).removeClass('uk-panel-box-primary');
  465 + f.prepend('<input type="hidden" name="destroy" value="true">');
  466 + $('[name=mileage]', f).val(sch.jhlcOrig);
  467 +
  468 + //进场起点
  469 + $('[name=startStation]', jcForm).val(sch.qdzCode);
  470 + //出场终点
  471 + $('[name=endStation]', ccForm).val(sch.qdzCode);
  472 + }
  473 + }
453 474 })();
454 475 </script>
455 476 </div>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_outpark.html
... ... @@ -42,7 +42,7 @@
42 42 </div>
43 43 </div>
44 44 <div class="uk-width-7-10 pl5">
45   - <select name="endStation" class="ct_focus" disabled></select>
  45 + <select name="endStation" class="ct_focus"></select>
46 46 </div>
47 47 </div>
48 48 <div class="uk-grid">
... ... @@ -82,7 +82,7 @@
82 82 </div>
83 83  
84 84 <div class="sub-task-card">
85   - <div class="uk-panel uk-panel-box uk-panel-box-primary">
  85 + <div class="uk-panel uk-panel-box uk-panel-box-primary twins_task_panel">
86 86 <div class="uk-panel-badge uk-badge">营运</div>
87 87 <h3 class="uk-panel-title">线路上站点间</h3>
88 88 <form class="uk-form uk-form-horizontal inpark_form" service_form>
... ... @@ -199,6 +199,9 @@
199 199  
200 200 //设置默认值
201 201 setDefaultVal();
  202 +
  203 + //根据主任务状态,复子任务
  204 + updateTwinsTaskBySch(sch);
202 205 });
203 206 //线路标准
204 207 information = gb_data_basic.getLineInformation(sch.xlBm);
... ... @@ -271,13 +274,6 @@
271 274 });
272 275 });
273 276  
274   - /* function outUpOrDown() {
275   - if (information.carPark != $('select[name=startStation]', emptyForm).val())
276   - return -1;
277   -
278   - return sch.xlDir;
279   - }*/
280   -
281 277 function getOutTime() {
282 278 if (information.carPark != $('select[name=startStation]', emptyForm).val())
283 279 return null;
... ... @@ -337,6 +333,16 @@
337 333 //空驶里程
338 334 $('input[name=mileage]', emptyForm).val(sch.xlDir == 0 ? information.upOutMileage : information.downOutMileage);
339 335 }
  336 +
  337 +
  338 + function updateTwinsTaskBySch(sch) {
  339 + //主任务是烂班
  340 + if(sch.destroy){
  341 + serviceForm.prepend('<input type="hidden" name="destroy" value="true">');
  342 + $('.twins_task_panel .uk-badge', modal).addClass('uk-badge-danger').text('烂班');
  343 + $('[name=mileage]', serviceForm).val(sch.jhlcOrig).attr('disabled', 'disabled');
  344 + }
  345 + }
340 346 })();
341 347 </script>
342 348 </div>
343 349 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
... ... @@ -3,9 +3,9 @@
3 3 <div class="schedule-wrap {{if dir==0}}up{{else}}down{{/if}}">
4 4 <h3 class="header-title">
5 5 {{if dir==0}}
6   - 上行/{{line.startStationName}}
  6 + {{line.startStationName}}
7 7 {{else}}
8   - 下行/{{line.endStationName}}
  8 + {{line.endStationName}}
9 9 {{/if}}
10 10 <i class="uk-icon-question-circle uk-icon-hover"></i>
11 11 <div class="fixed_legend">
... ... @@ -65,21 +65,21 @@
65 65 <dd data-sort-val={{sch.fcsjT}}>
66 66 {{sch.fcsj}}
67 67 {{if sch.bcType == "out"}}
68   - <span class="uk-badge uk-badge-success">出场</span>
  68 + <span class="uk-badge uk-badge-success out">出场</span>
69 69 {{else if sch.bcType == "in"}}
70   - <span class="uk-badge uk-badge-warning">进场</span>
  70 + <span class="uk-badge uk-badge-warning in">进场</span>
71 71 {{else if sch.bcType == "venting"}}
72 72 <span class="uk-badge uk-badge-danger">直放</span>
73 73 {{else if sch.bcType == "major"}}
74 74 <span class="uk-badge uk-badge-danger">放站</span>
75 75 {{else if sch.bcType == "region"}}
76   - <span class="uk-badge">区间</span>
  76 + <span class="uk-badge sch_region">区间</span>
77 77 {{/if}}
78 78 {{if sch.sflj}}
79 79 <span class="uk-badge uk-badge-danger">临加</span>
80 80 {{/if}}
81 81 {{if sch.cTasks.length > 0}}
82   - <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span>
  82 + <span class="uk-badge uk-badge-notification c_task">{{sch.cTasks.length}}</span>
83 83 {{/if}}
84 84 </dd>
85 85 <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">
... ... @@ -117,21 +117,21 @@
117 117 <dd data-sort-val={{fcsjT}}>
118 118 {{fcsj}}
119 119 {{if bcType == "out"}}
120   - <span class="uk-badge uk-badge-success">出场</span>
  120 + <span class="uk-badge uk-badge-success out">出场</span>
121 121 {{else if bcType == "in"}}
122   - <span class="uk-badge uk-badge-warning">进场</span>
  122 + <span class="uk-badge uk-badge-warning in">进场</span>
123 123 {{else if bcType == "venting"}}
124 124 <span class="uk-badge uk-badge-danger">直放</span>
125 125 {{else if bcType == "major"}}
126 126 <span class="uk-badge uk-badge-danger">放站</span>
127 127 {{else if bcType == "region"}}
128   - <span class="uk-badge">区间</span>
  128 + <span class="uk-badge sch_region">区间</span>
129 129 {{/if}}
130 130 {{if sflj}}
131 131 <span class="uk-badge uk-badge-danger">临加</span>
132 132 {{/if}}
133 133 {{if cTasks.length > 0}}
134   - <span class="uk-badge uk-badge-notification">{{cTasks.length}}</span>
  134 + <span class="uk-badge uk-badge-notification c_task">{{cTasks.length}}</span>
135 135 {{/if}}
136 136 </dd>
137 137 </script>
... ...
src/main/resources/static/real_control_v2/js/line_schedule/badge_tooltip.js 0 → 100644
  1 +
  2 +/** badge 悬停 tip 相关 */
  3 +var gb_schedule_badge_tootip = (function () {
  4 +
  5 + var temps;
  6 + //html 模板
  7 + $.get('/real_control_v2/fragments/line_schedule/badge_tooltip.html', function(dom) {
  8 + temps = gb_common.compileTempByDom(dom);
  9 + });
  10 +
  11 + //子任务 tootip
  12 + $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.c_task', function() {
  13 + $(this).qtip({
  14 + show: {
  15 + ready: true,
  16 + delay: 300
  17 + },
  18 + content: {
  19 + text: function() {
  20 + var id = $(this).parents('dl').data('id'),
  21 + lineCode = $(this).parents('li.line_schedule').data('id'),
  22 + sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  23 + //排序
  24 + var array = sch.cTasks.sort(function (a, b) {
  25 + var an = (a.mileageType=='service'?1:0)+''+(a.destroy?0:1);
  26 + var bn = (b.mileageType=='service'?1:0)+''+(b.destroy?0:1);
  27 + return parseInt(bn) - parseInt(an);
  28 + });
  29 + return temps['sch-table-task-tootip-temp']({tasks: array});
  30 + }
  31 + },
  32 + position: {
  33 + viewport: $(window),
  34 + my: 'center left',
  35 + at: 'center right'
  36 + },
  37 + style: {
  38 + classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip'
  39 + },
  40 + hide: {
  41 + fixed: true,
  42 + delay: 300
  43 + },
  44 + events: {
  45 + hidden: function(event, api) {
  46 + //destroy dom
  47 + $(this).qtip('destroy', true);
  48 + }
  49 + }
  50 + });
  51 + });
  52 +
  53 + //区间 tootip
  54 + $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.sch_region', function() {
  55 + $(this).qtip({
  56 + show: {
  57 + ready: true,
  58 + delay: 300
  59 + },
  60 + content: {
  61 + text: function() {
  62 + var id = $(this).parents('dl').data('id'),
  63 + lineCode = $(this).parents('li.line_schedule').data('id'),
  64 + sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  65 + return temps['sch-table-region-tootip-temp'](sch);
  66 + }
  67 + },
  68 + position: {
  69 + viewport: $(window),
  70 + my: 'center left',
  71 + at: 'center right'
  72 + },
  73 + style: {
  74 + classes: 'qtip-youtube sch-badge-tip'
  75 + },
  76 + hide: {
  77 + fixed: true,
  78 + delay: 300
  79 + },
  80 + events: {
  81 + hidden: function(event, api) {
  82 + //destroy dom
  83 + $(this).qtip('destroy', true);
  84 + }
  85 + }
  86 + });
  87 + });
  88 +
  89 +
  90 + //出场 tootip
  91 + $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.out', function() {
  92 + $(this).qtip({
  93 + show: {
  94 + ready: true,
  95 + delay: 300
  96 + },
  97 + content: {
  98 + text: function() {
  99 + var id = $(this).parents('dl').data('id'),
  100 + lineCode = $(this).parents('li.line_schedule').data('id'),
  101 + sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  102 + return temps['sch-table-out-tootip-temp'](sch);
  103 + }
  104 + },
  105 + position: {
  106 + viewport: $(window),
  107 + my: 'center left',
  108 + at: 'center right'
  109 + },
  110 + style: {
  111 + classes: 'qtip-youtube sch-badge-tip'
  112 + },
  113 + hide: {
  114 + fixed: true,
  115 + delay: 300
  116 + },
  117 + events: {
  118 + hidden: function(event, api) {
  119 + //destroy dom
  120 + $(this).qtip('destroy', true);
  121 + }
  122 + }
  123 + });
  124 + });
  125 +
  126 +
  127 + //进场 tootip
  128 + $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.in', function() {
  129 + $(this).qtip({
  130 + show: {
  131 + ready: true,
  132 + delay: 300
  133 + },
  134 + content: {
  135 + text: function() {
  136 + var id = $(this).parents('dl').data('id'),
  137 + lineCode = $(this).parents('li.line_schedule').data('id'),
  138 + sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  139 + return temps['sch-table-in-tootip-temp'](sch);
  140 + }
  141 + },
  142 + position: {
  143 + viewport: $(window),
  144 + my: 'center left',
  145 + at: 'center right'
  146 + },
  147 + style: {
  148 + classes: 'qtip-youtube sch-badge-tip'
  149 + },
  150 + hide: {
  151 + fixed: true,
  152 + delay: 300
  153 + },
  154 + events: {
  155 + hidden: function(event, api) {
  156 + //destroy dom
  157 + $(this).qtip('destroy', true);
  158 + }
  159 + }
  160 + });
  161 + });
  162 +})();
0 163 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
... ... @@ -174,13 +174,15 @@ var gb_schedule_context_menu = (function () {
174 174 add_sub_task_range_turn: function (sch) {
175 175 if(sch.bcType == 'out' || sch.bcType == 'in')
176 176 return notify_err('进出场班次不能做区间掉头!');
  177 + if(sch.destroy)
  178 + return notify_err('没有理由在烂班上做区间调头!!');
177 179 open_modal(folder + '/sub_task/add_sub_task_range_turn.html', {
178 180 sch: sch
179 181 }, modal_opts);
180 182 },
181 183 add_oil: function (sch) {
182 184 if(sch.bcType == 'out' || sch.bcType == 'in'){
183   - notify_err('暂不能在进出场班次上做加油子任务!');
  185 + notify_err('暂不能在进出场班次上做这个操作!');
184 186 return;
185 187 }
186 188 open_modal(folder + '/sub_task/add_sub_task_oil.html', {
... ...
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -194,6 +194,9 @@ var gb_schedule_table = (function () {
194 194 gb_schedule_table_dbclick.sfsjCellClick($('dd.fcsjActualCell', tabCont));
195 195 //滚动条
196 196 $('.schedule-wrap .ct_table_wrap', tabCont).perfectScrollbar({suppressScrollX: true});
  197 +
  198 + //搜索模板初始化
  199 + gb_sch_search.init();
197 200 }
198 201 };
199 202  
... ...
src/main/resources/static/real_control_v2/js/line_schedule/search.js
... ... @@ -40,6 +40,9 @@ var gb_sch_search = (function() {
40 40 var elements = '.search_sch_panel .sch-search-autocom';
41 41 var init = function() {
42 42 $(elements).each(function() {
  43 + if($('script[type="text/autocomplete"]', this).length > 0)
  44 + return true;
  45 +
43 46 $(this).append(result_template);
44 47 constructor(this);
45 48 });
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) {
171 171 function showUpdateDescription() {
172 172 //更新说明
173 173 var updateDescription = {
174   - date: '2017-04-20',
175   - text: '<h5>现在可以在轨迹回放里看到停车场位置和多边形电子围栏</h5><h5>区间调头子任务,可以勾选“调头后空驶回起点”</h5>'
  174 + date: '2017-04-24',
  175 + text: '<h5>应到实到时间按路牌连接显示</h5><h5>批量子任务时,如果主任务烂班,则自动复一个全程烂班子任务</h5><h5>鼠标悬停在子任务数字徽章上可查看详细</h5>'
176 176 };
177 177  
178 178 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -22,6 +22,8 @@
22 22 <link rel="stylesheet" href="/real_control_v2/css/home.css" merge="custom_style"/>
23 23 <!-- line style -->
24 24 <link rel="stylesheet" href="/real_control_v2/css/line_schedule.css" merge="custom_style"/>
  25 + <link rel="stylesheet" href="/real_control_v2/css/line_schedule_table.css" merge="custom_style"/>
  26 +
25 27 <link rel="stylesheet" href="/real_control_v2/css/sch_autocomp_result.css" merge="custom_style"/>
26 28 <!-- custom table -->
27 29 <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/>
... ... @@ -172,6 +174,7 @@
172 174 <script src="/real_control_v2/js/line_schedule/context_menu.js" merge="custom_js"></script>
173 175 <script src="/real_control_v2/js/line_schedule/dbclick.js" merge="custom_js"></script>
174 176 <script src="/real_control_v2/js/line_schedule/search.js" merge="custom_js"></script>
  177 +<script src="/real_control_v2/js/line_schedule/badge_tooltip.js" merge="custom_js"></script>
175 178  
176 179 <!-- 字典相关 -->
177 180 <script src="/assets/js/dictionary.js" merge="custom_js"></script>
... ...