Commit c81af18814a52df8790a265a6f7064bd488be213

Authored by 徐烜
2 parents dd8b08bd 0939baf2

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

Showing 27 changed files with 310 additions and 624 deletions
src/main/java/com/bsth/XDApplication.java
@@ -88,14 +88,14 @@ public class XDApplication implements CommandLineRunner { @@ -88,14 +88,14 @@ public class XDApplication implements CommandLineRunner {
88 ScheduledExecutorService sexec = Application.mainServices; 88 ScheduledExecutorService sexec = Application.mainServices;
89 //抓取GPS数据 89 //抓取GPS数据
90 gpsDataLoader.setFlag(-1); 90 gpsDataLoader.setFlag(-1);
91 - sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); 91 + //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS);
92 //实际排班更新线程 92 //实际排班更新线程
93 - sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 93 + //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
94 //实际排班延迟入库线程 94 //实际排班延迟入库线程
95 - sexec.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS); 95 + //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
96 96
97 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) 97 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
98 - sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); 98 + //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
99 } 99 }
100 100
101 public void prodInit(){ 101 public void prodInit(){
@@ -110,7 +110,7 @@ public class XDApplication implements CommandLineRunner { @@ -110,7 +110,7 @@ public class XDApplication implements CommandLineRunner {
110 //实际排班更新线程 110 //实际排班更新线程
111 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 111 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
112 //实际排班延迟入库线程 112 //实际排班延迟入库线程
113 - sexec.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS); 113 + sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
114 //检查班次误点 114 //检查班次误点
115 sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS); 115 sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS);
116 //调度指令延迟入库 116 //调度指令延迟入库
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -48,8 +48,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -48,8 +48,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
48 */ 48 */
49 @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) 49 @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)
50 public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, 50 public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,
51 - @RequestParam String dfsj,String bcType) {  
52 - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType); 51 + @RequestParam String dfsj,String bcType,
  52 + @RequestParam(defaultValue = "") String opType) {
  53 + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType);
53 } 54 }
54 55
55 /** 56 /**
src/main/java/com/bsth/data/gpsdata/arrival/handlers/ReverseSignalHandle.java
@@ -38,7 +38,7 @@ public class ReverseSignalHandle extends SignalHandle { @@ -38,7 +38,7 @@ public class ReverseSignalHandle extends SignalHandle {
38 if (isReverse(gps, prev)) { 38 if (isReverse(gps, prev)) {
39 RouteReverse reverse = reverseSearch(prevs, gps); 39 RouteReverse reverse = reverseSearch(prevs, gps);
40 40
41 - if (reverse.getCount() >= 3 41 + if (reverse != null && reverse.getCount() >= 3
42 && reverse.isClose() 42 && reverse.isClose()
43 && !GeoCacheData.isEndStation(gps.getLineId(), gps.getUpDown(), reverse.getTurned())) { 43 && !GeoCacheData.isEndStation(gps.getLineId(), gps.getUpDown(), reverse.getTurned())) {
44 scheduleSignalState.reverseAnalyse(reverse); 44 scheduleSignalState.reverseAnalyse(reverse);
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -31,6 +31,7 @@ import org.springframework.stereotype.Component; @@ -31,6 +31,7 @@ import org.springframework.stereotype.Component;
31 import java.text.ParseException; 31 import java.text.ParseException;
32 import java.text.SimpleDateFormat; 32 import java.text.SimpleDateFormat;
33 import java.util.*; 33 import java.util.*;
  34 +import java.util.concurrent.ConcurrentLinkedQueue;
34 35
35 /** 36 /**
36 * @author PanZhao 37 * @author PanZhao
@@ -59,7 +60,7 @@ public class DayOfSchedule { @@ -59,7 +60,7 @@ public class DayOfSchedule {
59 private static Map<String, ScheduleRealInfo> carExecutePlanMap; 60 private static Map<String, ScheduleRealInfo> carExecutePlanMap;
60 61
61 // 持久化 62 // 持久化
62 - public static LinkedList<ScheduleRealInfo> pstBuffer; 63 + public static ConcurrentLinkedQueue<ScheduleRealInfo> pstBuffer;
63 64
64 // 排序器 65 // 排序器
65 private static ScheduleComparator.FCSJ schFCSJComparator; 66 private static ScheduleComparator.FCSJ schFCSJComparator;
@@ -92,7 +93,7 @@ public class DayOfSchedule { @@ -92,7 +93,7 @@ public class DayOfSchedule {
92 lpScheduleMap = ArrayListMultimap.create(); 93 lpScheduleMap = ArrayListMultimap.create();
93 94
94 id2SchedulMap = new HashMap<>(); 95 id2SchedulMap = new HashMap<>();
95 - pstBuffer = new LinkedList<>(); 96 + pstBuffer = new ConcurrentLinkedQueue<>();
96 schFCSJComparator = new ScheduleComparator.FCSJ(); 97 schFCSJComparator = new ScheduleComparator.FCSJ();
97 currSchDateMap = new HashMap<>(); 98 currSchDateMap = new HashMap<>();
98 carExecutePlanMap = new HashMap<>(); 99 carExecutePlanMap = new HashMap<>();
@@ -109,7 +110,7 @@ public class DayOfSchedule { @@ -109,7 +110,7 @@ public class DayOfSchedule {
109 private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"), fmtHHmm = DateTimeFormat.forPattern("HH:mm"); 110 private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"), fmtHHmm = DateTimeFormat.forPattern("HH:mm");
110 111
111 //数据恢复 112 //数据恢复
112 - private void dataRecovery() { 113 + public void dataRecovery() {
113 GpsDataRecovery.run = true; 114 GpsDataRecovery.run = true;
114 115
115 Collection<LineConfig> confs = lineConfigs.getAll(); 116 Collection<LineConfig> confs = lineConfigs.getAll();
src/main/java/com/bsth/data/schedule/edit_logs/SchEditLogger.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs;
  2 +
  3 +/**
  4 + * 班次修正记录
  5 + * Created by panzhao on 2017/5/16.
  6 + */
  7 +public class SchEditLogger {
  8 +
  9 + /**
  10 + * 待发调整
  11 + */
  12 + public static void dftz(Long id, String remarks, String dfsj, String bcType, String opType){
  13 +
  14 + }
  15 +}
src/main/java/com/bsth/data/schedule/thread/SchedulePstThread.java
@@ -10,7 +10,6 @@ import org.springframework.orm.jpa.JpaObjectRetrievalFailureException; @@ -10,7 +10,6 @@ import org.springframework.orm.jpa.JpaObjectRetrievalFailureException;
10 import org.springframework.stereotype.Component; 10 import org.springframework.stereotype.Component;
11 11
12 import javax.persistence.EntityNotFoundException; 12 import javax.persistence.EntityNotFoundException;
13 -import java.util.LinkedList;  
14 13
15 /** 14 /**
16 * @author PanZhao 15 * @author PanZhao
@@ -29,11 +28,11 @@ public class SchedulePstThread extends Thread { @@ -29,11 +28,11 @@ public class SchedulePstThread extends Thread {
29 @Override 28 @Override
30 public void run() { 29 public void run() {
31 30
32 - LinkedList<ScheduleRealInfo> list = DayOfSchedule.pstBuffer; 31 + //LinkedList<ScheduleRealInfo> list = DayOfSchedule.pstBuffer;
33 32
34 ScheduleRealInfo schedule; 33 ScheduleRealInfo schedule;
35 for (int i = 0; i < 1000; i++) { 34 for (int i = 0; i < 1000; i++) {
36 - schedule = list.poll(); 35 + schedule = DayOfSchedule.pstBuffer.poll();
37 if (null == schedule) 36 if (null == schedule)
38 break; 37 break;
39 38
@@ -47,7 +46,7 @@ public class SchedulePstThread extends Thread { @@ -47,7 +46,7 @@ public class SchedulePstThread extends Thread {
47 logger.error("EntityNotFoundException error.... 可忽略"); 46 logger.error("EntityNotFoundException error.... 可忽略");
48 } 47 }
49 catch (Exception e) { 48 catch (Exception e) {
50 - logger.error("", e); 49 + logger.error("班次入库的时候出现未知异常!!", e);
51 } 50 }
52 } 51 }
53 } 52 }
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -924,4 +924,8 @@ public class ScheduleRealInfo { @@ -924,4 +924,8 @@ public class ScheduleRealInfo {
924 public void setFcpSn(int fcpSn) { 924 public void setFcpSn(int fcpSn) {
925 this.fcpSn = fcpSn; 925 this.fcpSn = fcpSn;
926 } 926 }
  927 +
  928 + public boolean _isInout(){
  929 + return this.getBcType().equals("out") || this.getBcType().equals("in");
  930 + }
927 } 931 }
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -71,7 +71,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -71,7 +71,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
71 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 71 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
72 } 72 }
73 if(normal){ 73 if(normal){
74 - sql += " and bc_type != 'in' and bc_type != 'out'"; 74 + sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
75 } 75 }
76 76
77 list = jdbcTemplate.query(sql, 77 list = jdbcTemplate.query(sql,
@@ -158,7 +158,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -158,7 +158,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
158 158
159 if(model.length() != 0){ 159 if(model.length() != 0){
160 // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; 160 // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'";
161 - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'"; 161 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
162 162
163 ttList = jdbcTemplate.query(sql, 163 ttList = jdbcTemplate.query(sql,
164 new RowMapper<Long>(){ 164 new RowMapper<Long>(){
@@ -452,8 +452,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -452,8 +452,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
452 if(statu.equals("1")){ 452 if(statu.equals("1")){
453 for(Long time : timeList){ 453 for(Long time : timeList){
454 Map<String, Object> tempMap = new HashMap<String, Object>(); 454 Map<String, Object> tempMap = new HashMap<String, Object>();
455 - List<Long> fcsjs = timeMap0.get(time);  
456 - List<Long> fcsjAs = timeMap1.get(time); 455 + List<Long> fcsjs = new ArrayList<Long>();
  456 + List<Long> fcsjAs = new ArrayList<Long>();
  457 + for(Long l : timeMap0.get(time)){
  458 + if(l < 90)
  459 + fcsjs.add(l);
  460 + }
  461 + for(Long l : timeMap1.get(time)){
  462 + if(l < 90)
  463 + fcsjAs.add(l);
  464 + }
457 Collections.sort(fcsjs); 465 Collections.sort(fcsjs);
458 Collections.sort(fcsjAs); 466 Collections.sort(fcsjAs);
459 String[] split = key.split("/"); 467 String[] split = key.split("/");
@@ -514,8 +522,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -514,8 +522,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
514 String[] split = key.split("/"); 522 String[] split = key.split("/");
515 if((long)Long.valueOf(split[0]) == xlBm){ 523 if((long)Long.valueOf(split[0]) == xlBm){
516 Map<String, Object> tempMap = new HashMap<String, Object>(); 524 Map<String, Object> tempMap = new HashMap<String, Object>();
517 - List<Long> fcsjs = temp0.get(key);  
518 - List<Long> fcsjAs = temp1.get(key); 525 + List<Long> fcsjs = new ArrayList<Long>();
  526 + List<Long> fcsjAs = new ArrayList<Long>();
  527 + for(Long l : temp0.get(key)){
  528 + if(l < 90)
  529 + fcsjs.add(l);
  530 + }
  531 + for(Long l : temp1.get(key)){
  532 + if(l < 90)
  533 + fcsjAs.add(l);
  534 + }
519 Collections.sort(fcsjs); 535 Collections.sort(fcsjs);
520 Collections.sort(fcsjAs); 536 Collections.sort(fcsjAs);
521 long fcsj = 0l; 537 long fcsj = 0l;
@@ -613,7 +629,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -613,7 +629,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
613 if(sfqr == 1){ 629 if(sfqr == 1){
614 sql += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; 630 sql += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
615 } 631 }
616 - sql += " and bc_type != 'in' and bc_type != 'out' order by fcsj"; 632 + sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' order by fcsj";
617 633
618 list = jdbcTemplate.query(sql, 634 list = jdbcTemplate.query(sql,
619 new RowMapper<ScheduleRealInfo>(){ 635 new RowMapper<ScheduleRealInfo>(){
@@ -707,7 +723,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -707,7 +723,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
707 }); 723 });
708 724
709 if(model.length() != 0){ 725 if(model.length() != 0){
710 - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'"; 726 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
711 727
712 ttList = jdbcTemplate.query(sql, 728 ttList = jdbcTemplate.query(sql,
713 new RowMapper<Long>(){ 729 new RowMapper<Long>(){
@@ -896,9 +912,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -896,9 +912,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
896 } 912 }
897 } 913 }
898 Collections.sort(keyList2); 914 Collections.sort(keyList2);
899 - for(long l : keyList2){  
900 - System.out.println(l);  
901 - } 915 +
902 for(int i = 1; i < keyList2.size(); i++){ 916 for(int i = 1; i < keyList2.size(); i++){
903 long fcsj1 = keyList2.get(i - 1); 917 long fcsj1 = keyList2.get(i - 1);
904 long fcsj2 = keyList2.get(i); 918 long fcsj2 = keyList2.get(i);
@@ -911,7 +925,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -911,7 +925,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
911 sjyysj += fcsj2 - fcsj1; 925 sjyysj += fcsj2 - fcsj1;
912 } 926 }
913 sjyysj1 += fcsj2 - fcsj1; 927 sjyysj1 += fcsj2 - fcsj1;
914 - System.out.println("---"+(fcsj2-fcsj1)+"---"+sjyysj+"---"+sjyysj1);  
915 } 928 }
916 } 929 }
917 930
@@ -1722,7 +1735,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1722,7 +1735,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1722 if(company.length() != 0){ 1735 if(company.length() != 0){
1723 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; 1736 sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
1724 } 1737 }
1725 - sql += " and bc_type != 'in' and bc_type != 'out'"; 1738 + sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
1726 1739
1727 list = jdbcTemplate.query(sql, 1740 list = jdbcTemplate.query(sql,
1728 new RowMapper<ScheduleRealInfo>(){ 1741 new RowMapper<ScheduleRealInfo>(){
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
@@ -16,6 +16,7 @@ import com.bsth.util.TimeUtils; @@ -16,6 +16,7 @@ import com.bsth.util.TimeUtils;
16 import com.bsth.util.db.DBUtils_MS; 16 import com.bsth.util.db.DBUtils_MS;
17 import com.bsth.webService.trafficManage.geotool.services.InternalPortType; 17 import com.bsth.webService.trafficManage.geotool.services.InternalPortType;
18 import com.bsth.webService.trafficManage.geotool.services.Internal; 18 import com.bsth.webService.trafficManage.geotool.services.Internal;
  19 +import com.bsth.webService.trafficManage.org.tempuri.Results;
19 import com.bsth.webService.trafficManage.org.tempuri.WebServiceLocator; 20 import com.bsth.webService.trafficManage.org.tempuri.WebServiceLocator;
20 import com.bsth.webService.trafficManage.org.tempuri.WebServiceSoap; 21 import com.bsth.webService.trafficManage.org.tempuri.WebServiceSoap;
21 import org.apache.commons.lang.time.DateUtils; 22 import org.apache.commons.lang.time.DateUtils;
@@ -300,7 +301,9 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -300,7 +301,9 @@ public class TrafficManageServiceImpl implements TrafficManageService{
300 String date = sdfnyr.format(DateUtils.addDays(new Date(), -1)); 301 String date = sdfnyr.format(DateUtils.addDays(new Date(), -1));
301 StringBuffer sf = new StringBuffer(); 302 StringBuffer sf = new StringBuffer();
302 try { 303 try {
303 - sf.append("<DLDS>"); 304 + int counter = 0; // 计数器
  305 + int per = 10; // 每几条线路上传一次路单
  306 +
304 List<ScheduleRealInfo> list = scheduleRealInfoRepository.setLD(date); 307 List<ScheduleRealInfo> list = scheduleRealInfoRepository.setLD(date);
305 List<Map<String,Object>> listGroup = scheduleRealInfoRepository.setLDGroup(date); 308 List<Map<String,Object>> listGroup = scheduleRealInfoRepository.setLDGroup(date);
306 Map<String,Object> map = new HashMap<String,Object>(); 309 Map<String,Object> map = new HashMap<String,Object>();
@@ -314,6 +317,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -314,6 +317,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{
314 if(line == null || line.getInUse() == null || line.getInUse() == 0){ 317 if(line == null || line.getInUse() == null || line.getInUse() == 0){
315 continue; 318 continue;
316 } 319 }
  320 + if(counter % per == 0){
  321 + sf = new StringBuffer();
  322 + sf.append("<DLDS>");
  323 + }
  324 + counter ++;
317 sf.append("<DLD>"); 325 sf.append("<DLD>");
318 sf.append("<RQ>"+date+"</RQ>"); 326 sf.append("<RQ>"+date+"</RQ>");
319 sf.append("<XLBM>"+BasicData.lineCode2ShangHaiCodeMap.get(schRealInfo.get("xlBm")+"")+"</XLBM>"); 327 sf.append("<XLBM>"+BasicData.lineCode2ShangHaiCodeMap.get(schRealInfo.get("xlBm")+"")+"</XLBM>");
@@ -322,7 +330,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -322,7 +330,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{
322 sf.append("<UPDT>"+sdfnyrsfm.format(new Date())+"</UPDT>"); 330 sf.append("<UPDT>"+sdfnyrsfm.format(new Date())+"</UPDT>");
323 sf.append("<LDList>"); 331 sf.append("<LDList>");
324 332
325 - int seqNumber = 0;  
326 for(ScheduleRealInfo scheduleRealInfo:list){ 333 for(ScheduleRealInfo scheduleRealInfo:list){
327 if((schRealInfo.get("xlBm")+"").equals(scheduleRealInfo.getXlBm()) && (schRealInfo.get("lpName")+"") 334 if((schRealInfo.get("xlBm")+"").equals(scheduleRealInfo.getXlBm()) && (schRealInfo.get("lpName")+"")
328 .equals(scheduleRealInfo.getLpName()) 335 .equals(scheduleRealInfo.getLpName())
@@ -369,17 +376,33 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -369,17 +376,33 @@ public class TrafficManageServiceImpl implements TrafficManageService{
369 sf.append("</LDList>"); 376 sf.append("</LDList>");
370 sf.append("</DLD>"); 377 sf.append("</DLD>");
371 } 378 }
  379 + if(counter % per == per - 1){
  380 + counter = 0;
  381 + sf.append("</DLDS>");
  382 + Results results = ssop.setLD(userNameOther, passwordOther, sf.toString());
  383 + if(results.isSuccess()){
  384 + result = "success";
  385 + }
  386 + logger.info("setLD:"+sf.toString());
  387 + logger.info("setLD:"+result);
  388 + }
372 } 389 }
373 - sf.append("</DLDS>");  
374 - if(ssop.setLD(userNameOther, passwordOther, sf.toString()).isSuccess()){  
375 - result = "success"; 390 + // 每per条线路上传后剩下的数据再上传
  391 + if(counter > 0){
  392 + sf.append("</DLDS>");
  393 + Results results = ssop.setLD(userNameOther, passwordOther, sf.toString());
  394 + if(results.isSuccess()){
  395 + result = "success";
  396 + }
  397 + logger.info("setLD:"+sf.toString());
  398 + logger.info("setLD:"+result);
376 } 399 }
  400 +
377 } catch (Exception e) { 401 } catch (Exception e) {
378 logger.error("setLD:",e); 402 logger.error("setLD:",e);
379 e.printStackTrace(); 403 e.printStackTrace();
380 }finally{ 404 }finally{
381 - logger.info("setLD:"+sf.toString());  
382 - logger.info("setLD:"+result); 405 +
383 } 406 }
384 return result; 407 return result;
385 } 408 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -16,7 +16,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -16,7 +16,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
16 16
17 Map<String, Collection<ScheduleRealInfo>> findByLines(String lines); 17 Map<String, Collection<ScheduleRealInfo>> findByLines(String lines);
18 18
19 - Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj, String bcType); 19 + Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj, String bcType, String opType);
20 20
21 Map<String, Object> destroy(String idsStr/*, int spaceAdjust*/, String remarks, String reason/*, int spaceNum*/); 21 Map<String, Object> destroy(String idsStr/*, int spaceAdjust*/, String remarks, String reason/*, int spaceNum*/);
22 22
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -207,7 +207,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -207,7 +207,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
207 private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm"); 207 private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
208 208
209 @Override 209 @Override
210 - public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj, String bcType) { 210 + public Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj, String bcType, String opType) {
211 Map<String, Object> map = new HashMap<>(); 211 Map<String, Object> map = new HashMap<>();
212 try { 212 try {
213 213
@@ -1155,7 +1155,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1155,7 +1155,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1155 sch = list.get(i); 1155 sch = list.get(i);
1156 1156
1157 //调整待发 1157 //调整待发
1158 - outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null); 1158 + outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "间隔调整");
1159 } 1159 }
1160 1160
1161 rs.put("status", ResponseCode.SUCCESS); 1161 rs.put("status", ResponseCode.SUCCESS);
@@ -1325,7 +1325,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1325,7 +1325,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1325 if (StringUtils.isNotEmpty(jhlc)) { 1325 if (StringUtils.isNotEmpty(jhlc)) {
1326 double jhlcNum = Double.parseDouble(jhlc); 1326 double jhlcNum = Double.parseDouble(jhlc);
1327 //烂班 1327 //烂班
1328 - if(jhlcNum == 0 && sch.getJhlcOrig() != 0) 1328 + if(jhlcNum == 0 && sch.getJhlcOrig() != 0 && !sch._isInout())
1329 destroy(sch.getId() + "", "", map.get("adjustExps").toString()); 1329 destroy(sch.getId() + "", "", map.get("adjustExps").toString());
1330 else if(jhlcNum != sch.getJhlc()){ 1330 else if(jhlcNum != sch.getJhlc()){
1331 sch.setJhlc(jhlcNum); 1331 sch.setJhlc(jhlcNum);
@@ -1375,7 +1375,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1375,7 +1375,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1375 schedule = dayOfSchedule.get(id); 1375 schedule = dayOfSchedule.get(id);
1376 1376
1377 if(schedule != null) 1377 if(schedule != null)
1378 - outgoAdjust(id, null, dfsj, null); 1378 + outgoAdjust(id, null, dfsj, null, "批量调整");
1379 } 1379 }
1380 1380
1381 rs.put("status", ResponseCode.SUCCESS); 1381 rs.put("status", ResponseCode.SUCCESS);
@@ -3229,7 +3229,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3229,7 +3229,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3229 if (StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj())) 3229 if (StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj()))
3230 continue; 3230 continue;
3231 3231
3232 - tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null); 3232 + tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null, "批量调整");
3233 3233
3234 if (tempMap.get("status").equals(ResponseCode.SUCCESS)) { 3234 if (tempMap.get("status").equals(ResponseCode.SUCCESS)) {
3235 list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts")); 3235 list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts"));
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -793,260 +793,74 @@ public class ReportServiceImpl implements ReportService{ @@ -793,260 +793,74 @@ public class ReportServiceImpl implements ReportService{
793 return m; 793 return m;
794 } 794 }
795 }); 795 });
796 -  
797 - //班次  
798 - int sj_0 = 6*60+31,sj_1 = 8*60+30,sj_2 = 16*60+1,sj_3 = 18*60;  
799 -  
800 - //顺序 出场--早高峰---中午---晚高峰---进场  
801 - //实驶时间时间(分),0为上行,1为下行  
802 - int ccsj0=0,ccsj1=0,zgf0=0,zgf1=0,zw0=0,zw1=0,wgf0=0,wgf1=0,jcsj0=0,jcsj1=0;  
803 -  
804 - //记录上一个发车时间(方便记录间距)  
805 - int cfc0=0,cfc1=0,zfc0=0,zfc1=0,zwfc0=0,zwfc1=0,wfc0=0,wfc1=0,jcfc0Z=0,jcfc1Z=0,jcfc0W=0,jcfc1W=0;  
806 - //车距 (发车时间的间距) i--MIN a--MAX  
807 - int iC=999,aC=-1,iZg=999,aZg=-1,iZw=999,aZw=-1,iWg=999,aWg=-1,iJcZ=999,aJcZ=-1,iJcW=999,aJcW=-1;  
808 - int iC1=999,aC1=-1,iZg1=999,aZg1=-1,iZw1=999,aZw1=-1,iWg1=999,aWg1=-1,iJc1Z=999,aJc1Z=-1,iJc1W=999,aJc1W=-1; 796 +
  797 + List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>();
  798 + Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>();
  799 + Map<String, Map<String, Object>> maps = new HashMap<String, Map<String, Object>>();
  800 + keyMap.put("(首)——6:30", new ArrayList<Map<String, Object>>());
  801 + keyMap.put("6:31——8:30", new ArrayList<Map<String, Object>>());
  802 + keyMap.put("8:31——16:00", new ArrayList<Map<String, Object>>());
  803 + keyMap.put("16:01——18:00", new ArrayList<Map<String, Object>>());
  804 + keyMap.put("18:01——(末)", new ArrayList<Map<String, Object>>());
  805 + for(int i = 0; i < list.size(); i++){
  806 + Map<String, Object> ttMap = list.get(i);
  807 + String fcsj = ttMap.get("fcsj").toString();
  808 + String[] split = fcsj.split(":");
  809 + int fcsjT = Integer.valueOf(split[0])*60+Integer.valueOf(split[1]);
  810 + if(fcsjT >= minSj && fcsjT <= 6*60+30){
  811 + keyMap.get("(首)——6:30").add(ttMap);
  812 + } else if(fcsjT > 6*60+30 && fcsjT <= 8*60+30){
  813 + keyMap.get("6:31——8:30").add(ttMap);
  814 + } else if(fcsjT > 8*60+30 && fcsjT <= 16*60){
  815 + keyMap.get("8:31——16:00").add(ttMap);
  816 + } else if(fcsjT > 16*60 && fcsjT <= 18*60){
  817 + keyMap.get("16:01——18:00").add(ttMap);
  818 + } else {
  819 + keyMap.get("18:01——(末)").add(ttMap);
  820 + }
  821 + }
809 822
810 - for(int i=0;i<list.size();i++){  
811 - Map<String, Object> ttMap=list.get(i);  
812 - String xlDir=ttMap.get("dir").toString();  
813 - int bcsj=Integer.parseInt(ttMap.get("bcsj").toString());  
814 - String fcsj=ttMap.get("fcsj").toString();  
815 - String[] fcsjs=fcsj.split(":");  
816 - int fcsjNum=Integer.parseInt(fcsjs[0])*60+Integer.parseInt(fcsjs[1]);  
817 -  
818 - if(xlDir.equals("0")){  
819 - if(fcsjNum>=minSj && fcsjNum<sj_0){  
820 - ccsj0 +=bcsj;  
821 - if(aC<0){  
822 - cfc0 =fcsjNum;  
823 - aC=0;  
824 - }else{  
825 - if(fcsjNum-cfc0<iC){  
826 - iC=fcsjNum-cfc0;  
827 - }  
828 - if(fcsjNum-cfc0>aC){  
829 - aC=fcsjNum-cfc0;  
830 - }  
831 -  
832 - cfc0=fcsjNum;  
833 - }  
834 -  
835 - }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){  
836 - zgf0 +=bcsj;  
837 - if(aZg<0){  
838 - zfc0 =fcsjNum;  
839 - aZg=0;  
840 - }else{  
841 - if(fcsjNum-zfc0<iZg){  
842 - iZg=fcsjNum-zfc0;  
843 - }  
844 -  
845 - if(fcsjNum-zfc0>aZg){  
846 - aZg=fcsjNum-zfc0;  
847 - }  
848 -  
849 - zfc0=fcsjNum;  
850 - }  
851 - }else if(fcsjNum>sj_1 && fcsjNum<sj_2){  
852 - zw0 +=bcsj;  
853 - if(aZw<0){  
854 - zwfc0 =fcsjNum;  
855 - aZw=0;  
856 - }else{  
857 - if(fcsjNum-zwfc0<iZw){  
858 - iZw=fcsjNum-zwfc0;  
859 - }  
860 - if(fcsjNum-zwfc0>aZw){  
861 - aZw=fcsjNum-zwfc0;  
862 - }  
863 - zwfc0=fcsjNum;  
864 - }  
865 -  
866 - }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){  
867 - wgf0 +=bcsj;  
868 - if(aWg<0){  
869 - wfc0=fcsjNum;  
870 - aWg=0;  
871 - }else{  
872 - if(fcsjNum-wfc0<iWg){  
873 - iWg=fcsjNum-wfc0;  
874 - }  
875 - if(fcsjNum-wfc0>aWg){  
876 - aWg=fcsjNum-wfc0;  
877 - }  
878 - wfc0=fcsjNum;  
879 - }  
880 - }else if(fcsjNum>sj_3){  
881 - jcsj0 +=bcsj;  
882 - if(aJcW<0){  
883 - jcfc0W=fcsjNum;  
884 - aJcW=0;  
885 - }else{  
886 - if(fcsjNum-jcfc0W<iJcW){  
887 - iJcW=fcsjNum-jcfc0W;  
888 - }  
889 - if(fcsjNum-jcfc0W>aJcW){  
890 - aJcW=fcsjNum-jcfc0W;  
891 - }  
892 - jcfc0W=fcsjNum;  
893 - }  
894 - }else if(fcsjNum<minSj){  
895 - jcsj0 +=bcsj;  
896 - if(aJcZ<0){  
897 - jcfc0Z=fcsjNum;  
898 - aJcZ=0;  
899 - }else{  
900 - if(fcsjNum-jcfc0Z<iJcZ){  
901 - iJcZ=fcsjNum-jcfc0Z;  
902 - }  
903 - if(fcsjNum-jcfc0Z>aJcZ){  
904 - aJcZ=fcsjNum-jcfc0Z;  
905 - }  
906 - jcfc0Z=fcsjNum;  
907 - } 823 + for(String key : keyMap.keySet()){
  824 + Map<String, Object> tempMap = new HashMap<String, Object>();
  825 + List<Map<String, Object>> list2 = keyMap.get(key);
  826 + List<Integer> cjs = new ArrayList<Integer>();
  827 + int sxsj = 0, xxsj = 0, zcj = 0;
  828 + int temp = 24*60+1;
  829 + for(Map<String, Object> m : list2){
  830 + String[] split = m.get("fcsj").toString().split(":");
  831 + int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  832 + int xlDir = Integer.valueOf(m.get("dir").toString());
  833 + int bcsj = Integer.valueOf(m.get("bcsj").toString());
  834 + if(xlDir == 0){
  835 + sxsj += bcsj;
  836 + } else {
  837 + xxsj += bcsj;
908 } 838 }
909 -  
910 -  
911 - }else{  
912 - if(fcsjNum>=minSj && fcsjNum<sj_0){  
913 - ccsj1 +=bcsj;  
914 - if(aC1<0){  
915 - cfc1=fcsjNum;  
916 - aC1=0;  
917 - }else{  
918 - if(fcsjNum-cfc1<iC1){  
919 - iC1=fcsjNum-cfc1;  
920 - }  
921 - if(fcsjNum-cfc1>aC1){  
922 - aC1=fcsjNum-cfc1;  
923 - }  
924 - cfc1=fcsjNum;  
925 - }  
926 - }else if(fcsjNum>=sj_0 && fcsjNum<=sj_1){  
927 - zgf1 +=bcsj;  
928 - if(aZg1<0){  
929 - zfc1=fcsjNum;  
930 - aZg1=0;  
931 - }else{  
932 - if(fcsjNum-zfc1<iZg1){  
933 - iZg1=fcsjNum-zfc1;  
934 - }  
935 - if(fcsjNum-zfc1>aZg1){  
936 - aZg1=fcsjNum-zfc1;  
937 - }  
938 -  
939 - zfc1=fcsjNum;  
940 - }  
941 - }else if(fcsjNum>sj_1 && fcsjNum<sj_2){  
942 - zw1 +=bcsj;  
943 - if(aZw1<0){  
944 - zwfc1=fcsjNum;  
945 - aZw1=0;  
946 - }else{  
947 - if(fcsjNum-zwfc1<iZw1){  
948 - iZw1=fcsjNum-zwfc1;  
949 - }  
950 - if(fcsjNum-zwfc1>aZw1){  
951 - aZw1=fcsjNum-zwfc1;  
952 - }  
953 - zwfc1=fcsjNum;  
954 - }  
955 - }else if(fcsjNum>=sj_2 && fcsjNum<=sj_3){  
956 - wgf1 +=bcsj;  
957 - if(aWg1<0){  
958 - wfc1=fcsjNum;  
959 - aWg1=0;  
960 - }else{  
961 - if(fcsjNum-wfc1<iWg1){  
962 - iWg1=fcsjNum-wfc1;  
963 - }  
964 - if(fcsjNum-wfc1<aWg1){  
965 - aWg1=fcsjNum-wfc1;  
966 - }  
967 - wfc1=fcsjNum;  
968 - }  
969 - }else if(fcsjNum>sj_3){  
970 - jcsj1 +=bcsj;  
971 - if(aJc1W<0){  
972 - jcfc1W=fcsjNum;  
973 - aJc1W=0;  
974 - }else{  
975 - if(fcsjNum-jcfc1W<iJc1W){  
976 - aJc1W=fcsjNum-jcfc1W;  
977 - }  
978 - if(fcsjNum-jcfc1W>aJc1W){  
979 - aJc1W=fcsjNum-jcfc1W;  
980 - }  
981 -  
982 - jcfc1W=fcsjNum;  
983 - }  
984 - }else if(fcsjNum<minSj){  
985 - jcsj1 +=bcsj;  
986 - if(aJc1Z<0){  
987 - jcfc1Z=fcsjNum;  
988 - aJc1Z=0;  
989 - }else{  
990 - if(fcsjNum-jcfc1Z<iJc1Z){  
991 - aJc1Z=fcsjNum-jcfc1Z;  
992 - }  
993 - if(fcsjNum-jcfc1Z>aJc1Z){  
994 - aJc1Z=fcsjNum-jcfc1Z;  
995 - }  
996 -  
997 - jcfc1Z=fcsjNum;  
998 - } 839 + if(temp >= fcsj){
  840 + temp = fcsj;
  841 + } else {
  842 + cjs.add(fcsj - temp);
  843 + temp = fcsj;
999 } 844 }
1000 } 845 }
1001 - 846 + Collections.sort(cjs);
  847 + for(int i : cjs){
  848 + zcj += i;
  849 + }
  850 + tempMap.put("sjd", key);
  851 + tempMap.put("sxsj", sxsj);
  852 + tempMap.put("xxsj", xxsj);
  853 + tempMap.put("fqsj", sxsj + xxsj);
  854 + tempMap.put("cjqj", cjs.size()>0?cjs.get(0)+"——"+cjs.get(cjs.size()-1):"——");
  855 + tempMap.put("pjcj", cjs.size()>0?zcj/(cjs.size()-1):"/");
  856 + maps.put(key, tempMap);
1002 } 857 }
  858 + newList.add(maps.get("(首)——6:30"));
  859 + newList.add(maps.get("6:31——8:30"));
  860 + newList.add(maps.get("8:31——16:00"));
  861 + newList.add(maps.get("16:01——18:00"));
  862 + newList.add(maps.get("18:01——(末)"));
1003 863
1004 -  
1005 - List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>();  
1006 - Map<String, Object> newmap1=new HashMap<String,Object>();  
1007 - Map<String, Object> newmap2=new HashMap<String,Object>();  
1008 - Map<String, Object> newmap3=new HashMap<String,Object>();  
1009 - Map<String, Object> newmap4=new HashMap<String,Object>();  
1010 - Map<String, Object> newmap5=new HashMap<String,Object>();  
1011 - newmap1.put("sjd", "(首)——6:30");  
1012 - newmap1.put("sxsj", ccsj0);  
1013 - newmap1.put("xxsj", ccsj1);  
1014 - newmap1.put("fqsj", ccsj0+ccsj1);  
1015 - newmap1.put("cj", (iC-iC1>0?iC1:iC)+"——"+(aC-aC1>0?aC:aC1));  
1016 -  
1017 - newmap2.put("sjd", "6:31——8:30");  
1018 - newmap2.put("sxsj", zgf0);  
1019 - newmap2.put("xxsj", zgf1);  
1020 - newmap2.put("fqsj", zgf1+zgf0);  
1021 - newmap2.put("cj", (iZg-iZg1>0?iZg1:iZg)+"——"+(aZg-aZg1>0?aZg:aZg1));  
1022 -  
1023 - newmap3.put("sjd", "8:30——16:00");  
1024 - newmap3.put("sxsj", zw0);  
1025 - newmap3.put("xxsj", zw1);  
1026 - newmap3.put("fqsj", zw0+zw1);  
1027 - newmap3.put("cj", (iZw-iZw1>0?iZw1:iZw)+"——"+(aZw-aZw1>0?aZw:aZw1));  
1028 -  
1029 - newmap4.put("sjd", "16:01——18:00");  
1030 - newmap4.put("sxsj", wgf0);  
1031 - newmap4.put("xxsj", wgf1);  
1032 - newmap4.put("fqsj", wgf0+wgf1);  
1033 - newmap4.put("cj", (iWg-iWg1>0?iWg1:iWg)+"——"+(aWg-aWg1>0?aWg:aWg1));  
1034 -  
1035 - newmap5.put("sjd", "18:00——(末)");  
1036 - newmap5.put("sxsj", jcsj0);  
1037 - newmap5.put("xxsj", jcsj1);  
1038 - newmap5.put("fqsj", jcsj0+jcsj1);  
1039 - int min0=iJcZ-iJcW>0?iJcW:iJcZ;  
1040 - int max0=aJcZ-aJcW>0?aJcZ:aJcW;  
1041 - int min1=iJc1Z-iJc1W>0?iJc1W:iJc1Z;  
1042 - int max1=aJc1Z-aJc1W>0?aJc1Z:aJc1W;  
1043 - newmap5.put("cj", (min0-min1>0?min1:min0)+"——"+(max0-max1>0?max0:max1));  
1044 -  
1045 - newList.add(newmap1);  
1046 - newList.add(newmap2);  
1047 - newList.add(newmap3);  
1048 - newList.add(newmap4);  
1049 - newList.add(newmap5);  
1050 return newList; 864 return newList;
1051 } 865 }
1052 @Override 866 @Override
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
@@ -404,7 +404,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -404,7 +404,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
404 } 404 }
405 405
406 if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out") 406 if(!schedule.getBcType().equals("in") && !schedule.getBcType().equals("out")
407 - && schedule.getFcsjActual() != null){ 407 + && !schedule.getBcType().equals("ldks") && schedule.getFcsjActual() != null){
408 // String clZbh = schedule.getClZbh(); 408 // String clZbh = schedule.getClZbh();
409 String xlDir = schedule.getXlDir(); 409 String xlDir = schedule.getXlDir();
410 if(!listMap.containsKey(xlDir)) 410 if(!listMap.containsKey(xlDir))
@@ -526,7 +526,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -526,7 +526,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
526 // if(company.length() != 0){ 526 // if(company.length() != 0){
527 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; 527 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";
528 // } 528 // }
529 - sql += " and bc_type != 'in' and bc_type != 'out'"; 529 + sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
530 530
531 list = jdbcTemplate.query(sql, 531 list = jdbcTemplate.query(sql,
532 new RowMapper<ScheduleRealInfo>(){ 532 new RowMapper<ScheduleRealInfo>(){
@@ -579,7 +579,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -579,7 +579,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
579 579
580 if(model.length() != 0){ 580 if(model.length() != 0){
581 // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; 581 // sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'";
582 - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'"; 582 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
583 583
584 ttList = jdbcTemplate.query(sql, 584 ttList = jdbcTemplate.query(sql,
585 new RowMapper<Long>(){ 585 new RowMapper<Long>(){
@@ -807,7 +807,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -807,7 +807,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
807 // if(company.length() != 0){ 807 // if(company.length() != 0){
808 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; 808 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";
809 // } 809 // }
810 - sql += " and bc_type != 'in' and bc_type != 'out'"; 810 + sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
811 811
812 list = jdbcTemplate.query(sql, 812 list = jdbcTemplate.query(sql,
813 new RowMapper<ScheduleRealInfo>(){ 813 new RowMapper<ScheduleRealInfo>(){
@@ -1174,7 +1174,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1174,7 +1174,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1174 List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); 1174 List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
1175 1175
1176 for(ScheduleRealInfo schedule : list){ 1176 for(ScheduleRealInfo schedule : list){
1177 - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) 1177 + if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks"))
1178 continue; 1178 continue;
1179 if(schedule.getStatus() == -1){ 1179 if(schedule.getStatus() == -1){
1180 continue; 1180 continue;
@@ -1353,7 +1353,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1353,7 +1353,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1353 List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); 1353 List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
1354 1354
1355 for(ScheduleRealInfo schedule : list){ 1355 for(ScheduleRealInfo schedule : list){
1356 - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out")) 1356 + if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks"))
1357 continue; 1357 continue;
1358 if(schedule.getStatus() == -1){ 1358 if(schedule.getStatus() == -1){
1359 continue; 1359 continue;
src/main/resources/static/pages/report/timetable/timetable.html
@@ -165,13 +165,14 @@ @@ -165,13 +165,14 @@
165 <div class="col-md-6" > 165 <div class="col-md-6" >
166 <table class="table table-bordered table-checkable" id="formsTime5"> 166 <table class="table table-bordered table-checkable" id="formsTime5">
167 <tr> 167 <tr>
168 - <td colspan="5">全日分组行驶时间(区间除外)</td> 168 + <td colspan="6">全日分组行驶时间(区间除外)</td>
169 </tr> 169 </tr>
170 <tr> 170 <tr>
171 - <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;">分组 时间</td>  
172 - <td width="30%" colspan="2" style="text-align:center;vertical-align:middle;">实驶(分)</td> 171 + <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分组 时间</td>
  172 + <td width="25%" colspan="2" style="text-align:center;vertical-align:middle;">计划行驶(分)</td>
173 <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈 时间</td> 173 <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈 时间</td>
174 - <td width="25%" rowspan="2" style="text-align:center;vertical-align:middle;">车距</td> 174 + <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">车距区间</td>
  175 + <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">平均车距</td>
175 </tr> 176 </tr>
176 <tr> 177 <tr>
177 <td>上行</td> 178 <td>上行</td>
@@ -398,12 +399,13 @@ @@ -398,12 +399,13 @@
398 <td align="center">{{result.sxsj}}</td> 399 <td align="center">{{result.sxsj}}</td>
399 <td align="center">{{result.xxsj}}</td> 400 <td align="center">{{result.xxsj}}</td>
400 <td align="center">{{result.fqsj}}</td> 401 <td align="center">{{result.fqsj}}</td>
401 - <td align="center">{{result.cj}}</td> 402 + <td align="center">{{result.cjqj}}</td>
  403 + <td align="center">{{result.pjcj}}</td>
402 </tr> 404 </tr>
403 {{/each}} 405 {{/each}}
404 {{if list.length == 0}} 406 {{if list.length == 0}}
405 <tr> 407 <tr>
406 - <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td> 408 + <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
407 </tr> 409 </tr>
408 {{/if}} 410 {{/if}}
409 </script> 411 </script>
src/main/resources/static/real_control_v2/css/main.css
@@ -1158,3 +1158,8 @@ ul.left_tabs_lg li{ @@ -1158,3 +1158,8 @@ ul.left_tabs_lg li{
1158 padding: 2px 7px; 1158 padding: 2px 7px;
1159 border-radius: 3px; 1159 border-radius: 3px;
1160 } 1160 }
  1161 +
  1162 +.uk-badge.sch_ldks{
  1163 + background: #8c8c8c;
  1164 + background-image: linear-gradient(to bottom,#a7a7a7,#8c8c8c);
  1165 +}
src/main/resources/static/real_control_v2/fragments/line_schedule/badge_tooltip.html
@@ -61,4 +61,12 @@ @@ -61,4 +61,12 @@
61 </div> 61 </div>
62 </div> 62 </div>
63 </script> 63 </script>
  64 +
  65 + <script id="sch-table-ldks-tootip-temp" type="text/html">
  66 + <div class="tl-tip-panel">
  67 + <div style="font-size: 13px;">
  68 + {{qdzName}} 空驶至 {{zdzName}}
  69 + </div>
  70 + </div>
  71 + </script>
64 </div> 72 </div>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -115,6 +115,10 @@ @@ -115,6 +115,10 @@
115 (function() { 115 (function() {
116 var modal = '#schedule-dftz-modal' 116 var modal = '#schedule-dftz-modal'
117 ,sch; 117 ,sch;
  118 +
  119 + var isInout = function (code) {
  120 + return code=='out' || code=='in';
  121 + };
118 $(modal).on('init', function(e, data) { 122 $(modal).on('init', function(e, data) {
119 e.stopPropagation(); 123 e.stopPropagation();
120 sch=data.sch; 124 sch=data.sch;
@@ -125,12 +129,12 @@ @@ -125,12 +129,12 @@
125 var bctypes=dictionaryUtils.getByGroup('ScheduleType') 129 var bctypes=dictionaryUtils.getByGroup('ScheduleType')
126 ,opts=''; 130 ,opts='';
127 131
128 - if(sch.bcType == 'out' || sch.bcType == 'in'){ 132 + if(isInout(sch.bcType)){
129 $('[name=bcType]', modal).html('<option value="'+sch.bcType+'">'+bctypes[sch.bcType]+'</option>'); 133 $('[name=bcType]', modal).html('<option value="'+sch.bcType+'">'+bctypes[sch.bcType]+'</option>');
130 } 134 }
131 else{ 135 else{
132 for(var code in bctypes){ 136 for(var code in bctypes){
133 - if(code!='venting' && code!='major' && code != 'normal') 137 + if(isInout(code))
134 continue; 138 continue;
135 opts+='<option value="'+code+'">'+bctypes[code]+'</option>'; 139 opts+='<option value="'+code+'">'+bctypes[code]+'</option>';
136 } 140 }
@@ -166,10 +170,12 @@ @@ -166,10 +170,12 @@
166 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html'; 170 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html';
167 detailModal='#bctype-venting-modal'; 171 detailModal='#bctype-venting-modal';
168 } 172 }
169 - else{ 173 + else if(type=='major'){
170 detailModal='#bctype-major-modal'; 174 detailModal='#bctype-major-modal';
171 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html'; 175 url='/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html';
172 } 176 }
  177 + else
  178 + return;
173 179
174 $.get(url, function(htmlStr){ 180 $.get(url, function(htmlStr){
175 $(document.body).append(htmlStr); 181 $(document.body).append(htmlStr);
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
@@ -99,6 +99,8 @@ @@ -99,6 +99,8 @@
99 <span class="uk-badge uk-badge-danger">放站</span> 99 <span class="uk-badge uk-badge-danger">放站</span>
100 {{else if sch.bcType == "region"}} 100 {{else if sch.bcType == "region"}}
101 <span class="uk-badge">区间</span> 101 <span class="uk-badge">区间</span>
  102 + {{else if sch.bcType == "ldks"}}
  103 + <span class="uk-badge sch_ldks">空驶</span>
102 {{/if}} 104 {{/if}}
103 {{if sch.sflj}} 105 {{if sch.sflj}}
104 <span class="uk-badge uk-badge-danger">临加</span> 106 <span class="uk-badge uk-badge-danger">临加</span>
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
@@ -74,6 +74,8 @@ @@ -74,6 +74,8 @@
74 <span class="uk-badge uk-badge-danger">放站</span> 74 <span class="uk-badge uk-badge-danger">放站</span>
75 {{else if sch.bcType == "region"}} 75 {{else if sch.bcType == "region"}}
76 <span class="uk-badge sch_region">区间</span> 76 <span class="uk-badge sch_region">区间</span>
  77 + {{else if sch.bcType == "ldks"}}
  78 + <span class="uk-badge sch_ldks">空驶</span>
77 {{/if}} 79 {{/if}}
78 {{if sch.sflj}} 80 {{if sch.sflj}}
79 <span class="uk-badge uk-badge-danger">临加</span> 81 <span class="uk-badge uk-badge-danger">临加</span>
@@ -126,6 +128,8 @@ @@ -126,6 +128,8 @@
126 <span class="uk-badge uk-badge-danger">放站</span> 128 <span class="uk-badge uk-badge-danger">放站</span>
127 {{else if bcType == "region"}} 129 {{else if bcType == "region"}}
128 <span class="uk-badge sch_region">区间</span> 130 <span class="uk-badge sch_region">区间</span>
  131 + {{else if bcType == "ldks"}}
  132 + <span class="uk-badge sch_ldks">空驶</span>
129 {{/if}} 133 {{/if}}
130 {{if sflj}} 134 {{if sflj}}
131 <span class="uk-badge uk-badge-danger">临加</span> 135 <span class="uk-badge uk-badge-danger">临加</span>
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch/edit.html deleted 100644 → 0
1 -<div class="uk-modal ct-form-modal ct_move_modal" id="history-sch-edit-modal">  
2 - <div class="uk-modal-dialog" style="width: 900px;">  
3 - <a href="" class="uk-modal-close uk-close"></a>  
4 - <div class="uk-modal-header">  
5 - <h2>历史班次编辑</h2></div>  
6 - <form class="uk-form uk-form-horizontal">  
7 - </form>  
8 - </div>  
9 -  
10 - <script id="history-sch-edit-form-temp" type="text/html">  
11 - <input type="hidden" name="id" value="{{id}}"/>  
12 -  
13 - <div class="uk-grid">  
14 - <div class="uk-width-1-3">  
15 - <div class="uk-form-row">  
16 - <label class="uk-form-label" >班次类型</label>  
17 - <div class="uk-form-controls">  
18 - <select class="form-control nt-dictionary" disabled data-code="{{bcType}}" name="bcType" data-group=ScheduleType></select>  
19 - </div>  
20 - </div>  
21 - </div>  
22 - <div class="uk-width-1-3">  
23 - <div class="uk-form-row">  
24 - <label class="uk-form-label" >起点</label>  
25 - <div class="uk-form-controls">  
26 - <input type="text" value="{{qdzName}}" disabled>  
27 - </div>  
28 - </div>  
29 - </div>  
30 - <div class="uk-width-1-3">  
31 - <div class="uk-form-row">  
32 - <label class="uk-form-label" >终点</label>  
33 - <div class="uk-form-controls">  
34 - <input type="text" value="{{zdzName}}" disabled>  
35 - </div>  
36 - </div>  
37 - </div>  
38 - </div>  
39 -  
40 - <div class="uk-grid">  
41 - <div class="uk-width-1-3">  
42 - <div class="uk-form-row">  
43 - <label class="uk-form-label" >车辆</label>  
44 - <div class="uk-form-controls">  
45 - <div class="uk-autocomplete uk-form car-autocom">  
46 - <input type="text" value="{{clZbh}}" name="clZbh" required>  
47 - </div>  
48 - </div>  
49 - </div>  
50 - </div>  
51 - <div class="uk-width-1-3">  
52 - <div class="uk-form-row">  
53 - <label class="uk-form-label" >驾驶员</label>  
54 - <div class="uk-form-controls">  
55 - <div class="uk-autocomplete uk-form jsy-autocom">  
56 - <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required>  
57 - </div>  
58 - </div>  
59 - </div>  
60 - </div>  
61 - </div>  
62 -  
63 - <div class="uk-grid">  
64 - <div class="uk-width-1-3">  
65 - <div class="uk-form-row">  
66 - <label class="uk-form-label" >计发</label>  
67 - <div class="uk-form-controls">  
68 - <input type="text" value="{{fcsj}}" disabled>  
69 - </div>  
70 - </div>  
71 - </div>  
72 - <div class="uk-width-1-3">  
73 - <div class="uk-form-row">  
74 - <label class="uk-form-label" >待发</label>  
75 - <div class="uk-form-controls">  
76 - <input type="text" name="dfsj" value="{{dfsj}}" required>  
77 - </div>  
78 - </div>  
79 - </div>  
80 - <div class="uk-width-1-3">  
81 - <div class="uk-form-row">  
82 - <label class="uk-form-label" >实发</label>  
83 - <div class="uk-form-controls">  
84 - <input type="text" name="fcsjActual" value="{{fcsjActual}}" >  
85 - </div>  
86 - </div>  
87 - </div>  
88 - </div>  
89 -  
90 - <div class="uk-grid">  
91 - <div class="uk-width-1-3">  
92 - <div class="uk-form-row">  
93 - <label class="uk-form-label" >计划里程</label>  
94 - <div class="uk-form-controls">  
95 - <input type="text" value="{{jhlc}}" disabled>  
96 - </div>  
97 - </div>  
98 - </div>  
99 - <div class="uk-width-1-3">  
100 - <div class="uk-form-row">  
101 - <label class="uk-form-label" >计划终点</label>  
102 - <div class="uk-form-controls">  
103 - <input type="text" value="{{zdsj}}" disabled>  
104 - </div>  
105 - </div>  
106 - </div>  
107 - <div class="uk-width-1-3">  
108 - <div class="uk-form-row">  
109 - <label class="uk-form-label" >实际终点</label>  
110 - <div class="uk-form-controls">  
111 - <input type="text" name="zdsjActual" value="{{zdsjActual}}" >  
112 - </div>  
113 - </div>  
114 - </div>  
115 - </div>  
116 -  
117 - <div class="uk-grid">  
118 - <div class="uk-width-1-1">  
119 - <div class="uk-form-row ct-stacked">  
120 - <label class="uk-form-label" >备注</label>  
121 - <div class="uk-form-controls" style="margin-top: 5px;">  
122 - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="100" placeholder="备注">{{remarks}}</textarea>  
123 - </div>  
124 - </div>  
125 - </div>  
126 - </div>  
127 - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">  
128 - <button type="button" class="uk-button uk-modal-close">取消</button>  
129 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>  
130 - </div>  
131 - </script>  
132 -  
133 - <script>  
134 - (function() {  
135 - var modal = '#history-sch-edit-modal'  
136 - ,sch,parentModal;  
137 - $(modal).on('init', function(e, data) {  
138 - var id = data.id;  
139 - parentModal=data.parentModal;  
140 -  
141 - $.get('/realSchedule/'+id, function (sch) {  
142 - var htmlStr = template('history-sch-edit-form-temp', sch);  
143 - $('form', modal).html(htmlStr);  
144 -  
145 - //字典转换  
146 - dictionaryUtils.transformDom($('.nt-dictionary', modal));  
147 -  
148 - //----------- Autocomplete --------------  
149 - $.get('/basic/cars', function(rs) {  
150 - //车辆  
151 - gb_common.carAutocomplete($('.car-autocom', modal), rs);  
152 - });  
153 - $.get('/basic/all_personnel', function(rs) {  
154 - //驾驶员  
155 - gb_common.personAutocomplete($('.jsy-autocom', modal), rs);  
156 - //售票员  
157 - gb_common.personAutocomplete($('.spy-autocom', modal), rs);  
158 - });  
159 -  
160 -  
161 - //submit  
162 - var f = $('form', modal).formValidation(gb_form_validation_opts);  
163 - f.on('success.form.fv', function(e) {  
164 - e.preventDefault();  
165 - var data = $(this).serializeJSON();  
166 -  
167 - //拆分驾驶员工号和姓名  
168 - data.jGh = data.jsy.split('/')[0];  
169 - data.jName = data.jsy.split('/')[1];  
170 - delete data.jsy;  
171 - //拆分售票员工号和姓名  
172 - if(data.sGh != null){  
173 - data.sGh = data.spy.split('/')[0];  
174 - data.sName = data.spy.split('/')[1];  
175 - delete data.spy;  
176 - }  
177 -  
178 - gb_common.$post('/realSchedule/history', data, function (rs) {  
179 - //console.log(rs);  
180 - UIkit.modal(modal).hide();  
181 - $(parentModal).trigger('refresh');  
182 - });  
183 - });  
184 - });  
185 - });  
186 - })();  
187 - </script>  
188 -</div>  
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
@@ -86,6 +86,8 @@ @@ -86,6 +86,8 @@
86 <span class="uk-badge uk-badge-danger">放站</span> 86 <span class="uk-badge uk-badge-danger">放站</span>
87 {{else if sch.bcType == "region"}} 87 {{else if sch.bcType == "region"}}
88 <span class="uk-badge sch_region">区间</span> 88 <span class="uk-badge sch_region">区间</span>
  89 + {{else if sch.bcType == "ldks"}}
  90 + <span class="uk-badge sch_ldks">空驶</span>
89 {{/if}} 91 {{/if}}
90 {{if sch.sflj}} 92 {{if sch.sflj}}
91 <span class="uk-badge uk-badge-danger">临加</span> 93 <span class="uk-badge uk-badge-danger">临加</span>
src/main/resources/static/real_control_v2/fragments/north/toolbar.html
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 </li> 55 </li>
56 {{/each}} 56 {{/each}}
57 </ul> 57 </ul>
58 - <a class="uk-navbar-brand op-beijingtime-time" title="每次秒数到0与服务器同步一次,睡眠状态唤醒会短暂异常,可鼠标右击横幅任意区域立刻同步!"> 58 + <a class="uk-navbar-brand op-beijingtime-time" >
59 <span></span> 59 <span></span>
60 </a> 60 </a>
61 <div class="uk-navbar-content uk-navbar-flip uk-hidden-small" style="padding-left: 0;"> 61 <div class="uk-navbar-content uk-navbar-flip uk-hidden-small" style="padding-left: 0;">
src/main/resources/static/real_control_v2/js/line_schedule/badge_tooltip.js
@@ -2,6 +2,36 @@ @@ -2,6 +2,36 @@
2 /** badge 悬停 tip 相关 */ 2 /** badge 悬停 tip 相关 */
3 var gb_schedule_badge_tootip = (function () { 3 var gb_schedule_badge_tootip = (function () {
4 4
  5 + var _opts = {
  6 + show:{
  7 + ready: true,
  8 + delay: 300
  9 + },
  10 + position: {
  11 + viewport: $(window),
  12 + my: 'center left',
  13 + at: 'center right'
  14 + },
  15 + hide: {
  16 + fixed: true,
  17 + delay: 300
  18 + },
  19 + events: {
  20 + hidden: function(event, api) {
  21 + //destroy dom
  22 + $(this).qtip('destroy', true);
  23 + }
  24 + }
  25 + };
  26 +
  27 + var getSch = function (e) {
  28 + var id = $(e).parents('dl').data('id'),
  29 + lineCode = $(e).parents('li.line_schedule').data('id'),
  30 + sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  31 + return sch;
  32 + };
  33 +
  34 + var _badge = '.schedule-wrap .ct_table_body .uk-badge';
5 var temps; 35 var temps;
6 //html 模板 36 //html 模板
7 $.get('/real_control_v2/fragments/line_schedule/badge_tooltip.html', function(dom) { 37 $.get('/real_control_v2/fragments/line_schedule/badge_tooltip.html', function(dom) {
@@ -9,18 +39,13 @@ var gb_schedule_badge_tootip = (function () { @@ -9,18 +39,13 @@ var gb_schedule_badge_tootip = (function () {
9 }); 39 });
10 40
11 //子任务 tootip 41 //子任务 tootip
12 - $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.c_task', function() { 42 + $(document).on('mouseenter', _badge + '.c_task', function() {
13 $(this).qtip({ 43 $(this).qtip({
14 - show: {  
15 - ready: true,  
16 - delay: 300  
17 - }, 44 + show: _opts.show,
18 content: { 45 content: {
19 text: function() { 46 text: function() {
20 - var id = $(this).parents('dl').data('id'),  
21 - lineCode = $(this).parents('li.line_schedule').data('id'),  
22 - sch = gb_schedule_table.findScheduleByLine(lineCode)[id];  
23 - //排序 47 + var sch = getSch(this);
  48 + //子任务排序
24 var array = sch.cTasks.sort(function (a, b) { 49 var array = sch.cTasks.sort(function (a, b) {
25 var an = (a.mileageType=='service'?1:0)+''+(a.destroy?0:1); 50 var an = (a.mileageType=='service'?1:0)+''+(a.destroy?0:1);
26 var bn = (b.mileageType=='service'?1:0)+''+(b.destroy?0:1); 51 var bn = (b.mileageType=='service'?1:0)+''+(b.destroy?0:1);
@@ -29,134 +54,86 @@ var gb_schedule_badge_tootip = (function () { @@ -29,134 +54,86 @@ var gb_schedule_badge_tootip = (function () {
29 return temps['sch-table-task-tootip-temp']({tasks: array}); 54 return temps['sch-table-task-tootip-temp']({tasks: array});
30 } 55 }
31 }, 56 },
32 - position: {  
33 - viewport: $(window),  
34 - my: 'center left',  
35 - at: 'center right'  
36 - }, 57 + position: _opts.position,
37 style: { 58 style: {
38 classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip' 59 classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip'
39 }, 60 },
40 - hide: {  
41 - fixed: true,  
42 - delay: 300  
43 - },  
44 - events: {  
45 - hidden: function(event, api) {  
46 - //destroy dom  
47 - $(this).qtip('destroy', true);  
48 - }  
49 - } 61 + hide: _opts.hide,
  62 + events: _opts.events
50 }); 63 });
51 }); 64 });
52 65
53 //区间 tootip 66 //区间 tootip
54 - $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.sch_region', function() { 67 + $(document).on('mouseenter', _badge+'.sch_region', function() {
55 $(this).qtip({ 68 $(this).qtip({
56 - show: {  
57 - ready: true,  
58 - delay: 300  
59 - }, 69 + show: _opts.show,
60 content: { 70 content: {
61 text: function() { 71 text: function() {
62 - var id = $(this).parents('dl').data('id'),  
63 - lineCode = $(this).parents('li.line_schedule').data('id'),  
64 - sch = gb_schedule_table.findScheduleByLine(lineCode)[id];  
65 - return temps['sch-table-region-tootip-temp'](sch); 72 + return temps['sch-table-region-tootip-temp'](getSch(this));
66 } 73 }
67 }, 74 },
68 - position: {  
69 - viewport: $(window),  
70 - my: 'center left',  
71 - at: 'center right'  
72 - }, 75 + position: _opts.position,
73 style: { 76 style: {
74 classes: 'qtip-youtube sch-badge-tip' 77 classes: 'qtip-youtube sch-badge-tip'
75 }, 78 },
76 - hide: {  
77 - fixed: true,  
78 - delay: 300  
79 - },  
80 - events: {  
81 - hidden: function(event, api) {  
82 - //destroy dom  
83 - $(this).qtip('destroy', true);  
84 - }  
85 - } 79 + hide: _opts.hide,
  80 + events: _opts.events
86 }); 81 });
87 }); 82 });
88 83
89 84
90 //出场 tootip 85 //出场 tootip
91 - $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.out', function() { 86 + $(document).on('mouseenter', _badge+'.out', function() {
92 $(this).qtip({ 87 $(this).qtip({
93 - show: {  
94 - ready: true,  
95 - delay: 300  
96 - }, 88 + show: _opts.show,
97 content: { 89 content: {
98 text: function() { 90 text: function() {
99 - var id = $(this).parents('dl').data('id'),  
100 - lineCode = $(this).parents('li.line_schedule').data('id'),  
101 - sch = gb_schedule_table.findScheduleByLine(lineCode)[id];  
102 - return temps['sch-table-out-tootip-temp'](sch); 91 + return temps['sch-table-out-tootip-temp'](getSch(this));
103 } 92 }
104 }, 93 },
105 - position: {  
106 - viewport: $(window),  
107 - my: 'center left',  
108 - at: 'center right'  
109 - }, 94 + position: _opts.position,
110 style: { 95 style: {
111 classes: 'qtip-youtube sch-badge-tip' 96 classes: 'qtip-youtube sch-badge-tip'
112 }, 97 },
113 - hide: {  
114 - fixed: true,  
115 - delay: 300  
116 - },  
117 - events: {  
118 - hidden: function(event, api) {  
119 - //destroy dom  
120 - $(this).qtip('destroy', true);  
121 - }  
122 - } 98 + hide: _opts.hide,
  99 + events: _opts.events
123 }); 100 });
124 }); 101 });
125 102
126 103
127 //进场 tootip 104 //进场 tootip
128 - $(document).on('mouseenter', '.schedule-wrap .ct_table_body .uk-badge.in', function() { 105 + $(document).on('mouseenter', _badge+'.in', function() {
129 $(this).qtip({ 106 $(this).qtip({
130 - show: {  
131 - ready: true,  
132 - delay: 300  
133 - }, 107 + show: _opts.show,
134 content: { 108 content: {
135 text: function() { 109 text: function() {
136 - var id = $(this).parents('dl').data('id'),  
137 - lineCode = $(this).parents('li.line_schedule').data('id'),  
138 - sch = gb_schedule_table.findScheduleByLine(lineCode)[id];  
139 - return temps['sch-table-in-tootip-temp'](sch); 110 + return temps['sch-table-in-tootip-temp'](getSch(this));
140 } 111 }
141 }, 112 },
142 - position: {  
143 - viewport: $(window),  
144 - my: 'center left',  
145 - at: 'center right'  
146 - }, 113 + position: _opts.position,
147 style: { 114 style: {
148 classes: 'qtip-youtube sch-badge-tip' 115 classes: 'qtip-youtube sch-badge-tip'
149 }, 116 },
150 - hide: {  
151 - fixed: true,  
152 - delay: 300  
153 - },  
154 - events: {  
155 - hidden: function(event, api) {  
156 - //destroy dom  
157 - $(this).qtip('destroy', true); 117 + hide: _opts.hide,
  118 + events: _opts.events
  119 + });
  120 + });
  121 +
  122 + //2点间空放
  123 + $(document).on('mouseenter', _badge+'.sch_ldks', function() {
  124 + $(this).qtip({
  125 + show: _opts.show,
  126 + content: {
  127 + text: function() {
  128 + return temps['sch-table-ldks-tootip-temp'](getSch(this));
158 } 129 }
159 - } 130 + },
  131 + position: _opts.position,
  132 + style: {
  133 + classes: 'qtip-shadow qtip-bootstrap sch-badge-tip'
  134 + },
  135 + hide: _opts.hide,
  136 + events: _opts.events
160 }); 137 });
161 }); 138 });
162 })(); 139 })();
163 \ No newline at end of file 140 \ No newline at end of file
src/main/resources/static/real_control_v2/js/main.js
@@ -170,7 +170,7 @@ function showUpdateDescription() { @@ -170,7 +170,7 @@ function showUpdateDescription() {
170 //更新说明 170 //更新说明
171 var updateDescription = { 171 var updateDescription = {
172 date: '2017-05-16', 172 date: '2017-05-16',
173 - text: '<h5>菜单栏加入了服务器时间</h5>' 173 + text: '<h5>修复了进出场班次公里设置为0后自动烂班的问题</h5>'
174 }; 174 };
175 175
176 var storage = window.localStorage 176 var storage = window.localStorage
src/main/resources/static/real_control_v2/js/minute_timer.js deleted 100644 → 0
1 -/** 时钟 */  
2 -var gb_minute_timer = (function () {  
3 -  
4 -  
5 - var getServerTime = function (cb) {  
6 - function oncallback(jqXHR) {  
7 - var time = jqXHR && jqXHR.getResponseHeader("Date");  
8 - if (time)  
9 - callback(new Date(time))  
10 - }  
11 -  
12 - if ("function" == typeof callback)  
13 - $.ajax({  
14 - url: "/real_control_v2/assets/imgs/time.gif",  
15 - type: "HEAD"  
16 - }).done(function (data, textStatus, jqXHR) {  
17 - oncallback(jqXHR)  
18 - }).fail(function (jqXHR, textStatus, errorThrown) {  
19 - oncallback(jqXHR)  
20 - })  
21 - };  
22 -  
23 -  
24 - setTimeout(function () {  
25 - getServerTime(function () {  
26 - console.log('cb,,', cb);  
27 - });  
28 - }, 5000);  
29 -  
30 -})();  
31 \ No newline at end of file 0 \ No newline at end of file
src/main/resources/static/real_control_v2/js/north/second_timer.js
@@ -19,7 +19,7 @@ var gb_second_timer = (function () { @@ -19,7 +19,7 @@ var gb_second_timer = (function () {
19 setTime(); 19 setTime();
20 20
21 secondTimer = window.setInterval(function () { 21 secondTimer = window.setInterval(function () {
22 - if(0 == now.getSeconds() || true == contextFlag){ 22 + if (0 == now.getSeconds() || true == contextFlag) {
23 minuteTimer(); 23 minuteTimer();
24 contextFlag = false; 24 contextFlag = false;
25 } 25 }
@@ -48,7 +48,7 @@ var gb_second_timer = (function () { @@ -48,7 +48,7 @@ var gb_second_timer = (function () {
48 }) 48 })
49 }; 49 };
50 50
51 - var timeFormat = function(str) { 51 + var timeFormat = function (str) {
52 return ("0" + str).slice(-2) 52 return ("0" + str).slice(-2)
53 }; 53 };
54 54
@@ -57,11 +57,41 @@ var gb_second_timer = (function () { @@ -57,11 +57,41 @@ var gb_second_timer = (function () {
57 }; 57 };
58 58
59 var minuteTimer = function () { 59 var minuteTimer = function () {
60 - getServerTime(function(time) { 60 + getServerTime(function (time) {
61 now = time; 61 now = time;
62 setTime() 62 setTime()
63 }) 63 })
64 }; 64 };
65 65
66 window.setTimeout(init, 6000); 66 window.setTimeout(init, 6000);
  67 +
  68 +/* $(document).on('mouseenter', '.op-beijingtime-time', function () {
  69 + $(this).qtip({
  70 + show: {ready: true, delay: 300},
  71 + content: {
  72 + text: function () {
  73 + return '<div class="tl-tip-panel">' +
  74 + '<div style="font-size: 13px;">' +
  75 + '每次秒数到0与服务器同步一次<br>服务器每10分钟与国家授时中心标准时间同步一次<br>睡眠状态唤醒会短暂异常,可鼠标右击横幅任意区域立刻同步' +
  76 + '</div>' +
  77 + '</div>';
  78 + }
  79 + },
  80 + position: {
  81 + viewport: $(window),
  82 + my: 'top center',
  83 + at: 'bottom center'
  84 + },
  85 + style: {
  86 + classes: 'qtip-shadow qtip-tipped sch-badge-tip'
  87 + },
  88 + hide: {fixed: true, delay: 300},
  89 + events: {
  90 + hidden: function(event, api) {
  91 + //destroy dom
  92 + $(this).qtip('destroy', true);
  93 + }
  94 + }
  95 + });
  96 + });*/
67 })(); 97 })();
68 \ No newline at end of file 98 \ No newline at end of file
src/main/resources/static/real_control_v2/main.html
@@ -184,8 +184,6 @@ @@ -184,8 +184,6 @@
184 <script src="/real_control_v2/js/websocket/sch_websocket.js" merge="custom_js"></script> 184 <script src="/real_control_v2/js/websocket/sch_websocket.js" merge="custom_js"></script>
185 <!-- tts --> 185 <!-- tts -->
186 <script src="/real_control_v2/js/utils/tts.js" merge="custom_js"></script> 186 <script src="/real_control_v2/js/utils/tts.js" merge="custom_js"></script>
187 -<!-- minute_timer.js -->  
188 -<script src="/real_control_v2/js/minute_timer.js" merge="custom_js"></script>  
189 187
190 <!-- echart --> 188 <!-- echart -->
191 <script src="/real_control_v2/assets/echarts-3/echarts.js" merge="plugins"></script> 189 <script src="/real_control_v2/assets/echarts-3/echarts.js" merge="plugins"></script>