Commit a073eb241e12b6fb54d10745388ee9651505a5f2

Authored by 徐烜
2 parents bc51f6e2 39ac8765
Showing 36 changed files with 958 additions and 190 deletions
src/main/java/com/bsth/StartCommand.java
... ... @@ -4,6 +4,7 @@ package com.bsth;
4 4 import com.bsth.security.SecurityMetadataSourceService;
5 5 import com.bsth.service.realcontrol.buffer.GetSchedulePlanThread;
6 6 import com.bsth.service.realcontrol.buffer.SchedulePersistenceThread;
  7 +import com.bsth.util.DateUtils;
7 8 import com.bsth.vehicle.common.CommonRefreshThread;
8 9 import com.bsth.vehicle.directive.thread.DirectivePersistenceThread;
9 10 import com.bsth.vehicle.directive.thread.FirstScheduleIssuedThread;
... ... @@ -63,13 +64,15 @@ public class StartCommand implements CommandLineRunner{
63 64 * GPS实时数据更新 线程
64 65 * 每8秒和网关HTTP接口同步一次
65 66 */
66   - //scheduler.scheduleWithFixedDelay(gpsRefreshThread, 0, 8, TimeUnit.SECONDS);
  67 + scheduler.scheduleWithFixedDelay(gpsRefreshThread, 0, 8, TimeUnit.SECONDS);
67 68  
68 69 /**
69 70 * 每天 0点 抓取当天实际排班
70 71 */
  72 + //启动时先run一次
  73 + getSchedulePlanThread.start();
71 74 scheduler.scheduleAtFixedRate(getSchedulePlanThread
72   - , 0//DateUtils.getTimesnight() + 5 - System.currentTimeMillis() / 1000
  75 + , DateUtils.getTimesnight() + 5 - System.currentTimeMillis() / 1000
73 76 , 60 * 60 * 24, TimeUnit.SECONDS);
74 77  
75 78 /**
... ... @@ -106,7 +109,7 @@ public class StartCommand implements CommandLineRunner{
106 109 * 还车线程(2分钟运行一次)
107 110 * 将借出的车刷回原线路
108 111 */
109   - //scheduler.scheduleWithFixedDelay(revertLineThread, 60 , 60 * 2 , TimeUnit.SECONDS);
  112 + scheduler.scheduleWithFixedDelay(revertLineThread, 60 , 60 * 2 , TimeUnit.SECONDS);
110 113 } catch (Exception e) {
111 114 e.printStackTrace();
112 115 }
... ...
src/main/java/com/bsth/controller/UserController.java
... ... @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
14 14 import org.springframework.web.servlet.ModelAndView;
15 15  
16 16 import com.bsth.entity.sys.SysUser;
  17 +import com.bsth.security.util.SecurityUtils;
17 18  
18 19 @RestController
19 20 @RequestMapping("user")
... ... @@ -58,4 +59,9 @@ public class UserController extends BaseController<SysUser, Integer>{
58 59 }
59 60 return new ModelAndView("/");
60 61 }
  62 +
  63 + @RequestMapping("/currentUser")
  64 + public SysUser currentUser(){
  65 + return SecurityUtils.getCurrentUser();
  66 + }
61 67 }
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -186,6 +186,18 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
186 186  
187 187 /**
188 188 *
  189 + * @Title: schInfoFineTune
  190 + * @Description: TODO(发车信息微调)
  191 + * @param @param map
  192 + * @throws
  193 + */
  194 + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)
  195 + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){
  196 + return scheduleRealInfoService.schInfoFineTune(map);
  197 + }
  198 +
  199 + /**
  200 + *
189 201 * @Title: trustStatus @Description: TODO(线路托管状态) @param @param lineCodes
190 202 * 线路编码 @throws
191 203 */
... ...
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
... ... @@ -18,6 +18,9 @@ public class ScheduleRealInfo {
18 18 @Id
19 19 @GeneratedValue
20 20 private Long id;
  21 +
  22 + /** 计划ID */
  23 + private Long spId;
21 24  
22 25 /** 排班计划日期 */
23 26 private Date scheduleDate;
... ... @@ -141,10 +144,10 @@ public class ScheduleRealInfo {
141 144 private Integer directiveState = -1;
142 145  
143 146 /** 起点站计划到达时间 */
144   - private String qdzArrDateJH;
  147 + private String qdzArrDatejh;
145 148  
146 149 /** 起点站实际到达时间 */
147   - private String qdzArrDateSJ;
  150 + private String qdzArrDatesj;
148 151  
149 152 public void addRemarks(String remark){
150 153 String newRem = this.getRemarks();
... ... @@ -500,8 +503,15 @@ public class ScheduleRealInfo {
500 503 this.setDfsj(this.getFcsj());
501 504 //发车时间戳
502 505 this.setFcsjT(sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + this.getFcsj()).getTime());
503   - //待发时间
  506 + //待发时间
504 507 this.setDfsjT(this.getFcsjT());
  508 +
  509 + //计划终点时间
  510 + if(this.getBcsj() != null){
  511 + Date zdDate = new Date(this.getFcsjT() + (this.getBcsj() * 60 * 1000));
  512 + this.setZdsjT(zdDate.getTime());
  513 + this.setZdsj(sdfHHmm.format(zdDate));
  514 + }
505 515 }catch(Exception e){
506 516 e.printStackTrace();
507 517 }
... ... @@ -521,19 +531,19 @@ public class ScheduleRealInfo {
521 531 }
522 532  
523 533 public String getQdzArrDateJH() {
524   - return qdzArrDateJH;
  534 + return qdzArrDatejh;
525 535 }
526 536  
527 537 public void setQdzArrDateJH(String qdzArrDateJH) {
528   - this.qdzArrDateJH = qdzArrDateJH;
  538 + this.qdzArrDatejh = qdzArrDateJH;
529 539 }
530 540  
531 541 public String getQdzArrDateSJ() {
532   - return qdzArrDateSJ;
  542 + return qdzArrDatesj;
533 543 }
534 544  
535 545 public void setQdzArrDateSJ(String qdzArrDateSJ) {
536   - this.qdzArrDateSJ = qdzArrDateSJ;
  546 + this.qdzArrDatesj = qdzArrDateSJ;
537 547 }
538 548  
539 549 public boolean isSflj() {
... ... @@ -544,4 +554,56 @@ public class ScheduleRealInfo {
544 554 this.sflj = sflj;
545 555 }
546 556  
  557 + /**
  558 + *
  559 + * @Title: setFcsjAll
  560 + * @Description: TODO(设置计划发车时间)
  561 + * @throws
  562 + */
  563 + public void setFcsjAll(String fcsj){
  564 + try {
  565 + this.fcsjT = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + fcsj).getTime();
  566 + this.fcsj = fcsj;
  567 + } catch (ParseException e) {
  568 + e.printStackTrace();
  569 + }
  570 + }
  571 +
  572 + /**
  573 + *
  574 + * @Title: setFcsjActualAll
  575 + * @Description: TODO(设置实际发车时间)
  576 + * @throws
  577 + */
  578 + public void setFcsjActualAll(String fcsjActual){
  579 + try {
  580 + this.fcsjActualTime = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + fcsjActual).getTime();
  581 + this.fcsjActual = fcsjActual;
  582 + } catch (ParseException e) {
  583 + e.printStackTrace();
  584 + }
  585 + }
  586 +
  587 + /**
  588 + *
  589 + * @Title: setFcsjActualAll
  590 + * @Description: TODO(设置实际终点时间)
  591 + * @throws
  592 + */
  593 + public void setZdsjActualAll(String zdsjActual){
  594 + try {
  595 + this.zdsjActualTime = sdfyyyyMMddHHmm.parse(sdfyyyyMMdd.format(this.scheduleDate) + " " + zdsjActual).getTime();
  596 + this.zdsjActual = zdsjActual;
  597 + } catch (ParseException e) {
  598 + e.printStackTrace();
  599 + }
  600 + }
  601 +
  602 + public Long getSpId() {
  603 + return spId;
  604 + }
  605 +
  606 + public void setSpId(Long spId) {
  607 + this.spId = spId;
  608 + }
547 609 }
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
1 1 package com.bsth.repository.realcontrol;
2 2  
  3 +import java.util.Date;
3 4 import java.util.List;
4 5 import java.util.Map;
5 6  
... ... @@ -34,4 +35,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
34 35  
35 36 @Query(value="select s from ScheduleRealInfo s where s.xlName = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.clZbh like ?3")
36 37 List<ScheduleRealInfo> historyMessage(String line,String date,String code);
  38 +
  39 + @Query(value = "select max(id) from ScheduleRealInfo")
  40 + Long getMaxId();
  41 +
  42 + @Query(value = "select count(*) from ScheduleRealInfo s where s.scheduleDate = ?1")
  43 + int countByDate(Date date);
  44 +
  45 + @Query(value = "select s from ScheduleRealInfo s where s.scheduleDate = ?1")
  46 + List<ScheduleRealInfo> findByDate(Date date);
37 47 }
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -76,4 +76,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
76 76  
77 77 Map<String, Object> spaceAdjust(Long[] ids, Integer space);
78 78  
  79 + Map<String, Object> schInfoFineTune(Map<String, String> map);
  80 +
79 81 }
... ...
src/main/java/com/bsth/service/realcontrol/buffer/GetSchedulePlanThread.java
... ... @@ -36,29 +36,41 @@ public class GetSchedulePlanThread extends Thread{
36 36 @Autowired
37 37 ScheduleRealInfoRepository scheduleRealInfoRepository;
38 38  
39   - SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm");
  39 + SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");
40 40  
41 41 @Override
42 42 public void run() {
43 43 try{
44   - String dateStr = /*sdf.format(new Date())*/"2016-06-01";
45   - List<SchedulePlanInfo> list = schedulePlanInfoRepository.findByDate(dateStr);
  44 + ScheduleBuffer.clear();
46 45  
47   - //实际排班计划
48   - List<ScheduleRealInfo> realList = JSONArray.parseArray(JSON.toJSONString(list), ScheduleRealInfo.class);
49   -
50   - Date zdDate;
51   - for(ScheduleRealInfo item : realList){
52   - item.syncTime();
53   - //计划终点时间
54   - if(item.getBcsj() != null){
55   - zdDate = new Date(item.getFcsjT() + (item.getBcsj() * 60 * 1000));
56   - item.setZdsjT(zdDate.getTime());
57   - item.setZdsj(sdfHHmm.format(zdDate));
  46 + List<ScheduleRealInfo> realList = null;
  47 + String dateStr = sdfyyyyMMdd.format(new Date());
  48 + Date cDate = sdfyyyyMMdd.parse(dateStr);
  49 + //查询数据库是否有今日排班
  50 + int size = scheduleRealInfoRepository.countByDate(cDate);
  51 + if(size > 0){
  52 + //从数据库恢复当日排班
  53 + realList = scheduleRealInfoRepository.findByDate(cDate);
  54 + }
  55 + else{
  56 + List<SchedulePlanInfo> list = schedulePlanInfoRepository.findByDate(dateStr);
  57 +
  58 + //实际排班计划
  59 + realList = JSONArray.parseArray(JSON.toJSONString(list), ScheduleRealInfo.class);
  60 + //查询数据库最大ID
  61 + Long id = scheduleRealInfoRepository.getMaxId();
  62 + if(null == id)
  63 + id = 0L;
  64 + id ++;
  65 +
  66 + for(ScheduleRealInfo item : realList){
  67 + item.setSpId(item.getId());
  68 + item.setId(id ++);//设置ID
58 69 }
  70 + //入库
  71 + new BatchSaveUtils<ScheduleRealInfo>().saveList(realList, ScheduleRealInfo.class);
59 72 }
60 73  
61   - //new BatchSaveUtils<ScheduleRealInfo>().saveList(realList, ScheduleRealInfo.class);
62 74 //写入缓存
63 75 ScheduleBuffer.init(realList);
64 76  
... ...
src/main/java/com/bsth/service/realcontrol/buffer/ScheduleBuffer.java
... ... @@ -77,6 +77,11 @@ public class ScheduleBuffer {
77 77 public static int init(List<ScheduleRealInfo> list){
78 78  
79 79 try{
  80 + //计算时间戳
  81 + for(ScheduleRealInfo schedul : list){
  82 + schedul.syncTime();
  83 + }
  84 +
80 85 //发车时间排序
81 86 Collections.sort(list, scheduleComparator);
82 87  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -241,7 +241,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
241 241 t.setScheduleDate(new Date());
242 242 t.setCreateBy(user);
243 243 t.syncTime();
244   -
  244 + t.setSflj(true);
245 245 Map<String, Object> map = super.save(t);
246 246  
247 247 // 加入缓存
... ... @@ -473,8 +473,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
473 473 // 按发车时间排序
474 474 Collections.sort(list, new ScheduleBuffer.ScheduleComparator());
475 475  
476   - // 以第一个待发时间为起点,调整间隔
477   - Long st = list.get(0).getDfsjT()
  476 + // 以第一个实际发车/待发时间为起点,调整间隔
  477 + sch = list.get(0);
  478 + Long st = sch.getFcsjActualTime()==null?sch.getDfsjT():sch.getFcsjActualTime()
478 479 ,plus = space * 60 * 1000L;
479 480  
480 481 for(int i = 1; i < size; i ++){
... ... @@ -495,4 +496,51 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
495 496 }
496 497 return rs;
497 498 }
  499 +
  500 + @Override
  501 + public Map<String, Object> schInfoFineTune(Map<String, String> map) {
  502 + Map<String, Object> rs = new HashMap<>();
  503 + try {
  504 + Long id = Long.parseLong(map.get("id"));
  505 + //班次类型
  506 + String bcType = map.get("bcType");
  507 + //车辆自编号
  508 + String clZbh = map.get("clZbh");
  509 + //计划发车时间
  510 + String fcsj = map.get("fcsj");
  511 + //实际发车时间
  512 + String fcsjActual = map.get("fcsjActual");
  513 + //驾驶员
  514 + String[] jsy = map.get("jsy").split("/");
  515 + //售票员
  516 + String[] spy = map.get("spy").split("/");
  517 + //实际终点时间
  518 + String zdsjActual = map.get("zdsjActual");
  519 + //备注
  520 + String remarks = map.get("remarks");
  521 +
  522 + ScheduleRealInfo sch = ScheduleBuffer.findOne(id);
  523 + if(null != sch){
  524 + sch.setBcType(bcType);
  525 + sch.setClZbh(clZbh);
  526 + sch.setFcsjAll(fcsj);
  527 + sch.setFcsjActualAll(fcsjActual);
  528 + sch.setZdsjActualAll(zdsjActual);
  529 + sch.setjGh(jsy[0]);
  530 + sch.setjName(jsy[1]);
  531 + sch.setsGh(spy[0]);
  532 + sch.setsName(spy[1]);
  533 + sch.setRemarks(remarks);
  534 + }
  535 +
  536 + ScheduleBuffer.persistentList.add(sch);
  537 +
  538 + rs.put("status", ResponseCode.SUCCESS);
  539 + rs.put("t", sch);
  540 + } catch (Exception e) {
  541 + logger.error("", e);
  542 + rs.put("status", ResponseCode.ERROR);
  543 + }
  544 + return rs;
  545 + }
498 546 }
... ...
src/main/java/com/bsth/util/BatchSaveUtils.java
... ... @@ -36,11 +36,10 @@ public class BatchSaveUtils&lt;T&gt; {
36 36 Logger logger = LoggerFactory.getLogger(this.getClass());
37 37  
38 38 static {
39   - Tools t = new Tools("application.properties");
40   - driver = t.getValue("spring.datasource.driver-class-name");
41   - url = t.getValue("spring.datasource.url");
42   - uname = t.getValue("spring.datasource.username");
43   - pwd = t.getValue("spring.datasource.password");
  39 + driver = ConfigUtil.get("spring.datasource.driver-class-name");
  40 + url = ConfigUtil.get("spring.datasource.url");
  41 + uname = ConfigUtil.get("spring.datasource.username");
  42 + pwd = ConfigUtil.get("spring.datasource.password");
44 43 }
45 44  
46 45 /**
... ...
src/main/java/com/bsth/util/ConfigUtil.java 0 → 100644
  1 +package com.bsth.util;
  2 +
  3 +public class ConfigUtil {
  4 +
  5 + static Tools tools;
  6 +
  7 + static{
  8 + tools = new Tools("application.properties");
  9 + String active = tools.getValue("spring.profiles.active");
  10 + tools = new Tools("application-"+active+".properties");
  11 + }
  12 +
  13 + public static String get(String key){
  14 + return tools.getValue(key);
  15 + }
  16 +}
... ...
src/main/java/com/bsth/vehicle/directive/Consts.java
1 1 package com.bsth.vehicle.directive;
2 2  
3   -import com.bsth.util.Tools;
4 3  
5 4 public class Consts {
6 5  
7   - static Tools tools = new Tools("application.properties");
8   -
9 6 /**
10 7 * 调度指令 -多营运状态 [0][0]上行营运 [0][1]上行非营运 [1][0]下行营运 [1][1]下行非营运
11 8 */
12 9 public static final int[][] SERVICE_STATE = { { 0, 0x02000000 }, { 0x10000000, 0x12000000 } };
13 10  
14   - /**
15   - * 消息下发地址
16   - */
17   - public static final String SEND_DIRECTIVE_URL = tools.getValue("http.send.directive");
18 11 }
... ...
src/main/java/com/bsth/vehicle/directive/service/DirectiveServiceImpl.java
... ... @@ -110,7 +110,6 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;Directive60, Integer&gt;
110 110 directive.setDispatch(true);
111 111 directive.setSch(sch);
112 112 DirectiveBuffer.put(directive);
113   -
114 113 //通知页面,消息已发出
115 114 sendDirectiveState(sch);
116 115 }else{
... ... @@ -281,7 +280,7 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;Directive60, Integer&gt;
281 280 }else{
282 281 logger.error("send60 upDownChange error, code: " + code);
283 282 }
284   - return 0;
  283 + return code;
285 284 }
286 285  
287 286 /**
... ...
src/main/java/com/bsth/vehicle/directive/thread/FirstScheduleIssuedThread.java
... ... @@ -35,7 +35,9 @@ public class FirstScheduleIssuedThread extends Thread{
35 35  
36 36 sch = linkedList.getFirst();
37 37  
38   - if(sch.getFcsjActual() == null)
  38 + //没有完成班次,且头班车没有发车时间
  39 + if(!ScheduleBuffer.finishLinkedMap.containsKey(nbbm)
  40 + && sch.getFcsjActual() == null)
39 41 directiveService.send60Dispatch(sch, 0);
40 42 }
41 43 }
... ...
src/main/java/com/bsth/vehicle/directive/util/HttpUtils.java
... ... @@ -2,6 +2,7 @@ package com.bsth.vehicle.directive.util;
2 2  
3 3 import java.io.IOException;
4 4  
  5 +import org.apache.http.client.config.RequestConfig;
5 6 import org.apache.http.client.methods.CloseableHttpResponse;
6 7 import org.apache.http.client.methods.HttpPost;
7 8 import org.apache.http.entity.StringEntity;
... ... @@ -12,7 +13,7 @@ import org.slf4j.Logger;
12 13 import org.slf4j.LoggerFactory;
13 14  
14 15 import com.alibaba.fastjson.JSONObject;
15   -import com.bsth.vehicle.directive.Consts;
  16 +import com.bsth.util.ConfigUtil;
16 17  
17 18 /**
18 19 *
... ... @@ -26,6 +27,12 @@ public class HttpUtils {
26 27  
27 28 static Logger logger = LoggerFactory.getLogger(HttpUtils.class);
28 29  
  30 + static String url;
  31 +
  32 + static{
  33 + url = ConfigUtil.get("http.send.directive");
  34 + }
  35 +
29 36 public static int postJson(String jsonStr){
30 37 logger.info("send : " + jsonStr);
31 38  
... ... @@ -34,7 +41,14 @@ public class HttpUtils {
34 41 try{
35 42 httpClient = HttpClients.createDefault();
36 43  
37   - HttpPost post = new HttpPost(Consts.SEND_DIRECTIVE_URL);
  44 + //超时时间
  45 + RequestConfig requestConfig = RequestConfig.custom()
  46 + .setConnectTimeout(3000).setConnectionRequestTimeout(1000)
  47 + .setSocketTimeout(3000).build();
  48 +
  49 + HttpPost post = new HttpPost(url);
  50 +
  51 + post.setConfig(requestConfig);
38 52  
39 53 post.setEntity(new StringEntity(jsonStr, "utf-8"));
40 54  
... ...
src/main/java/com/bsth/vehicle/gpsdata/GpsArrivalStationThread.java
... ... @@ -8,7 +8,9 @@ import java.text.SimpleDateFormat;
8 8 import java.util.ArrayList;
9 9 import java.util.Calendar;
10 10 import java.util.Date;
  11 +import java.util.HashSet;
11 12 import java.util.Iterator;
  13 +import java.util.LinkedList;
12 14 import java.util.List;
13 15 import java.util.Set;
14 16  
... ... @@ -22,6 +24,7 @@ import com.bsth.entity.realcontrol.ScheduleRealInfo;
22 24 import com.bsth.service.realcontrol.buffer.ScheduleBuffer;
23 25 import com.bsth.util.DateUtils;
24 26 import com.bsth.util.db.DBUtils_MS;
  27 +import com.bsth.vehicle.common.CommonMapped;
25 28 import com.bsth.vehicle.directive.service.DirectiveService;
26 29 import com.bsth.vehicle.gpsdata.buffer.GpsArrivalDataBuffer;
27 30 import com.bsth.vehicle.gpsdata.entity.ArrivalInfo;
... ... @@ -57,7 +60,33 @@ public class GpsArrivalStationThread extends Thread{
57 60 } catch (ParseException e) {
58 61 e.printStackTrace();
59 62 }
  63 + //缓存
60 64 GpsArrivalDataBuffer.putAll(list);
  65 +
  66 + //车辆
  67 + Set<String> set = new HashSet<>();
  68 + for(ArrivalInfo arr : list)
  69 + set.add(CommonMapped.vehicDeviceBiMap.get(arr.getDeviceId()));
  70 +
  71 + List<ArrivalInfo> rsList = null;
  72 + LinkedList<ScheduleRealInfo> linked = null;
  73 + int[] status;
  74 + ScheduleRealInfo sch;
  75 + for(String nbbm : set){
  76 + rsList = GpsArrivalDataBuffer.pops(nbbm);
  77 + //和该车辆未执行班次进行匹配
  78 + linked = ScheduleBuffer.vehLinkedMap.get(nbbm);
  79 +
  80 + if(null == linked || linked.size() == 0)
  81 + continue;
  82 + //第一个未执行班次
  83 + sch = linked.getFirst();
  84 +
  85 + //匹配结果
  86 + status = match(rsList, sch);
  87 + }
  88 + //
  89 + /*GpsArrivalDataBuffer.putAll(list);
61 90 //实际到离站和计划排班相匹配
62 91  
63 92 Set<String> keySet = GpsArrivalDataBuffer.allMap.keySet();
... ... @@ -68,7 +97,42 @@ public class GpsArrivalStationThread extends Thread{
68 97 if(null != schList)
69 98 match(GpsArrivalDataBuffer.allMap.get(key), schList);
70 99 }
71   - System.out.println("结束...");
  100 + System.out.println("结束...");*/
  101 + }
  102 +
  103 + public int[] match(List<ArrivalInfo> arrList, ScheduleRealInfo sch){
  104 + //进出分组
  105 + List<ArrivalInfo> in = new ArrayList<>(), out = new ArrayList<>();
  106 + for(ArrivalInfo arr : arrList){
  107 + if(arr.getInOut() == 0)
  108 + in.add(arr);
  109 + else
  110 + out.add(arr);
  111 + }
  112 + int s1 = 0, s2 = 0;
  113 + //匹配发车时间
  114 + if(sch.getFcsjActual() == null)
  115 + s1 = matchOut(arrList, sch);
  116 +
  117 + //匹配终点时间
  118 + if(sch.getZdsjActual() == null)
  119 + s2 = matchIn(arrList, sch);
  120 +
  121 + return new int[]{s1,s2};
  122 + }
  123 +
  124 + public int matchOut(List<ArrivalInfo> arrList, ScheduleRealInfo sch){
  125 +
  126 + for(ArrivalInfo arr : arrList){
  127 + if(arr.getStopNo().equals(sch.getQdzCode())){
  128 +
  129 + }
  130 + }
  131 + return 0;
  132 + }
  133 +
  134 + public int matchIn(List<ArrivalInfo> arrList, ScheduleRealInfo sch){
  135 + return 0;
72 136 }
73 137  
74 138  
... ... @@ -80,21 +144,21 @@ public class GpsArrivalStationThread extends Thread{
80 144 * @param @param schList 计划排班链表
81 145 * @throws
82 146 */
83   - public void match(List<ArrivalInfo> arrList, List<ScheduleRealInfo> schList){
  147 + /*public void match(List<ArrivalInfo> arrList, List<ScheduleRealInfo> schList){
84 148 Iterator<ScheduleRealInfo> schIterator = schList.iterator();
85 149  
86 150 while(schIterator.hasNext())
87 151 match(schIterator.next(), arrList);
88   - }
  152 + }*/
89 153  
90 154  
91   - public void match(ScheduleRealInfo scInfo, List<ArrivalInfo> arrList){
  155 + /*public void match(ScheduleRealInfo scInfo, List<ArrivalInfo> arrList){
92 156 for(ArrivalInfo arr : arrList){
93 157 match(scInfo, arr);
94 158 }
95   - }
  159 + }*/
96 160  
97   - public void match(ScheduleRealInfo scInfo, ArrivalInfo arr){
  161 +/* public void match(ScheduleRealInfo scInfo, ArrivalInfo arr){
98 162 try{
99 163 //匹配起点
100 164 matchStart(scInfo, arr);
... ... @@ -104,7 +168,7 @@ public class GpsArrivalStationThread extends Thread{
104 168 }catch(Exception e){
105 169 e.printStackTrace();
106 170 }
107   - }
  171 + }*/
108 172  
109 173 /**
110 174 *
... ...
src/main/java/com/bsth/vehicle/gpsdata/GpsRefreshThread.java
... ... @@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
19 19  
20 20 import com.alibaba.fastjson.JSON;
21 21 import com.alibaba.fastjson.JSONObject;
22   -import com.bsth.util.Tools;
  22 +import com.bsth.util.ConfigUtil;
23 23 import com.bsth.vehicle.gpsdata.buffer.GpsRealDataBuffer;
24 24 import com.bsth.vehicle.gpsdata.entity.GpsRealData;
25 25 import com.google.common.collect.ImmutableMap;
... ... @@ -42,8 +42,7 @@ public class GpsRefreshThread extends Thread{
42 42  
43 43  
44 44 public GpsRefreshThread() {
45   - Tools t = new Tools("application.properties");
46   - url = t.getValue("http.gps.real.url");
  45 + url = ConfigUtil.get("http.gps.real.url");
47 46 }
48 47  
49 48 @Autowired
... ...
src/main/java/com/bsth/vehicle/gpsdata/buffer/GpsArrivalDataBuffer.java
... ... @@ -2,7 +2,9 @@ package com.bsth.vehicle.gpsdata.buffer;
2 2  
3 3 import java.util.Collections;
4 4 import java.util.Comparator;
  5 +import java.util.HashMap;
5 6 import java.util.List;
  7 +import java.util.Map;
6 8  
7 9 import com.bsth.vehicle.common.CommonMapped;
8 10 import com.bsth.vehicle.gpsdata.entity.ArrivalInfo;
... ... @@ -10,54 +12,74 @@ import com.google.common.collect.LinkedListMultimap;
10 12  
11 13 /**
12 14 *
13   - * @ClassName: GpsArrivalDataBuffer
14   - * @Description: TODO(GPS到离站数据缓存)
  15 + * @ClassName: GpsArrivalDataBuffer
  16 + * @Description: TODO(GPS到离站数据缓存)
15 17 * @author PanZhao
16   - * @date 2016年6月27日 下午1:08:35
  18 + * @date 2016年6月27日 下午1:08:35
17 19 *
18 20 */
19 21 public class GpsArrivalDataBuffer {
20 22  
21 23 /**
22   - * 车辆 时间戳排序的进出站链表
  24 + * 车辆 时间戳排序的进出站链表
23 25 */
24 26 public static LinkedListMultimap<String, ArrivalInfo> allMap;
25   -
  27 +
  28 + /**
  29 + * 车辆 和 进出站链表索引
  30 + */
  31 + public static Map<String, Integer> markMap;
  32 +
26 33 /**
27 34 * 时间戳标记,从数据库增量查询时起始时间
28 35 */
29 36 public static Long markTime;
30   -
31   -
32   - static{
  37 +
  38 + public static List<ArrivalInfo> pops(String nbbm) {
  39 + Integer mark = null;
  40 + if (!markMap.containsKey(nbbm))
  41 + mark = 0;
  42 + else
  43 + mark = markMap.get(nbbm);
  44 +
  45 + List<ArrivalInfo> all = allMap.get(nbbm);
  46 + int size = all.size();
  47 + if(size == 0)
  48 + return null;
  49 +
  50 + List<ArrivalInfo> rs = all.subList(mark, size);
  51 +
  52 + markMap.put(nbbm, size);
  53 + return rs;
  54 + }
  55 +
  56 + static {
33 57 allMap = LinkedListMultimap.create();
  58 + markMap = new HashMap<>();
34 59 }
35   -
  60 +
36 61 /**
37 62 *
38   - * @Title: putAll
39   - * @Description: TODO(将增量数据添加到缓存)
40   - * @param @param list 设定文件
41   - * @return void 返回类型
42   - * @throws
  63 + * @Title: putAll @Description: TODO(将增量数据添加到缓存) @param @param list
  64 + * 设定文件 @return void 返回类型 @throws
43 65 */
44   - public static void putAll(List<ArrivalInfo> list){
45   - //按时间戳排序
  66 + public static void putAll(List<ArrivalInfo> list) {
  67 + // 按时间戳排序
46 68 Collections.sort(list, new Comparator<ArrivalInfo>() {
47 69 @Override
48 70 public int compare(ArrivalInfo o1, ArrivalInfo o2) {
49 71 return (int) (o1.getTs() - o2.getTs());
50 72 }
51 73 });
52   -
  74 +
53 75 int len = list.size();
54 76 ArrivalInfo arrival;
55 77 String nbbm;
56   - for(int i = 0; i < len; i ++){
  78 + for (int i = 0; i < len; i++) {
57 79 arrival = list.get(i);
58 80 nbbm = CommonMapped.vehicDeviceBiMap.get(arrival.getDeviceId());
59   -
60   - if(null != nbbm)
  81 +
  82 + if (null != nbbm)
61 83 allMap.put(nbbm, arrival);
62 84 }
63 85 }
... ...
src/main/resources/application-dev.properties 0 → 100644
  1 +server.port=9088
  2 +management.port= 9001
  3 +management.address= 127.0.0.1
  4 +
  5 +spring.jpa.hibernate.ddl-auto= update
  6 +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
  7 +#DATABASE
  8 +spring.jpa.database= MYSQL
  9 +spring.jpa.show-sql= true
  10 +spring.datasource.driver-class-name= com.mysql.jdbc.Driver
  11 +spring.datasource.url= jdbc:mysql://192.168.168.201:3306/control
  12 +spring.datasource.username= root
  13 +spring.datasource.password= 123456
  14 +#DATASOURCE
  15 +spring.datasource.max-active=100
  16 +spring.datasource.max-idle=8
  17 +spring.datasource.min-idle=8
  18 +spring.datasource.initial-size=5
  19 +
  20 +spring.datasource.test-on-borrow=true
  21 +spring.datasource.test-on-connect=true
  22 +spring.datasource.test-on-return=true
  23 +spring.datasource.test-while-idle=true
  24 +spring.datasource.validation-query=select 1
  25 +
  26 +##
  27 +#222.66.0.204:5555
  28 +##\u5B9E\u65F6gps
  29 +http.gps.real.url= http://192.168.168.192:8080/transport_server/rtgps/
  30 +##\u6D88\u606F\u4E0B\u53D1
  31 +http.send.directive = http://192.168.168.192:8080/transport_server/message/
... ...
src/main/resources/application-prod.properties 0 → 100644
  1 +server.port=9088
  2 +management.port= 9001
  3 +management.address= 127.0.0.1
  4 +
  5 +spring.jpa.hibernate.ddl-auto= update
  6 +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
  7 +#DATABASE
  8 +spring.jpa.database= MYSQL
  9 +spring.jpa.show-sql= true
  10 +spring.datasource.driver-class-name= com.mysql.jdbc.Driver
  11 +spring.datasource.url= jdbc:mysql://192.168.168.171:3306/control
  12 +spring.datasource.username= root
  13 +spring.datasource.password= root2jsp
  14 +#DATASOURCE
  15 +spring.datasource.max-active=100
  16 +spring.datasource.max-idle=8
  17 +spring.datasource.min-idle=8
  18 +spring.datasource.initial-size=5
  19 +
  20 +spring.datasource.test-on-borrow=true
  21 +spring.datasource.test-on-connect=true
  22 +spring.datasource.test-on-return=true
  23 +spring.datasource.test-while-idle=true
  24 +spring.datasource.validation-query=select 1
  25 +
  26 +##
  27 +#222.66.0.204:5555
  28 +##\u5B9E\u65F6gps
  29 +http.gps.real.url= http://192.168.168.171:8080/transport_server/rtgps/
  30 +##\u6D88\u606F\u4E0B\u53D1
  31 +http.send.directive = http://192.168.168.171:8080/transport_server/message/
... ...
src/main/resources/application.properties
1   -server.port=9088
2   -management.port= 9001
3   -management.address= 127.0.0.1
4   -
5   -spring.jpa.hibernate.ddl-auto= update
6   -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7   -
8   -#DATABASE
9   -spring.jpa.database= MYSQL
10   -spring.jpa.show-sql= true
11   -spring.datasource.driver-class-name= com.mysql.jdbc.Driver
12   -spring.datasource.url= jdbc:mysql://192.168.168.201:3306/control
13   -spring.datasource.username= root
14   -spring.datasource.password= 123456
15   -
16   -#DATASOURCE
17   -spring.datasource.max-active=100
18   -spring.datasource.max-idle=8
19   -spring.datasource.min-idle=8
20   -spring.datasource.initial-size=5
21   -
22   -spring.datasource.test-on-borrow=true
23   -spring.datasource.test-on-connect=true
24   -spring.datasource.test-on-return=true
25   -spring.datasource.test-while-idle=true
26   -spring.datasource.validation-query=select 1
  1 +spring.profiles: dev,prod
  2 +spring.profiles.active: dev
27 3  
28 4 spring.view.suffix=.html
29   -
30 5 server.session-timeout=-1
31   -
32 6 security.basic.enabled=false
33 7  
34   -# 上传文件大小限制配置
  8 +# \u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u9650\u5236\u914D\u7F6E
35 9 # File size limit
36 10 multipart.maxFileSize = -1
37 11 # Total request size for a multipart/form-data
38 12 multipart.maxRequestSize = -1
39 13  
40   -##
41   -#222.66.0.204:5555
42   -##\u5B9E\u65F6gps
43   -http.gps.real.url= http://192.168.168.192:8080/transport_server/rtgps/
44   -##\u6D88\u606F\u4E0B\u53D1
45   -http.send.directive = http://192.168.168.192:8080/transport_server/message/
... ...
src/main/resources/static/assets/img/logo_text.png 0 → 100644

14.7 KB

src/main/resources/static/assets/js/common.js
... ... @@ -114,7 +114,7 @@ function initPinYinSelect2(selector, data, cb){
114 114 })
115 115 });
116 116  
117   - cb && cb();
  117 + cb && cb($(selector));
118 118 });
119 119  
120 120 return $(selector);
... ...
src/main/resources/static/index.html
... ... @@ -108,6 +108,17 @@ tr.row-active td {
108 108 .page-content.active{
109 109 display: block !important;
110 110 }
  111 +
  112 +.page-header.navbar .page-logo {
  113 + width: 335px;
  114 +}
  115 +
  116 +.page-header.navbar .page-logo .logo-default {
  117 + margin: 0;
  118 +}
  119 +.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle {
  120 + background-color: #284a99;
  121 +}
111 122 </style>
112 123  
113 124 <!-- ocLazyLoading载入文件的位置 -->
... ... @@ -115,28 +126,18 @@ tr.row-active td {
115 126  
116 127 </head>
117 128 <body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed">
118   - <div class="page-header navbar navbar-fixed-top">
  129 + <div class="page-header navbar navbar-fixed-top" style="background: #23438e;">
119 130 <div class="page-header-inner ">
120 131 <!-- LOGO -->
121 132 <div class="page-logo">
122 133 <a href="index.html">
123   - <img src="" alt="logo" class="logo-default" /> </a>
  134 + <img src="/assets/img/logo_text.png" alt="logo" class="logo-default" /> </a>
124 135 <div class="menu-toggler sidebar-toggler">
125 136 </div>
126 137 </div>
127 138 <!-- END LOGO -->
128 139 <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"> </a>
129 140 <div class="page-top">
130   - <form class="search-form" action="page_general_search_2.html" method="GET">
131   - <div class="input-group">
132   - <input type="text" class="form-control input-sm" placeholder="Search..." name="query">
133   - <span class="input-group-btn">
134   - <a href="javascript:;" class="btn submit">
135   - <i class="fa fa-search"></i>
136   - </a>
137   - </span>
138   - </div>
139   - </form>
140 141 <div class="top-menu">
141 142 <ul class="nav navbar-nav pull-right">
142 143 <!-- 信息通知区 -->
... ... @@ -158,7 +159,7 @@ tr.row-active td {
158 159 </li>
159 160 <li class="dropdown dropdown-user dropdown-dark">
160 161 <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
161   - <span class="username username-hide-on-mobile" style="vertical-align: middle;">潘钊 <i class="fa fa-user"></i></span>
  162 + <span id="indexTopUName" class="username username-hide-on-mobile" style="vertical-align: middle;"> <i class="fa fa-user"></i></span>
162 163 </a>
163 164 <ul class="dropdown-menu dropdown-menu-default">
164 165 <li>
... ... @@ -301,12 +302,12 @@ tr.row-active td {
301 302 <!-- angularJS相关库 -->
302 303 <!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 -->
303 304 <script src="/assets/js/angular.js" data-autocephaly=1></script>
304   -<script src="/assets/bower_components/angular-resource/angular-resource.min.js" data-autocephaly=1></script>
305   -<script src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js" data-autocephaly=1></script>
306   -<script src="/assets/bower_components/angular-touch/angular-touch.min.js" data-autocephaly=1></script>
307   -<script src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js" data-autocephaly=1></script>
308   -<script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-autocephaly=1></script>
309   -<script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-autocephaly=1></script>
  305 +<script src="/assets/bower_components/angular-resource/angular-resource.min.js" data-exclude=1></script>
  306 +<script src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js" data-exclude=1></script>
  307 +<script src="/assets/bower_components/angular-touch/angular-touch.min.js" data-exclude=1></script>
  308 +<script src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js" data-exclude=1></script>
  309 +<script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-exclude=1></script>
  310 +<script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-exclude=1></script>
310 311 <!-- schedule计划调度AngularJS模块主JS -->
311 312 <script src="/pages/scheduleApp/module/main.js" data-exclude=1></script>
312 313  
... ... @@ -320,6 +321,10 @@ var pjaxContainer = &#39;#pjax-container&#39;
320 321 ,angJsContainer = '#route-container';
321 322  
322 323 $(function(){
  324 + $.get('/user/currentUser', function(user){
  325 + $('#indexTopUName').text(user.userName);
  326 + });
  327 +
323 328 //带 data-pjax 的链接由pjax加载
324 329 $(document).pjax('a[data-pjax]', pjaxContainer);
325 330  
... ...
src/main/resources/static/pages/control/line/css/lineControl.css
  1 +.load-anim{
  2 + position: fixed;z-index: 9999999;width: 100%;height: 100%;
  3 + background: rgba(8, 47, 74, 0.89);top: 0;left: 0;
  4 +}
  5 +.load-anim .loader{
  6 + margin: auto !important;
  7 + position: absolute;
  8 + top: 0;
  9 + left: 0;
  10 + bottom: 0;
  11 + right: 0;
  12 +}
  13 +
  14 +
  15 +.load8 .loader {
  16 + font-size: 10px;
  17 + text-indent: -9999em;
  18 + border-top: 1.1em solid rgba(255, 255, 255, 0.2);
  19 + border-right: 1.1em solid rgba(255, 255, 255, 0.2);
  20 + border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
  21 + border-left: 1.1em solid #ffffff;
  22 + -webkit-animation: load8 1.1s infinite linear;
  23 + animation: load8 1.1s infinite linear;
  24 +}
  25 +.load8 .loader,
  26 +.load8 .loader:after {
  27 + border-radius: 50% !important;
  28 + width: 8em;
  29 + height: 8em;
  30 +}
  31 +@-webkit-keyframes load8 {
  32 + 0% {
  33 + -webkit-transform: rotate(0deg);
  34 + transform: rotate(0deg);
  35 + }
  36 + 100% {
  37 + -webkit-transform: rotate(360deg);
  38 + transform: rotate(360deg);
  39 + }
  40 +}
  41 +@keyframes load8 {
  42 + 0% {
  43 + -webkit-transform: rotate(0deg);
  44 + transform: rotate(0deg);
  45 + }
  46 + 100% {
  47 + -webkit-transform: rotate(360deg);
  48 + transform: rotate(360deg);
  49 + }
  50 +}
  51 +
  52 +
1 53 label {
2 54 max-width: none;
3 55 }
... ... @@ -220,7 +272,7 @@ body{
220 272 }
221 273  
222 274 .card_wrap{
223   - height: 268px;
  275 + min-height: 268px;
224 276 text-align: center;
225 277 }
226 278  
... ... @@ -425,7 +477,7 @@ body{
425 477  
426 478 .station_text{
427 479 writing-mode: tb;
428   - letter-spacing: -2.6px;
  480 + /* letter-spacing: -2.6px; */
429 481 }
430 482  
431 483 .station_text:hover{
... ... @@ -877,6 +929,10 @@ height: 400px;
877 929 .pb-table tr td:nth-child(9){
878 930 width: 55px;
879 931 }
  932 +
  933 + .station_text {
  934 + letter-spacing: -2.6px;
  935 + }
880 936 }
881 937  
882 938 .pb-table.head tr td{
... ... @@ -911,6 +967,14 @@ height: 400px;
911 967 .pb-table tr td:nth-child(8){
912 968 width: 15%;
913 969 }
  970 +
  971 + .card_wrap .col-lg-2 .table td{
  972 + font-size: 12px;
  973 + }
  974 +
  975 + .station_text {
  976 + letter-spacing: 1px;
  977 + }
914 978 }
915 979  
916 980 /** 1310px 以下 */
... ... @@ -946,6 +1010,9 @@ height: 400px;
946 1010  
947 1011 .table.pb-table>tbody>tr>td{
948 1012 line-height: 1.43257;
  1013 + white-space: nowrap;
  1014 + overflow: hidden;
  1015 + text-overflow: ellipsis;
949 1016 }
950 1017  
951 1018 .pic-panel{
... ... @@ -2094,4 +2161,29 @@ tr._tr_active.active-line-no .in-badge{
2094 2161  
2095 2162 tr._tr_active.active-line-no .out-badge{
2096 2163 background: #67a3a8;
2097   -}
2098 2164 \ No newline at end of file
  2165 +}
  2166 +
  2167 +.sfsj-sch-detail{
  2168 + list-style: none;
  2169 + padding: 3px;
  2170 + /* color: black; */
  2171 + font-family: 微软雅黑;
  2172 +}
  2173 +.sfsj-sch-detail li{
  2174 + font-size: 14px;
  2175 + margin: 6px 4px;
  2176 +}
  2177 +
  2178 +.sfsj-sch-detail li span{
  2179 + display: inline-block;
  2180 + width: 75px;
  2181 + text-align: right;
  2182 + /* color: #818181; */
  2183 +}
  2184 +
  2185 +.vehicDataTable a{
  2186 + text-decoration: underline;
  2187 + color: black;
  2188 +}
  2189 +
  2190 +
... ...
src/main/resources/static/pages/control/line/index.html
1 1 <link href="css/lineControl.css" rel="stylesheet" type="text/css" />
2 2 <link href="/metronic_v4.5.4/css/animate.min.css" rel="stylesheet" type="text/css" />
3 3  
  4 +<!-- 初始load动画 -->
  5 +<div class="load-anim load8" >
  6 +<div class="loader">Loading...</div>
  7 +</div>
  8 +
4 9 <div class="portlet light portlet-fullscreen" style="transition: all .5s ease;padding: 0;" oncontextmenu=self.event.returnValue=false>
  10 +
5 11 <div class="portlet-title" style="padding: 17px 20px 0px 20px;border-bottom: none;margin-bottom: 0;background: linear-gradient(to right ,#082F4A, #125688,#0a3f64);padding-bottom: 5px;">
6 12 <div class="caption col_hide_1280" style="color: #FFF;">
7 13 <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span
8   - class="caption-subject bold" style="font-size: 24px;">线路调度系统</span>
  14 + class="caption-subject bold" style="font-size: 24px;">闵行公交线路调度系统</span>
9 15 </div>
10 16 <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;">
11   - panzhao,在线!
  17 + <span class="top_username"></span>,在线!
12 18 </div>
13 19 <div class="actions col_hide_1280" >
14 20 <div class="btn-group">
... ... @@ -84,6 +90,7 @@
84 90 </div>
85 91 <div id="tooltipShade" class="animated fadeIn"></div>
86 92  
  93 +<!-- 线路调度右键菜单 -->
87 94 <menu class="menu" id="rightMenu">
88 95 <li class="menu-item" >
89 96 <button type="button" class="menu-btn" data-method="outgoAdjust">
... ... @@ -122,6 +129,11 @@
122 129 <span class="menu-text">误点调整</span>
123 130 </button>
124 131 </li>
  132 + <li class="menu-item" >
  133 + <button type="button" class="menu-btn" data-method="schInfoFineTune">
  134 + <span class="menu-text">发车信息微调</span>
  135 + </button>
  136 + </li>
125 137 <li class="menu-separator"></li>
126 138 <li class="menu-item" >
127 139 <button type="button" class="menu-btn" data-method="childTask">
... ... @@ -137,13 +149,6 @@
137 149 </button>
138 150 </li>
139 151 <li class="menu-separator"></li>
140   -<!-- <li class="menu-item" >
141   - <button type="button" class="menu-btn" data-method="temporaryAdd">
142   - <i class="fa fa-plus"></i>
143   - <span class="menu-text">临加班次</span>
144   - </button>
145   - </li> -->
146   - <li class="menu-separator"></li>
147 152 <li class="menu-item" >
148 153 <button type="button" class="menu-btn" data-method="vehicAndPerAdjust">
149 154 <i class="fa fa-retweet"></i>
... ... @@ -158,6 +163,42 @@
158 163 </button>
159 164 </li>
160 165 </menu>
  166 +<!-- 主页右键菜单 -->
  167 +<menu class="menu" id="homeMenu">
  168 + <li class="menu-item disabled" id="menu-linename">
  169 + <button type="button" class="menu-btn">
  170 + <span class="menu-text">--- W2B-102 ---</span>
  171 + </button>
  172 + </li>
  173 + <li class="menu-item" >
  174 + <button type="button" class="menu-btn" data-method="sendPhrase">
  175 + <span class="menu-text">发送消息短语</span>
  176 + </button>
  177 + </li>
  178 + <li class="menu-separator"></li>
  179 + <li class="menu-item" >
  180 + <button type="button" class="menu-btn" data-method="showState">
  181 + <span class="menu-text">车辆状态查看</span>
  182 + </button>
  183 + </li>
  184 + <li class="menu-item submenu">
  185 + <button type="button" class="menu-btn">
  186 + <span class="menu-text">车辆状态发送</span>
  187 + </button>
  188 + <menu class="menu">
  189 + <li class="menu-item">
  190 + <button type="button" class="menu-btn" data-method="changeUp">
  191 + <span class="menu-text">上行营运</span>
  192 + </button>
  193 + </li>
  194 + <li class="menu-item">
  195 + <button type="button" class="menu-btn" data-method="changeDown">
  196 + <span class="menu-text">下行营运</span>
  197 + </button>
  198 + </li>
  199 + </menu>
  200 + </li>
  201 +</menu>
161 202  
162 203 </div>
163 204 <div id="temps"></div>
... ... @@ -169,6 +210,7 @@
169 210 <script src="/pages/control/line/js/drawSvg.js"></script>
170 211 <script src="/pages/control/line/js/data.js"></script>
171 212 <script src="/pages/control/line/js/rightMenu.js"></script>
  213 +<script src="/pages/control/line/js/homeMenu.js"></script>
172 214 <script src="/pages/control/line/js/alone.js"></script>
173 215 <script src="/pages/control/line/js/main.js"></script>
174 216 <script src="/pages/control/line/js/console.js"></script>
... ... @@ -179,10 +221,16 @@ var lineCodes = &#39;&#39; //全部线路编码字符串,由data.js初始化
179 221 , lineMap = {} //编码和线路详细对照,由data.js初始化;
180 222 ,animationend = 'webkitAnimationEnd animationend';
181 223 moment.locale('zh-cn');
  224 +
  225 +var cUser;
  226 +//当前用户
  227 +$.get('/user/currentUser', function(user){
  228 + cUser = user;
  229 + $('.portlet-fullscreen .top_username').text(cUser.userName);
  230 +});
182 231 $(function() {
183 232 //加载模板文件
184 233 getTemp('temps/home_tp.html');
185   - getTemp('temps/home_table_tp.html');
186 234 getTemp('temps/tooltip_tp.html');
187 235 getTemp('temps/alone_tp.html');
188 236 getTemp('temps/child_task_case_tp.html');
... ...
src/main/resources/static/pages/control/line/js/alone.js
... ... @@ -98,11 +98,6 @@ var _alone = (function(){
98 98 calculateLineNo: calculateLineNo
99 99 }
100 100  
101   - //实发时间单元格事件
102   - $('.portlet-fullscreen').on('click', 'table.pb-table .sfsj-item', function(){
103   -
104   - });
105   -
106 101 //计算行号
107 102 function calculateLineNo(table){
108 103 var rows = table.rows;
... ... @@ -162,13 +157,22 @@ var _alone = (function(){
162 157 var tgTools = $('#tgTools_' + line);
163 158  
164 159 tgTools.html(tgHtml[status]).data('status', status);
  160 + var array = $('#top-tabs-wrap a[data-id='+line+'] span zz');
  161 +
165 162 if(status == 0){
166 163 //托管Question
167 164 $('.tgQuestion', tgTools).popover(tgPopoverOps);
168 165 tgTools.removeClass('hand');
  166 +
  167 + $(array[2]).text('托管');
169 168 }
170   - else
  169 + else{
171 170 tgTools.addClass('hand');
  171 + $(array[2]).text('');
  172 + }
  173 +
  174 + //tab 头改变
  175 +
172 176 }
173 177  
174 178 function initRemarksPop(){
... ...
src/main/resources/static/pages/control/line/js/drawSvg.js
... ... @@ -49,6 +49,12 @@ var drawSvg = (function(){
49 49 svg = drawSvgObject.init(lineId, data, container, w, 80);
50 50 //线路编码 和 首页SVG对照
51 51 homeSvgMapp[lineId] = svg;
  52 + if(svg && svg.length > 0){
  53 + //双击事件
  54 + $(svg[0]).dblclick(function(){
  55 + $('#top-tabs-wrap .nav-tabs a[data-id='+this.id+']').click();
  56 + });
  57 + }
52 58 },
53 59 initAloneSvg: function(lineId, data, container){
54 60 var w = $(document).width(),
... ... @@ -371,5 +377,8 @@ var drawSvg = (function(){
371 377 }
372 378 }
373 379  
  380 + //双击svg切换
  381 + //$('.line_chart svg').
  382 +
374 383 return drawSvgObject;
375 384 })();
... ...
src/main/resources/static/pages/control/line/js/homeMenu.js 0 → 100644
  1 +var _home_menu = (function(){
  2 +
  3 + $('#homeMenu .menu-item button').on('click', function(){
  4 + var method = $(this).data('method');
  5 + if(!method)return;
  6 + var nbbm = $('.vehicDataTable tr._home_tr_active').data('nbbm');
  7 +
  8 + if(!nbbm){
  9 + layer.alert('无法获取车辆自编号,请尝试刷新页面!', {icon: 2, title: '异常'});
  10 + return;
  11 + }
  12 + menuObject[method](nbbm);
  13 + });
  14 +
  15 + //右键事件
  16 + $('.portlet-fullscreen').on('contextmenu', '.vehicDataTable tr td', function(e){
  17 + e.preventDefault();
  18 + $('.vehicDataTable tr._home_tr_active').removeClass('_home_tr_active');
  19 + $(this).parent().addClass('_home_tr_active');
  20 + showMenu(e.pageX, e.pageY + 3);
  21 + $(document).one('click', function() {
  22 + $('#homeMenu').removeClass('show-menu');
  23 + });
  24 + });
  25 +
  26 +
  27 + function showMenu(x, y) {
  28 + var menu = $('#homeMenu'),
  29 + docWidth = $(document).width(), docHeight = $(document).height(),
  30 + menuHeight = menu.height(),
  31 + menuWidth = menu.width(),
  32 + offset = 12;
  33 + /* 边界 */
  34 + if (y > (docHeight - menuHeight)) {
  35 + y = docHeight - menuHeight - offset;
  36 + }
  37 +
  38 + if (x > (docWidth - (menuWidth * 2))) {
  39 + x = docWidth - (menuWidth * 2) - offset;
  40 + }
  41 +
  42 + menu.css('left', x + 'px')
  43 + .css('top', y + 'px')
  44 + .addClass('show-menu');
  45 + }
  46 +
  47 + var menuObject = {
  48 + //发送消息短语
  49 + sendPhrase: function(nbbm){
  50 + layer.prompt({title: '请输入短语信息', formType: 2 , shift: 5
  51 + }, function(space){
  52 + $.post('/directive/phrase', {nbbm: nbbm, text: space}, function(rs){
  53 + if(rs == 0)
  54 + layer.msg('发送成功!');
  55 + else
  56 + layer.alert('发送短语信息失败!', {icon: 2, title: '操作失败'});
  57 + });
  58 + });
  59 + },
  60 + //上行营运
  61 + changeUp: function(nbbm){
  62 + $.post('/directive/upDownChange', {nbbm: nbbm, upDown: 0}, function(rs){
  63 + if(rs == 0)
  64 + layer.msg('发送指令成功!');
  65 + else
  66 + layer.alert('发送指令失败!', {icon: 2, title: '操作失败'});
  67 + });
  68 + },
  69 + //下行营运
  70 + changeDown: function(nbbm){
  71 + $.post('/directive/upDownChange', {nbbm: nbbm, upDown: 1}, function(rs){
  72 + if(rs == 0)
  73 + layer.msg('发送指令成功!');
  74 + else
  75 + layer.alert('发送指令失败!', {icon: 2, title: '操作失败'});
  76 + });
  77 + },
  78 + //车辆状态查看
  79 + showState: function(nbbm){
  80 + /*var index = layer.open({
  81 + type: 1,
  82 + area: '370px',
  83 + maxmin: true,
  84 + content: template('', data),
  85 + shift: 5,
  86 + title: '---' + nbbm + '---',
  87 + success: function(){}
  88 + });*/
  89 + }
  90 + }
  91 +})();
  92 +
... ...
src/main/resources/static/pages/control/line/js/keyboardListen.js
1 1 /** 键盘监听 */
2 2  
3 3 //禁止选中
4   -$(document).on('selectstart','table.pb-table', function(event){
  4 +$(document).on('selectstart','table.pb-table,svg', function(event){
5 5 event = window.event||event;
6 6 event.returnValue = false;
7 7 });
... ...
src/main/resources/static/pages/control/line/js/main.js
... ... @@ -36,6 +36,10 @@
36 36 var homeHtmlStr = template('line_control_home_temp', {tabList: tabData});
37 37  
38 38 $('#tab_home').html(homeHtmlStr);
  39 + //计算高度 40 页脚
  40 + var ah = $('#top-tabs-wrap .tab-content').height() - 40 - 5;
  41 + console.log(ah);
  42 + $('.card_wrap').css('height', ah / 3);
39 43  
40 44 //滚动条
41 45 $('.card_wrap .table_wrap').slimscroll({
... ... @@ -61,6 +65,7 @@
61 65  
62 66 //按线路分组
63 67 var listMap = groupByLine(addList);
  68 + console.log('listMap', listMap);
64 69 for(var key in listMap){
65 70 var htmlStr = template('home_table_temp', {list: listMap[key]});
66 71 $('#tab_' + key).find('tbody').html(htmlStr);
... ... @@ -69,16 +74,15 @@
69 74 }
70 75 });
71 76  
72   -
73 77 setTimeout(function(){
  78 + //打开GPS定时刷新
74 79 _data.startRefreshGpsTimer();
75   - }, 300);
76   - /* setTimeout(function(){
77   - homeObject.refreshGps(function(add, update){
78   - //将新增的点画到模拟图上
79   - drawSvg.drawVehicle(add);
80   - });
81   - }, 300);*/
  80 +
  81 + setTimeout(function(){
  82 + //去掉loading
  83 + $('.load-anim').fadeOut();
  84 + }, 500);
  85 + }, 400);
82 86  
83 87 }
84 88 }
... ... @@ -88,7 +92,7 @@ setTimeout(function(){
88 92 var topTabs = '', tabPanels = '';
89 93 $.each(_data.getLines(), function(i, line){
90 94 topTabs += '<li ><a data-id="'+line.lineCode+'" href="#tab_line_'+line.lineCode+'" data-toggle="tab" '+
91   - 'aria-expanded="false"> '+line.name+'<span>(0,0 托管)</span> </a></li>';
  95 + 'aria-expanded="false"> '+line.name+'<span>(<zz>0</zz>,<zz>0</zz> <zz>托管</zz>)</span> </a></li>';
92 96  
93 97 tabPanels += '<div class="tab-pane fade tab_line" data-id="'+line.lineCode+'" id="tab_line_'+line.lineCode+'"></div>';
94 98  
... ...
src/main/resources/static/pages/control/line/js/rightMenu.js
... ... @@ -87,6 +87,21 @@ var _menu = (function() {
87 87 return $(firstCell).addClass('selected').parent().addClass('_tr_active active-line-no');
88 88 }
89 89  
  90 + //实发时间单元格事件
  91 + var layerTip;
  92 + $('.portlet-fullscreen').on('click', 'table.pb-table .sfsj-item', function(){
  93 + var id = $(this).parent().data('id');
  94 + var sch = _data.getSchedulById(id);
  95 +
  96 + layerTip = layer.tips(template('sfsj_sch-detail-temp', sch), this, {
  97 + tips: [2, '#709d94'],shift:5, time: 5000
  98 + });
  99 + });
  100 +
  101 + $('.portlet-fullscreen').on('dbclick', 'table.pb-table .sfsj-item', function(){
  102 + alert(11);
  103 + });
  104 +
90 105 //选中关联班次
91 106 function selCognateSch($ctr){
92 107 //选中关联班次
... ... @@ -119,6 +134,10 @@ var _menu = (function() {
119 134 $('.pb-table tr td.' + ac).removeClass(ac);
120 135 $('.pb-table tr.selected').removeClass('selected');
121 136 $('.pb-table tr.next-sch').removeClass('next-sch');
  137 + if(layerTip){
  138 + layer.close(layerTip);
  139 + layerTip = null;
  140 + }
122 141 }
123 142 function resetAllState(){
124 143 $('.pb-table tr td.' + ac).removeClass(ac);
... ... @@ -128,6 +147,10 @@ var _menu = (function() {
128 147 $('.pb-table.data tr td.selected[name=lineNo]').removeClass('selected');
129 148  
130 149 prveSelRow = null;
  150 + if(layerTip){
  151 + layer.close(layerTip);
  152 + layerTip = null;
  153 + }
131 154 }
132 155  
133 156 //根据起止行号选中多行
... ... @@ -163,14 +186,34 @@ var _menu = (function() {
163 186 title: '待发调整',
164 187 success: function(){
165 188 dictionaryUtils.transformDom($('#outgoAdjustForm .nt-dictionary'));
  189 + //驾驶员
  190 + $.get('/realSchedule/driver', {lineCode: schedul.xlBm}, function(rs){
  191 + initPinYinSelect2('#outgoAdjustForm select[name=jsy]', rs, function(that){
  192 + //默认选中
  193 + that.val(schedul.jGh + '/' + schedul.jName).change();
  194 + });
  195 + });
  196 + //售票员
  197 + $.get('/realSchedule/conductor', {lineCode: schedul.xlBm}, function(rs){
  198 + initPinYinSelect2('#outgoAdjustForm select[name=spy]' , rs, function(that){
  199 + //默认选中
  200 + that.val(schedul.sGh + '/' + schedul.sName).change();
  201 + });
  202 + });
  203 + //车辆
  204 + $.get('/realSchedule/cars', {lineCode: schedul.xlBm}, function(rs){
  205 + $('#outgoAdjustForm select[name=clZbh]').select2({data: rs}).val(schedul.clZbh).change();
  206 + });
  207 +
166 208 $('#outgoAdjustForm button.confirm').one('click', function(){
  209 +
167 210 var params = $('#outgoAdjustForm').serializeJSON();
168 211 $post('/realSchedule/outgoAdjust', params, function(rs){
169 212 layer.close(index);
170   - layer.msg('调整成功!');
171 213 schedul.dfsj = rs.dfsj;
172 214 schedul.remarks = rs.remarks;
173 215 _alone.refreshSchedule(schedul);
  216 + layer.msg('调整成功!');
174 217 });
175 218 });
176 219 }
... ... @@ -413,6 +456,64 @@ var _menu = (function() {
413 456 layer.alert('发送调度指令失败', {icon: 2, title: '操作失败'});
414 457 });
415 458 });
  459 + },
  460 + //发车信息微调
  461 + schInfoFineTune: function(schedul){
  462 + var index = layer.open({
  463 + type: 1,
  464 + area: '630px',
  465 + maxmin: true,
  466 + content: template('schinfo_fine_tune_temp', schedul),
  467 + shift: 5,
  468 + title: '发车信息微调',
  469 + success: function(){
  470 + var ntds = $('#schinfoFineTune .nt-dictionary');
  471 + dictionaryUtils.transformDom(ntds);
  472 + //驾驶员
  473 + $.get('/realSchedule/driver', {lineCode: schedul.xlBm}, function(rs){
  474 + initPinYinSelect2('#schinfoFineTune select[name=jsy]', rs, function(that){
  475 + //默认选中
  476 + that.val(schedul.jGh + '/' + schedul.jName).change();
  477 + });
  478 +
  479 + });
  480 + //售票员
  481 + $.get('/realSchedule/conductor', {lineCode: schedul.xlBm}, function(rs){
  482 + initPinYinSelect2('#schinfoFineTune select[name=spy]' , rs, function(rs){
  483 + initPinYinSelect2('#outgoAdjustForm select[name=spy]' , rs, function(that){
  484 + //默认选中
  485 + that.val(schedul.sGh + '/' + schedul.sName).change();
  486 + });
  487 + });
  488 + });
  489 + //车辆
  490 + $.get('/realSchedule/cars', {lineCode: schedul.xlBm}, function(rs){
  491 + $('#schinfoFineTune select[name=clZbh]').select2({data: rs}).val(schedul.clZbh).change();
  492 + });
  493 +
  494 +
  495 + //调整说明
  496 + $('#schinfoFineTune select[name=reason]').on('change', function(){
  497 + var t = $(this).val();
  498 + if(!t) return;
  499 + var textarea = $('#schinfoFineTune textarea[name=remarks]');
  500 + textarea.val(textarea.val() + t + ',');
  501 + });
  502 + //确定
  503 + $('#schinfoFineTune button.confirm').on('click', function(){
  504 + var params = $('form#schinfoFineTune').serializeJSON();
  505 + if(!$.trim(params.fcsj)){
  506 + layer.msg('计发时间不能为空!');
  507 + return;
  508 + }
  509 + $post('/realSchedule/schInfoFineTune', params, function(rs){
  510 + layer.close(index);
  511 + if(rs.t)
  512 + _alone.refreshSchedule(rs.t);
  513 + });
  514 + });
  515 + }
  516 + });
416 517 }
417 518 }
418 519  
... ...
src/main/resources/static/pages/control/line/js/webSocketHandle.js
... ... @@ -8,7 +8,7 @@ setTimeout(function(){
8 8 $.post('/realSchedule/registerLine', {lineCodes: lineCodes}
9 9 ,function(rs){
10 10 if(rs == 0){
11   - layer.msg('注册线路成功!');
  11 + console.log('注册线路成功!');
12 12 initWebSocket();
13 13 }
14 14 });
... ...
src/main/resources/static/pages/control/line/temps/alone_tp.html
... ... @@ -212,7 +212,7 @@
212 212 <div class="form-custom-row">
213 213 <div class="item">
214 214 <span class="item-label" style="width: 80px;">班次类型:</span>
215   - <input class="form-control nt-dictionary" disabled data-code={{bcType}} data-group=ScheduleType>
  215 + <select class="form-control nt-dictionary" data-code={{bcType}} data-group=ScheduleType></select>
216 216 </div>
217 217 </div>
218 218 <div class="form-custom-row">
... ... @@ -236,7 +236,7 @@
236 236 <div class="form-custom-row">
237 237 <div class="item">
238 238 <span class="item-label" style="width: 80px;">车辆编码: </span>
239   - <input class="form-control" disabled value="{{clZbh}}" name="clZbh">
  239 + <select class="form-control" value="{{clZbh}}" name="clZbh"></select>
240 240 </div>
241 241 <div class="item">
242 242 <span class="item-label" style="width: 80px;">路&nbsp;牌: </span>
... ... @@ -258,11 +258,11 @@
258 258 <div class="form-custom-row">
259 259 <div class="item">
260 260 <span class="item-label" style="width: 80px;">驾驶员: </span>
261   - <input class="form-control" disabled value="{{jName}}" name="jName">
  261 + <select class="form-control" value="{{jName}}" name="jsy"></select>
262 262 </div>
263 263 <div class="item">
264 264 <span class="item-label" style="width: 80px;">售票员: </span>
265   - <input class="form-control" disabled value="{{sName}}" name="sName">
  265 + <select class="form-control" value="{{sName}}" name="spy"></select>
266 266 </div>
267 267 </div>
268 268 <hr>
... ... @@ -351,6 +351,105 @@
351 351 </form>
352 352 </script>
353 353  
  354 +<!-- 发车信息微调 -->
  355 +<script id="schinfo_fine_tune_temp" type="text/html">
  356 +<form action="#" class="form-horizontal form-custom" id="schinfoFineTune">
  357 + <input value={{id}} type="hidden" name="id">
  358 + <div class="form-body">
  359 + <div class="form-custom-row">
  360 + <div class="item">
  361 + <span class="item-label" style="width: 80px;">发车站点: </span>
  362 + <input class="form-control" disabled value="{{qdzName}}" name="qdzName">
  363 + </div>
  364 + <div class="item">
  365 + <span class="item-label" style="width: 80px;">结束站点: </span>
  366 + <input class="form-control" disabled value="{{zdzName}}" name="zdzName">
  367 + </div>
  368 + </div>
  369 +
  370 + <div class="form-custom-row">
  371 + <div class="item">
  372 + <span class="item-label" style="width: 80px;">车辆编码: </span>
  373 + <select class="form-control" value="{{clZbh}}" name="clZbh"></select>
  374 + </div>
  375 + <div class="item">
  376 + <span class="item-label" style="width: 80px;">路&nbsp;牌: </span>
  377 + <input class="form-control" disabled value="{{lpName}}" name="lpName">
  378 + </div>
  379 + </div>
  380 +
  381 + <div class="form-custom-row">
  382 + <div class="item">
  383 + <span class="item-label" style="width: 80px;">驾驶员: </span>
  384 + <select class="form-control" value="{{jName}}" name="jsy"></select>
  385 + </div>
  386 + <div class="item">
  387 + <span class="item-label" style="width: 80px;">售票员: </span>
  388 + <select class="form-control" value="{{sName}}" name="spy"></select>
  389 + </div>
  390 + </div>
  391 +
  392 + <div class="form-custom-row">
  393 + <div class="item">
  394 + <span class="item-label" style="width: 80px;">计发时刻: </span>
  395 + <input type="time" class="form-control" value="{{fcsj}}" name="fcsj">
  396 + </div>
  397 + <div class="item">
  398 + <span class="item-label" style="width: 80px;">实际时刻: </span>
  399 + <input type="time" class="form-control" value="{{fcsjActual}}" name="fcsjActual">
  400 + </div>
  401 + </div>
  402 +
  403 + <div class="form-custom-row">
  404 + <div class="item">
  405 + <span class="item-label" style="width: 80px;">到达时刻: </span>
  406 + <input type="time" class="form-control" value="{{zdsjActual}}" name="zdsjActual">
  407 + </div>
  408 + <div class="item">
  409 + <span class="item-label" style="width: 80px;">班次类型: </span>
  410 + <select type="text" class="form-control nt-dictionary" data-group="ScheduleType" data-code="{{bcType}}" name="bcType"></select>
  411 + </div>
  412 + </div>
  413 +
  414 + <div class="form-custom-row">
  415 + <div class="item full">
  416 + <span class="item-label" style="width: 80px;">调整说明: </span><br>
  417 + <select class="form-control" style="width: 100%;margin-top: 4px;" name="reason">
  418 + <option value="">请选择..</option>
  419 + <option value="配车">配车</option>
  420 + <option value="保养">保养</option>
  421 + <option value="故障">故障</option>
  422 + <option value="肇事">肇事</option>
  423 + <option value="路阻">路阻</option>
  424 + <option value="纠纷">纠纷</option>
  425 + <option value="缺人">缺人</option>
  426 + <option value="客稀">客稀</option>
  427 + <option value="缺车">缺车</option>
  428 + <option value="气候">气候</option>
  429 + <option value="援外">援外</option>
  430 + <option value="吊慢">吊慢</option>
  431 + <option value="抽减">抽减</option>
  432 + <option value="其他">其他</option>
  433 + </select>
  434 + </div>
  435 + </div>
  436 +
  437 + <div class="form-custom-row">
  438 + <div class="item full">
  439 + <textarea class="form-control" rows="4" placeholder="备注" name="remarks">{{remarks}}</textarea>
  440 + </div>
  441 + </div>
  442 +
  443 + <hr>
  444 + <div class="form-custom-footer">
  445 + <button type="button" class="btn blue-madison confirm"> <i class="fa fa-check"></i> &nbsp;&nbsp;确&nbsp;&nbsp;定 </button>
  446 + <button type="button" class="btn layui-layer-close"> 取消 </button>
  447 + </div>
  448 + </div>
  449 +</form>
  450 +<br>
  451 +</script>
  452 +
354 453 <script id="real_outgo_adjust_body_temp" type="text/html">
355 454 <form action="#" class="form-horizontal form-custom" id="realOutgoAdjust">
356 455 <input type="hidden" name="id" value={{id}}>
... ... @@ -396,4 +495,18 @@
396 495 <button type="button" class="btn layui-layer-close"> 取消 </button>
397 496 </div>
398 497 </form>
399   -</script>
400 498 \ No newline at end of file
  499 +</script>
  500 +
  501 +<script id="sfsj_sch-detail-temp" type="text/html">
  502 +<ul class="sfsj-sch-detail">
  503 + <li><span>路牌名:</span>{{lpName}}</li>
  504 + <li><span>车辆编码:</span>{{clZbh}}</li>
  505 + <li><span>计发时刻:</span>{{fcsj}}</li>
  506 + <li><span>实发时刻:</span>{{fcsjActual}}</li>
  507 + <li><span>计达时刻:</span>{{zdsj}}</li>
  508 + <li><span>实达时刻:</span>{{zdsjActual}}</li>
  509 + <li><span>驾驶员:</span>{{jName}}</li>
  510 + <li><span>售票员:</span>{{sName}}</li>
  511 + <li><span>终点站:</span>{{zdzName}}</li>
  512 +</ul>
  513 +</script>
... ...
src/main/resources/static/pages/control/line/temps/home_table_tp.html deleted 100644 → 0
1   -<script id="home_table_temp" type="text/html">
2   -{{each list as obj i}}
3   -<tr>
4   - <td style="width: 22%;"> {{obj.nbbm}} </td>
5   - <td style="width: 17%;">
6   - {{if obj.currSch != null}}
7   - {{obj.currSch.lpName}}
8   - {{else}}
9   - 无
10   - {{/if}}
11   - </td>
12   - <td style="width: 17%;"> {{obj.speed}} </td>
13   - <td style="width: 22%;" > 暂无 </td>
14   - <td style="width: 22%;" class="col_hide_1680">
15   -{{if obj.nextSch != null}}
16   - {{obj.nextSch.dfsj}}
17   -{{else}}
18   - 无
19   -{{/if}}
20   - </td>
21   -</tr>
22   -{{/each}}
23   -</script>
24 0 \ No newline at end of file
src/main/resources/static/pages/control/line/temps/home_tp.html
... ... @@ -43,7 +43,8 @@
43 43 <table
44 44 class="table table-striped table-bordered table-advance table-hover vehicDataTable"
45 45 style="table-layout: fixed;" id="tab_{{lineObj.lineCode}}_0">
46   - <tbody></tbody>
  46 + <tbody>
  47 + </tbody>
47 48 </table>
48 49 </div>
49 50 </div>
... ... @@ -118,6 +119,30 @@
118 119 </div>
119 120 </script>
120 121  
  122 +<script id="home_table_temp" type="text/html">
  123 +{{each list as obj i}}
  124 +<tr data-nbbm="{{obj.nbbm}}" data-device="{{obj.deviceId}}">
  125 + <td style="width: 22%;"> {{obj.nbbm}} </td>
  126 + <td style="width: 17%;">
  127 + {{if obj.currSch != null}}
  128 + {{obj.currSch.lpName}}
  129 + {{else}}
  130 + 无
  131 + {{/if}}
  132 + </td>
  133 + <td style="width: 17%;"> {{obj.speed}} </td>
  134 + <td style="width: 22%;" > 暂无 </td>
  135 + <td style="width: 22%;" class="col_hide_1680">
  136 +{{if obj.nextSch != null}}
  137 + {{obj.nextSch.dfsj}}
  138 +{{else}}
  139 + 无
  140 +{{/if}}
  141 + </td>
  142 +</tr>
  143 +{{/each}}
  144 +</script>
  145 +
121 146 <script id="ctrl_f_search_temp" type="text/html">
122 147 <div class="ctrl_f_search">
123 148 <select class="form-control pd90" id="ctrlFSearchSelect" ></select>
... ...