Commit 05c92ff9a3e0d5515da31c23ca590a75bcf0123f

Authored by 徐烜
2 parents 712b4761 680915c2

Merge branch 'minhang' of http://222.66.0.204:8090//panzhaov5/bsth_control into minhang

src/main/java/com/bsth/data/pilot80/PilotReport.java
... ... @@ -78,6 +78,12 @@ public class PilotReport {
78 78 //d80MultiMap.put(d80.getData().getLineId().toString(), d80);
79 79  
80 80 String nbbm = BasicData.deviceId2NbbmMap.get(d80.getDeviceId());
  81 + //上报时,在执行的班次
  82 + if(StringUtils.isNotEmpty(nbbm)){
  83 + ScheduleRealInfo sch = dayOfSchedule.executeCurr(nbbm);
  84 + if(null != sch)
  85 + d80.setSchId(sch.getId());
  86 + }
81 87 //处理
82 88 switch (d80.getData().getRequestCode()) {
83 89 //出场请求
... ... @@ -111,6 +117,11 @@ public class PilotReport {
111 117  
112 118 //推送到页面
113 119 sendUtils.send80ToPage(d80);
  120 +
  121 + //反射搜索用 瞬时字段
  122 + d80.setLineId(d80.getData().getLineId());
  123 + d80.setNbbm(d80.getData().getNbbm());
  124 + d80.setRequestCode(d80.getData().getRequestCode());
114 125 } catch (Exception e) {
115 126 logger.error("", e);
116 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 1 package com.bsth.entity.directive;
2 2  
3 3 import com.bsth.entity.directive.DC0.DC0Data;
  4 +import com.fasterxml.jackson.annotation.JsonIgnore;
4 5  
5 6 import javax.persistence.*;
6 7 import java.util.Date;
... ... @@ -62,7 +63,53 @@ public class D80 {
62 63 private Date handleTime;
63 64  
64 65 private String remarks;
65   -
  66 +
  67 + private Long schId;
  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 +
  81 + public Long getSchId() {
  82 + return schId;
  83 + }
  84 +
  85 + public void setSchId(Long schId) {
  86 + this.schId = schId;
  87 + }
  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 +
66 113 @Embeddable
67 114 public static class D80Data {
68 115  
... ...
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
... ... @@ -11,6 +11,8 @@ import com.bsth.data.gpsdata.GpsEntity;
11 11 import com.bsth.data.gpsdata.GpsRealData;
12 12 import com.bsth.data.pilot80.PilotReport;
13 13 import com.bsth.data.schedule.DayOfSchedule;
  14 +import com.bsth.data.utils.ListFilterUtils;
  15 +import com.bsth.data.utils.ListPageQueryUtils;
14 16 import com.bsth.entity.directive.*;
15 17 import com.bsth.entity.realcontrol.ScheduleRealInfo;
16 18 import com.bsth.entity.sys.SysUser;
... ... @@ -110,8 +112,11 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
110 112 logger.warn("烂班不允许发送调度指令....");
111 113 return -1;
112 114 }
  115 +
  116 + //待发应到时间
  117 + String dfsj = fmtHHmm.print(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000));
113 118 String text = "您已完成" + finish + "个班次,下一发车时间" + fmtHHmm_CN.print(sch.getDfsjT()) + ",由"
114   - + sch.getQdzName() + "发往" + sch.getZdzName() ;
  119 + + sch.getQdzName() + "发往" + sch.getZdzName() + ";应到 " + dfsj;
115 120  
116 121 if(sch.getBcType().equals("venting")){
117 122 text += " (直放)";
... ... @@ -445,7 +450,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
445 450  
446 451 @Override
447 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 455 Object nbbm = map.get("nbbm");
451 456 if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) {
... ... @@ -489,8 +494,25 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
489 494 Map<String, Object> rsMap = new HashMap<>();
490 495 rsMap.put("list", rs);
491 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 516 return rsMap;
495 517 }
496 518  
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -958,6 +958,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
958 958 if(tsSet.contains(schedule2.getId()) || schedule2.getBcType().toString().equals("in") || schedule2.getBcType().toString().equals("out")){
959 959 fcsj2 = schedule1.getZdsjT();
960 960 }
  961 + if(fcsj2 < fcsj1)
  962 + fcsj2 += 1440l;
961 963 if(sfqr == 1 && time1 > fcsj1){
962 964 jhyysj += fcsj2 - time1;
963 965 }else if(sfqr == 1 && time2 < fcsj2){
... ... @@ -966,7 +968,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
966 968 jhyysj += fcsj2 - fcsj1;
967 969 }
968 970 if(jhyysj < 0){
969   - System.out.println(fcsj2 + " - " + fcsj1);
  971 + System.out.println(fcsj2 + " - " + fcsj1 + " = " + (fcsj2 - fcsj1));
970 972 }
971 973 jhyysj1 += fcsj2 - fcsj1;
972 974 }
... ... @@ -1010,7 +1012,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1010 1012 List<ChildTaskPlan> cTasks = cMap.get(schedule.getId());
1011 1013 for(ChildTaskPlan childTaskPlan : cTasks){
1012 1014 Map<String, Object> temp = new HashMap<String, Object>();
1013   - if(childTaskPlan.getMileageType().equals("empty") || childTaskPlan.isDestroy()){
  1015 + if(!childTaskPlan.getMileageType().equals("service") || childTaskPlan.isDestroy()
  1016 + || !childTaskPlan.getType1().equals("正常") || childTaskPlan.getCcId() != null){
1014 1017 temp.put("lc", null);
1015 1018 temp.put("fcsj", null);
1016 1019 temp.put("zdsj", null);
... ... @@ -1071,6 +1074,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1071 1074 } else if(i == keyList.size() - 1){
1072 1075 fcsj2 = Long.valueOf(m2.get("zdsj").toString());
1073 1076 }
  1077 + if(fcsj2 < fcsj1){
  1078 + fcsj2 += 1440l;
  1079 + }
1074 1080 if(sfqr == 1 && time1 > fcsj1){
1075 1081 sjyysj += fcsj2 - time1;
1076 1082 }else if(sfqr == 1 && time2 < fcsj2){
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -60,6 +60,9 @@ import com.bsth.service.schedule.SchedulePlanInfoService;
60 60 import com.bsth.service.sys.DutyEmployeeService;
61 61 import com.bsth.util.*;
62 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 66 import com.google.common.base.Splitter;
64 67 import com.google.common.collect.Lists;
65 68 import org.apache.commons.lang3.StringEscapeUtils;
... ... @@ -2464,6 +2467,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2464 2467 Map<String, Object> map = new HashMap<String, Object>();
2465 2468 if(list.size()>0){
2466 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 2476 double jhyygl=culateService.culateJhgl(list);//计划营运公里
2468 2477 double jhjcclc= culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)
2469 2478 map.put("jhlc", jhyygl);
... ... @@ -2480,8 +2489,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2480 2489 map.put("sjzgl", Arith.add(zyygl, zksgl));
2481 2490 map.put("sjgl",zyygl);
2482 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 2503 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
2486 2504 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
2487 2505 map.put("ssgl_gz", culateService.culateCJLC(list, "故障"));
... ... @@ -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 2591 Map<String, Object> map = new HashMap<String, Object>();
2573 2592 map.put("xlName", "合计");
2574 2593 double jhyygl=culateService.culateJhgl(list);//计划营运公里
... ... @@ -2587,7 +2606,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2587 2606 map.put("sjzgl", Arith.add(zyygl, zksgl));
2588 2607 map.put("sjgl",zyygl);
2589 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 2619 map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
2592 2620 map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
2593 2621 map.put("ssgl_gz", culateService.culateCJLC(list, "故障"));
... ... @@ -3270,7 +3298,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3270 3298 ScheduleRealInfo sch = dayOfSchedule.get(id);
3271 3299 if (sch != null) {
3272 3300 sch.setBcType(bcType);
3273   - sch.addRemarks(remarks);
  3301 + sch.setRemarks(remarks);
3274 3302 rs.put("status", ResponseCode.SUCCESS);
3275 3303 rs.put("t", sch);
3276 3304  
... ... @@ -4942,3 +4970,14 @@ class AccountMap2 implements Comparator&lt;Map&lt;String, Object&gt;&gt;{
4942 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
... ... @@ -593,7 +593,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{
593 593 while (it.hasNext()) {
594 594 ChildTaskPlan childTaskPlan = it.next();
595 595 if (childTaskPlan.getMileageType().equals("service")
596   - && "正常".equals(childTaskPlan.getType1())) {
  596 + && "正常".equals(childTaskPlan.getType1())
  597 + && childTaskPlan.getCcId()==null) {
597 598 if (!childTaskPlan.isDestroy()) {
598 599 Float jhgl = childTaskPlan.getMileage() == null ? 0
599 600 : childTaskPlan.getMileage();
... ... @@ -769,7 +770,8 @@ public class CulateMileageServiceImpl implements CulateMileageService{
769 770 xxkzgf=0,xxkwgf=0,xxm=0,xxmzgf=0,xxmwgf=0;
770 771 for (int i = 0; i < lists.size(); i++) {
771 772 ScheduleRealInfo s=lists.get(i);
772   - if(s.getFcsjActual()!=null){
  773 + if(s.getFcsjActual()!=null && !s.isCcService()
  774 + && !isInOut(s)){
773 775 String xlDir=s.getXlDir();
774 776 String fcsjs=s.getFcsj();
775 777 String[] fcsjStr = fcsjs.split(":");
... ... @@ -779,7 +781,6 @@ public class CulateMileageServiceImpl implements CulateMileageService{
779 781 long fcsjActual = Long.parseLong(fcsjActualsStr[0]) * 60 + Long.parseLong(fcsjActualsStr[1]);
780 782  
781 783 if("0".equals(xlDir)){
782   -
783 784 if(fcsj-fcsjActual>1){
784 785 sxk++;
785 786 if(fcsj>zgf1&&fcsj<zgf2)
... ... @@ -881,7 +882,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{
881 882 else if(isInOut(sch))
882 883 continue;
883 884 //主任务烂班
884   - else if(sch.getStatus() == -1){
  885 + else if(sch.getStatus() == -1 && !sch.isCcService()){
885 886 if(sch.getAdjustExps().equals(item) ||
886 887 (StringUtils.isEmpty(sch.getAdjustExps()) && item.equals("其他"))){
887 888 sum = Arith.add(sum, sch.getJhlcOrig());
... ...
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
... ... @@ -80,6 +80,9 @@ public class SheetServiceImpl extends BaseServiceImpl&lt;Sheet, Integer&gt; implements
80 80 if(s.getBcType().equals("ldks")){
81 81 fage=true;
82 82 }
  83 + if(s.isCcService()){
  84 + fage=true;
  85 + }
83 86  
84 87 return fage;
85 88 }
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -427,7 +427,7 @@
427 427 layer.msg("请选择时间");
428 428 return;
429 429 }
430   - $("#xlmc").html(xlName);
  430 + $("#xlmc").html(xlName+" "+date+" ");
431 431 // $("#ddrbBody").height($(window).height()-300);
432 432 $("c").html("全日");
433 433 $("#export").removeAttr("disabled");
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html
... ... @@ -316,7 +316,7 @@
316 316 </script>
317 317 <script type="text/html" id="statisticsDaily">
318 318 {{each list as obj i}}
319   - <tr>
  319 + <tr {{if obj.zt==1}}style='color: red'{{/if}}>
320 320 <td>{{obj.xlName}}</td>
321 321 <td>{{obj.jhzlc}}</td>
322 322 <td>{{obj.jhlc}}</td>
... ...
src/main/resources/static/real_control_v2/alone_page/home/home_wrap.html
... ... @@ -44,6 +44,7 @@
44 44  
45 45 #main-tab-content{
46 46 padding: 0 !important;
  47 + list-style: none;
47 48 }
48 49  
49 50 .home-panel{
... ... @@ -99,6 +100,8 @@
99 100 <script src="/assets/js/d3.min.js"></script>
100 101 <!-- EventProxy -->
101 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 106 <script>
104 107  
... ...
src/main/resources/static/real_control_v2/alone_page/map/alone_wrap.html
... ... @@ -42,13 +42,23 @@
42 42 <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/themes/airbnb.css" merge="plugins"/>
43 43  
44 44 <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/>
  45 +
  46 + <style>
  47 + .main-container .map-panel{
  48 + position: absolute;
  49 + top:0;
  50 + left: 0;
  51 + width: 20px;
  52 + z-index: 999;
  53 + height: 20px;
  54 + }
  55 + </style>
45 56 </head>
46 57  
47 58 <body>
48 59 <div class="main-container" style="height: 100%;">
49 60 <span style="position: absolute;left: calc(50% - 35px);top: calc(45% - 35px);">加载中...</span>
50 61 </div>
51   -
52 62 <!-- 地图相关 -->
53 63 <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
54 64 <script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script>
... ... @@ -108,6 +118,8 @@
108 118 //嵌入地图页面
109 119 $('.main-container').load('/real_control_v2/mapmonitor/real.html', function () {
110 120 $('.map-system-msg.flex-left').remove();
  121 +
  122 + $(this).append('<span class="map-panel"></span>');//判断里有JS判定这个容器是否显示
111 123 });
112 124 });
113 125  
... ...
src/main/resources/static/real_control_v2/css/home.css
... ... @@ -125,6 +125,7 @@
125 125 line-height: 25px;
126 126 font-size: 13px;
127 127 padding: 0 0 3px;
  128 + position: relative;
128 129 }
129 130  
130 131 .data-wrap .data-title span.data-title-text {
... ... @@ -326,4 +327,13 @@ span.signal-state-speed-limit{
326 327 #send-phrase-multi-modal .tools>span{
327 328 cursor: pointer;
328 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 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 42 <div class="uk-grid">
43 43 <div class="uk-width-1-1">
44 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 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 48 </div>
49 49 </div>
50 50 </div>
... ... @@ -164,11 +164,10 @@
164 164  
165 165 $('[name=bcType]', modal).on('change', function(){
166 166 var type = $(this).val();
167   - if(sch.bcType != 'normal')
  167 + if(sch.bcType == 'in' || sch.bcType == 'out')
168 168 return;
169 169  
170   - //重置类型,等待调整界面触发刷新事件
171   - $(this).val(sch.bcType);
  170 +
172 171 var url, detailModal;
173 172 if(type=='venting'){
174 173 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
... ... @@ -181,6 +180,8 @@
181 180 else
182 181 return;
183 182  
  183 + //重置类型,等待调整界面触发刷新事件
  184 + $(this).val(sch.bcType);
184 185 $.get(url, function(htmlStr){
185 186 $(document.body).append(htmlStr);
186 187  
... ... @@ -188,6 +189,18 @@
188 189 $(detailModal).trigger('init', {sch: sch, parentModal: modal, _dfsj: $('[name=dfsj]', modal).val()});
189 190 })
190 191 });
  192 +
  193 + /**
  194 + * 相同选项 也触发 onchange
  195 + */
  196 + $('[name=bcType]', modal).mousedown(function () {
  197 + this.sindex = $(this)[0].selectedIndex;
  198 + $(this)[0].selectedIndex = -1;
  199 + }).mouseout(function () {
  200 + if ($(this)[0].selectedIndex === -1) {
  201 + $(this)[0].selectedIndex = this.sindex;
  202 + }
  203 + });
191 204 });
192 205 })();
193 206 </script>
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
... ... @@ -267,20 +267,22 @@
267 267  
268 268 $('select[name=bcType]', modal).on('change', function(){
269 269 var type = $(this).val();
270   - if(sch.bcType != 'normal')
  270 + if(sch.bcType == 'in' || sch.bcType == 'out')
271 271 return;
272 272  
273   - //重置类型,等待调整界面触发刷新事件
274   - $(this).val(sch.bcType);
275 273 var url, detailModal;
276 274 if(type=='venting'){
277 275 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
278 276 detailModal='#bctype-venting-modal';
279 277 }
280   - else{
  278 + else if(type=='major'){
281 279 detailModal='#bctype-major-modal';
282 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 287 $.get(url, function(htmlStr){
286 288 $(document.body).append(htmlStr);
... ... @@ -289,6 +291,18 @@
289 291 $(detailModal).trigger('init', {sch: sch, parentModal: modal});
290 292 })
291 293 });
  294 +
  295 + /**
  296 + * 相同选项 也触发 onchange
  297 + */
  298 + $('select[name=bcType]', modal).mousedown(function () {
  299 + this.sindex = $(this)[0].selectedIndex;
  300 + $(this)[0].selectedIndex = -1;
  301 + }).mouseout(function () {
  302 + if ($(this)[0].selectedIndex === -1) {
  303 + $(this)[0].selectedIndex = this.sindex;
  304 + }
  305 + });
292 306 });
293 307  
294 308 function validation_s_e_Time(data) {
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sys_mailbox.html
... ... @@ -5,8 +5,9 @@
5 5 <h4 class="uk-panel-title">{{data.nbbm}} {{text}}</h4>
6 6 <code>{{dateStr}}</code>
7 7 <div class="uk-button-group">
8   - <a class="uk-button uk-button-mini uk-button-primary">同意</a>
9   - <a class="uk-button uk-button-mini reject">不同意</a>
  8 + <button class="uk-button uk-button-mini uk-button-primary">同意</button>
  9 + <button class="uk-button uk-button-mini reject">不同意</button>
  10 + <a class="edit_link" data-id="{{schId}}" data-line="{{data.lineId}}" >编辑</a>
10 11 </div>
11 12 </div>
12 13 </div>
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_80.html
... ... @@ -12,8 +12,12 @@
12 12 </legend>
13 13 <span class="horizontal-field">请求代码</span>
14 14 <select name="requestCode">
15   - <option value="-1">全部</option>
  15 + <option value="">全部</option>
16 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 21 <span class="horizontal-field">车辆</span>
18 22 <div class="uk-autocomplete uk-form autocomplete-cars" >
19 23 <input type="text" name="nbbm" placeholder="车辆自编号">
... ... @@ -84,9 +88,9 @@
84 88 }
85 89 $('[name=requestCode]', modal).append(opt);
86 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 94 query();
91 95 });
92 96  
... ... @@ -102,6 +106,12 @@
102 106 var data = form.serializeJSON();
103 107 data.page = page;
104 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 115 $.get('/directive/findAll80', data, function(rs) {
106 116 $.each(rs.list, function(){
107 117 //命令字转中文
... ... @@ -122,7 +132,7 @@
122 132 if (resetPagination)
123 133 pagination(rs.totalPages + 1, rs.page);
124 134 })
125   - }
  135 + };
126 136  
127 137 var resetPagination = true;
128 138 var pagination = function(pages, currentPage) {
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -168,8 +168,8 @@ var disabled_submit_btn = function (form) {
168 168 function showUpdateDescription() {
169 169 //更新说明
170 170 var updateDescription = {
171   - date: '2017-11-01',
172   - text: '<h5>1、修正了XP系统下主页滚动条的显示问题(Windows XP sp3 + chrome 49.0.2623.112)。</h5>'
  171 + date: '2017-11-02',
  172 + text: '<h5>1、修正二次放站时,需要先将班次切回正常班次的问题。</h5><h5>2、驾驶员请求信使上,添加“编辑”链接,可弹出对应班次的发车信息微调框。</h5>'
173 173 };
174 174  
175 175 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
... ... @@ -235,8 +235,10 @@ var gb_sch_websocket = (function () {
235 235 dl.addClass('relevance-active intimity').find('dd:eq(5)').trigger('click');
236 236 });
237 237  
  238 +
238 239 //80同意
239 240 $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button-primary', function () {
  241 + $(this).attr('disabled', 'disabled');
240 242 var panel = $(this).parents('.sys-note-80')
241 243 , id = panel.data('id');
242 244  
... ... @@ -245,6 +247,7 @@ var gb_sch_websocket = (function () {
245 247  
246 248 //80不同意
247 249 $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button.reject', function () {
  250 + $(this).attr('disabled', 'disabled');
248 251 var panel = $(this).parents('.sys-note-80')
249 252 , id = panel.data('id');
250 253  
... ... @@ -329,6 +332,24 @@ var gb_sch_websocket = (function () {
329 332 gb_schedule_context_menu.dftz(nextSch);
330 333 });
331 334  
  335 + /**
  336 + * 信使 sys-note-80 编辑
  337 + */
  338 + $(document).on('click', '.sys-note-80 .edit_link', function () {
  339 + var id = $(this).data('id'),
  340 + lineCode = $(this).data('line');
  341 +
  342 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  343 + if(!sch)
  344 + return;
  345 +
  346 + gb_schedule_context_menu.fcxxwt(sch);
  347 + var dl = gb_schedule_table.scroToDl(sch);
  348 + //高亮
  349 + gb_schedule_table.reset_drag_active_all(dl);
  350 + dl.addClass('relevance-active intimity').find('dd:eq(5)').trigger('click');
  351 + });
  352 +
332 353 return {
333 354 sock: function () {
334 355 return schSock;
... ...