Commit 680915c23fd085ad136fd608511ee2294858ddb3

Authored by 娄高锋
2 parents 0b901a5a 9ac1c7a3

Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into minhang

src/main/java/com/bsth/data/pilot80/PilotReport.java
@@ -117,6 +117,11 @@ public class PilotReport { @@ -117,6 +117,11 @@ public class PilotReport {
117 117
118 //推送到页面 118 //推送到页面
119 sendUtils.send80ToPage(d80); 119 sendUtils.send80ToPage(d80);
  120 +
  121 + //反射搜索用 瞬时字段
  122 + d80.setLineId(d80.getData().getLineId());
  123 + d80.setNbbm(d80.getData().getNbbm());
  124 + d80.setRequestCode(d80.getData().getRequestCode());
120 } catch (Exception e) { 125 } catch (Exception e) {
121 logger.error("", e); 126 logger.error("", e);
122 } 127 }
src/main/java/com/bsth/data/utils/ListFilterUtils.java 0 → 100644
  1 +package com.bsth.data.utils;
  2 +
  3 +import org.apache.commons.lang3.StringUtils;
  4 +import org.slf4j.Logger;
  5 +import org.slf4j.LoggerFactory;
  6 +
  7 +import java.lang.reflect.Field;
  8 +import java.util.ArrayList;
  9 +import java.util.Collection;
  10 +import java.util.List;
  11 +import java.util.Map;
  12 +
  13 +/**
  14 + * 集合搜索过滤
  15 + * Created by panzhao on 2017/8/2.
  16 + */
  17 +public class ListFilterUtils {
  18 +
  19 + static Logger logger = LoggerFactory.getLogger(ListFilterUtils.class);
  20 +
  21 + public static List filter(Collection all, Map<String, Object> map, Class clazz) {
  22 + List rs = new ArrayList();
  23 + Field[] fields = clazz.getDeclaredFields();
  24 +
  25 + //参与过滤的字段
  26 + List<Field> fs = new ArrayList<>();
  27 + for (Field f : fields) {
  28 + f.setAccessible(true);
  29 + if (map.containsKey(f.getName()))
  30 + fs.add(f);
  31 + }
  32 +
  33 + //过滤数据
  34 + for (Object obj : all) {
  35 + if (fieldEquals(fs, obj, map))
  36 + rs.add(obj);
  37 + }
  38 + return rs;
  39 + }
  40 +
  41 + public static boolean fieldEquals(List<Field> fs, Object obj, Map<String, Object> map) {
  42 + try {
  43 + for (Field f : fs) {
  44 + if (StringUtils.isEmpty(map.get(f.getName()).toString()))
  45 + continue;
  46 +
  47 + if (f.get(obj) == null || f.get(obj).toString().indexOf(map.get(f.getName()).toString()) == -1)
  48 + return false;
  49 + }
  50 + } catch (Exception e) {
  51 + logger.error("", e);
  52 + return false;
  53 + }
  54 + return true;
  55 + }
  56 +}
src/main/java/com/bsth/data/utils/ListPageQueryUtils.java 0 → 100644
  1 +package com.bsth.data.utils;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +/**
  7 + * 集合分页工具
  8 + * Created by panzhao on 2017/8/2.
  9 + */
  10 +public class ListPageQueryUtils {
  11 +
  12 + public static List paging(List all, int page, int pageSize) {
  13 + List rs = new ArrayList(pageSize);
  14 +
  15 + int s = page * pageSize;
  16 + int e = (page + 1) * pageSize;
  17 +
  18 + int size = all.size();
  19 +
  20 + if (e > size)
  21 + e = size;
  22 +
  23 + if (s > size)
  24 + return rs;
  25 +
  26 + for (; s < e; s++) {
  27 + rs.add(all.get(s));
  28 + }
  29 + return rs;
  30 + }
  31 +}
src/main/java/com/bsth/entity/directive/D80.java
1 package com.bsth.entity.directive; 1 package com.bsth.entity.directive;
2 2
3 import com.bsth.entity.directive.DC0.DC0Data; 3 import com.bsth.entity.directive.DC0.DC0Data;
  4 +import com.fasterxml.jackson.annotation.JsonIgnore;
4 5
5 import javax.persistence.*; 6 import javax.persistence.*;
6 import java.util.Date; 7 import java.util.Date;
@@ -65,6 +66,18 @@ public class D80 { @@ -65,6 +66,18 @@ public class D80 {
65 66
66 private Long schId; 67 private Long schId;
67 68
  69 + @Transient
  70 + @JsonIgnore
  71 + private String lineId;
  72 +
  73 + @Transient
  74 + @JsonIgnore
  75 + private String nbbm;
  76 +
  77 + @Transient
  78 + @JsonIgnore
  79 + private Short requestCode;
  80 +
68 public Long getSchId() { 81 public Long getSchId() {
69 return schId; 82 return schId;
70 } 83 }
@@ -73,6 +86,30 @@ public class D80 { @@ -73,6 +86,30 @@ public class D80 {
73 this.schId = schId; 86 this.schId = schId;
74 } 87 }
75 88
  89 + public String getLineId() {
  90 + return data.lineId;
  91 + }
  92 +
  93 + public String getNbbm() {
  94 + return data.nbbm;
  95 + }
  96 +
  97 + public void setLineId(String lineId) {
  98 + this.lineId = lineId;
  99 + }
  100 +
  101 + public void setNbbm(String nbbm) {
  102 + this.nbbm = nbbm;
  103 + }
  104 +
  105 + public Short getRequestCode() {
  106 + return requestCode;
  107 + }
  108 +
  109 + public void setRequestCode(Short requestCode) {
  110 + this.requestCode = requestCode;
  111 + }
  112 +
76 @Embeddable 113 @Embeddable
77 public static class D80Data { 114 public static class D80Data {
78 115
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
@@ -11,6 +11,8 @@ import com.bsth.data.gpsdata.GpsEntity; @@ -11,6 +11,8 @@ import com.bsth.data.gpsdata.GpsEntity;
11 import com.bsth.data.gpsdata.GpsRealData; 11 import com.bsth.data.gpsdata.GpsRealData;
12 import com.bsth.data.pilot80.PilotReport; 12 import com.bsth.data.pilot80.PilotReport;
13 import com.bsth.data.schedule.DayOfSchedule; 13 import com.bsth.data.schedule.DayOfSchedule;
  14 +import com.bsth.data.utils.ListFilterUtils;
  15 +import com.bsth.data.utils.ListPageQueryUtils;
14 import com.bsth.entity.directive.*; 16 import com.bsth.entity.directive.*;
15 import com.bsth.entity.realcontrol.ScheduleRealInfo; 17 import com.bsth.entity.realcontrol.ScheduleRealInfo;
16 import com.bsth.entity.sys.SysUser; 18 import com.bsth.entity.sys.SysUser;
@@ -110,8 +112,11 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen @@ -110,8 +112,11 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
110 logger.warn("烂班不允许发送调度指令...."); 112 logger.warn("烂班不允许发送调度指令....");
111 return -1; 113 return -1;
112 } 114 }
  115 +
  116 + //待发应到时间
  117 + String dfsj = fmtHHmm.print(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000));
113 String text = "您已完成" + finish + "个班次,下一发车时间" + fmtHHmm_CN.print(sch.getDfsjT()) + ",由" 118 String text = "您已完成" + finish + "个班次,下一发车时间" + fmtHHmm_CN.print(sch.getDfsjT()) + ",由"
114 - + sch.getQdzName() + "发往" + sch.getZdzName() + ";应到 " + sch.getZdsj(); 119 + + sch.getQdzName() + "发往" + sch.getZdzName() + ";应到 " + dfsj;
115 120
116 if(sch.getBcType().equals("venting")){ 121 if(sch.getBcType().equals("venting")){
117 text += " (直放)"; 122 text += " (直放)";
@@ -445,7 +450,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen @@ -445,7 +450,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
445 450
446 @Override 451 @Override
447 public Map<String, Object> findAll80(Map<String, Object> map, int page, int size) { 452 public Map<String, Object> findAll80(Map<String, Object> map, int page, int size) {
448 - List<D80> d80s = new ArrayList<>(); 453 + /*List<D80> d80s = new ArrayList<>();
449 454
450 Object nbbm = map.get("nbbm"); 455 Object nbbm = map.get("nbbm");
451 if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) { 456 if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) {
@@ -489,8 +494,25 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen @@ -489,8 +494,25 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
489 Map<String, Object> rsMap = new HashMap<>(); 494 Map<String, Object> rsMap = new HashMap<>();
490 rsMap.put("list", rs); 495 rsMap.put("list", rs);
491 rsMap.put("totalPages", count % size == 0 ? count / size - 1 : count / size); 496 rsMap.put("totalPages", count % size == 0 ? count / size - 1 : count / size);
492 - rsMap.put("page", page); 497 + rsMap.put("page", page);*/
493 498
  499 + List all = ListFilterUtils.filter(pilotReport.findAll(), map, D80.class);
  500 + //排序
  501 + Collections.sort(all, new Comparator<D80>() {
  502 + @Override
  503 + public int compare(D80 o1, D80 o2) {
  504 + return (int) (o2.getTimestamp() - o1.getTimestamp());
  505 + }
  506 + });
  507 + List<D80> d80s = ListPageQueryUtils.paging(all, page, size);
  508 + //时间格式化
  509 + for (D80 d80 : d80s) {
  510 + d80.setTimeStr(fmtHHmm.print(d80.getTimestamp()));
  511 + }
  512 + Map<String, Object> rsMap = new HashMap<>();
  513 + rsMap.put("list", d80s);
  514 + rsMap.put("totalPages", all.size() % size == 0 ? all.size() / size - 1: all.size() / size);
  515 + rsMap.put("page", page);
494 return rsMap; 516 return rsMap;
495 } 517 }
496 518
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -60,6 +60,9 @@ import com.bsth.service.schedule.SchedulePlanInfoService; @@ -60,6 +60,9 @@ import com.bsth.service.schedule.SchedulePlanInfoService;
60 import com.bsth.service.sys.DutyEmployeeService; 60 import com.bsth.service.sys.DutyEmployeeService;
61 import com.bsth.util.*; 61 import com.bsth.util.*;
62 import com.bsth.websocket.handler.SendUtils; 62 import com.bsth.websocket.handler.SendUtils;
  63 +import com.github.stuxuhai.jpinyin.PinyinException;
  64 +import com.github.stuxuhai.jpinyin.PinyinFormat;
  65 +import com.github.stuxuhai.jpinyin.PinyinHelper;
63 import com.google.common.base.Splitter; 66 import com.google.common.base.Splitter;
64 import com.google.common.collect.Lists; 67 import com.google.common.collect.Lists;
65 import org.apache.commons.lang3.StringEscapeUtils; 68 import org.apache.commons.lang3.StringEscapeUtils;
@@ -2464,6 +2467,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2464,6 +2467,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2464 Map<String, Object> map = new HashMap<String, Object>(); 2467 Map<String, Object> map = new HashMap<String, Object>();
2465 if(list.size()>0){ 2468 if(list.size()>0){
2466 map.put("xlName", list.get(0).getXlName()); 2469 map.put("xlName", list.get(0).getXlName());
  2470 + try {
  2471 + map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getXlName(), "" , PinyinFormat.WITHOUT_TONE));
  2472 + } catch (PinyinException e) {
  2473 + // TODO Auto-generated catch block
  2474 + e.printStackTrace();
  2475 + }
2467 double jhyygl=culateService.culateJhgl(list);//计划营运公里 2476 double jhyygl=culateService.culateJhgl(list);//计划营运公里
2468 double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里) 2477 double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)
2469 map.put("jhlc", jhyygl); 2478 map.put("jhlc", jhyygl);
@@ -2480,8 +2489,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2480,8 +2489,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2480 map.put("sjzgl", Arith.add(zyygl, zksgl)); 2489 map.put("sjzgl", Arith.add(zyygl, zksgl));
2481 map.put("sjgl",zyygl); 2490 map.put("sjgl",zyygl);
2482 map.put("sjksgl", zksgl); 2491 map.put("sjksgl", zksgl);
2483 -  
2484 - map.put("ssgl", culateService.culateLbgl(list)); 2492 + double ssgl= culateService.culateLbgl(list);
  2493 + map.put("ssgl", ssgl);
  2494 +
  2495 + //计划+临加-少驶=实驶
  2496 + double jl=Arith.add(jhyygl, ljgl);
  2497 + if(Arith.sub(jl, ssgl)==sjyygl){
  2498 + map.put("zt", 0);
  2499 + }else{
  2500 + map.put("zt", 1);
  2501 + }
  2502 +
2485 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); 2503 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
2486 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); 2504 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
2487 map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); 2505 map.put("ssgl_gz", culateService.culateCJLC(list, "故障"));
@@ -2568,7 +2586,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2568,7 +2586,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2568 } 2586 }
2569 } 2587 }
2570 } 2588 }
2571 - 2589 +
  2590 + Collections.sort(lMap,new AccountXlbm());
2572 Map<String, Object> map = new HashMap<String, Object>(); 2591 Map<String, Object> map = new HashMap<String, Object>();
2573 map.put("xlName", "合计"); 2592 map.put("xlName", "合计");
2574 double jhyygl=culateService.culateJhgl(list);//计划营运公里 2593 double jhyygl=culateService.culateJhgl(list);//计划营运公里
@@ -2587,7 +2606,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2587,7 +2606,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2587 map.put("sjzgl", Arith.add(zyygl, zksgl)); 2606 map.put("sjzgl", Arith.add(zyygl, zksgl));
2588 map.put("sjgl",zyygl); 2607 map.put("sjgl",zyygl);
2589 map.put("sjksgl", zksgl); 2608 map.put("sjksgl", zksgl);
2590 - map.put("ssgl", culateService.culateLbgl(list)); 2609 +
  2610 + double ssgl= culateService.culateLbgl(list);
  2611 + map.put("ssgl", ssgl);
  2612 + //计划+临加-少驶=实驶
  2613 + double jl=Arith.add(jhyygl, ljgl);
  2614 + if(Arith.sub(jl, ssgl)==sjyygl){
  2615 + map.put("zt", 0);
  2616 + }else{
  2617 + map.put("zt", 1);
  2618 + }
2591 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); 2619 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
2592 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); 2620 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
2593 map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); 2621 map.put("ssgl_gz", culateService.culateCJLC(list, "故障"));
@@ -4942,3 +4970,14 @@ class AccountMap2 implements Comparator&lt;Map&lt;String, Object&gt;&gt;{ @@ -4942,3 +4970,14 @@ class AccountMap2 implements Comparator&lt;Map&lt;String, Object&gt;&gt;{
4942 return o2.get("clZbh").toString().compareTo(o1.get("clZbh").toString()); 4970 return o2.get("clZbh").toString().compareTo(o1.get("clZbh").toString());
4943 } 4971 }
4944 } 4972 }
  4973 +
  4974 +class AccountXlbm implements Comparator<Map<String, Object>>{
  4975 + @Override
  4976 + public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  4977 + // TODO Auto-generated method stub
  4978 +// PinyinHelper.convertToPinyinString(ppy.getName(),
  4979 +// "" , PinyinFormat.WITHOUT_TONE)
  4980 + return o1.get("xlNamePy").toString().compareTo(
  4981 + o2.get("xlNamePy").toString());
  4982 + }
  4983 +}
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
@@ -882,7 +882,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ @@ -882,7 +882,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{
882 else if(isInOut(sch)) 882 else if(isInOut(sch))
883 continue; 883 continue;
884 //主任务烂班 884 //主任务烂班
885 - else if(sch.getStatus() == -1){ 885 + else if(sch.getStatus() == -1 && !sch.isCcService()){
886 if(sch.getAdjustExps().equals(item) || 886 if(sch.getAdjustExps().equals(item) ||
887 (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){ 887 (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){
888 sum = Arith.add(sum, sch.getJhlcOrig()); 888 sum = Arith.add(sum, sch.getJhlcOrig());
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -427,7 +427,7 @@ @@ -427,7 +427,7 @@
427 layer.msg("请选择时间"); 427 layer.msg("请选择时间");
428 return; 428 return;
429 } 429 }
430 - $("#xlmc").html(xlName); 430 + $("#xlmc").html(xlName+" "+date+" ");
431 // $("#ddrbBody").height($(window).height()-300); 431 // $("#ddrbBody").height($(window).height()-300);
432 $("c").html("全日"); 432 $("c").html("全日");
433 $("#export").removeAttr("disabled"); 433 $("#export").removeAttr("disabled");
src/main/resources/static/pages/forms/statement/statisticsDaily.html
@@ -316,7 +316,7 @@ @@ -316,7 +316,7 @@
316 </script> 316 </script>
317 <script type="text/html" id="statisticsDaily"> 317 <script type="text/html" id="statisticsDaily">
318 {{each list as obj i}} 318 {{each list as obj i}}
319 - <tr> 319 + <tr {{if obj.zt==1}}style='color: red'{{/if}}>
320 <td>{{obj.xlName}}</td> 320 <td>{{obj.xlName}}</td>
321 <td>{{obj.jhzlc}}</td> 321 <td>{{obj.jhzlc}}</td>
322 <td>{{obj.jhlc}}</td> 322 <td>{{obj.jhlc}}</td>
src/main/resources/static/real_control_v2/alone_page/home/home_wrap.html
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
44 44
45 #main-tab-content{ 45 #main-tab-content{
46 padding: 0 !important; 46 padding: 0 !important;
  47 + list-style: none;
47 } 48 }
48 49
49 .home-panel{ 50 .home-panel{
@@ -99,6 +100,8 @@ @@ -99,6 +100,8 @@
99 <script src="/assets/js/d3.min.js"></script> 100 <script src="/assets/js/d3.min.js"></script>
100 <!-- EventProxy --> 101 <!-- EventProxy -->
101 <script src="/assets/js/eventproxy.js"></script> 102 <script src="/assets/js/eventproxy.js"></script>
  103 +<!-- Geolib -->
  104 +<script src="/real_control_v2/geolib/geolib.js" merge="plugins"></script>
102 105
103 <script> 106 <script>
104 107
src/main/resources/static/real_control_v2/css/home.css
@@ -125,6 +125,7 @@ @@ -125,6 +125,7 @@
125 line-height: 25px; 125 line-height: 25px;
126 font-size: 13px; 126 font-size: 13px;
127 padding: 0 0 3px; 127 padding: 0 0 3px;
  128 + position: relative;
128 } 129 }
129 130
130 .data-wrap .data-title span.data-title-text { 131 .data-wrap .data-title span.data-title-text {
@@ -326,4 +327,13 @@ span.signal-state-speed-limit{ @@ -326,4 +327,13 @@ span.signal-state-speed-limit{
326 #send-phrase-multi-modal .tools>span{ 327 #send-phrase-multi-modal .tools>span{
327 cursor: pointer; 328 cursor: pointer;
328 margin-left: 12px; 329 margin-left: 12px;
  330 +}
  331 +
  332 +.device_list_filter_icon{
  333 + position: absolute;
  334 + right: 15px;
  335 +}
  336 +
  337 +.device_list_filter_icon.online{
  338 +
329 } 339 }
330 \ No newline at end of file 340 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -42,9 +42,9 @@ @@ -42,9 +42,9 @@
42 <div class="uk-grid"> 42 <div class="uk-grid">
43 <div class="uk-width-1-1"> 43 <div class="uk-width-1-1">
44 <div class="uk-form-row ct-stacked"> 44 <div class="uk-form-row ct-stacked">
45 - <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过20个字符)</small></label> 45 + <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过50个字符)</small></label>
46 <div class="uk-form-controls"> 46 <div class="uk-form-controls">
47 - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" >{{remarks}}</textarea> 47 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" >{{remarks}}</textarea>
48 </div> 48 </div>
49 </div> 49 </div>
50 </div> 50 </div>
@@ -167,8 +167,7 @@ @@ -167,8 +167,7 @@
167 if(sch.bcType == 'in' || sch.bcType == 'out') 167 if(sch.bcType == 'in' || sch.bcType == 'out')
168 return; 168 return;
169 169
170 - //重置类型,等待调整界面触发刷新事件  
171 - $(this).val(sch.bcType); 170 +
172 var url, detailModal; 171 var url, detailModal;
173 if(type=='venting'){ 172 if(type=='venting'){
174 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; 173 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
@@ -181,6 +180,8 @@ @@ -181,6 +180,8 @@
181 else 180 else
182 return; 181 return;
183 182
  183 + //重置类型,等待调整界面触发刷新事件
  184 + $(this).val(sch.bcType);
184 $.get(url, function(htmlStr){ 185 $.get(url, function(htmlStr){
185 $(document.body).append(htmlStr); 186 $(document.body).append(htmlStr);
186 187
@@ -194,9 +195,9 @@ @@ -194,9 +195,9 @@
194 */ 195 */
195 $('[name=bcType]', modal).mousedown(function () { 196 $('[name=bcType]', modal).mousedown(function () {
196 this.sindex = $(this)[0].selectedIndex; 197 this.sindex = $(this)[0].selectedIndex;
197 - $(this)[0].selectedIndex = 0; 198 + $(this)[0].selectedIndex = -1;
198 }).mouseout(function () { 199 }).mouseout(function () {
199 - if ($(this)[0].selectedIndex === 0) { 200 + if ($(this)[0].selectedIndex === -1) {
200 $(this)[0].selectedIndex = this.sindex; 201 $(this)[0].selectedIndex = this.sindex;
201 } 202 }
202 }); 203 });
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
@@ -270,17 +270,19 @@ @@ -270,17 +270,19 @@
270 if(sch.bcType == 'in' || sch.bcType == 'out') 270 if(sch.bcType == 'in' || sch.bcType == 'out')
271 return; 271 return;
272 272
273 - //重置类型,等待调整界面触发刷新事件  
274 - $(this).val(sch.bcType);  
275 var url, detailModal; 273 var url, detailModal;
276 if(type=='venting'){ 274 if(type=='venting'){
277 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; 275 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
278 detailModal='#bctype-venting-modal'; 276 detailModal='#bctype-venting-modal';
279 } 277 }
280 - else{ 278 + else if(type=='major'){
281 detailModal='#bctype-major-modal'; 279 detailModal='#bctype-major-modal';
282 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; 280 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html';
283 } 281 }
  282 + else return;
  283 +
  284 + //重置类型,等待调整界面触发刷新事件
  285 + $(this).val(sch.bcType);
284 286
285 $.get(url, function(htmlStr){ 287 $.get(url, function(htmlStr){
286 $(document.body).append(htmlStr); 288 $(document.body).append(htmlStr);
@@ -295,9 +297,9 @@ @@ -295,9 +297,9 @@
295 */ 297 */
296 $('select[name=bcType]', modal).mousedown(function () { 298 $('select[name=bcType]', modal).mousedown(function () {
297 this.sindex = $(this)[0].selectedIndex; 299 this.sindex = $(this)[0].selectedIndex;
298 - $(this)[0].selectedIndex = 0; 300 + $(this)[0].selectedIndex = -1;
299 }).mouseout(function () { 301 }).mouseout(function () {
300 - if ($(this)[0].selectedIndex === 0) { 302 + if ($(this)[0].selectedIndex === -1) {
301 $(this)[0].selectedIndex = this.sindex; 303 $(this)[0].selectedIndex = this.sindex;
302 } 304 }
303 }); 305 });
src/main/resources/static/real_control_v2/fragments/north/nav/report_80.html
@@ -12,8 +12,12 @@ @@ -12,8 +12,12 @@
12 </legend> 12 </legend>
13 <span class="horizontal-field">请求代码</span> 13 <span class="horizontal-field">请求代码</span>
14 <select name="requestCode"> 14 <select name="requestCode">
15 - <option value="-1">全部</option> 15 + <option value="">全部</option>
16 </select> 16 </select>
  17 + <span class="horizontal-field">线路</span>
  18 + <div class="uk-autocomplete uk-form autocomplete-line" >
  19 + <input type="text" name="lineId" placeholder="线路">
  20 + </div>
17 <span class="horizontal-field">车辆</span> 21 <span class="horizontal-field">车辆</span>
18 <div class="uk-autocomplete uk-form autocomplete-cars" > 22 <div class="uk-autocomplete uk-form autocomplete-cars" >
19 <input type="text" name="nbbm" placeholder="车辆自编号"> 23 <input type="text" name="nbbm" placeholder="车辆自编号">
@@ -84,9 +88,9 @@ @@ -84,9 +88,9 @@
84 } 88 }
85 $('[name=requestCode]', modal).append(opt); 89 $('[name=requestCode]', modal).append(opt);
86 //车辆 autocomplete 90 //车辆 autocomplete
87 - $.get('/basic/cars', function(rs) {  
88 - gb_common.carAutocomplete($('.autocomplete-cars', modal), rs);  
89 - }); 91 + gb_common.carAutocomplete($('.autocomplete-cars', modal), gb_data_basic.carsArray());
  92 + //线路 autocomplete
  93 + gb_common.lineAutocomplete($('.autocomplete-line', modal));
90 query(); 94 query();
91 }); 95 });
92 96
@@ -102,6 +106,12 @@ @@ -102,6 +106,12 @@
102 var data = form.serializeJSON(); 106 var data = form.serializeJSON();
103 data.page = page; 107 data.page = page;
104 data.size = pageSize; 108 data.size = pageSize;
  109 + //线路转换成编码
  110 + if(data.lineId){
  111 + var lineCode = gb_data_basic.findCodeByLinename(data.lineId);
  112 + if(lineCode)
  113 + data.lineId=lineCode;
  114 + }
105 $.get('/directive/findAll80', data, function(rs) { 115 $.get('/directive/findAll80', data, function(rs) {
106 $.each(rs.list, function(){ 116 $.each(rs.list, function(){
107 //命令字转中文 117 //命令字转中文
@@ -122,7 +132,7 @@ @@ -122,7 +132,7 @@
122 if (resetPagination) 132 if (resetPagination)
123 pagination(rs.totalPages + 1, rs.page); 133 pagination(rs.totalPages + 1, rs.page);
124 }) 134 })
125 - } 135 + };
126 136
127 var resetPagination = true; 137 var resetPagination = true;
128 var pagination = function(pages, currentPage) { 138 var pagination = function(pages, currentPage) {