Commit 5ace7d78a5825197865f366af93e1a3cf4d7a07b

Authored by 廖磊
2 parents 3076d693 0d33b44d

Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control

into pudong
Showing 31 changed files with 304 additions and 202 deletions
src/main/java/com/bsth/controller/LineController.java
1 1 package com.bsth.controller;
2 2  
  3 +import java.text.ParseException;
  4 +import java.text.SimpleDateFormat;
  5 +import java.util.Date;
3 6 import java.util.HashMap;
4 7 import java.util.Map;
5 8  
... ... @@ -11,7 +14,9 @@ import org.springframework.web.bind.annotation.RestController;
11 14  
12 15 import com.bsth.common.ResponseCode;
13 16 import com.bsth.entity.Line;
  17 +import com.bsth.entity.LineVersions;
14 18 import com.bsth.service.LineService;
  19 +import com.bsth.service.LineVersionsService;
15 20 import com.bsth.util.GetUIDAndCode;
16 21  
17 22 /**
... ... @@ -36,6 +41,9 @@ public class LineController extends BaseController<Line, Integer> {
36 41 @Autowired
37 42 private LineService service;
38 43  
  44 + @Autowired
  45 + private LineVersionsService lineVersionsService;
  46 +
39 47 /**
40 48 * 获取线路编码与ID
41 49 *
... ... @@ -74,13 +82,31 @@ public class LineController extends BaseController<Line, Integer> {
74 82 map.put("status", ResponseCode.ERROR);
75 83 return map;
76 84 }
77   - return service.save(t);
  85 + // 添加线路版本
  86 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  87 + try {
  88 + Date endDate = simpleDateFormat.parse("2088-08-08 00:00:00");
  89 + LineVersions lineVersions = new LineVersions();
  90 + lineVersions.setName("原始版本");
  91 + lineVersions.setLine(t);
  92 + lineVersions.setLineCode(t.getLineCode());
  93 + lineVersions.setStartDate(t.getCreateDate());
  94 + lineVersions.setEndDate(new java.sql.Date(endDate.getTime()));// 2088-8-8 00:00:00
  95 + lineVersions.setVersions(1);
  96 + lineVersions.setStatus(1);
  97 + // 先添加线路再添加版本
  98 + service.save(t);
  99 + return lineVersionsService.save(lineVersions);
  100 + } catch (ParseException e) {
  101 + // TODO Auto-generated catch block
  102 + e.printStackTrace();
  103 + map.put("status", ResponseCode.ERROR);
  104 + return map;
  105 + }
78 106 }
79 107  
80 108 /**
81   - *
82 109 * 更改
83   - *
84 110 */
85 111 @RequestMapping(value="/update", method = RequestMethod.POST)
86 112 public Map<String, Object> update(Line l){
... ...
src/main/java/com/bsth/controller/LineVersionsController.java
... ... @@ -12,16 +12,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
12 12 import org.springframework.web.bind.annotation.RequestParam;
13 13 import org.springframework.web.bind.annotation.RestController;
14 14  
15   -import com.alibaba.fastjson.JSON;
16   -import com.alibaba.fastjson.JSONObject;
17   -import com.alibaba.fastjson.TypeReference;
18   -import com.bsth.data.LineVersionsData;
19 15 import com.bsth.entity.Line;
20 16 import com.bsth.entity.LineVersions;
21   -import com.bsth.entity.LsStationRoute;
22   -import com.bsth.entity.StationRoute;
23 17 import com.bsth.repository.LineRepository;
24   -import com.bsth.repository.LsStationRouteRepository;
25 18 import com.bsth.service.LineVersionsService;
26 19  
27 20 /**
... ... @@ -46,8 +39,15 @@ public class LineVersionsController extends BaseController&lt;LineVersions, Integer
46 39  
47 40 @Autowired
48 41 LineRepository lineRepository;
49   - @Autowired
50   - LsStationRouteRepository lsStationRouteRepository ;
  42 +
  43 + /**
  44 + * 获取线路所有版本
  45 + */
  46 + @RequestMapping(value = "findLineVersionsMax", method = RequestMethod.GET)
  47 + public LineVersions findLineVersionsMax(@RequestParam(defaultValue = "lineId") int lineId) {
  48 + return service.findLineVersionsMax(lineId);
  49 + }
  50 +
51 51 /**
52 52 * 获取线路所有版本
53 53 *
... ... @@ -63,7 +63,6 @@ public class LineVersionsController extends BaseController&lt;LineVersions, Integer
63 63 */
64 64 @RequestMapping(value = "findById", method = RequestMethod.GET)
65 65 public LineVersions findOne(@RequestParam(defaultValue = "id") int id) {
66   - service.lineUpdate();
67 66 return service.findById(id);
68 67 }
69 68  
... ... @@ -85,6 +84,7 @@ public class LineVersionsController extends BaseController&lt;LineVersions, Integer
85 84 Date startDate = simpleDateFormat.parse(map.get("startDate").toString());
86 85 Date endDate = simpleDateFormat.parse(map.get("endDate").toString());
87 86 Line line = lineRepository.findOne(Integer.valueOf(map.get("lineId").toString()));
  87 + lineVersions.setName(map.get("name").toString());
88 88 lineVersions.setLine(line);
89 89 lineVersions.setLineCode(map.get("lineCode").toString());
90 90 lineVersions.setStartDate(new java.sql.Date(startDate.getTime()));
... ... @@ -92,6 +92,8 @@ public class LineVersionsController extends BaseController&lt;LineVersions, Integer
92 92 lineVersions.setVersions(Integer.valueOf(map.get("versions").toString()));
93 93 lineVersions.setStatus(Integer.valueOf(map.get("status").toString()));
94 94 lineVersions.setRemark(map.get("remark").toString());
  95 +
  96 +
95 97 } catch (ParseException e) {
96 98 // TODO Auto-generated catch block
97 99 e.printStackTrace();
... ...
src/main/java/com/bsth/controller/directive/DirectiveController.java
... ... @@ -165,11 +165,11 @@ public class DirectiveController {
165 165 * @throws
166 166 */
167 167 @RequestMapping(value = "/list", method = RequestMethod.GET)
168   - public Map<String, Object> findDirective(String nbbm,@RequestParam int dType
  168 + public Map<String, Object> findDirective(String nbbms,@RequestParam int dType
169 169 , @RequestParam(defaultValue = "0") int page,
170 170 @RequestParam(defaultValue = "10") int size){
171 171  
172   - return directiveService.findDirective(nbbm, dType, page, size);
  172 + return directiveService.findDirective(nbbms, dType, page, size);
173 173 }
174 174  
175 175 @RequestMapping(value = "/c0a4", method = RequestMethod.POST)
... ...
src/main/java/com/bsth/data/gpsdata/status_manager/gps_line_state/LineStateHandle.java
... ... @@ -31,7 +31,7 @@ public class LineStateHandle {
31 31 /** 重发次数 */
32 32 private final static int MAX_SEND_COUNT=3;
33 33 /** 重发间隔 */
34   - private final static int SEND_SPACE=1000 * 60 * 4;
  34 + private final static int SEND_SPACE=1000 * 60 * 6;
35 35 /** 最大有效时间 */
36 36 private final static int MAX_AVAIL_TIME=1000 * 60 * 60 * 2;
37 37  
... ...
src/main/java/com/bsth/data/schedule/auto_exec/RealScheduleAutoExecHandler.java
1 1 package com.bsth.data.schedule.auto_exec;
2 2  
  3 +import com.bsth.data.gpsdata.status_manager.GpsStatusManager;
3 4 import com.bsth.data.schedule.DayOfSchedule;
4 5 import com.bsth.entity.realcontrol.ScheduleRealInfo;
5 6 import com.bsth.websocket.handler.SendUtils;
... ... @@ -21,6 +22,8 @@ public class RealScheduleAutoExecHandler {
21 22 @Autowired
22 23 DayOfSchedule dayOfSchedule;
23 24  
  25 + @Autowired
  26 + GpsStatusManager gpsStatusManager;
24 27  
25 28 public void exec(ScheduleRealInfo sch) {
26 29 boolean flag = false;
... ... @@ -33,13 +36,24 @@ public class RealScheduleAutoExecHandler {
33 36  
34 37 if (sch.getZdsjT() < t) {
35 38 sch.setZdsjActualAll(sch.getZdsjT());
36   - ScheduleRealInfo next = dayOfSchedule.nextByLp(sch);
37   - if (null != next) {
38   - next.setQdzArrDatesj(sch.getZdsjActual());
  39 +
  40 + //准备执行下一个班次
  41 + ScheduleRealInfo next = dayOfSchedule.next(sch);
  42 + if (next != null) {
  43 + //套跑 -下发线路切换指令
  44 + if(!next.getXlBm().equals(sch.getXlBm())){
  45 + gpsStatusManager.changeLine(next.getClZbh(), next.getXlBm(), "套跑@系统");
  46 + }
  47 + }
  48 +
  49 + //路牌的下一个班次,线调页面显示
  50 + ScheduleRealInfo nextLp = dayOfSchedule.nextByLp(sch);
  51 + if (null != nextLp) {
  52 + nextLp.setQdzArrDatesj(sch.getZdsjActual());
39 53  
40 54 List<ScheduleRealInfo> refs = new ArrayList<>();
41 55 refs.add(sch);
42   - refs.add(next);
  56 + refs.add(nextLp);
43 57 sendUtils.refreshSch(refs);
44 58 return;
45 59 }
... ...
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
... ... @@ -49,8 +49,8 @@ public class LateAdjustHandle implements ApplicationContextAware{
49 49 */
50 50 public static void putLate(ScheduleRealInfo sch){
51 51 try {
52   - //进出场班次不需要
53   - if(sch.getBcType().equals("in") || sch.getBcType().equals("out"))
  52 + //出场班次不需要
  53 + if(/*sch.getBcType().equals("in") || */sch.getBcType().equals("out"))
54 54 return;
55 55 //线路配置
56 56 LineConfig config = lineConfigData.get(sch.getXlBm());
... ...
src/main/java/com/bsth/entity/LineVersions.java
... ... @@ -32,6 +32,11 @@ public class LineVersions{
32 32 /** ID 主键(唯一标识符) int length(11) */
33 33 private Integer id;
34 34  
  35 + /** 线路版本名字 varchar length(50)
  36 + * 给排版人员选版本使用
  37 + * */
  38 + private String name;
  39 +
35 40 /** 线路ID int length(11) */
36 41 @ManyToOne
37 42 private Line line;
... ... @@ -71,6 +76,14 @@ public class LineVersions{
71 76 public void setId(Integer id) {
72 77 this.id = id;
73 78 }
  79 +
  80 + public String getName() {
  81 + return name;
  82 + }
  83 +
  84 + public void setName(String name) {
  85 + this.name = name;
  86 + }
74 87  
75 88 public Line getLine() {
76 89 return line;
... ...
src/main/java/com/bsth/repository/LineVersionsRepository.java
... ... @@ -59,5 +59,12 @@ public interface LineVersionsRepository extends BaseRepository&lt;LineVersions, Int
59 59 @Modifying
60 60 @Query(value = "UPDATE LineVersions lv set lv.status=1 where lv.line.id=?1 and lv.lineCode=?2 and lv.versions=?3")
61 61 public void updateNewVersions(Integer lineId, String lineCode, Integer versions);
  62 +
  63 +
  64 + /**
  65 + * 查询线路最大线路版本
  66 + */
  67 + @Query(value = "select lv2 from LineVersions lv2 where lv2.line.id =?1 and lv2.versions=(SELECT max(lv.versions) FROM LineVersions lv where lv.line.id = ?1) ")
  68 + public LineVersions findLineVersionsMax(int lineId);
62 69  
63 70 }
... ...
src/main/java/com/bsth/service/LineVersionsService.java
... ... @@ -32,4 +32,6 @@ public interface LineVersionsService extends BaseService&lt;LineVersions, Integer&gt;
32 32  
33 33 List<LineVersions> lineUpdate();
34 34  
  35 + LineVersions findLineVersionsMax(int lineId);
  36 +
35 37 }
... ...
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
... ... @@ -256,7 +256,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
256 256 int code = GatewayHttpUtils.postJson(JSON.toJSONString(d64));
257 257 // 入库
258 258 d64.setHttpCode(code);
259   - d64.getData().setTxtContent("切换线路[" + lineCode + "]");
  259 + d64.getData().setTxtContent("切换线路[" + BasicData.lineCode2NameMap.get(lineCode) + "]");
260 260 dayOfDirectives.put64(d64);
261 261  
262 262 // 通知设备刷新线路文件,忽略结果
... ... @@ -365,11 +365,21 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
365 365 }
366 366  
367 367 @Override
368   - public Map<String, Object> findDirective(String nbbm, int dType, int page, int size) {
  368 + public Map<String, Object> findDirective(String nbbms, int dType, int page, int size) {
369 369 Map<String, Object> rsMap = new HashMap<>();
370 370 try{
371   - List<Directive> list = new ArrayList<>();
372 371  
  372 + List<String> carArray = new ArrayList<>(), deviceArray=new ArrayList<>();
  373 + if(StringUtils.isNotEmpty(nbbms)){
  374 + carArray = Splitter.on(",").splitToList(nbbms);
  375 + //转换成设备号
  376 + Map<String, String> nbbm2deviceMap = BasicData.deviceId2NbbmMap.inverse();
  377 + for(int i = 0, len=carArray.size(); i < len; i++){
  378 + deviceArray.add(nbbm2deviceMap.get(carArray.get(i)));
  379 + }
  380 + }
  381 +
  382 + List<Directive> list = new ArrayList<>();
373 383 switch (dType) {
374 384 case -1:
375 385 //所有指令
... ... @@ -409,18 +419,22 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
409 419  
410 420 // 时间倒序
411 421 Collections.sort(list, new DayOfDirectives.DComparator());
412   - if (StringUtils.isNotBlank(nbbm)) {
413   - String deviceId = BasicData.deviceId2NbbmMap.inverse().get(nbbm);
414   - //按车辆过滤
  422 + if(deviceArray.size() > 0){
  423 + //按设备号过滤
415 424 List<Directive> subList = new ArrayList<>();
416 425 for (Directive d : list) {
417   - if (d.getDeviceId().equals(deviceId)) {
  426 + if (deviceArray.contains(d.getDeviceId())) {
418 427 subList.add(d);
419 428 }
420 429 }
421 430 list = subList;
422 431 }
423 432  
  433 + for(Directive d : list){
  434 + d.setTimeHHmm(fmtHHmm.print(d.getTimestamp()));
  435 + d.setNbbm(BasicData.deviceId2NbbmMap.get(d.getDeviceId()));
  436 + }
  437 +
424 438 int count = list.size();
425 439 // 分页
426 440 int s = page * size, e = s + size;
... ... @@ -429,15 +443,6 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
429 443 e = count;
430 444  
431 445 List<Directive> rs = list.subList(s, e);
432   -
433   - // 时间格式化,车辆自编号转换
434   - for (Directive d : rs) {
435   - if (d.getTimeHHmm() == null)
436   - d.setTimeHHmm(fmtHHmm.print(d.getTimestamp()));
437   - if (d.getNbbm() == null)
438   - d.setNbbm(BasicData.deviceId2NbbmMap.get(d.getDeviceId()));
439   - }
440   -
441 446 rsMap.put("list", rs);
442 447 rsMap.put("totalPages", count % size == 0 ? (count / size - 1) : count / size);
443 448 rsMap.put("page", page);
... ... @@ -450,51 +455,6 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
450 455  
451 456 @Override
452 457 public Map<String, Object> findAll80(Map<String, Object> map, int page, int size) {
453   - /*List<D80> d80s = new ArrayList<>();
454   -
455   - Object nbbm = map.get("nbbm");
456   - if (null != nbbm && StringUtils.isNotEmpty(nbbm.toString())) {
457   - d80s.addAll(pilotReport.findByCar(nbbm.toString()));
458   - } else {
459   - d80s.addAll(pilotReport.findAll());
460   - }
461   -
462   - Short requestCode = Short.parseShort(map.get("requestCode").toString());
463   - if (requestCode != -1) {
464   - List<D80> temps = new ArrayList<>();
465   - for (D80 d80 : d80s) {
466   - if (d80.getData().getRequestCode().equals(requestCode))
467   - temps.add(d80);
468   - }
469   - d80s = temps;
470   - }
471   -
472   - //排序
473   - Collections.sort(d80s, new Comparator<D80>() {
474   - @Override
475   - public int compare(D80 o1, D80 o2) {
476   - return (int) (o2.getTimestamp() - o1.getTimestamp());
477   - }
478   - });
479   -
480   - //分页
481   - int count = d80s.size();
482   - // 分页
483   - int s = page * size, e = s + size;
484   -
485   - if (e > count)
486   - e = count;
487   -
488   - //SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm");
489   - List<D80> rs = d80s.subList(s, e);
490   - for (D80 d80 : rs) {
491   - d80.setTimeStr(fmtHHmm.print(d80.getTimestamp()));
492   - }
493   -
494   - Map<String, Object> rsMap = new HashMap<>();
495   - rsMap.put("list", rs);
496   - rsMap.put("totalPages", count % size == 0 ? count / size - 1 : count / size);
497   - rsMap.put("page", page);*/
498 458  
499 459 List all = ListFilterUtils.filter(pilotReport.findAll(), map, D80.class);
500 460 //排序
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
... ... @@ -1099,7 +1099,7 @@ public class FormsServiceImpl implements FormsService {
1099 1099 if (cts != null && cts.size() > 0) {
1100 1100 newList.add(s);
1101 1101 } else {
1102   - if (s.getZdsjActual() != null) {
  1102 + if (s.getZdsjActual() != null && s.getFcsjActual() != null) {
1103 1103 newList.add(s);
1104 1104 }
1105 1105 }
... ... @@ -1184,7 +1184,7 @@ public class FormsServiceImpl implements FormsService {
1184 1184 if (cts != null && cts.size() > 0) {
1185 1185 newList_.add(s);
1186 1186 } else {
1187   - if (s.getZdsjActual() != null) {
  1187 + if (s.getZdsjActual() != null && s.getFcsjActual() != null) {
1188 1188 newList_.add(s);
1189 1189 }
1190 1190 }
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -418,7 +418,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
418 418 for(ScheduleRealInfo schedule : keyMap2.get(date)){
419 419 if(schedule.getFcsjT() != null && !schedule.isSflj())
420 420 fcsjs.add(schedule.getFcsjT());
421   - if(schedule.getFcsjActualTime() != null && schedule.getStatus() != -1)
  421 + if(schedule.getFcsjActualTime() != null && schedule.getZdsjActualTime() != null
  422 + && schedule.getStatus() != -1)
422 423 fcsjAs.add(schedule.getFcsjActualTime());
423 424 }
424 425 Collections.sort(fcsjs);
... ... @@ -1686,7 +1687,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1686 1687 jhbc++;
1687 1688 jhlc = jhlc.add(lc);
1688 1689 }
1689   - if(schedule.getStatus() != -1 && !schedule.isCcService()){
  1690 + if(schedule.getFcsjActual() != null && schedule.getZdsjActual() != null
  1691 + && schedule.getStatus() != -1 && !schedule.isCcService()){
1690 1692 sjbc++;
1691 1693 sjlc = sjlc.add(lc);
1692 1694 } else if(schedule.getStatus() == -1 && !schedule.isCcService()){
... ... @@ -1920,8 +1922,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1920 1922 dxtz = 0, lbtz = 0;
1921 1923 for(ScheduleRealInfo schedule : keyMap.get(key)){
1922 1924 boolean flag = false;
1923   - if(schedule.getFcsjActual() != null && schedule.getStatus() != -1
1924   - && !schedule.isCcService()){
  1925 + if(schedule.getFcsjActual() != null && schedule.getZdsjActual() != null
  1926 + && schedule.getStatus() != -1 && !schedule.isCcService()){
1925 1927 sjbc++;
1926 1928 if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
1927 1929 flag = true;
... ...
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
... ... @@ -9,7 +9,6 @@ import java.util.HashMap;
9 9 import java.util.List;
10 10 import java.util.Map;
11 11  
12   -import org.drools.core.time.impl.PseudoClockScheduler;
13 12 import org.springframework.beans.factory.annotation.Autowired;
14 13 import org.springframework.jdbc.core.BatchPreparedStatementSetter;
15 14 import org.springframework.jdbc.core.JdbcTemplate;
... ... @@ -141,9 +140,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
141 140 jdbcTemplate.update("delete from bsth_c_stationroute where line = ? and line_code = ?", lineId, lineCode);
142 141  
143 142 String stationSql ="insert into bsth_c_stationroute(id,line,station,station_name,station_route_code,"
144   - + "line_code,station_code,station_mark,out_station_nmber,directions,distances,"
145   - + "to_time,first_time,end_time,descriptions,destroy,versions,create_by,create_date,"
146   - + "update_by,update_date) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  143 + + "line_code,station_code,station_mark,directions,distances,to_time,destroy,versions,"
  144 + + "create_date,update_date) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
147 145 jdbcTemplate.batchUpdate(stationSql, new BatchPreparedStatementSetter() {
148 146  
149 147 @Override
... ... @@ -158,19 +156,13 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
158 156 ps.setString(6, sRoute.getLineCode());
159 157 ps.setString(7, sRoute.getStationCode());
160 158 ps.setString(8, sRoute.getStationMark());
161   - ps.setInt(9, sRoute.getOutStationNmber()==null ? 0:sRoute.getOutStationNmber());
162   - ps.setInt(10, sRoute.getDirections());
163   - ps.setDouble(11, sRoute.getDistances());
164   - ps.setDouble(12, sRoute.getToTime());
165   - ps.setString(13, sRoute.getFirstTime()==null ? "":sRoute.getFirstTime());
166   - ps.setString(14, sRoute.getEndTime()==null ? "":sRoute.getEndTime());
167   - ps.setString(15, sRoute.getDescriptions()==null ? "":sRoute.getDescriptions());
168   - ps.setInt(16, sRoute.getDestroy());
169   - ps.setInt(17, sRoute.getVersions());
170   - ps.setInt(18, sRoute.getCreateBy()==null ? 0:sRoute.getCreateBy());
171   - ps.setDate(19, new java.sql.Date(sRoute.getCreateDate().getTime()));
172   - ps.setInt(20, sRoute.getUpdateBy()==null ? 0:sRoute.getUpdateBy());
173   - ps.setDate(21, new java.sql.Date(sRoute.getUpdateDate().getTime()));
  159 + ps.setInt(9, sRoute.getDirections());
  160 + ps.setDouble(10, sRoute.getDistances());
  161 + ps.setDouble(11, sRoute.getToTime());
  162 + ps.setInt(12, sRoute.getDestroy());
  163 + ps.setInt(13, sRoute.getVersions());
  164 + ps.setDate(14, new java.sql.Date(sRoute.getCreateDate().getTime()));
  165 + ps.setDate(15, new java.sql.Date(sRoute.getUpdateDate().getTime()));
174 166 }
175 167  
176 168 @Override
... ... @@ -182,8 +174,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
182 174 jdbcTemplate.update("delete from bsth_c_sectionroute where line = ? and line_code = ?", lineId, lineCode);
183 175  
184 176 String sectionSql ="insert into bsth_c_sectionroute(id,line_code,section_code,sectionroute_code,"
185   - + "directions,line,section,descriptions,create_by,create_date,update_by,update_date,versions,"
186   - + "destroy,is_roade_speed) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  177 + + "directions,line,section,create_date,update_date,versions,"
  178 + + "destroy) values(?,?,?,?,?,?,?,?,?,?,?)";
187 179 jdbcTemplate.batchUpdate(sectionSql, new BatchPreparedStatementSetter() {
188 180  
189 181 @Override
... ... @@ -196,14 +188,10 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
196 188 ps.setInt(5, sRoute.getDirections());
197 189 ps.setInt(6, sRoute.getLine().getId());
198 190 ps.setInt(7, sRoute.getSection().getId());
199   - ps.setString(8, sRoute.getDescriptions()==null ? "":sRoute.getDescriptions());
200   - ps.setInt(9, sRoute.getCreateBy()==null ? 0:sRoute.getCreateBy());
201   - ps.setDate(10, new java.sql.Date(sRoute.getCreateDate().getTime()));
202   - ps.setInt(11, sRoute.getUpdateBy()==null ? 0:sRoute.getUpdateBy());
203   - ps.setDate(12, new java.sql.Date(sRoute.getUpdateDate().getTime()));
204   - ps.setInt(13, sRoute.getVersions());
205   - ps.setInt(14, sRoute.getDestroy());
206   - ps.setInt(15, sRoute.getIsRoadeSpeed()==null ? 0:sRoute.getIsRoadeSpeed());
  191 + ps.setDate(8, new java.sql.Date(sRoute.getCreateDate().getTime()));
  192 + ps.setDate(9, new java.sql.Date(sRoute.getUpdateDate().getTime()));
  193 + ps.setInt(10, sRoute.getVersions());
  194 + ps.setInt(11, sRoute.getDestroy());
207 195 }
208 196  
209 197 @Override
... ... @@ -231,5 +219,10 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
231 219 }
232 220 return list;
233 221 }
  222 +
  223 + @Override
  224 + public LineVersions findLineVersionsMax(int lineId) {
  225 + return repository.findLineVersionsMax(lineId);
  226 + }
234 227  
235 228 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -283,10 +283,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
283 283 //重新计算是否误点
284 284 schedule.reCalcLate();
285 285 //取消应发未到标记,不再自动调整待发
286   - if(schedule.isLate2()){
287   - schedule.setLate2(false);
288   - LateAdjustHandle.remove(schedule);
289   - }
  286 + //if(schedule.isLate2()){
  287 + // schedule.setLate2(false);
  288 + LateAdjustHandle.remove(schedule);
  289 + //}
290 290  
291 291 try {
292 292 if(!schedule.getDirectiveState().equals(-1) && schedule.getStatus()==0){
... ... @@ -1200,11 +1200,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1200 1200 sch.setFcsjActualAll(fcsjActual);
1201 1201 sch.addRemarks(remarks);
1202 1202 sch.calcStatus();
1203   - if(sch.isLate2()){
  1203 + //if(sch.isLate2()){
1204 1204 //取消应发未到标记
1205   - sch.setLate2(false);
1206   - LateAdjustHandle.remove(sch);
1207   - }
  1205 + // sch.setLate2(false);
  1206 + LateAdjustHandle.remove(sch);
  1207 + //}
1208 1208  
1209 1209 dayOfSchedule.save(sch);
1210 1210  
... ... @@ -1431,10 +1431,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1431 1431 fLog.log("调整实发时间", sch.getFcsjActual(), fcsjActual);
1432 1432 sch.setFcsjActualAll(t);
1433 1433 //取消应发未到标记
1434   - if(sch.isLate2()){
1435   - sch.setLate2(false);
  1434 + //if(sch.isLate2()){
  1435 + // sch.setLate2(false);
1436 1436 LateAdjustHandle.remove(sch);
1437   - }
  1437 + //}
1438 1438 } else if (StringUtils.isNotEmpty(sch.getFcsjActual()) && StringUtils.isEmpty(fcsjActual)){
1439 1439 fLog.log("撤销实发时间", sch.getFcsjActual(), "");
1440 1440 //撤销实发
... ... @@ -1463,6 +1463,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1463 1463  
1464 1464 //重新计算车辆执行班次
1465 1465 dayOfSchedule.reCalcExecPlan(sch.getClZbh());
  1466 + //取消应发未到标记
  1467 + LateAdjustHandle.remove(sch);
1466 1468 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){
1467 1469 //清除实达时间
1468 1470 fLog.log("撤销实达时间", sch.getZdsjActual(), "");
... ...
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -80,6 +80,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
80 80 schedule.setsGh(rs.getString("s_gh"));
81 81 schedule.setsName(rs.getString("s_name"));
82 82 schedule.setSpId(rs.getLong("sp_id"));
  83 + schedule.setSflj(rs.getBoolean("sflj"));
83 84 schedule.setCcService(rs.getBoolean("cc_service"));
84 85  
85 86 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
... ... @@ -224,8 +225,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
224 225  
225 226 //分组计算路程公里
226 227 for(SchedulePlanInfo schedule : list){
  228 + if(schedule.getsName() != null && schedule.getsName().trim().equals("")){
  229 + schedule.setsName(null);
  230 + }
227 231 String key = schedule.getXlName() + "/" + schedule.getLpName() + "/" +
228 232 schedule.getClZbh() + "/" + schedule.getjName() + "/" + schedule.getsName();
  233 + key = key.trim();
229 234 if(!keyMap.containsKey(key))
230 235 keyMap.put(key, new ArrayList<SchedulePlanInfo>());
231 236 keyMap.get(key).add(schedule);
... ... @@ -273,10 +278,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
273 278 str += (int)lp.charAt(i);
274 279 }
275 280 Long i = Long.valueOf(str);
276   - if(!tempList.containsKey(i))
  281 + if(!tempList.containsKey(i)){
277 282 tempList.put(i, new ArrayList<Map<String, Object>>());
  283 + keyList.add(i);
  284 + }
278 285 tempList.get(i).add(m);
279   - keyList.add(i);
280 286 }
281 287 Collections.sort(keyList);
282 288 for(Long i : keyList){
... ... @@ -387,14 +393,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
387 393 }
388 394  
389 395 //班次数和出场数
390   - jhbc++;
391   - if(schedule.getBcType().equals("out"))
392   - jhcc++;
  396 + if(!schedule.isSflj() && schedule.getFcsj() != null && schedule.getZdsj() != null){
  397 + if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out") && !schedule.getBcType().equals("ldks")){
  398 + jhbc++;
  399 + System.out.print((""+schedule.isSflj()).equals("false")?"":"X" + " ");
  400 + }
  401 + if(schedule.getBcType().equals("out"))
  402 + jhcc++;
  403 + }
  404 + if(schedule.getStatus() != -1 && schedule.getBcType().equals("out"))
  405 + sjcc++;
393 406  
  407 + if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out") && !schedule.getBcType().equals("ldks")
  408 + && schedule.getFcsjActual() != null && schedule.getZdsjActual() != null && schedule.getStatus() != -1){
  409 +
394 410 //发出时间快慢
395 411 if(schedule.getFcsjActual() != null){
396   - if(schedule.getBcType().equals("out"))
397   - sjcc++;
398 412 // schedule.setFcsjActualAll(schedule.getFcsjActual());
399 413 if(schedule.getFcsjActualTime() - schedule.getFcsjT() < -1){
400 414 if(schedule.getXlDir().equals("0"))
... ... @@ -434,14 +448,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
434 448 }
435 449 }
436 450  
437   - if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out")
438   - && !schedule.getBcType().equals("ldks") && schedule.getFcsjActual() != null){
  451 + if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out") && !schedule.getBcType().equals("ldks")
  452 + && schedule.getFcsjActual() != null && schedule.getZdsjActual() != null){
439 453 // String clZbh = schedule.getClZbh();
440 454 String xlDir = schedule.getXlDir();
441 455 if(!listMap.containsKey(xlDir))
442 456 listMap.put(xlDir, new ArrayList<ScheduleRealInfo>());
443 457 listMap.get(xlDir).add(schedule);
444 458 }
  459 + }
445 460 }
446 461  
447 462 //求首末班准点率
... ...
src/main/resources/static/pages/base/line/editRoute.html
... ... @@ -57,7 +57,7 @@
57 57 <p>
58 58 <span class="help-block" style="color: #1bbc9b;">
59 59 &nbsp;请在文本域中按顺序依次输坐标点,每行中的数据之间用【Tab】键隔开(如果是站点,请将在坐标后面加 stop;没有
60   - stop默认是路段点),每输入完一个坐标时请按回车键【Enter】换行. 例如:<!-- <br> 121.715623
  60 + stop默认是路段点,连续带stop的坐标认为是同一个站点),每输入完一个坐标时请按回车键【Enter】换行. 例如:<!-- <br> 121.715623
61 61 31.224058 042408.000<br> 121.715623 31.224065 042409.000
62 62 Stop<br> 121.715623 31.224065 042410.000<br> -->
63 63 <br>121.511870 31.180638 043703.000
... ...
src/main/resources/static/pages/base/line/map.html
... ... @@ -175,7 +175,7 @@ $(function(){
175 175 WorldsBMapLine.deleteCutSectionPoint(firstPoint);
176 176 WorldsBMapLine.setIsCutSection(false);
177 177 } else {
178   - layer.msg("没有截取路段,不可以删除!!!");
  178 + layer.msg("没有截取路段,不可以撤销!!!");
179 179 }
180 180 });
181 181 // 滚动轴监听事件
... ...
src/main/resources/static/pages/base/line/submit_select.html
... ... @@ -23,9 +23,9 @@
23 23 </form>
24 24 </div>
25 25 <div class="modal-footer">
26   - <button type="button" class="btn default" data-dismiss="modal">取消</button>
27 26 <button type="button" class="btn btn-primary"
28 27 id="submitSelectnextButton">提交</button>
  28 + <button type="button" class="btn default" data-dismiss="modal">取消</button>
29 29 </div>
30 30 </div>
31 31 </div>
... ... @@ -50,9 +50,9 @@
50 50 }
51 51 if(this.status==1){
52 52 //当前版本为默认
53   - options += '<option value="'+this.versions+','+this.status+','+startDate+'" > 版本'+this.versions+' 启用时间:'+startDate+' 当前版本</option>';
  53 + options += '<option value="'+this.versions+','+this.status+','+startDate+'" selected = "selected" > 版本'+this.versions+' 启用时间:'+startDate+' 当前版本</option>';
54 54 } else if(this.status==2){
55   - options += '<option value="'+this.versions+','+this.status+','+startDate+'" selected = "selected"> 版本'+this.versions+' 启用时间:'+startDate+' 待更新版本</option>';
  55 + options += '<option value="'+this.versions+','+this.status+','+startDate+'"> 版本'+this.versions+' 启用时间:'+startDate+' 待更新版本</option>';
56 56 }
57 57 });
58 58 $('#lineVersions').html(options);
... ...
src/main/resources/static/pages/base/lineversions/add.html
1 1 <!-- 片段标题 START -->
2 2 <div class="page-head">
3 3 <div class="page-title">
4   - <h1>修改添加信息</h1>
  4 + <h1>添加线路版本</h1>
5 5 </div>
6 6 </div>
7 7 <!-- 片段标题 END -->
8 8  
9   -<!-- 线路信息导航栏组件 START -->
  9 +<!-- 线路版本信息导航栏组件 START -->
10 10 <ul class="page-breadcrumb breadcrumb">
11 11 <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
12 12 <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li>
13   - <li><a href="/pages/base/line/list.html" data-pjax>线路信息</a> <i class="fa fa-circle"></i></li>
  13 + <li><a href="/pages/base/lineversions/list.html" data-pjax>线路版本信息</a> <i class="fa fa-circle"></i></li>
14 14 <li><span class="active">修改添加信息</span></li>
15 15 </ul>
16   -<!-- 线路信息导航栏组件 END -->
  16 +<!-- 线路版本信息导航栏组件 END -->
17 17  
18 18 <!-- 信息容器组件 START -->
19 19 <div class="portlet light bordered">
... ... @@ -22,7 +22,7 @@
22 22 <div class="portlet-title">
23 23 <div class="caption">
24 24 <i class="icon-equalizer font-red-sunglo"></i>
25   - <span class="caption-subject font-red-sunglo bold uppercase">添加线路信息</span>
  25 + <span class="caption-subject font-red-sunglo bold uppercase">添加线路版本信息</span>
26 26 </div>
27 27 </div>
28 28 <!-- 信息容器组件标题 END -->
... ... @@ -48,6 +48,17 @@
48 48 <!-- 表单分组组件 form-group START -->
49 49 <div class="form-group">
50 50 <label class="control-label col-md-5">
  51 + <span class="required"> * </span>线路版本名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  52 + </label>
  53 + <div class="col-md-4">
  54 + <input name="name" class="form-control" style="width:100%" id="nameInput" placeholder="请填写更换版本原因,方便排班人员操作!" />
  55 + </div>
  56 + </div>
  57 + <!-- 表单分组组件 form-group END -->
  58 +
  59 + <!-- 表单分组组件 form-group START -->
  60 + <div class="form-group">
  61 + <label class="control-label col-md-5">
51 62 <span class="required"> * </span>线路名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
52 63 </label>
53 64 <div class="col-md-4">
... ... @@ -105,9 +116,9 @@
105 116  
106 117 <!-- 表单分组组件 form-group START -->
107 118 <div class="form-group">
108   - <label class="control-label col-md-5"> 描述/说明&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  119 + <label class="control-label col-md-5"> 描述/说明&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
109 120 <div class="col-md-4">
110   - <textarea class="form-control" rows="3" name="remark" id="remarkTextarea" placeholder="请填写更换版本原因,方便排班人员操作!"></textarea>
  121 + <textarea class="form-control" rows="3" name="remark" id="remarkTextarea" placeholder="描述/说明"></textarea>
111 122 </div>
112 123 </div>
113 124 <!-- 表单分组组件 form-group END -->
... ... @@ -130,5 +141,5 @@
130 141 </div>
131 142 <!-- 信息容器组件 END -->
132 143  
133   -<!-- 线路信息添加片段JS模块 -->
  144 +<!-- 线路版本信息添加片段JS模块 -->
134 145 <script src="/pages/base/lineversions/js/lineversions-add-from.js"></script>
135 146 \ No newline at end of file
... ...
src/main/resources/static/pages/base/lineversions/js/lineversions-add-from.js
... ... @@ -70,6 +70,9 @@
70 70 $('#lineIdInput').val('');// 设值线路ID.
71 71 }else {
72 72 var lineSelectValueArray = lineSelectValue.split('_');// 切割线路名称值.
  73 + $.get('/lineVersions/findLineVersionsMax',{'lineId':lineSelectValueArray[1]}, function(lineVersionsMax){
  74 + $('#versionsInput').val(++lineVersionsMax.versions);// 设值线路编码.
  75 + });
73 76 $('#lineIdInput').val(lineSelectValueArray[0]);// 设值线路编码.
74 77 $('#lineCodeInput').val(lineSelectValueArray[1]);// 设值线路ID.
75 78 }
... ... @@ -110,6 +113,7 @@
110 113 focusInvalid : true,
111 114 // 需要验证的表单元素
112 115 rules : {
  116 + 'name' : {required : true,maxlength: 30},// 线路名称 必填项、最大长度.
113 117 'line' : {required : true,maxlength: 30},// 线路名称 必填项、最大长度.
114 118 'startDate' : {required : true},// 启用时间 不为空.
115 119 'endDate' : {required : true},// 结束时间.
... ...
src/main/resources/static/pages/base/stationroute/edit_select.html
... ... @@ -124,6 +124,10 @@ $(&#39;#edit_select_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,drw,ajaxd,ed
124 124 // 打开绘制工具
125 125 drw.openDrawingManager();
126 126 map_.localtionPoint(editStationName);
  127 + layer.open({
  128 + title: '友情提示'
  129 + ,content: '重绘站点,会修改站点编码,影响已做好的排班和线路文件。请谨慎使用,谢谢!'
  130 + });
127 131 }else if(params.editselect==1){
128 132 // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒)
129 133 var mindex = layer.msg('编辑完图形后,请双击图形区域保存',{ offset: '126px',
... ...
src/main/resources/static/pages/forms/statement/busInterval.html
... ... @@ -308,7 +308,7 @@
308 308 // $(".hidden").removeClass("hidden");
309 309 $get('/busInterval/interval', params, function(result){
310 310 // 把数据填充到模版中
311   - var tbodyHtml = template('list_workDaily',{list:result,statu:statu});
  311 + var tbodyHtml = template('list_busInteval',{list:result,statu:statu});
312 312 // 把渲染好的模版html文本追加到表格中
313 313 $('#forms').html(tbodyHtml);
314 314 _w_table_rowspan("#forms tbody", 1);
... ... @@ -440,7 +440,7 @@
440 440 });
441 441  
442 442 </script>
443   -<script type="text/html" id="list_workDaily">
  443 +<script type="text/html" id="list_busInteval">
444 444 <thead>
445 445 <tr>
446 446 <th>日期</th>
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly_sum.html
... ... @@ -257,7 +257,7 @@
257 257 $(".hidden").removeClass("hidden");
258 258 $get('/pcpc/scheduleAnaly_sum', params, function(result){
259 259 // 把数据填充到模版中
260   - var tbodyHtml = template('list_scheduleAnaly',{list:result.dataList, companyName:companyName, subCompanyName:subCompanyName});
  260 + var tbodyHtml = template('list_scheduleAnaly_sum',{list:result.dataList, companyName:companyName, subCompanyName:subCompanyName});
261 261 // 把渲染好的模版html文本追加到表格中
262 262 $('#forms tbody').html(tbodyHtml);
263 263  
... ... @@ -384,7 +384,7 @@
384 384 });
385 385  
386 386 </script>
387   -<script type="text/html" id="list_scheduleAnaly">
  387 +<script type="text/html" id="list_scheduleAnaly_sum">
388 388 {{each list as obj i}}
389 389 <tr>
390 390 <th style="display: none;"></th>
... ...
src/main/resources/static/pages/history_sch/edit/main_page.html
... ... @@ -144,6 +144,19 @@
144 144 var hide_wait_modal = function () {
145 145 UIkit.modal('#gb_wait_modal').hide();
146 146 };
  147 +
  148 + var alt_confirm = function (content, succ, okBtn, noCenter) {
  149 + var modalEl = UIkit.modal.confirm(content, function () {
  150 + succ && succ();
  151 + modalEl.hide();
  152 + }, {
  153 + labels: {
  154 + Ok: okBtn,
  155 + Cancel: '取消'
  156 + }
  157 + , center: !noCenter
  158 + });
  159 + };
147 160 </script>
148 161 </body>
149 162 </html>
150 163 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sys_mailbox.html
1 1 <div>
2 2 <script id="sys-note-80-temp" type="text/html">
3   - <div class="uk-width-medium-1-1 sys-note-80 sys-mail-item" data-id={{id}}>
  3 + <div class="uk-width-medium-1-1 sys-note-80 sys-mail-item" data-id={{id}} data-schid="{{schId}}">
4 4 <div class="uk-panel uk-panel-box uk-panel-box-primary">
5 5 <h4 class="uk-panel-title">{{data.nbbm}} {{text}}</h4>
6 6 <code>{{dateStr}}</code>
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/directive_history.html
... ... @@ -21,9 +21,13 @@
21 21 <option value="1">运营指令</option>
22 22 <option value="2">线路切换指令</option>
23 23 </select>
  24 + <span class="horizontal-field">线路</span>
  25 + <select name="lineCode" style="width: 140px;">
  26 + <option value="">全部</option>
  27 + </select>
24 28 <span class="horizontal-field">车辆</span>
25 29 <div class="uk-autocomplete uk-form" id="uk-autocomplete-cars">
26   - <input type="text" name="nbbm" placeholder="车辆自编号">
  30 + <input type="text" name="nbbms" placeholder="车辆自编号">
27 31 </div>
28 32  
29 33 <button class="uk-button">检索</button>
... ... @@ -81,43 +85,18 @@
81 85 var form = $('.search-form', modal);
82 86 var page = 0;
83 87 var pageSize = 12;
84   - //all car nbbm
85   - var cars;
86   - //custom autocomplete search function
87   - var carInput = $('#uk-autocomplete-cars input');
88   - var search_nbbm = function(release) {
89   - var q = carInput.val().toUpperCase(),
90   - rs = [],
91   - max = 12,
92   - count = 0;
93   -
94   - $.each(cars, function(i, item) {
95   - if (item.indexOf(q) != -1){
96   - rs.push({
97   - value: item,
98   - title: item
99   - });
100   - count ++;
101   - }
102   - if (count >= max)
103   - return false;
104   - });
105 88  
106   - release && release(rs);
107   - }
  89 + //线路下拉框
  90 + var opts = '<option value="">全部</option>';
  91 + $.each(gb_data_basic.activeLines, function () {
  92 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  93 + });
  94 + $('[name=lineCode]', form).html(opts);
108 95  
109 96 $('#directive-history-modal').on('init', function(e, data) {
110 97 e.stopPropagation();
111   - // autocomplete
112   - $.get('/basic/cars', function(rs) {
113   - cars = rs;
114   -
115   - UIkit.autocomplete('#uk-autocomplete-cars', {
116   - source: search_nbbm,
117   - minLength: 1,
118   - delay: 50
119   - });
120   - });
  98 + //车辆 autocomplete
  99 + gb_common.carAutocomplete($('#uk-autocomplete-cars', modal), gb_data_basic.carsArray());
121 100 query();
122 101 });
123 102  
... ... @@ -133,6 +112,17 @@
133 112 var data = form.serializeJSON();
134 113 data.page = page;
135 114 data.size = pageSize;
  115 + if(data.lineCode){
  116 + //有选择线路,重新设置车辆字符串
  117 + var nbbmArray=data.nbbms=gb_schedule_table.findNbbmByLineCode(data.lineCode);
  118 + if(nbbmArray.length>0){
  119 + data.nbbms='';
  120 + for(var i=0,n;n=nbbmArray[i++];){
  121 + data.nbbms+=n+',';
  122 + }
  123 + data.nbbms=data.nbbms.substr(0, data.nbbms.length-1);
  124 + }
  125 + }
136 126  
137 127 $.get('/directive/list', data, function(rs) {
138 128 $.each(rs.list, function(i, e){
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_80.html
... ... @@ -14,10 +14,12 @@
14 14 <select name="requestCode">
15 15 <option value="">全部</option>
16 16 </select>
17   - <span class="horizontal-field">线路</span>
  17 + <!--<span class="horizontal-field">线路</span>
18 18 <div class="uk-autocomplete uk-form autocomplete-line" >
19 19 <input type="text" name="lineId" placeholder="线路">
20   - </div>
  20 + </div>-->
  21 + <span class="horizontal-field">线路</span>
  22 + <select name="lineId" style="width: 140px;"></select>
21 23 <span class="horizontal-field">车辆</span>
22 24 <div class="uk-autocomplete uk-form autocomplete-cars" >
23 25 <input type="text" name="nbbm" placeholder="车辆自编号">
... ... @@ -80,6 +82,13 @@
80 82 var page = 0;
81 83 var pageSize = 12;
82 84  
  85 + //线路下拉框
  86 + var opts = '<option value="">全部</option>';
  87 + $.each(gb_data_basic.activeLines, function () {
  88 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  89 + });
  90 + $('[name=lineId]', form).html(opts);
  91 +
83 92 $(modal).on('init', function(e, data) {
84 93 e.stopPropagation();
85 94 var opt='';
... ... @@ -90,7 +99,7 @@
90 99 //车辆 autocomplete
91 100 gb_common.carAutocomplete($('.autocomplete-cars', modal), gb_data_basic.carsArray());
92 101 //线路 autocomplete
93   - gb_common.lineAutocomplete($('.autocomplete-line', modal));
  102 + //gb_common.lineAutocomplete($('.autocomplete-line', modal));
94 103 query();
95 104 });
96 105  
... ... @@ -106,12 +115,12 @@
106 115 var data = form.serializeJSON();
107 116 data.page = page;
108 117 data.size = pageSize;
109   - //线路转换成编码
  118 + /*//线路转换成编码
110 119 if(data.lineId){
111 120 var lineCode = gb_data_basic.findCodeByLinename(data.lineId);
112 121 if(lineCode)
113 122 data.lineId=lineCode;
114   - }
  123 + }*/
115 124 $.get('/directive/findAll80', data, function(rs) {
116 125 $.each(rs.list, function(){
117 126 //命令字转中文
... ...
src/main/resources/static/real_control_v2/js/common.js
... ... @@ -62,6 +62,18 @@ var gb_common = (function () {
62 62 return rs;
63 63 };
64 64  
  65 + /**
  66 + * 从班次集合里提取车辆
  67 + * @param list
  68 + */
  69 + var extractNbbm = function (list) {
  70 + var rs = {};
  71 + $.each(list, function () {
  72 + rs[this.clZbh]=1;
  73 + });
  74 + return rs;
  75 + };
  76 +
65 77 var compileTempByDom = function (dom, opts) {
66 78 var tps = {},
67 79 id;
... ... @@ -435,7 +447,8 @@ var gb_common = (function () {
435 447 adjustExps: adjustExps,
436 448 inOutExps: inOutExps,
437 449 next_elem: next_elem,
438   - getDisabledVal: getDisabledVal
  450 + getDisabledVal: getDisabledVal,
  451 + extractNbbm: extractNbbm
439 452  
440 453 //whichTransitionEvent:whichTransitionEvent
441 454 };
... ...
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -651,6 +651,17 @@ var gb_schedule_table = (function () {
651 651 var refreshAll = function () {
652 652 show();
653 653 };
  654 +
  655 + /**
  656 + * 获取线路下营运的车辆
  657 + */
  658 + var findNbbmByLineCode = function (lineCode) {
  659 + try{
  660 + return gb_common.get_keys(gb_common.extractNbbm(gb_common.get_vals(line2Schedule[lineCode])));
  661 + }catch (e){
  662 + return [];
  663 + }
  664 + };
654 665  
655 666 return {
656 667 show: show,
... ... @@ -673,6 +684,7 @@ var gb_schedule_table = (function () {
673 684 showLateBadge: showLateBadge,
674 685 cancelLateBadge: cancelLateBadge,
675 686 refreshAll: refreshAll,
676   - getNextNormalSch: getNextNormalSch
  687 + getNextNormalSch: getNextNormalSch,
  688 + findNbbmByLineCode:findNbbmByLineCode
677 689 };
678 690 })();
... ...
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-02',
172   - text: '<h5>1、修正二次放站时,需要先将班次切回正常班次的问题。</h5><h5>2、驾驶员请求信使上,添加“编辑”链接,可弹出对应班次的发车信息微调框。</h5>'
  171 + date: '2017-11-08',
  172 + text: '<h5>1、现在点击驾驶员请求信使,也可以定位到班次。</h5><h5>2、修复进场班次不会自动误点待发调整的问题。</h5><h5>3、“指令下发记录” 和 “设备上报记录” 加入线路筛选。</h5><h5>4、尝试修复“自动执行的班车线路”和营运线路套跑时,线路切换指令会延迟触发的问题。</h5>'
173 173 };
174 174  
175 175 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
... ... @@ -235,23 +235,37 @@ var gb_sch_websocket = (function () {
235 235 dl.addClass('relevance-active intimity').find('dd:eq(5)').trigger('click');
236 236 });
237 237  
  238 + //80消息点击
  239 + $(document).on('click', '.sys-mailbox .sys-note-80', function () {
  240 + var lineCode = $(this).parents('li.line_schedule').data('id')
  241 + , id = $(this).data('schid');
  242 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  243 + var dl = gb_schedule_table.scroToDl(sch);
  244 + //高亮
  245 + gb_schedule_table.reset_drag_active_all(dl);
  246 + dl.addClass('relevance-active intimity').find('dd:eq(5)').trigger('click');
  247 + });
238 248  
239 249 //80同意
240   - $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button-primary', function () {
  250 + $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button-primary', function (e) {
  251 + e.stopPropagation();
241 252 $(this).attr('disabled', 'disabled');
242 253 var panel = $(this).parents('.sys-note-80')
243 254 , id = panel.data('id');
244 255  
245 256 reply80({id: id, reply: 0});
  257 + return false;
246 258 });
247 259  
248 260 //80不同意
249 261 $(document).on('click', '.sys-mailbox .sys-note-80 .uk-button.reject', function () {
  262 + e.stopPropagation();
250 263 $(this).attr('disabled', 'disabled');
251 264 var panel = $(this).parents('.sys-note-80')
252 265 , id = panel.data('id');
253 266  
254 267 reply80({id: id, reply: -1});
  268 + return false;
255 269 });
256 270  
257 271 var reply80 = function (data, cb) {
... ... @@ -344,10 +358,6 @@ var gb_sch_websocket = (function () {
344 358 return;
345 359  
346 360 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 361 });
352 362  
353 363 return {
... ...