Commit fa9e32d3be01c95809264455e4ab493c7beb35e9

Authored by 娄高锋
2 parents 128329b8 63a058e8

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

Showing 36 changed files with 1013 additions and 825 deletions
src/main/java/com/bsth/controller/sys/DutyEmployeeController.java 0 → 100644
  1 +package com.bsth.controller.sys;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.sys.DutyEmployee;
  5 +import com.bsth.service.sys.DutyEmployeeService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import java.util.List;
  12 +
  13 +/**
  14 + * Created by panzhao on 2017/1/5.
  15 + */
  16 +@RestController
  17 +@RequestMapping("dutyEmployee")
  18 +public class DutyEmployeeController extends BaseController<DutyEmployee, Long> {
  19 +
  20 + @Autowired
  21 + DutyEmployeeService dutyEmployeeService;
  22 +
  23 + @RequestMapping(value = "queryByLineAndTime")
  24 + public List<DutyEmployee> getDutyEmployee(@RequestParam String lineCode, @RequestParam String startTime, @RequestParam String endTime) {
  25 + return dutyEmployeeService.getDutyEmployee(lineCode, startTime, endTime);
  26 + }
  27 +}
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
1 package com.bsth.data.arrival; 1 package com.bsth.data.arrival;
2 2
3 -import com.bsth.data.match.Arrival2Schedule;  
4 import com.bsth.data.schedule.DayOfSchedule; 3 import com.bsth.data.schedule.DayOfSchedule;
5 import com.google.common.collect.ArrayListMultimap; 4 import com.google.common.collect.ArrayListMultimap;
6 import com.google.common.collect.ListMultimap; 5 import com.google.common.collect.ListMultimap;
@@ -59,7 +58,7 @@ public class ArrivalData_GPS implements CommandLineRunner{ @@ -59,7 +58,7 @@ public class ArrivalData_GPS implements CommandLineRunner{
59 58
60 @Override 59 @Override
61 public void run() { 60 public void run() {
62 - try{ 61 + /*try{
63 logger.info("开始加载到离站数据, " + System.currentTimeMillis()); 62 logger.info("开始加载到离站数据, " + System.currentTimeMillis());
64 List<ArrivalEntity> arrSets = dataLoader.load(); 63 List<ArrivalEntity> arrSets = dataLoader.load();
65 if(null == arrSets || arrSets.size() == 0) 64 if(null == arrSets || arrSets.size() == 0)
@@ -86,7 +85,7 @@ public class ArrivalData_GPS implements CommandLineRunner{ @@ -86,7 +85,7 @@ public class ArrivalData_GPS implements CommandLineRunner{
86 Arrival2Schedule.start(carSet); 85 Arrival2Schedule.start(carSet);
87 }catch(Exception e){ 86 }catch(Exception e){
88 logger.error("", e); 87 logger.error("", e);
89 - } 88 + }*/
90 } 89 }
91 } 90 }
92 91
src/main/java/com/bsth/data/forecast/ForecastRealServer.java
1 package com.bsth.data.forecast; 1 package com.bsth.data.forecast;
2 2
  3 +import com.bsth.Application;
3 import com.bsth.data.forecast.entity.ForecastResult; 4 import com.bsth.data.forecast.entity.ForecastResult;
4 import com.bsth.data.forecast.entity.ForecastResult.ForecastResultItem; 5 import com.bsth.data.forecast.entity.ForecastResult.ForecastResultItem;
5 import com.bsth.data.forecast.entity.SimpleRoute; 6 import com.bsth.data.forecast.entity.SimpleRoute;
@@ -20,6 +21,7 @@ import java.util.ArrayList; @@ -20,6 +21,7 @@ import java.util.ArrayList;
20 import java.util.HashMap; 21 import java.util.HashMap;
21 import java.util.List; 22 import java.util.List;
22 import java.util.Map; 23 import java.util.Map;
  24 +import java.util.concurrent.TimeUnit;
23 25
24 /** 26 /**
25 * 27 *
@@ -58,7 +60,7 @@ public class ForecastRealServer implements CommandLineRunner { @@ -58,7 +60,7 @@ public class ForecastRealServer implements CommandLineRunner {
58 @Override 60 @Override
59 public void run(String... arg0) throws Exception { 61 public void run(String... arg0) throws Exception {
60 //2小时更新一次站点间耗时数据 62 //2小时更新一次站点间耗时数据
61 - //Application.mainServices.scheduleWithFixedDelay(dataLoader, 12, 120 * 60, TimeUnit.SECONDS); 63 + Application.mainServices.scheduleWithFixedDelay(dataLoader, 12, 120 * 60, TimeUnit.SECONDS);
62 } 64 }
63 65
64 /** 66 /**
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
@@ -66,7 +66,7 @@ public class GpsRealData implements CommandLineRunner { @@ -66,7 +66,7 @@ public class GpsRealData implements CommandLineRunner {
66 @Override 66 @Override
67 public void run(String... arg0) throws Exception { 67 public void run(String... arg0) throws Exception {
68 logger.info("gpsDataLoader,20,5"); 68 logger.info("gpsDataLoader,20,5");
69 - //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 30, TimeUnit.SECONDS); 69 + //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS);
70 } 70 }
71 71
72 public void put(GpsEntity gps) { 72 public void put(GpsEntity gps) {
src/main/java/com/bsth/data/gpsdata/arrival/entity/SignalState.java
@@ -37,8 +37,8 @@ public class SignalState { @@ -37,8 +37,8 @@ public class SignalState {
37 * @return 37 * @return
38 */ 38 */
39 public static SignalState reverseSignalSTate(ScheduleRealInfo sch, RouteReverse reverse) { 39 public static SignalState reverseSignalSTate(ScheduleRealInfo sch, RouteReverse reverse) {
40 - if(reverse.isVague())  
41 - return null; 40 + /*if(reverse.isVague())
  41 + return null;*/
42 42
43 SignalState state = new SignalState(); 43 SignalState state = new SignalState();
44 state.setSchId(sch.getId()); 44 state.setSchId(sch.getId());
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
@@ -154,6 +154,7 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -154,6 +154,7 @@ public class InOutStationSignalHandle extends SignalHandle{
154 schPrev.setZdsjActualAll(sch.getFcsjActualTime()); 154 schPrev.setZdsjActualAll(sch.getFcsjActualTime());
155 155
156 sendUtils.refreshSch(schPrev); 156 sendUtils.refreshSch(schPrev);
  157 + dayOfSchedule.save(schPrev);
157 } 158 }
158 } 159 }
159 } 160 }
@@ -181,7 +182,7 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -181,7 +182,7 @@ public class InOutStationSignalHandle extends SignalHandle{
181 //持久化 182 //持久化
182 dayOfSchedule.save(sch); 183 dayOfSchedule.save(sch);
183 //下发调度指令 184 //下发调度指令
184 - //directiveService.send60Dispatch(next, doneSum, "到站@系统"); 185 + directiveService.send60Dispatch(next, doneSum, "到站@系统");
185 186
186 //准备执行下一个班次 187 //准备执行下一个班次
187 if (next != null) { 188 if (next != null) {
@@ -211,6 +212,7 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -211,6 +212,7 @@ public class InOutStationSignalHandle extends SignalHandle{
211 next.setZdsjActualAll(sch.getZdsjActualTime()); 212 next.setZdsjActualAll(sch.getZdsjActualTime());
212 213
213 sendUtils.refreshSch(next); 214 sendUtils.refreshSch(next);
  215 + dayOfSchedule.save(next);
214 } 216 }
215 } 217 }
216 218
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() >= 4 41 + if (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/gpsdata/recovery/GpsDataRecovery.java
@@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware { @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 for (String nbbm : keys) { 60 for (String nbbm : keys) {
61 Collections.sort(listMap.get(nbbm), comp); 61 Collections.sort(listMap.get(nbbm), comp);
62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count)); 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63 - /*if(nbbm.equals("YT-CD008")) 63 + /*if(nbbm.equals("W9H-003"))
64 new RecoveryThread(listMap.get(nbbm), count).run();*/ 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 } 65 }
66 66
src/main/java/com/bsth/data/pilot80/PilotReport.java
@@ -84,6 +84,8 @@ public class PilotReport { @@ -84,6 +84,8 @@ public class PilotReport {
84 84
85 //下发调度指令 85 //下发调度指令
86 directiveService.send60Dispatch(outSch, dayOfSchedule.doneSum(nbbm), "请出@系统"); 86 directiveService.send60Dispatch(outSch, dayOfSchedule.doneSum(nbbm), "请出@系统");
  87 + //下发线路切换指令
  88 + directiveService.lineChange(outSch.getClZbh(), outSch.getXlBm(), "请出@系统");
87 /* d80.setRemarks("计划出场时间:" + outSch.getDfsj()); 89 /* d80.setRemarks("计划出场时间:" + outSch.getDfsj());
88 //当前GPS位置 90 //当前GPS位置
89 GpsEntity gps = gpsRealData.get(d80.getDeviceId()); 91 GpsEntity gps = gpsRealData.get(d80.getDeviceId());
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -130,12 +130,12 @@ public class DayOfSchedule implements CommandLineRunner { @@ -130,12 +130,12 @@ public class DayOfSchedule implements CommandLineRunner {
130 public void run(String... arg0) throws Exception { 130 public void run(String... arg0) throws Exception {
131 basicDataLoader.loadAllData(); 131 basicDataLoader.loadAllData();
132 //从数据库恢复排班 132 //从数据库恢复排班
133 - dataRecovery(); 133 + //dataRecovery();
134 134
135 //翻班线程 135 //翻班线程
136 Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 136 Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
137 //入库 137 //入库
138 - Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS); 138 +// Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
139 //首班出场指令补发器 139 //首班出场指令补发器
140 // Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS); 140 // Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS);
141 //班次误点扫描 141 //班次误点扫描
@@ -563,7 +563,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -563,7 +563,7 @@ public class DayOfSchedule implements CommandLineRunner {
563 */ 563 */
564 public boolean isFirstOut(ScheduleRealInfo sch){ 564 public boolean isFirstOut(ScheduleRealInfo sch){
565 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); 565 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh());
566 - if(list.get(0).equals(sch) && sch.getBcType().equals("out")) 566 + if(list.get(0) == sch && sch.getBcType().equals("out"))
567 return true; 567 return true;
568 return false; 568 return false;
569 } 569 }
src/main/java/com/bsth/entity/sys/DutyEmployee.java 0 → 100644
  1 +package com.bsth.entity.sys;
  2 +
  3 +import javax.persistence.*;
  4 +
  5 +/**
  6 + * 当班调度员
  7 + * Created by panzhao on 2017/1/5.
  8 + */
  9 +@Entity
  10 +@Table(name = "bsth_c_sys_duty_employee")
  11 +public class DutyEmployee {
  12 +
  13 + @Id
  14 + @GeneratedValue
  15 + private Long id;
  16 +
  17 + /**
  18 + * 员工ID
  19 + */
  20 + private Integer uId;
  21 +
  22 + /**
  23 + * 员工姓名
  24 + */
  25 + private String uName;
  26 +
  27 + /**
  28 + * 线路编码 ,号分割多个
  29 + */
  30 + private String codeIdx;
  31 +
  32 + /**
  33 + * 登入线调时间
  34 + */
  35 + private Long ts;
  36 +
  37 + /**
  38 + * 是否主调模式进入
  39 + */
  40 + private boolean main;
  41 +
  42 + public Integer getuId() {
  43 + return uId;
  44 + }
  45 +
  46 + public void setuId(Integer uId) {
  47 + this.uId = uId;
  48 + }
  49 +
  50 + public String getuName() {
  51 + return uName;
  52 + }
  53 +
  54 + public void setuName(String uName) {
  55 + this.uName = uName;
  56 + }
  57 +
  58 + public String getCodeIdx() {
  59 + return codeIdx;
  60 + }
  61 +
  62 + public void setCodeIdx(String codeIdx) {
  63 + this.codeIdx = codeIdx;
  64 + }
  65 +
  66 + public Long getTs() {
  67 + return ts;
  68 + }
  69 +
  70 + public void setTs(Long ts) {
  71 + this.ts = ts;
  72 + }
  73 +
  74 + public boolean isMain() {
  75 + return main;
  76 + }
  77 +
  78 + public void setMain(boolean main) {
  79 + this.main = main;
  80 + }
  81 +
  82 + public Long getId() {
  83 + return id;
  84 + }
  85 +
  86 + public void setId(Long id) {
  87 + this.id = id;
  88 + }
  89 +}
src/main/java/com/bsth/entity/sys/SessionLog.java deleted 100644 → 0
1 -package com.bsth.entity.sys;  
2 -  
3 -import java.util.Date;  
4 -  
5 -import javax.persistence.Column;  
6 -import javax.persistence.Entity;  
7 -import javax.persistence.GeneratedValue;  
8 -import javax.persistence.GenerationType;  
9 -import javax.persistence.Id;  
10 -import javax.persistence.ManyToOne;  
11 -import javax.persistence.Table;  
12 -  
13 -/**  
14 - *  
15 - * @ClassName: SessionLog  
16 - * @Description: TODO(session日志)  
17 - * @author PanZhao  
18 - * @date 2016年7月20日 下午4:46:27  
19 - *  
20 - */  
21 -@Entity  
22 -@Table(name = "bsth_c_sys_sessionlog")  
23 -public class SessionLog {  
24 -  
25 - @Id  
26 - @GeneratedValue(strategy = GenerationType.IDENTITY)  
27 - private Integer id;  
28 -  
29 - @ManyToOne  
30 - private SysUser user;  
31 -  
32 - /** 登录时间 */  
33 - private Date loginDate;  
34 -  
35 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
36 - private Date createDate;  
37 -  
38 - /** 登出时间 */  
39 - private Date logoutDate;  
40 -  
41 - /** 登出方式 0:主动登出, -1:其他 */  
42 - private int logoutType;  
43 -  
44 - /** 登录IP */  
45 - private String ip;  
46 -  
47 - public Integer getId() {  
48 - return id;  
49 - }  
50 -  
51 - public void setId(Integer id) {  
52 - this.id = id;  
53 - }  
54 -  
55 - public SysUser getUser() {  
56 - return user;  
57 - }  
58 -  
59 - public void setUser(SysUser user) {  
60 - this.user = user;  
61 - }  
62 -  
63 - public Date getLoginDate() {  
64 - return loginDate;  
65 - }  
66 -  
67 - public void setLoginDate(Date loginDate) {  
68 - this.loginDate = loginDate;  
69 - }  
70 -  
71 - public Date getCreateDate() {  
72 - return createDate;  
73 - }  
74 -  
75 - public void setCreateDate(Date createDate) {  
76 - this.createDate = createDate;  
77 - }  
78 -  
79 - public Date getLogoutDate() {  
80 - return logoutDate;  
81 - }  
82 -  
83 - public void setLogoutDate(Date logoutDate) {  
84 - this.logoutDate = logoutDate;  
85 - }  
86 -  
87 - public int getLogoutType() {  
88 - return logoutType;  
89 - }  
90 -  
91 - public void setLogoutType(int logoutType) {  
92 - this.logoutType = logoutType;  
93 - }  
94 -  
95 - public String getIp() {  
96 - return ip;  
97 - }  
98 -  
99 - public void setIp(String ip) {  
100 - this.ip = ip;  
101 - }  
102 -}  
src/main/java/com/bsth/entity/sys/SignControl.java deleted 100644 → 0
1 -package com.bsth.entity.sys;  
2 -  
3 -import java.util.Date;  
4 -  
5 -import javax.persistence.Entity;  
6 -import javax.persistence.GeneratedValue;  
7 -import javax.persistence.GenerationType;  
8 -import javax.persistence.Id;  
9 -import javax.persistence.ManyToOne;  
10 -import javax.persistence.Table;  
11 -  
12 -/**  
13 - *  
14 - * @ClassName: SignControl  
15 - * @Description: TODO(进出线调记录)  
16 - * @author PanZhao  
17 - * @date 2016年7月20日 下午4:50:50  
18 - *  
19 - */  
20 -@Entity  
21 -@Table(name = "bsth_c_sys_sign")  
22 -public class SignControl {  
23 -  
24 - @Id  
25 - @GeneratedValue(strategy = GenerationType.IDENTITY)  
26 - private Integer id;  
27 -  
28 - @ManyToOne  
29 - private SessionLog session;  
30 -  
31 - /** 登出线调时间 */  
32 - private Date outDate;  
33 -  
34 - /** 在线时长 */  
35 - private Long onLineTimel;  
36 -  
37 - /** 0: 主调模式, 1:监控模式 */  
38 - private int signType;  
39 -  
40 - /** 用户名 */  
41 - private String userName;  
42 -  
43 - public Integer getId() {  
44 - return id;  
45 - }  
46 -  
47 - public void setId(Integer id) {  
48 - this.id = id;  
49 - }  
50 -  
51 - public SessionLog getSession() {  
52 - return session;  
53 - }  
54 -  
55 - public void setSession(SessionLog session) {  
56 - this.session = session;  
57 - }  
58 -  
59 - public Date getOutDate() {  
60 - return outDate;  
61 - }  
62 -  
63 - public void setOutDate(Date outDate) {  
64 - this.outDate = outDate;  
65 - }  
66 -  
67 - public Long getOnLineTimel() {  
68 - return onLineTimel;  
69 - }  
70 -  
71 - public void setOnLineTimel(Long onLineTimel) {  
72 - this.onLineTimel = onLineTimel;  
73 - }  
74 -  
75 - public int getSignType() {  
76 - return signType;  
77 - }  
78 -  
79 - public void setSignType(int signType) {  
80 - this.signType = signType;  
81 - }  
82 -  
83 - public String getUserName() {  
84 - return userName;  
85 - }  
86 -  
87 - public void setUserName(String userName) {  
88 - this.userName = userName;  
89 - }  
90 -}  
src/main/java/com/bsth/repository/sys/DutyEmployeeRepository.java 0 → 100644
  1 +package com.bsth.repository.sys;
  2 +
  3 +import com.bsth.entity.sys.DutyEmployee;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.data.jpa.repository.Query;
  6 +import org.springframework.stereotype.Repository;
  7 +
  8 +import java.util.List;
  9 +
  10 +/**
  11 + * Created by panzhao on 2017/1/5.
  12 + */
  13 +@Repository
  14 +public interface DutyEmployeeRepository extends BaseRepository<DutyEmployee, Long>{
  15 +
  16 + @Query("select t from DutyEmployee t where t.codeIdx like %?1% and t.ts > ?2 and t.ts < ?3")
  17 + List<DutyEmployee> findByLineAndTime(String lineCode, long st, long et);
  18 +}
src/main/java/com/bsth/repository/sys/SessionLogRepository.java deleted 100644 → 0
1 -package com.bsth.repository.sys;  
2 -  
3 -import org.springframework.stereotype.Repository;  
4 -  
5 -import com.bsth.entity.sys.SessionLog;  
6 -import com.bsth.repository.BaseRepository;  
7 -  
8 -@Repository  
9 -public interface SessionLogRepository extends BaseRepository<SessionLog, Integer>{  
10 -  
11 -}  
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
@@ -58,7 +58,7 @@ public class GpsServiceImpl implements GpsService { @@ -58,7 +58,7 @@ public class GpsServiceImpl implements GpsService {
58 58
59 int dayOfYear = sCal.get(Calendar.DAY_OF_YEAR); 59 int dayOfYear = sCal.get(Calendar.DAY_OF_YEAR);
60 /* 60 /*
61 - * if(dayOfYear != eCal.get(Calendar.DAY_OF_YEAR)){ 61 + * if(dayOfYear != eCal.get(Calendar.DAY_OF_YEAR)){
62 * System.out.println("暂时不支持跨天查询..."); return null; } 62 * System.out.println("暂时不支持跨天查询..."); return null; }
63 */ 63 */
64 64
@@ -195,7 +195,7 @@ public class GpsServiceImpl implements GpsService { @@ -195,7 +195,7 @@ public class GpsServiceImpl implements GpsService {
195 inv = inv.substring(0, inv.length() - 1); 195 inv = inv.substring(0, inv.length() - 1);
196 196
197 // 查询到离站数据 197 // 查询到离站数据
198 - //Map<String, ArrivalEntity> arrivalMap = findArrivalByTs(weekOfYear/* 30 */, st, et, inv); 198 + Map<String, ArrivalEntity> arrivalMap = findArrivalByTs(weekOfYear/* 30 */, st, et, inv);
199 199
200 String sql = "select DEVICE_ID,LON,LAT,TS,INOUT_STOP,SERVICE_STATE ,STOP_NO,DIRECTION,LINE_ID,SPEED_GPS from bsth_c_gps_info where days_year=? and device_id in (" 200 String sql = "select DEVICE_ID,LON,LAT,TS,INOUT_STOP,SERVICE_STATE ,STOP_NO,DIRECTION,LINE_ID,SPEED_GPS from bsth_c_gps_info where days_year=? and device_id in ("
201 + inv + ") and ts > ? and ts < ?"; 201 + inv + ") and ts > ? and ts < ?";
@@ -239,11 +239,12 @@ public class GpsServiceImpl implements GpsService { @@ -239,11 +239,12 @@ public class GpsServiceImpl implements GpsService {
239 inOutStop = rs.getInt("INOUT_STOP"); 239 inOutStop = rs.getInt("INOUT_STOP");
240 map.put("inout_stop", inOutStop); 240 map.put("inout_stop", inOutStop);
241 241
242 - /*analyse = arrivalMap.get(rs.getString("DEVICE_ID") + "_" + rs.getLong("TS"));  
243 - if (analyse != null) {  
244 - map.put("inout_stop_info", analyse);  
245 - map.put("inout_stop", analyse.getInOut());  
246 - }*/ 242 + arrival = arrivalMap.get(rs.getString("DEVICE_ID") + "_" + rs.getLong("TS"));
  243 + if (arrival != null) {
  244 + map.put("inout_stop_info", arrival);
  245 + map.put("inout_stop", arrival.getInOut());
  246 + }
  247 +
247 map.put("nbbm", BasicData.deviceId2NbbmMap.get(rs.getString("DEVICE_ID"))); 248 map.put("nbbm", BasicData.deviceId2NbbmMap.get(rs.getString("DEVICE_ID")));
248 map.put("state", 0); 249 map.put("state", 0);
249 // 上下行 250 // 上下行
@@ -272,11 +273,17 @@ public class GpsServiceImpl implements GpsService { @@ -272,11 +273,17 @@ public class GpsServiceImpl implements GpsService {
272 273
273 rs = ps.executeQuery(); 274 rs = ps.executeQuery();
274 ArrivalEntity arr; 275 ArrivalEntity arr;
275 - int inOut; 276 + int inOut, updown;
  277 + String prefix, stationName, lineId;
276 while (rs.next()) { 278 while (rs.next()) {
277 - arr = new ArrivalEntity(rs.getString("DEVICE_ID"), rs.getLong("TS"), rs.getString("LINE_ID"),  
278 - rs.getInt("UP_DOWN"), rs.getString("STOP_NO"), rs.getInt("IN_OUT"), rs.getLong("CREATE_DATE"),  
279 - rs.getInt("WEEKS_YEAR"), BasicData.stationCode2NameMap.get(rs.getString("STOP_NO"))); 279 + lineId = rs.getString("LINE_ID");
  280 + updown = rs.getInt("UP_DOWN");
  281 + prefix = lineId + "_" + updown + "_";
  282 + stationName = BasicData.getStationNameByCode(rs.getString("STOP_NO"), prefix);
  283 +
  284 + arr = new ArrivalEntity(rs.getString("DEVICE_ID"), rs.getLong("TS"), lineId,
  285 + updown, rs.getString("STOP_NO"), rs.getInt("IN_OUT"), rs.getLong("CREATE_DATE"),
  286 + rs.getInt("WEEKS_YEAR"), stationName);
280 287
281 // 设备号_时间戳_进出状态 为key 288 // 设备号_时间戳_进出状态 为key
282 // 反转进出状态 289 // 反转进出状态
@@ -382,7 +389,7 @@ public class GpsServiceImpl implements GpsService { @@ -382,7 +389,7 @@ public class GpsServiceImpl implements GpsService {
382 389
383 gpsRealData.remove(device); 390 gpsRealData.remove(device);
384 rs.put("status", ResponseCode.SUCCESS); 391 rs.put("status", ResponseCode.SUCCESS);
385 - }catch (Exception e){ 392 + } catch (Exception e) {
386 rs.put("status", ResponseCode.ERROR); 393 rs.put("status", ResponseCode.ERROR);
387 } 394 }
388 return rs; 395 return rs;
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
@@ -43,7 +43,6 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon @@ -43,7 +43,6 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon
43 ScheduleRealInfo sch = dayOfSchedule.get(t.getSchedule().getId()); 43 ScheduleRealInfo sch = dayOfSchedule.get(t.getSchedule().getId());
44 Map<String, Object> rs; 44 Map<String, Object> rs;
45 //保存起终点名称 45 //保存起终点名称
46 - Map<String, String> map = BasicData.stationCode2NameMap;  
47 String prefix = sch.getXlBm() + "_" + sch.getXlDir() + "_"; 46 String prefix = sch.getXlBm() + "_" + sch.getXlDir() + "_";
48 47
49 t.setStartStationName(BasicData.getStationNameByCode(t.getStartStation(), prefix)); 48 t.setStartStationName(BasicData.getStationNameByCode(t.getStartStation(), prefix));
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -287,6 +287,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -287,6 +287,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
287 t.setCreateBy(user); 287 t.setCreateBy(user);
288 t.setSflj(true); 288 t.setSflj(true);
289 t.setLate(false); 289 t.setLate(false);
  290 + t.setDfsj(t.getFcsj());
290 t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime()); 291 t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime());
291 292
292 293
@@ -294,8 +295,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -294,8 +295,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
294 t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60); 295 t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60);
295 296
296 //起终点名称 297 //起终点名称
297 - t.setQdzName(BasicData.stationCode2NameMap.get(t.getQdzCode()));  
298 - t.setZdzName(BasicData.stationCode2NameMap.get(t.getZdzCode())); 298 + String prefix = t.getXlBm() + "_" + t.getXlDir() + "_";
  299 + t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix));
  300 + t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix));
299 301
300 //计算班次实际时间 302 //计算班次实际时间
301 schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t); 303 schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t);
src/main/java/com/bsth/service/sys/DutyEmployeeService.java 0 → 100644
  1 +package com.bsth.service.sys;
  2 +
  3 +import com.bsth.entity.sys.DutyEmployee;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +import java.util.List;
  7 +
  8 +/**
  9 + * Created by panzhao on 2017/1/5.
  10 + */
  11 +public interface DutyEmployeeService extends BaseService<DutyEmployee, Long> {
  12 +
  13 + List<DutyEmployee> getDutyEmployee(String lineCode, String startTime, String endTime);
  14 +}
src/main/java/com/bsth/service/sys/impl/DutyEmployeeServiceImpl.java 0 → 100644
  1 +package com.bsth.service.sys.impl;
  2 +
  3 +import com.bsth.entity.sys.DutyEmployee;
  4 +import com.bsth.repository.sys.DutyEmployeeRepository;
  5 +import com.bsth.service.impl.BaseServiceImpl;
  6 +import com.bsth.service.sys.DutyEmployeeService;
  7 +import org.joda.time.format.DateTimeFormat;
  8 +import org.joda.time.format.DateTimeFormatter;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Service;
  11 +
  12 +import java.util.List;
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * Created by panzhao on 2017/1/5.
  17 + */
  18 +@Service
  19 +public class DutyEmployeeServiceImpl extends BaseServiceImpl<DutyEmployee, Long> implements DutyEmployeeService {
  20 +
  21 + @Autowired
  22 + DutyEmployeeRepository dutyEmployeeRepository;
  23 +
  24 + @Override
  25 + public Map<String, Object> save(DutyEmployee dutyEmployee) {
  26 + //登入时间,当前时间 - 10分钟
  27 + dutyEmployee.setTs(System.currentTimeMillis() - (1000 * 60 * 10));
  28 + return super.save(dutyEmployee);
  29 + }
  30 +
  31 +
  32 + /**
  33 + * 获取当班调度
  34 + *
  35 + * @param lineCode 线路编码
  36 + * @param startTime 开始时间 yyyy-MM-ddHH:mm
  37 + * @param endTime 结束时间 yyyy-MM-ddHH:mm
  38 + * @return
  39 + */
  40 + public List<DutyEmployee> getDutyEmployee(String lineCode, String startTime, String endTime) {
  41 + DateTimeFormatter fmtyyyyMMddHHmm = DateTimeFormat.forPattern("yyyy-MM-ddHH:mm");
  42 + return dutyEmployeeRepository.findByLineAndTime(lineCode + ",", fmtyyyyMMddHHmm.parseMillis(startTime), fmtyyyyMMddHHmm.parseMillis(endTime));
  43 + }
  44 +}
src/main/resources/static/index.html
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="zh"> 2 <html lang="zh">
3 <head> 3 <head>
4 -<meta name="renderer" content="webkit" />  
5 -<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />  
6 -<meta charset="UTF-8">  
7 -<title>调度系统</title>  
8 -  
9 -<meta http-equiv="Pragma" content="no-cache">  
10 -<meta http-equiv="Cache-control" content="no-cache">  
11 -<meta http-equiv="Cache" content="no-cache">  
12 -  
13 -<!-- Font Awesome 图标字体 -->  
14 -<link href="/metronic_v4.5.4/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />  
15 -<!-- Bootstrap style -->  
16 -<link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />  
17 -<!-- jsTree 数插件 -->  
18 -<link href="/metronic_v4.5.4/plugins/jstree/dist/themes/default/style.min.css" rel="stylesheet" type="text/css" />  
19 -<!-- MULTI-select 多选下拉框美化 -->  
20 -<link href="/metronic_v4.5.4/plugins/jquery-multi-select/css/multi-select.css" rel="stylesheet" type="text/css" />  
21 -  
22 -<!-- editable -->  
23 -<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />  
24 -<!-- METRONIC style -->  
25 -<link href="/metronic_v4.5.4/layout4/css/themes/light.min.css" rel="stylesheet" type="text/css" id="style_color" />  
26 -<link href="/metronic_v4.5.4/css/components.css" rel="stylesheet" type="text/css" />  
27 -<link href="/metronic_v4.5.4/css/plugins.css" rel="stylesheet" type="text/css" />  
28 -<link href="/metronic_v4.5.4/layout4/css/layout.min.css" rel="stylesheet" type="text/css" />  
29 -<link href="/metronic_v4.5.4/layout4/css/custom.min.css" rel="stylesheet" type="text/css" />  
30 -<!-- select2 下拉框插件 -->  
31 -<link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />  
32 -<link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />  
33 -<!-- layer 弹层 插件 -->  
34 -<link href="/assets/plugins/layer-v2.4/layer/skin/layer.css" rel="stylesheet" type="text/css" />  
35 -<!-- fileinput 上传 插件 -->  
36 -<link href="/assets/plugins/fileinput/css/fileinput.min.css" rel="stylesheet" type="text/css" />  
37 -<!-- iCheck 单选框和复选框 -->  
38 -<link href="/metronic_v4.5.4/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css" />  
39 -<!-- 日期控件 -->  
40 -<link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />  
41 -<!-- table 表格控件 -->  
42 -<link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" type="text/css" />  
43 -  
44 -<!-- handsontable样式 -->  
45 -<link rel="stylesheet" href="/assets/bower_components/handsontable/dist/handsontable.full.css"/>  
46 -<!-- schedule计划调度AngularJS模块主css -->  
47 -<link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css" type="text/css"/>  
48 -  
49 -<style type="text/css">  
50 -.searchForm{  
51 -  
52 -}  
53 -.searchForm .form-group .control-label{  
54 - padding-right: 0px;  
55 - text-align: right;  
56 - margin-top: 7px;  
57 -}  
58 -.searchForm .form-group>div{  
59 - padding-left: 10px;  
60 - padding-right: 0px;  
61 -}  
62 -.searchForm .row>div{  
63 - padding-left: 0px;  
64 - padding-right: 0px;  
65 - padding: 5px 0 5px 0;  
66 - width: 270px;  
67 - display: inline-block;  
68 -}  
69 -.searchForm .form-actions{  
70 -  
71 -}  
72 -tr.row-active td {  
73 - border-bottom: 1px solid blue!important;  
74 - color: blue;  
75 -}  
76 -.ms-container .ms-selectable li.ms-elem-selectable, .ms-container .ms-selection li.ms-elem-selection {  
77 - font-size: 14px;  
78 -}  
79 -.ms-container .ms-selectable li.ms-elem-selectable, .ms-container .ms-selection li.ms-elem-selection{  
80 - padding: 6px 26px;  
81 -}  
82 -.ms-container .ms-list{  
83 - height: 306px;  
84 -}  
85 -.ms-container .ms-selectable, .ms-container .ms-selection{  
86 - width: 47%;  
87 -}  
88 -.ms-container {  
89 - width: 470px;  
90 - margin: auto;  
91 -}  
92 -.multi-custom-header-left{  
93 - text-align: center;  
94 - padding: 7px;  
95 - color: #3B3F51;  
96 -}  
97 -.multi-custom-header-right{  
98 - text-align: center;  
99 - padding: 7px;  
100 - font-weight: bold;  
101 - color: #36C6D3;  
102 -}  
103 -.mt-element-list .list-simple.mt-list-container ul > .mt-list-item > .list-item-content {  
104 - padding: 0 55px 0 0px;  
105 -}  
106 -.mt-element-list .list-simple.mt-list-container ul > .mt-list-item {  
107 - padding: 3.3px 0;  
108 -}  
109 -  
110 -#route-container{  
111 - display: none;  
112 -}  
113 -  
114 -.page-content.active{  
115 - display: block !important;  
116 -}  
117 -  
118 -.page-header.navbar .page-logo .logo-default {  
119 - margin: 0;  
120 -}  
121 -.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle {  
122 - background-color: #284a99;  
123 -}  
124 -.page-header.navbar .page-logo{  
125 - padding-right: 10px;  
126 -}  
127 -  
128 -.page-logo .logo-default.logo-default-text{  
129 - font-weight: 600;  
130 - color: white !important;  
131 - margin-top: 19px !important;  
132 - font-size: 24px;  
133 - text-decoration: none;  
134 -}  
135 -.page-logo .logo-default.logo-default-text:HOVER{  
136 - color: #dedede !important;  
137 -}  
138 -  
139 -</style>  
140 -  
141 -<!-- ocLazyLoading载入文件的位置 -->  
142 -<link id="ng_load_plugins_before" /> 4 + <meta name="renderer" content="webkit"/>
  5 + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  6 + <meta charset="UTF-8">
  7 + <title>调度系统</title>
  8 +
  9 + <meta http-equiv="Pragma" content="no-cache">
  10 + <meta http-equiv="Cache-control" content="no-cache">
  11 + <meta http-equiv="Cache" content="no-cache">
  12 +
  13 + <!-- Font Awesome 图标字体 -->
  14 + <link href="/metronic_v4.5.4/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
  15 + <!-- Bootstrap style -->
  16 + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
  17 + <!-- jsTree 数插件 -->
  18 + <link href="/metronic_v4.5.4/plugins/jstree/dist/themes/default/style.min.css" rel="stylesheet" type="text/css"/>
  19 + <!-- MULTI-select 多选下拉框美化 -->
  20 + <link href="/metronic_v4.5.4/plugins/jquery-multi-select/css/multi-select.css" rel="stylesheet" type="text/css"/>
  21 +
  22 + <!-- editable -->
  23 + <link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css"
  24 + rel="stylesheet" type="text/css"/>
  25 + <!-- METRONIC style -->
  26 + <link href="/metronic_v4.5.4/layout4/css/themes/light.min.css" rel="stylesheet" type="text/css" id="style_color"/>
  27 + <link href="/metronic_v4.5.4/css/components.css" rel="stylesheet" type="text/css"/>
  28 + <link href="/metronic_v4.5.4/css/plugins.css" rel="stylesheet" type="text/css"/>
  29 + <link href="/metronic_v4.5.4/layout4/css/layout.min.css" rel="stylesheet" type="text/css"/>
  30 + <link href="/metronic_v4.5.4/layout4/css/custom.min.css" rel="stylesheet" type="text/css"/>
  31 + <!-- select2 下拉框插件 -->
  32 + <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css"/>
  33 + <link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css"/>
  34 + <!-- layer 弹层 插件 -->
  35 + <link href="/assets/plugins/layer-v2.4/layer/skin/layer.css" rel="stylesheet" type="text/css"/>
  36 + <!-- fileinput 上传 插件 -->
  37 + <link href="/assets/plugins/fileinput/css/fileinput.min.css" rel="stylesheet" type="text/css"/>
  38 + <!-- iCheck 单选框和复选框 -->
  39 + <link href="/metronic_v4.5.4/plugins/icheck/skins/all.css" rel="stylesheet" type="text/css"/>
  40 + <!-- 日期控件 -->
  41 + <link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css"
  42 + rel="stylesheet" type="text/css"/>
  43 + <!-- table 表格控件 -->
  44 + <link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css"
  45 + type="text/css"/>
  46 +
  47 + <!-- handsontable样式 -->
  48 + <link rel="stylesheet" href="/assets/bower_components/handsontable/dist/handsontable.full.css"/>
  49 + <!-- schedule计划调度AngularJS模块主css -->
  50 + <link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css" type="text/css"/>
  51 +
  52 + <style type="text/css">
  53 + .searchForm {
  54 +
  55 + }
  56 +
  57 + .searchForm .form-group .control-label {
  58 + padding-right: 0px;
  59 + text-align: right;
  60 + margin-top: 7px;
  61 + }
  62 +
  63 + .searchForm .form-group > div {
  64 + padding-left: 10px;
  65 + padding-right: 0px;
  66 + }
  67 +
  68 + .searchForm .row > div {
  69 + padding-left: 0px;
  70 + padding-right: 0px;
  71 + padding: 5px 0 5px 0;
  72 + width: 270px;
  73 + display: inline-block;
  74 + }
  75 +
  76 + .searchForm .form-actions {
  77 +
  78 + }
  79 +
  80 + tr.row-active td {
  81 + border-bottom: 1px solid blue !important;
  82 + color: blue;
  83 + }
  84 +
  85 + .ms-container .ms-selectable li.ms-elem-selectable, .ms-container .ms-selection li.ms-elem-selection {
  86 + font-size: 14px;
  87 + }
  88 +
  89 + .ms-container .ms-selectable li.ms-elem-selectable, .ms-container .ms-selection li.ms-elem-selection {
  90 + padding: 6px 26px;
  91 + }
  92 +
  93 + .ms-container .ms-list {
  94 + height: 306px;
  95 + }
  96 +
  97 + .ms-container .ms-selectable, .ms-container .ms-selection {
  98 + width: 47%;
  99 + }
  100 +
  101 + .ms-container {
  102 + width: 470px;
  103 + margin: auto;
  104 + }
  105 +
  106 + .multi-custom-header-left {
  107 + text-align: center;
  108 + padding: 7px;
  109 + color: #3B3F51;
  110 + }
  111 +
  112 + .multi-custom-header-right {
  113 + text-align: center;
  114 + padding: 7px;
  115 + font-weight: bold;
  116 + color: #36C6D3;
  117 + }
  118 +
  119 + .mt-element-list .list-simple.mt-list-container ul > .mt-list-item > .list-item-content {
  120 + padding: 0 55px 0 0px;
  121 + }
  122 +
  123 + .mt-element-list .list-simple.mt-list-container ul > .mt-list-item {
  124 + padding: 3.3px 0;
  125 + }
  126 +
  127 + #route-container {
  128 + display: none;
  129 + }
  130 +
  131 + .page-content.active {
  132 + display: block !important;
  133 + }
  134 +
  135 + .page-header.navbar .page-logo .logo-default {
  136 + margin: 0;
  137 + }
  138 +
  139 + .page-header.navbar .top-menu .navbar-nav > li.dropdown.open .dropdown-toggle {
  140 + background-color: #284a99;
  141 + }
  142 +
  143 + .page-header.navbar .page-logo {
  144 + padding-right: 10px;
  145 + }
  146 +
  147 + .page-logo .logo-default.logo-default-text {
  148 + font-weight: 600;
  149 + color: white !important;
  150 + margin-top: 19px !important;
  151 + font-size: 24px;
  152 + text-decoration: none;
  153 + }
  154 +
  155 + .page-logo .logo-default.logo-default-text:HOVER {
  156 + color: #dedede !important;
  157 + }
  158 +
  159 + </style>
  160 +
  161 + <!-- ocLazyLoading载入文件的位置 -->
  162 + <link id="ng_load_plugins_before"/>
143 163
144 </head> 164 </head>
145 <body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed"> 165 <body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed">
146 - <div class="page-header navbar navbar-fixed-top" style="background: linear-gradient(to bottom ,#124e78, #125688);">  
147 - <div class="page-header-inner ">  
148 - <!-- LOGO -->  
149 - <div class="page-logo">  
150 - <a href="index.html" class="logo-default logo-default-text" > 闵行公交调度系统 </a>  
151 - <div class="menu-toggler sidebar-toggler">  
152 - </div>  
153 - </div>  
154 - <!-- END LOGO -->  
155 - <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse" data-target=".navbar-collapse"> </a>  
156 - <div class="page-top">  
157 - <div class="top-menu">  
158 - <ul class="nav navbar-nav pull-right">  
159 - <!-- 信息通知区 -->  
160 - <li class="dropdown dropdown-extended dropdown-notification dropdown-dark" id="header_notification_bar">  
161 - <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">  
162 - <i class="fa fa-bell"></i>  
163 - <span class="badge badge-success"> 0 </span>  
164 - </a>  
165 - <ul class="dropdown-menu" style="max-width: 345px;width: 345px;">  
166 - <li class="external">  
167 - <h3>今日 <span class="bold">0 条</span> 通知</h3>  
168 - <a href="javascript:;">查看全部</a>  
169 - </li>  
170 - <li>  
171 - <ul class="dropdown-menu-list scroller" style="height: 250px;" data-handle-color="#637283">  
172 - </ul>  
173 - </li>  
174 - </ul>  
175 - </li>  
176 - <li class="dropdown dropdown-user dropdown-dark">  
177 - <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">  
178 - <span id="indexTopUName" class="username username-hide-on-mobile" style="vertical-align: middle;"> <i class="fa fa-user"></i></span>  
179 - </a>  
180 - <ul class="dropdown-menu dropdown-menu-default">  
181 - <li>  
182 - <a href="javascript:;">  
183 - <i class="fa fa-user"></i> 我的信息 </a>  
184 - </li>  
185 - <li>  
186 - <a href="javascript:;" id="changePWD">  
187 - <i class="fa fa-unlock-alt"></i> 修改密码</a>  
188 - </li>  
189 - <li class="divider"> </li>  
190 - <li>  
191 - <a href="javascript:;">  
192 - <i class="fa fa-lock"></i> 锁屏 </a>  
193 - </li>  
194 - <li>  
195 - <a href="/logout">  
196 - <i class="fa fa-key"></i> 注销登陆 </a>  
197 - </li>  
198 - </ul>  
199 - </li>  
200 - </ul>  
201 - </div> 166 +<div class="page-header navbar navbar-fixed-top" style="background: linear-gradient(to bottom ,#124e78, #125688);">
  167 + <div class="page-header-inner ">
  168 + <!-- LOGO -->
  169 + <div class="page-logo">
  170 + <a href="index.html" class="logo-default logo-default-text"> 闵行公交调度系统 </a>
  171 + <div class="menu-toggler sidebar-toggler">
202 </div> 172 </div>
203 </div> 173 </div>
204 - </div>  
205 - <div class="page-container">  
206 - <div class="page-sidebar-wrapper">  
207 - <div class="page-sidebar navbar-collapse collapse">  
208 - <ul class="page-sidebar-menu page-sidebar-menu-fixed" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200" id="leftMenuSidebar"> 174 + <!-- END LOGO -->
  175 + <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse"
  176 + data-target=".navbar-collapse"> </a>
  177 + <div class="page-top">
  178 + <div class="top-menu">
  179 + <ul class="nav navbar-nav pull-right">
  180 + <!-- 信息通知区 -->
  181 + <li class="dropdown dropdown-extended dropdown-notification dropdown-dark"
  182 + id="header_notification_bar">
  183 + <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"
  184 + data-close-others="true">
  185 + <i class="fa fa-bell"></i>
  186 + <span class="badge badge-success"> 0 </span>
  187 + </a>
  188 + <ul class="dropdown-menu" style="max-width: 345px;width: 345px;">
  189 + <li class="external">
  190 + <h3>今日 <span class="bold">0 条</span> 通知</h3>
  191 + <a href="javascript:;">查看全部</a>
  192 + </li>
  193 + <li>
  194 + <ul class="dropdown-menu-list scroller" style="height: 250px;"
  195 + data-handle-color="#637283">
  196 + </ul>
  197 + </li>
  198 + </ul>
  199 + </li>
  200 + <li class="dropdown dropdown-user dropdown-dark">
  201 + <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"
  202 + data-close-others="true">
  203 + <span id="indexTopUName" class="username username-hide-on-mobile"
  204 + style="vertical-align: middle;"> <i class="fa fa-user"></i></span>
  205 + </a>
  206 + <ul class="dropdown-menu dropdown-menu-default">
  207 + <li>
  208 + <a href="javascript:;">
  209 + <i class="fa fa-user"></i> 我的信息 </a>
  210 + </li>
  211 + <li>
  212 + <a href="javascript:;" id="changePWD">
  213 + <i class="fa fa-unlock-alt"></i> 修改密码</a>
  214 + </li>
  215 + <li class="divider"></li>
  216 + <li>
  217 + <a href="javascript:;">
  218 + <i class="fa fa-lock"></i> 锁屏 </a>
  219 + </li>
  220 + <li>
  221 + <a href="/logout">
  222 + <i class="fa fa-key"></i> 注销登陆 </a>
  223 + </li>
  224 + </ul>
  225 + </li>
209 </ul> 226 </ul>
210 </div> 227 </div>
211 </div> 228 </div>
212 - <div class="page-content-wrapper">  
213 - <div id="pjax-container" class="page-content"></div>  
214 -  
215 - <div id="route-container">  
216 - <div ng-app="ScheduleApp">  
217 - <div ng-controller="ScheduleAppController">  
218 -  
219 - <!-- loading widget -->  
220 - <div id="loadingWidget" class="flyover mask" loading-widget>  
221 - <div class="alert alert-info">  
222 - <strong>载入中......</strong>  
223 - </div>  
224 - </div>  
225 -  
226 - <div ui-view class="fade-in-up"> </div> 229 + </div>
  230 +</div>
  231 +<div class="page-container">
  232 + <div class="page-sidebar-wrapper">
  233 + <div class="page-sidebar navbar-collapse collapse">
  234 + <ul class="page-sidebar-menu page-sidebar-menu-fixed" data-keep-expanded="false" data-auto-scroll="true"
  235 + data-slide-speed="200" id="leftMenuSidebar">
  236 + </ul>
  237 + </div>
  238 + </div>
  239 + <div class="page-content-wrapper">
  240 + <div id="pjax-container" class="page-content"></div>
  241 +
  242 + <div id="route-container">
  243 + <div ng-app="ScheduleApp">
  244 + <div ng-controller="ScheduleAppController">
  245 +
  246 + <!-- loading widget -->
  247 + <div id="loadingWidget" class="flyover mask" loading-widget>
  248 + <div class="alert alert-info">
  249 + <strong>载入中......</strong>
227 </div> 250 </div>
228 </div> 251 </div>
  252 +
  253 + <div ui-view class="fade-in-up"></div>
229 </div> 254 </div>
230 - </div> 255 + </div>
  256 + </div>
231 </div> 257 </div>
  258 +</div>
232 259
233 <script id="menu_list_temp" type="text/html"> 260 <script id="menu_list_temp" type="text/html">
234 -{{each list as group i}}  
235 - <li class="heading">  
236 - <h3 class="uppercase">{{group.name}}</h3>  
237 - </li>  
238 - {{each group.children as dir j}}  
239 - <li class="nav-item">  
240 - <a href="javascript:;" class="nav-link nav-toggle ">  
241 - <i class="{{dir.icon}}"></i>  
242 - <span class="title">{{dir.name}}</span>  
243 - <span class="arrow"></span>  
244 - </a>  
245 - <ul class="sub-menu">  
246 - {{each dir.children as module s}}  
247 - <li class="nav-item ">  
248 - {{if module.container=="pjax-container"}}  
249 - <a href="/pages/{{module.path}}" class="nav-link " data-pjax>  
250 - <span class="title">{{module.name}}</span>  
251 - </a>  
252 - {{else}}  
253 - <a href="{{module.path}}" class="nav-link " data-angularjs>  
254 - <span class="title">{{module.name}}</span>  
255 - </a>  
256 - {{/if}}  
257 - </li>  
258 - {{/each}}  
259 - </ul>  
260 - </li>  
261 - {{/each}}  
262 -{{/each}} 261 + {{each list as group i}}
  262 + <li class="heading">
  263 + <h3 class="uppercase">{{group.name}}</h3>
  264 + </li>
  265 + {{each group.children as dir j}}
  266 + <li class="nav-item">
  267 + <a href="javascript:;" class="nav-link nav-toggle ">
  268 + <i class="{{dir.icon}}"></i>
  269 + <span class="title">{{dir.name}}</span>
  270 + <span class="arrow"></span>
  271 + </a>
  272 + <ul class="sub-menu">
  273 + {{each dir.children as module s}}
  274 + <li class="nav-item ">
  275 + {{if module.container=="pjax-container"}}
  276 + <a href="/pages/{{module.path}}" class="nav-link " data-pjax>
  277 + <span class="title">{{module.name}}</span>
  278 + </a>
  279 + {{else}}
  280 + <a href="{{module.path}}" class="nav-link " data-angularjs>
  281 + <span class="title">{{module.name}}</span>
  282 + </a>
  283 + {{/if}}
  284 + </li>
  285 + {{/each}}
  286 + </ul>
  287 + </li>
  288 + {{/each}}
  289 + {{/each}}
263 290
264 </script> 291 </script>
265 <!-- jQuery --> 292 <!-- jQuery -->
@@ -272,24 +299,24 @@ tr.row-active td { @@ -272,24 +299,24 @@ tr.row-active td {
272 <script src="/metronic_v4.5.4/scripts/app.min.js" data-exclude=1></script> 299 <script src="/metronic_v4.5.4/scripts/app.min.js" data-exclude=1></script>
273 <script src="/metronic_v4.5.4/layout4/scripts/layout.min.js" data-exclude=1></script> 300 <script src="/metronic_v4.5.4/layout4/scripts/layout.min.js" data-exclude=1></script>
274 <!-- 虚拟滚动条 --> 301 <!-- 虚拟滚动条 -->
275 -<script src="/metronic_v4.5.4/plugins/jquery-slimscroll/jquery.slimscroll.min.js" ></script> 302 +<script src="/metronic_v4.5.4/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
276 <!-- jsTree 树插件 --> 303 <!-- jsTree 树插件 -->
277 -<script src="/metronic_v4.5.4/plugins/jstree/dist/jstree.min.js" ></script> 304 +<script src="/metronic_v4.5.4/plugins/jstree/dist/jstree.min.js"></script>
278 <!-- bootstrap-hover-dropDown --> 305 <!-- bootstrap-hover-dropDown -->
279 -<script src="/metronic_v4.5.4/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" ></script> 306 +<script src="/metronic_v4.5.4/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script>
280 <!-- jquery.validate 表单验证 --> 307 <!-- jquery.validate 表单验证 -->
281 <script src="/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.min.js"></script> 308 <script src="/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.min.js"></script>
282 <script src="/metronic_v4.5.4/plugins/jquery-validation/js/localization/messages_zh.js"></script> 309 <script src="/metronic_v4.5.4/plugins/jquery-validation/js/localization/messages_zh.js"></script>
283 <!-- 向导式插件 --> 310 <!-- 向导式插件 -->
284 <script src="/metronic_v4.5.4//plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script> 311 <script src="/metronic_v4.5.4//plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>
285 <!-- iCheck 单选框和复选框 --> 312 <!-- iCheck 单选框和复选框 -->
286 -<script src="/metronic_v4.5.4/plugins/icheck/icheck.min.js" ></script> 313 +<script src="/metronic_v4.5.4/plugins/icheck/icheck.min.js"></script>
287 <!-- select2 下拉框 --> 314 <!-- select2 下拉框 -->
288 -<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js" ></script> 315 +<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
289 <!-- MULTI SELECT 多选下拉框 --> 316 <!-- MULTI SELECT 多选下拉框 -->
290 -<script src="/metronic_v4.5.4/plugins/jquery-multi-select/js/jquery.multi-select.js" ></script> 317 +<script src="/metronic_v4.5.4/plugins/jquery-multi-select/js/jquery.multi-select.js"></script>
291 <!-- editable.js --> 318 <!-- editable.js -->
292 -<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js" ></script> 319 +<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>
293 <!-- PJAX --> 320 <!-- PJAX -->
294 <script src="/assets/plugins/jquery.pjax.js"></script> 321 <script src="/assets/plugins/jquery.pjax.js"></script>
295 <!-- layer 弹层 --> 322 <!-- layer 弹层 -->
@@ -313,7 +340,7 @@ tr.row-active td { @@ -313,7 +340,7 @@ tr.row-active td {
313 340
314 <script src="/assets/plugins/pinyin.js"></script> 341 <script src="/assets/plugins/pinyin.js"></script>
315 <!-- 日期控件 --> 342 <!-- 日期控件 -->
316 -<script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js" ></script> 343 +<script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
317 <!-- 表格控件 --> 344 <!-- 表格控件 -->
318 <!-- 统计图控件 --> 345 <!-- 统计图控件 -->
319 <!--<script src="/assets/global/getEchart.js"></script> 346 <!--<script src="/assets/global/getEchart.js"></script>
@@ -322,130 +349,139 @@ tr.row-active td { @@ -322,130 +349,139 @@ tr.row-active td {
322 <script src="/assets/js/dictionary.js"></script> 349 <script src="/assets/js/dictionary.js"></script>
323 350
324 <script data-exclude=1> 351 <script data-exclude=1>
325 -//初始打开的片段地址  
326 -var initFragment = "^_^initFragment^_^";  
327 -//静态文件目录  
328 -var dir = '/pages/';  
329 -//片段容器  
330 -var pjaxContainer = '#pjax-container'  
331 - ,angJsContainer = '#route-container';  
332 -  
333 -$(function(){  
334 - $.get('/user/currentUser', function(user){  
335 - $('#indexTopUName').text(user.userName);  
336 - });  
337 -  
338 - //带 data-pjax 的链接由pjax加载  
339 - $(document).pjax('a[data-pjax]', pjaxContainer);  
340 -  
341 - //pjax左菜单点击事件  
342 - $(document).on('click','#leftMenuSidebar a[data-pjax]', function(){  
343 - $('#leftMenuSidebar li.nav-item.active').removeClass('active');  
344 - $(this).parent().addClass('active');  
345 - showPjax();  
346 - });  
347 -  
348 - //angularjs左菜单点击事件  
349 - $(document).on('click','#leftMenuSidebar a[data-angularjs]', function(){  
350 - $('#leftMenuSidebar li.nav-item.active').removeClass('active');  
351 - $(this).parent().addClass('active');  
352 - showAngJs();  
353 - });  
354 -  
355 - //加载左菜单栏  
356 - $get('/module/findByCurrentUser', null,  
357 - function(ms){  
358 - var treeArray = createTreeData(ms);  
359 - treeArray.sort(function(a, b){  
360 - return a.createDate - b.createDate;  
361 - });  
362 - var menuHtml = template('menu_list_temp', {list: treeArray});  
363 - $('#leftMenuSidebar').html(menuHtml);  
364 -  
365 - //----------- 检查URL ----------------  
366 - var h = location.hash;  
367 - if(initFragment && initFragment != ''){  
368 - showPjax();  
369 - //普通片段  
370 - loadPage(initFragment);  
371 - //选中菜单  
372 - $.each($('#leftMenuSidebar a'), function(i, item){  
373 - if(urlPattern($(item).attr('href'), initFragment)){  
374 - activeLeftMenu(item);  
375 - }  
376 - });  
377 - }else if(h){  
378 - //angularjs片段  
379 - showAngJs();  
380 - //选中菜单  
381 - $.each($('#leftMenuSidebar a'), function(i, item){  
382 - if($(item).attr('href') == h){  
383 - activeLeftMenu(item);  
384 - }  
385 - });  
386 - }  
387 - else{  
388 - //加载主页  
389 - loadPage('/pages/home.html');  
390 - }  
391 - });  
392 -  
393 - //修改密码  
394 - $('#changePWD').on('click', function(){  
395 - $.get('/pages/permission/user/changePWD.html', function(content){  
396 - layer.open({  
397 - type: 1,  
398 - area: ['600px','360px'],  
399 - content: content,  
400 - title : '修改密码',  
401 - shift: 5,  
402 - scrollbar: false,  
403 - success: function(){  
404 - }  
405 - });  
406 - });  
407 - });  
408 -});  
409 -  
410 - //modal关闭时销毁dom  
411 - $(document).on('hidden.bs.modal', '.modal', function(){  
412 - $(this).remove();  
413 - });  
414 -  
415 - //pjax加载完成事件  
416 - $(document).on('pjax:success', function(){  
417 - var dicts = $(pjaxContainer).find('.nt-dictionary');  
418 - dictionaryUtils.transformDom(dicts);  
419 - });  
420 -  
421 - function loadPage(url){  
422 - $.pjax({url: url, container: pjaxContainer})  
423 - }  
424 -  
425 - function urlPattern(a , b){  
426 - var r;  
427 - try {  
428 - r = a.substring(0, a.lastIndexOf('/')) == b.substring(0, b.lastIndexOf('/'));  
429 - } catch (e) {  
430 - r = false;  
431 - }  
432 - return r;  
433 - }  
434 -  
435 - function showPjax(){  
436 - $(angJsContainer).removeClass('page-content active').hide();  
437 - $(pjaxContainer).addClass('page-content active');  
438 - }  
439 -  
440 - function showAngJs(){  
441 - $(pjaxContainer).html('').removeClass('page-content active').hide();  
442 - $(angJsContainer).addClass('page-content active');  
443 - }  
444 -  
445 - function activeLeftMenu(item){  
446 - $(item).parent('.nav-item').addClass('active').parent('.sub-menu').show().parent().addClass('open');  
447 - }  
448 - 352 + //初始打开的片段地址
  353 + var initFragment = "^_^initFragment^_^";
  354 + //静态文件目录
  355 + var dir = '/pages/';
  356 + //片段容器
  357 + var pjaxContainer = '#pjax-container'
  358 + , angJsContainer = '#route-container';
  359 +
  360 + $(function () {
  361 + $.get('/user/currentUser', function (user) {
  362 + $('#indexTopUName').text(user.userName);
  363 + });
  364 +
  365 + //带 data-pjax 的链接由pjax加载
  366 + $(document).pjax('a[data-pjax]', pjaxContainer);
  367 +
  368 + //pjax左菜单点击事件
  369 + $(document).on('click', '#leftMenuSidebar a[data-pjax]', function () {
  370 + setTitle(this);
  371 +
  372 + $('#leftMenuSidebar li.nav-item.active').removeClass('active');
  373 + $(this).parent().addClass('active');
  374 + showPjax();
  375 + });
  376 +
  377 + //angularjs左菜单点击事件
  378 + $(document).on('click', '#leftMenuSidebar a[data-angularjs]', function () {
  379 + setTitle(this);
  380 +
  381 + $('#leftMenuSidebar li.nav-item.active').removeClass('active');
  382 + $(this).parent().addClass('active');
  383 + showAngJs();
  384 + });
  385 +
  386 + //加载左菜单栏
  387 + $get('/module/findByCurrentUser', null,
  388 + function (ms) {
  389 + var treeArray = createTreeData(ms);
  390 + treeArray.sort(function (a, b) {
  391 + return a.createDate - b.createDate;
  392 + });
  393 + var menuHtml = template('menu_list_temp', {list: treeArray});
  394 + $('#leftMenuSidebar').html(menuHtml);
  395 +
  396 + //----------- 检查URL ----------------
  397 + var h = location.hash;
  398 + if (initFragment && initFragment != '') {
  399 + showPjax();
  400 + //普通片段
  401 + loadPage(initFragment);
  402 + //选中菜单
  403 + $.each($('#leftMenuSidebar a'), function (i, item) {
  404 + if (urlPattern($(item).attr('href'), initFragment)) {
  405 + activeLeftMenu(item);
  406 + }
  407 + });
  408 + } else if (h) {
  409 + //angularjs片段
  410 + showAngJs();
  411 + //选中菜单
  412 + $.each($('#leftMenuSidebar a'), function (i, item) {
  413 + if ($(item).attr('href') == h) {
  414 + activeLeftMenu(item);
  415 + }
  416 + });
  417 + }
  418 + else {
  419 + //加载主页
  420 + loadPage('/pages/home.html');
  421 + }
  422 + });
  423 +
  424 + //修改密码
  425 + $('#changePWD').on('click', function () {
  426 + $.get('/pages/permission/user/changePWD.html', function (content) {
  427 + layer.open({
  428 + type: 1,
  429 + area: ['600px', '360px'],
  430 + content: content,
  431 + title: '修改密码',
  432 + shift: 5,
  433 + scrollbar: false,
  434 + success: function () {
  435 + }
  436 + });
  437 + });
  438 + });
  439 + });
  440 +
  441 + //modal关闭时销毁dom
  442 + $(document).on('hidden.bs.modal', '.modal', function () {
  443 + $(this).remove();
  444 + });
  445 +
  446 + //pjax加载完成事件
  447 + $(document).on('pjax:success', function () {
  448 + var dicts = $(pjaxContainer).find('.nt-dictionary');
  449 + dictionaryUtils.transformDom(dicts);
  450 + });
  451 +
  452 + function loadPage(url) {
  453 + $.pjax({url: url, container: pjaxContainer})
  454 + }
  455 +
  456 + function urlPattern(a, b) {
  457 + var r;
  458 + try {
  459 + r = a.substring(0, a.lastIndexOf('/')) == b.substring(0, b.lastIndexOf('/'));
  460 + } catch (e) {
  461 + r = false;
  462 + }
  463 + return r;
  464 + }
  465 +
  466 + function showPjax() {
  467 + $(angJsContainer).removeClass('page-content active').hide();
  468 + $(pjaxContainer).addClass('page-content active');
  469 + }
  470 +
  471 + function showAngJs() {
  472 + $(pjaxContainer).html('').removeClass('page-content active').hide();
  473 + $(angJsContainer).addClass('page-content active');
  474 + }
  475 +
  476 + function activeLeftMenu(item) {
  477 + $(item).parent('.nav-item').addClass('active').parent('.sub-menu').show().parent().addClass('open');
  478 + setTitle(item);
  479 + }
  480 +
  481 + function setTitle(menuItem){
  482 + document.title = $('span.title', menuItem).text();
  483 + }
  484 +
449 </script> 485 </script>
450 <!-- d3 --> 486 <!-- d3 -->
451 <script src="/assets/js/d3.min.js" data-exclude=1></script> 487 <script src="/assets/js/d3.min.js" data-exclude=1></script>
@@ -478,8 +514,10 @@ $(function(){ @@ -478,8 +514,10 @@ $(function(){
478 <!-- 百度 --> 514 <!-- 百度 -->
479 <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT" data-exclude=1></script> 515 <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT" data-exclude=1></script>
480 <script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js" data-exclude=1></script> 516 <script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js" data-exclude=1></script>
481 -<script type="text/javascript" src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js" data-exclude=1></script>  
482 -<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js " data-exclude=1></script> 517 +<script type="text/javascript" src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"
  518 + data-exclude=1></script>
  519 +<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "
  520 + data-exclude=1></script>
483 <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script> 521 <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script>
484 <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script> 522 <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script>
485 <!-- 高德 --> 523 <!-- 高德 -->
src/main/resources/static/real_control_v2/css/line_schedule.css
@@ -685,15 +685,17 @@ label.destroy-sch small{ @@ -685,15 +685,17 @@ label.destroy-sch small{
685 border-bottom: 0; 685 border-bottom: 0;
686 } 686 }
687 687
688 -i.add-temp-sch-icon{  
689 - float: right;  
690 - font-size: 18px;  
691 - cursor: pointer;  
692 - color: #4592b8;  
693 - margin: 10px 15px 0; 688 +.add-temp-sch-icon{
  689 + float: right;
  690 + margin: 0 3px 0;
  691 + padding: 0;
  692 + font-size: 13px;
  693 + text-decoration: underline;
694 } 694 }
695 -i.add-temp-sch-icon:hover{  
696 - color: #2d7091; 695 +
  696 +.add-temp-lp-icon{
  697 + cursor: pointer;
  698 + margin-left: 5px;
697 } 699 }
698 700
699 701
@@ -1046,4 +1048,20 @@ i.signal_state_icon.uk-icon-question-circle{ @@ -1046,4 +1048,20 @@ i.signal_state_icon.uk-icon-question-circle{
1046 i.signal_state_icon.uk-icon-reply{ 1048 i.signal_state_icon.uk-icon-reply{
1047 color: #4134e3 !important; 1049 color: #4134e3 !important;
1048 box-shadow: none; 1050 box-shadow: none;
  1051 +}
  1052 +
  1053 +.child-task-status{
  1054 + float: right;
  1055 + font-size: 13px;
  1056 +}
  1057 +
  1058 +.child-task-status.fail{
  1059 + color: red;
  1060 + text-shadow: red 0px 0px 20px;
  1061 +}
  1062 +
  1063 +.child-task-status.fail span.calc-detail{
  1064 + font-family: Consolas,monospace,serif;
  1065 + white-space: nowrap;
  1066 + font-size: 14px;
1049 } 1067 }
1050 \ No newline at end of file 1068 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/add_temp_sch.html
@@ -13,7 +13,8 @@ @@ -13,7 +13,8 @@
13 <div class="uk-form-row"> 13 <div class="uk-form-row">
14 <label class="uk-form-label">班次类型</label> 14 <label class="uk-form-label">班次类型</label>
15 <div class="uk-form-controls"> 15 <div class="uk-form-controls">
16 - <select class="form-control nt-dictionary" name="bcType" data-code="{{bcType}}" data-group=ScheduleType></select> 16 + <select class="form-control nt-dictionary" name="bcType" data-code="{{bcType}}"
  17 + data-group=ScheduleType></select>
17 </div> 18 </div>
18 </div> 19 </div>
19 </div> 20 </div>
@@ -22,8 +23,8 @@ @@ -22,8 +23,8 @@
22 <label class="uk-form-label">上下行</label> 23 <label class="uk-form-label">上下行</label>
23 <div class="uk-form-controls"> 24 <div class="uk-form-controls">
24 <select name="xlDir"> 25 <select name="xlDir">
25 - <option value="0">上行</option>  
26 - <option value="1">下行</option> 26 + <option value="0">上行</option>
  27 + <option value="1">下行</option>
27 </select> 28 </select>
28 </div> 29 </div>
29 </div> 30 </div>
@@ -35,7 +36,7 @@ @@ -35,7 +36,7 @@
35 <label class="uk-form-label">起点站</label> 36 <label class="uk-form-label">起点站</label>
36 <div class="uk-form-controls"> 37 <div class="uk-form-controls">
37 <select name="qdzCode" required> 38 <select name="qdzCode" required>
38 - </select> 39 + </select>
39 </div> 40 </div>
40 </div> 41 </div>
41 </div> 42 </div>
@@ -44,7 +45,7 @@ @@ -44,7 +45,7 @@
44 <label class="uk-form-label">终点站</label> 45 <label class="uk-form-label">终点站</label>
45 <div class="uk-form-controls"> 46 <div class="uk-form-controls">
46 <select name="zdzCode" required> 47 <select name="zdzCode" required>
47 - </select> 48 + </select>
48 </div> 49 </div>
49 </div> 50 </div>
50 </div> 51 </div>
@@ -82,7 +83,8 @@ @@ -82,7 +83,8 @@
82 <div class="uk-form-row"> 83 <div class="uk-form-row">
83 <label class="uk-form-label">里程</label> 84 <label class="uk-form-label">里程</label>
84 <div class="uk-form-controls"> 85 <div class="uk-form-controls">
85 - <input type="text" name="jhlc" value="{{jhlc}}" max=222 data-fv-lessthan-inclusive="false" required> 86 + <input type="text" name="jhlc" value="{{jhlc}}" max=222 data-fv-lessthan-inclusive="false"
  87 + required>
86 </div> 88 </div>
87 </div> 89 </div>
88 </div> 90 </div>
@@ -90,7 +92,8 @@ @@ -90,7 +92,8 @@
90 <div class="uk-grid"> 92 <div class="uk-grid">
91 <div class="uk-width-1-2"> 93 <div class="uk-width-1-2">
92 <div class="uk-form-row"> 94 <div class="uk-form-row">
93 - <label class="uk-form-label">驾驶员 <!--<i class="uk-icon-question-circle" data-uk-tooltip title="如果有驾驶员未提示,请至后台“基础信息 -人员信息”里纠正该员工的“工种”类别 "></i>--></label> 95 + <label class="uk-form-label">驾驶员
  96 + <!--<i class="uk-icon-question-circle" data-uk-tooltip title="如果有驾驶员未提示,请至后台“基础信息 -人员信息”里纠正该员工的“工种”类别 "></i>--></label>
94 <div class="uk-form-controls"> 97 <div class="uk-form-controls">
95 <div class="uk-autocomplete uk-form jsy-autocom"> 98 <div class="uk-autocomplete uk-form jsy-autocom">
96 <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required> 99 <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required>
@@ -116,101 +119,139 @@ @@ -116,101 +119,139 @@
116 </script> 119 </script>
117 120
118 <script> 121 <script>
119 - (function() { 122 + (function () {
120 var modal = '#schedule-addsch-modal', 123 var modal = '#schedule-addsch-modal',
121 - sch, stationRoutes, parks, information;  
122 - $(modal).on('init', function(e, data) { 124 + sch, stationRoutes, parks, information;
  125 +
  126 + var normalInfo = [];
  127 + $(modal).on('init', function (e, data) {
123 sch = data.sch; 128 sch = data.sch;
  129 + //normal 班次里程和耗时
  130 + var list = gb_common.get_vals(gb_schedule_table.findScheduleByLine(sch.xlBm));
  131 + var upPlan = getNormalSch(list, 0)
  132 + , downPlan = getNormalSch(list, 1);
  133 + normalInfo[0] = {time: upPlan.bcsj, mileage: upPlan.jhlc};
  134 + normalInfo[1] = {time: downPlan.bcsj, mileage: downPlan.jhlc};
  135 +
  136 +
124 var formHtml = template('schedule-addsch-form-temp', sch); 137 var formHtml = template('schedule-addsch-form-temp', sch);
125 $('form', modal).html(formHtml); 138 $('form', modal).html(formHtml);
126 //字典转换 139 //字典转换
127 dictionaryUtils.transformDom($('.nt-dictionary', modal)); 140 dictionaryUtils.transformDom($('.nt-dictionary', modal));
128 141
129 //----------- Autocomplete -------------- 142 //----------- Autocomplete --------------
130 - $.get('/basic/cars', function(rs) { 143 + $.get('/basic/cars', function (rs) {
131 //车辆 144 //车辆
132 gb_common.carAutocomplete($('.car-autocom', modal), rs); 145 gb_common.carAutocomplete($('.car-autocom', modal), rs);
133 }); 146 });
134 - //$.get('/basic/all_personnel', function(rs) {  
135 - //驾驶员  
136 - gb_common.personAutocomplete($('.jsy-autocom', modal));  
137 - //售票员  
138 - gb_common.personAutocomplete($('.spy-autocom', modal));  
139 - //}); 147 + //驾驶员
  148 + gb_common.personAutocomplete($('.jsy-autocom', modal));
  149 +
  150 + //售票员
  151 + gb_common.personAutocomplete($('.spy-autocom', modal));
140 152
141 //站点路由 153 //站点路由
142 - stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){  
143 - return a.stationRouteCode-b.stationRouteCode; 154 + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) {
  155 + return a.stationRouteCode - b.stationRouteCode;
144 }), 'directions'); 156 }), 'directions');
145 //停车场 157 //停车场
146 - $.get('/basic/parks', function(rs){  
147 - parks=rs; 158 + $.get('/basic/parks', function (rs) {
  159 + parks = rs;
148 }); 160 });
149 //线路标准 161 //线路标准
150 - information=gb_data_basic.getLineInformation(sch.xlBm); 162 + information = gb_data_basic.getLineInformation(sch.xlBm);
151 163
152 //submit 164 //submit
153 var f = $('form', modal).formValidation(gb_form_validation_opts); 165 var f = $('form', modal).formValidation(gb_form_validation_opts);
154 - f.on('success.form.fv', function(e) { 166 + f.on('success.form.fv', function (e) {
155 disabled_submit_btn(this); 167 disabled_submit_btn(this);
156 e.preventDefault(); 168 e.preventDefault();
157 var data = $(this).serializeJSON(); 169 var data = $(this).serializeJSON();
158 - data.xlBm=sch.xlBm;  
159 - data.xlName=sch.xlName;  
160 - data.lpName=sch.lpName; 170 + data.xlBm = sch.xlBm;
  171 + data.xlName = sch.xlName;
  172 + data.lpName = sch.lpName;
161 //拆分驾驶员工号和姓名 173 //拆分驾驶员工号和姓名
162 data.jGh = data.jsy.split('/')[0]; 174 data.jGh = data.jsy.split('/')[0];
163 data.jName = data.jsy.split('/')[1]; 175 data.jName = data.jsy.split('/')[1];
164 delete data.jsy; 176 delete data.jsy;
165 //拆分售票员工号和姓名 177 //拆分售票员工号和姓名
166 - if(data.sGh != null){  
167 - data.sGh = data.spy.split('/')[0];  
168 - data.sName = data.spy.split('/')[1];  
169 - delete data.spy; 178 + if (data.sGh != null) {
  179 + data.sGh = data.spy.split('/')[0];
  180 + data.sName = data.spy.split('/')[1];
  181 + delete data.spy;
170 } 182 }
171 183
172 - gb_common.$post('/realSchedule', data, function(rs){  
173 - //插入  
174 - gb_schedule_table.insertSchedule(rs.t, rs.ts);  
175 - $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});  
176 - UIkit.modal(modal).hide();  
177 - notify_succ('新增临加班次成功'); 184 + gb_common.$post('/realSchedule', data, function (rs) {
  185 + //插入
  186 + gb_schedule_table.insertSchedule(rs.t, rs.ts);
  187 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});
  188 + UIkit.modal(modal).hide();
  189 + notify_succ('新增临加班次成功');
178 }); 190 });
179 }); 191 });
180 192
181 //班次类型 和 上下行切换 193 //班次类型 和 上下行切换
182 - $('[name=bcType],[name=xlDir]', f).on('change', function(){  
183 - var bcType_e=$('[name=bcType]', f)  
184 - , xlDir_e=$('[name=xlDir]', f);  
185 -  
186 - var routes=stationRoutes[xlDir_e.val()]  
187 - ,lastCode=routes[routes.length-1].stationCode  
188 - ,opts='',park_opts='';  
189 - //station options  
190 - $.each(routes, function(){  
191 - opts+='<option value="'+this.stationCode+'">'+this.stationName+'</option>'  
192 - });  
193 - //park options  
194 - for(var code in parks)  
195 - park_opts+='<option value="'+code+'">'+parks[code]+'</option>';  
196 -  
197 - var qdz=$('[name=qdzCode]', f),zdz=$('[name=zdzCode]', f);  
198 - switch (bcType_e.val()) {  
199 - case 'out':  
200 - qdz.html(park_opts).val(information.carPark);  
201 - zdz.html(opts);  
202 - break;  
203 - case 'in':  
204 - qdz.html(opts);  
205 - zdz.html(park_opts).val(information.carPark);  
206 - break;  
207 - default:  
208 - qdz.html(opts);  
209 - zdz.html(opts).val(lastCode);  
210 - } 194 + $('[name=bcType],[name=xlDir]', f).on('change', function () {
  195 + var bcType_e = $('[name=bcType]', f)
  196 + , xlDir_e = $('[name=xlDir]', f);
  197 +
  198 + var routes = stationRoutes[xlDir_e.val()]
  199 + , lastCode = routes[routes.length - 1].stationCode
  200 + , opts = '', park_opts = '';
  201 + //station options
  202 + $.each(routes, function () {
  203 + opts += '<option value="' + this.stationCode + '">' + this.stationName + '</option>'
  204 + });
  205 + //park options
  206 + for (var code in parks)
  207 + park_opts += '<option value="' + code + '">' + parks[code] + '</option>';
  208 +
  209 + var qdz = $('[name=qdzCode]', f), zdz = $('[name=zdzCode]', f);
  210 + var time, mileage;
  211 + switch (bcType_e.val()) {
  212 + case 'out':
  213 + qdz.html(park_opts).val(information.carPark);
  214 + zdz.html(opts);
  215 + //出场结束时间
  216 + time = xlDir_e.val() == 0 ? information.upOutTimer : information.downOutTimer;
  217 + mileage = xlDir_e.val() == 0 ? information.upOutMileage : information.downOutMileage;
  218 + break;
  219 + case 'in':
  220 + qdz.html(opts);
  221 + zdz.html(park_opts).val(information.carPark);
  222 + //进场结束时间
  223 + time = xlDir_e.val() == 0 ? information.upInTimer : information.downInTimer;
  224 + mileage = xlDir_e.val() == 0 ? information.upInMileage : information.downInMileage;
  225 + break;
  226 + default:
  227 + qdz.html(opts);
  228 + zdz.html(opts).val(lastCode);
  229 + time = xlDir_e.val() == 0?normalInfo[0].time:normalInfo[1].time;
  230 + mileage = xlDir_e.val() == 0?normalInfo[0].mileage:normalInfo[1].mileage;
  231 + }
  232 +
  233 + setEndTime(time);
  234 + $('[name=jhlc]', f).val(mileage);
211 }).trigger('change'); 235 }).trigger('change');
212 236
  237 +
  238 + function setEndTime(diff) {
  239 + var et = moment($('[name=fcsj]', f).val(), 'HH:mm').add(diff, 'minutes').format('HH:mm');
  240 + $('[name=zdsj]', f).val(et);
  241 + }
213 }); 242 });
  243 +
  244 + function getNormalSch(list, updown) {
  245 + var sch;
  246 + $.each(list, function () {
  247 + if (this.bcType == 'normal' && this.xlDir == updown) {
  248 + sch = this;
  249 + return false;
  250 + }
  251 + });
  252 +
  253 + return sch;
  254 + }
214 })(); 255 })();
215 </script> 256 </script>
216 </div> 257 </div>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
@@ -18,13 +18,17 @@ @@ -18,13 +18,17 @@
18 <div class="uk-form-row"> 18 <div class="uk-form-row">
19 <label class="uk-form-label" style="width: 50px;">路牌</label> 19 <label class="uk-form-label" style="width: 50px;">路牌</label>
20 <div class="uk-form-controls" style="margin-left: 51px;"> 20 <div class="uk-form-controls" style="margin-left: 51px;">
21 - <select name="lpName"></select> 21 + <select name="lpName" style="width: 120px;"></select>
  22 + <i class="uk-icon-plus add-temp-lp-icon" title="临加路牌" data-uk-tooltip></i>
22 </div> 23 </div>
23 </div> 24 </div>
24 </div> 25 </div>
25 <div class="uk-width-1-3"> 26 <div class="uk-width-1-3">
26 <div class="uk-form-row"> 27 <div class="uk-form-row">
27 - <i class="uk-icon-plus add-temp-sch-icon" title="新增临加班次" data-uk-tooltip></i> 28 + <!--<i class="uk-icon-plus add-temp-sch-icon" title="新增临加班次" data-uk-tooltip></i>-->
  29 + <!--<button class="uk-button uk-button-primary add-temp-sch-icon">临加班次</button>-->
  30 + <!--<a class="uk-button add-temp-sch-icon"><i class="uk-icon-plus"></i> 临加班次</a>-->
  31 + <a class="uk-button uk-button-link add-temp-sch-icon"> 临加班次</a>
28 </div> 32 </div>
29 </div> 33 </div>
30 </div> 34 </div>
@@ -51,7 +55,9 @@ @@ -51,7 +55,9 @@
51 </div> 55 </div>
52 56
53 <div class="uk-panel uk-panel-box uk-panel-box-secondary" style="padding-bottom: 0;"> 57 <div class="uk-panel uk-panel-box uk-panel-box-secondary" style="padding-bottom: 0;">
54 - <h3 class="uk-panel-title">子任务列表</h3> 58 + <h3 class="uk-panel-title" id="childTaskTitle">
  59 + 子任务列表
  60 + </h3>
55 <div class="ct_table_wrap ct_table_no_border" style="height: 142px;"> 61 <div class="ct_table_wrap ct_table_no_border" style="height: 142px;">
56 <div class="ct_table sub-task-table"> 62 <div class="ct_table sub-task-table">
57 <div class="ct_table_head"> 63 <div class="ct_table_head">
@@ -131,6 +137,12 @@ @@ -131,6 +137,12 @@
131 </dl> 137 </dl>
132 {{/each}} 138 {{/each}}
133 </script> 139 </script>
  140 +
  141 + <script id="sub_task-fail-status-temp" type="text/html">
  142 + <div class="child-task-status fail"><i class="uk-icon-times-circle"></i> 营运里程 与主任务不符,请检查子任务
  143 + <span class="calc-detail">{{calcs}}</span></div>
  144 + </script>
  145 +
134 <script> 146 <script>
135 (function () { 147 (function () {
136 var modal_opts = {center: false, bgclose: false, modal: false} 148 var modal_opts = {center: false, bgclose: false, modal: false}
@@ -140,6 +152,7 @@ @@ -140,6 +152,7 @@
140 s_t_body = '.sub-task-table .ct_table_body', 152 s_t_body = '.sub-task-table .ct_table_body',
141 folder = '/real_control_v2/fragments/line_schedule/context_menu', 153 folder = '/real_control_v2/fragments/line_schedule/context_menu',
142 sch, schList, lp2SchMap; 154 sch, schList, lp2SchMap;
  155 +
143 $(modal).on('init', function (e, data) { 156 $(modal).on('init', function (e, data) {
144 sch = data.sch; 157 sch = data.sch;
145 158
@@ -163,10 +176,16 @@ @@ -163,10 +176,16 @@
163 176
164 //路牌下拉框 177 //路牌下拉框
165 $('[name=lpName]', f).on('change', function () { 178 $('[name=lpName]', f).on('change', function () {
166 - var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort),  
167 - htmlBody = template('schedule-main-table-temp', {  
168 - list: list  
169 - }); 179 + var list = [];
  180 +
  181 + try {
  182 + list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort);
  183 +
  184 + } catch (e) {
  185 + }
  186 + var htmlBody = template('schedule-main-table-temp', {
  187 + list: list
  188 + });
170 $(m_t_body, modal).html(htmlBody); 189 $(m_t_body, modal).html(htmlBody);
171 $(s_t_body, modal).empty(); 190 $(s_t_body, modal).empty();
172 }); 191 });
@@ -218,7 +237,7 @@ @@ -218,7 +237,7 @@
218 if (opts && opts.sch) { 237 if (opts && opts.sch) {
219 selectedDl(opts.sch); 238 selectedDl(opts.sch);
220 } 239 }
221 - } 240 + };
222 241
223 //刷新子任务表格 242 //刷新子任务表格
224 var sub_task_update = function () { 243 var sub_task_update = function () {
@@ -230,7 +249,30 @@ @@ -230,7 +249,30 @@
230 tbody.html(htmlStr); 249 tbody.html(htmlStr);
231 //字典转换 250 //字典转换
232 dictionaryUtils.transformDom($('.nt-dictionary', tbody)); 251 dictionaryUtils.transformDom($('.nt-dictionary', tbody));
233 - } 252 +
  253 + //检查子任务营运里程
  254 + $('#childTaskTitle .child-task-status', modal).remove();
  255 + var i = 0;
  256 + if (sch.cTasks.length == 0)
  257 + return;
  258 + var sum = 0, calcs = '';
  259 + $.each(sch.cTasks, function () {
  260 + if (this.mileageType == 'service') {
  261 + sum = gb_common.accAdd(sum, this.mileage);
  262 + calcs += (' + ' + this.mileage);
  263 + i++;
  264 + }
  265 + });
  266 + //公里与主任务不符合
  267 + if (sum != sch.jhlc) {
  268 + if (i > 1)
  269 + calcs += ('=' + sum);
  270 + calcs += (' ≠ ' + sch.jhlc);
  271 + calcs = calcs.substr(3);
  272 + var htmlStr = template('sub_task-fail-status-temp', {calcs: calcs});
  273 + $('#childTaskTitle', modal).append(htmlStr);
  274 + }
  275 + };
234 276
235 //新增临加 277 //新增临加
236 var add_temp_sch = function () { 278 var add_temp_sch = function () {
@@ -241,7 +283,7 @@ @@ -241,7 +283,7 @@
241 open_modal(folder + '/add_temp_sch.html', { 283 open_modal(folder + '/add_temp_sch.html', {
242 sch: sch 284 sch: sch
243 }, modal_opts); 285 }, modal_opts);
244 - } 286 + };
245 287
246 //删除临加班次 288 //删除临加班次
247 var remove_sch = function () { 289 var remove_sch = function () {
@@ -254,7 +296,6 @@ @@ -254,7 +296,6 @@
254 //前端数据更新 296 //前端数据更新
255 gb_schedule_table.updateSchedule(rs.ts); 297 gb_schedule_table.updateSchedule(rs.ts);
256 gb_schedule_table.deheteSchedule(rs.delete); 298 gb_schedule_table.deheteSchedule(rs.delete);
257 - //m_s_table_update();  
258 $('.main-schedule-table', modal).trigger('refresh'); 299 $('.main-schedule-table', modal).trigger('refresh');
259 }); 300 });
260 }, '确定删除'); 301 }, '确定删除');
@@ -359,6 +400,21 @@ @@ -359,6 +400,21 @@
359 gb_ct_table.fixedHead($('.ct_table_wrap', modal)); 400 gb_ct_table.fixedHead($('.ct_table_wrap', modal));
360 401
361 $('.add-temp-sch-icon', modal).on('click', add_temp_sch); 402 $('.add-temp-sch-icon', modal).on('click', add_temp_sch);
  403 + //临加路牌
  404 + $('.add-temp-lp-icon', modal).on('click', function () {
  405 + var index = 0, max;
  406 + for (var lp in lp2SchMap) {
  407 + if (lp.indexOf('临') != -1) {
  408 + max = lp.substr(lp.indexOf('临') + 1);
  409 + if (!isNaN(max))
  410 + index = parseInt(max);
  411 + }
  412 + }
  413 +
  414 + var lpName = '临' + (index + 1);
  415 + lp2SchMap[lpName] = [];
  416 + $('[name=lpName]', f).append('<option value="' + lpName + '">' + lpName + '</option>').val(lpName).trigger('change');
  417 + });
362 418
363 function sub_task_sort(a, b) { 419 function sub_task_sort(a, b) {
364 return a.id - b.id; 420 return a.id - b.id;
src/main/resources/static/real_control_v2/js/data/data_gps.js
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 var gb_data_gps = (function() { 3 var gb_data_gps = (function() {
4 4
5 //fixed time refresh delay 5 //fixed time refresh delay
6 - var delay = 1000 * 60; 6 + var delay = 1000 * 6;
7 //deviceId ——> gps 7 //deviceId ——> gps
8 var realData = {}; 8 var realData = {};
9 //refresh after callback 9 //refresh after callback
@@ -15,12 +15,6 @@ var gb_data_gps = (function() { @@ -15,12 +15,6 @@ var gb_data_gps = (function() {
15 }; 15 };
16 16
17 var refresh = function(cb) { 17 var refresh = function(cb) {
18 - /*$.get('/gps/real/line', {  
19 - lineCodes: gb_data_basic.line_idx  
20 - }, function(rs) {  
21 - refreshData(rs);  
22 - cb();  
23 - });*/  
24 $.ajax({ 18 $.ajax({
25 url: '/gps/real/line', 19 url: '/gps/real/line',
26 data:{lineCodes: gb_data_basic.line_idx}, 20 data:{lineCodes: gb_data_basic.line_idx},
@@ -30,7 +24,7 @@ var gb_data_gps = (function() { @@ -30,7 +24,7 @@ var gb_data_gps = (function() {
30 }, 24 },
31 error: function (xr, t) { 25 error: function (xr, t) {
32 notify_err('刷新GPS失败,稍后重试' + t); 26 notify_err('刷新GPS失败,稍后重试' + t);
33 - //cb(); 27 + cb();
34 } 28 }
35 }); 29 });
36 }; 30 };
@@ -50,9 +44,7 @@ var gb_data_gps = (function() { @@ -50,9 +44,7 @@ var gb_data_gps = (function() {
50 upArr.push(this); 44 upArr.push(this);
51 } else 45 } else
52 addArr.push(this); 46 addArr.push(this);
53 - //起终点 拼接方向标识  
54 - /*if(this.sEPoint)  
55 - this.stopNo=this.stopNo+'_'+this.upDown;*/ 47 +
56 //时间格式化 48 //时间格式化
57 this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss'); 49 this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss');
58 realData[this.deviceId] = this; 50 realData[this.deviceId] = this;
@@ -86,15 +78,15 @@ var gb_data_gps = (function() { @@ -86,15 +78,15 @@ var gb_data_gps = (function() {
86 rs.push(realData[device]); 78 rs.push(realData[device]);
87 } 79 }
88 return rs; 80 return rs;
89 - } 81 + };
90 82
91 var findOne = function(deviceId){ 83 var findOne = function(deviceId){
92 return realData[deviceId]; 84 return realData[deviceId];
93 - } 85 + };
94 86
95 var findGpsByNbbm = function(nbbm){ 87 var findGpsByNbbm = function(nbbm){
96 return realData[gb_data_basic.nbbm2deviceMap()[nbbm]]; 88 return realData[gb_data_basic.nbbm2deviceMap()[nbbm]];
97 - } 89 + };
98 90
99 return { 91 return {
100 fixedTimeRefresh: fixedTimeRefresh, 92 fixedTimeRefresh: fixedTimeRefresh,
src/main/resources/static/real_control_v2/js/data/gps_signal_state.js 0 → 100644
  1 +/** gps 信号状态,无效 | 掉线 | 越界 | 超速 */
  2 +
  3 +var gb_gps_signal_state = (function () {
  4 +
  5 + //无效的gps
  6 + var signalInvalid = function (gps) {
  7 + return gps.lat == 0 || gps.lon == 0;
  8 + };
  9 +
  10 +})();
0 \ No newline at end of file 11 \ No newline at end of file
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
1 /* line schedule table context menu*/ 1 /* line schedule table context menu*/
2 2
3 -var gb_schedule_context_menu = (function() { 3 +var gb_schedule_context_menu = (function () {
4 4
5 var modal_opts = { 5 var modal_opts = {
6 center: false, 6 center: false,
@@ -8,35 +8,38 @@ var gb_schedule_context_menu = (function() { @@ -8,35 +8,38 @@ var gb_schedule_context_menu = (function() {
8 }, 8 },
9 folder = '/real_control_v2/fragments/line_schedule/context_menu'; 9 folder = '/real_control_v2/fragments/line_schedule/context_menu';
10 var callbackHandler = { 10 var callbackHandler = {
11 - dftz: function(sch) { 11 + dftz: function (sch) {
12 open_modal(folder + '/dftz.html', { 12 open_modal(folder + '/dftz.html', {
13 sch: sch 13 sch: sch
14 }, modal_opts); 14 }, modal_opts);
15 }, 15 },
16 - multi_tzrc: function(schArray) { 16 + multi_tzrc: function (schArray) {
17 open_modal(folder + '/multi_tzrc.html', { 17 open_modal(folder + '/multi_tzrc.html', {
18 list: schArray 18 list: schArray
19 }, modal_opts); 19 }, modal_opts);
20 }, 20 },
21 - multi_dftz: function(schArray) { 21 + multi_dftz: function (schArray) {
  22 + var list = schArray.filter(function (sch) {
  23 + return sch.bcType != 'out' && sch.bcType != 'in' && sch.fcsjActual == null;
  24 + });
22 open_modal(folder + '/multi_dftz.html', { 25 open_modal(folder + '/multi_dftz.html', {
23 - list: schArray 26 + list: list
24 }, modal_opts); 27 }, modal_opts);
25 }, 28 },
26 - jhlb: function(sch) { 29 + jhlb: function (sch) {
27 open_modal(folder + '/jhlb.html', { 30 open_modal(folder + '/jhlb.html', {
28 sch: sch 31 sch: sch
29 }, modal_opts); 32 }, modal_opts);
30 }, 33 },
31 - cxlb: function(sch) { 34 + cxlb: function (sch) {
32 if (!sch.destroy) 35 if (!sch.destroy)
33 return notify_err('烂掉的班次才能执行此操作!'); 36 return notify_err('烂掉的班次才能执行此操作!');
34 37
35 var content = '<h3>确定要撤销<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>的烂班设置?</h3>' 38 var content = '<h3>确定要撤销<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>的烂班设置?</h3>'
36 - alt_confirm(content, function() { 39 + alt_confirm(content, function () {
37 gb_common.$post('/realSchedule/revokeDestroy', { 40 gb_common.$post('/realSchedule/revokeDestroy', {
38 id: sch.id 41 id: sch.id
39 - }, function(rs) { 42 + }, function (rs) {
40 gb_schedule_table.updateSchedule(rs.t); 43 gb_schedule_table.updateSchedule(rs.t);
41 notify_succ('撤销烂班操作成功!'); 44 notify_succ('撤销烂班操作成功!');
42 45
@@ -45,20 +48,20 @@ var gb_schedule_context_menu = (function() { @@ -45,20 +48,20 @@ var gb_schedule_context_menu = (function() {
45 }); 48 });
46 }, '确认撤销'); 49 }, '确认撤销');
47 }, 50 },
48 - sftz: function(sch) { 51 + sftz: function (sch) {
49 open_modal(folder + '/sftz.html', { 52 open_modal(folder + '/sftz.html', {
50 sch: sch 53 sch: sch
51 }, modal_opts); 54 }, modal_opts);
52 }, 55 },
53 - cxsf: function(sch) { 56 + cxsf: function (sch) {
54 if (!sch.fcsjActual) 57 if (!sch.fcsjActual)
55 return notify_err('车辆未实发,无法执行该操作!'); 58 return notify_err('车辆未实发,无法执行该操作!');
56 59
57 var content = '<h3>确定要撤销<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>的实发时间?</h3>' 60 var content = '<h3>确定要撤销<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>的实发时间?</h3>'
58 - alt_confirm(content, function() { 61 + alt_confirm(content, function () {
59 gb_common.$post('/realSchedule/revokeRealOutgo', { 62 gb_common.$post('/realSchedule/revokeRealOutgo', {
60 id: sch.id 63 id: sch.id
61 - }, function(rs) { 64 + }, function (rs) {
62 gb_schedule_table.updateSchedule(rs.ts); 65 gb_schedule_table.updateSchedule(rs.ts);
63 notify_succ('撤销实发操作成功!'); 66 notify_succ('撤销实发操作成功!');
64 //calc 应发未发 67 //calc 应发未发
@@ -66,27 +69,27 @@ var gb_schedule_context_menu = (function() { @@ -66,27 +69,27 @@ var gb_schedule_context_menu = (function() {
66 }); 69 });
67 }, '确认撤销实发'); 70 }, '确认撤销实发');
68 }, 71 },
69 - fcxxwt: function(sch) { 72 + fcxxwt: function (sch) {
70 open_modal(folder + '/fcxxwt.html', { 73 open_modal(folder + '/fcxxwt.html', {
71 sch: sch 74 sch: sch
72 }, modal_opts); 75 }, modal_opts);
73 }, 76 },
74 - lj_zrw: function(sch) { 77 + lj_zrw: function (sch) {
75 open_modal(folder + '/lj_zrw.html', { 78 open_modal(folder + '/lj_zrw.html', {
76 sch: sch 79 sch: sch
77 }, modal_opts); 80 }, modal_opts);
78 }, 81 },
79 - tzrc: function(sch) { 82 + tzrc: function (sch) {
80 open_modal(folder + '/tzrc.html', { 83 open_modal(folder + '/tzrc.html', {
81 sch: sch 84 sch: sch
82 }, modal_opts); 85 }, modal_opts);
83 }, 86 },
84 - zlcf: function(sch) { 87 + zlcf: function (sch) {
85 var text = sch.clZbh + '重发调度指令? [路牌: ' + sch.lpName + ' 计划时间:' + sch.fcsj + ' 待发时间:' + sch.dfsj + ']'; 88 var text = sch.clZbh + '重发调度指令? [路牌: ' + sch.lpName + ' 计划时间:' + sch.fcsj + ' 待发时间:' + sch.dfsj + ']';
86 - alt_confirm(text, function() { 89 + alt_confirm(text, function () {
87 //走短语下发 90 //走短语下发
88 $.post('/directive/dispatch', {id: sch.id}, 91 $.post('/directive/dispatch', {id: sch.id},
89 - function(code) { 92 + function (code) {
90 if (code == 0) 93 if (code == 0)
91 notify_succ('发送指令成功'); 94 notify_succ('发送指令成功');
92 else 95 else
@@ -95,12 +98,12 @@ var gb_schedule_context_menu = (function() { @@ -95,12 +98,12 @@ var gb_schedule_context_menu = (function() {
95 }, '确定下发指令'); 98 }, '确定下发指令');
96 }, 99 },
97 jgtz: function (schArray) { 100 jgtz: function (schArray) {
98 - var idArr=[];  
99 - $.each(schArray, function(){  
100 - idArr.push(this.id); 101 + var idArr = [];
  102 + $.each(schArray, function () {
  103 + idArr.push(this.id);
101 }); 104 });
102 - var elem = UIkit.modal.prompt('请输入间隔(分钟)',0, function(newValue) {  
103 - if (!isNaN(newValue) && newValue>0) { 105 + var elem = UIkit.modal.prompt('请输入间隔(分钟)', 0, function (newValue) {
  106 + if (!isNaN(newValue) && newValue > 0) {
104 gb_common.$post_arr('/realSchedule/spaceAdjust', {ids: idArr, space: newValue}, function (rs) { 107 gb_common.$post_arr('/realSchedule/spaceAdjust', {ids: idArr, space: newValue}, function (rs) {
105 //刷新数据 108 //刷新数据
106 gb_schedule_table.updateSchedule(rs.ts); 109 gb_schedule_table.updateSchedule(rs.ts);
@@ -120,7 +123,7 @@ var gb_schedule_context_menu = (function() { @@ -120,7 +123,7 @@ var gb_schedule_context_menu = (function() {
120 $.contextMenu({ 123 $.contextMenu({
121 selector: '.line_schedule .ct_table_body dl:not([class="drag-active"])', 124 selector: '.line_schedule .ct_table_body dl:not([class="drag-active"])',
122 className: 'schedule-ct-menu', 125 className: 'schedule-ct-menu',
123 - callback: function(key, options) { 126 + callback: function (key, options) {
124 var $tbody = options.$trigger.parent(), 127 var $tbody = options.$trigger.parent(),
125 id = $('.context-menu-active', $tbody).data('id'), 128 id = $('.context-menu-active', $tbody).data('id'),
126 lineCode = $tbody.parents('li.line_schedule').data('id'), 129 lineCode = $tbody.parents('li.line_schedule').data('id'),
@@ -166,13 +169,13 @@ var gb_schedule_context_menu = (function() { @@ -166,13 +169,13 @@ var gb_schedule_context_menu = (function() {
166 $.contextMenu({ 169 $.contextMenu({
167 selector: '.line_schedule .ct_table_body dl.drag-active', 170 selector: '.line_schedule .ct_table_body dl.drag-active',
168 className: 'schedule-ct-menu', 171 className: 'schedule-ct-menu',
169 - callback: function(key, options) { 172 + callback: function (key, options) {
170 var $tbody = options.$trigger.parent(), 173 var $tbody = options.$trigger.parent(),
171 lineCode = $tbody.parents('li.line_schedule').data('id'), 174 lineCode = $tbody.parents('li.line_schedule').data('id'),
172 schArray = [], 175 schArray = [],
173 all = gb_schedule_table.findScheduleByLine(lineCode); 176 all = gb_schedule_table.findScheduleByLine(lineCode);
174 177
175 - $tbody.find('dl.drag-active').each(function() { 178 + $tbody.find('dl.drag-active').each(function () {
176 schArray.push(all[$(this).data('id')]); 179 schArray.push(all[$(this).data('id')]);
177 }); 180 });
178 181
src/main/resources/static/real_control_v2/js/main.js
1 -//主调和监控模式  
2 -var operationMode = window.localStorage.getItem('operationMode');  
3 -if (operationMode == 0) {  
4 - $('body>.north').addClass('monitor');  
5 - $(document).on('ajaxSend', interceptPOST);  
6 -}  
7 -else  
8 - $('body>.north').addClass('main');  
9 -  
10 -//拦截POST请求  
11 -function interceptPOST(e, xhr, t) {  
12 - if (t && (t.method == 'POST' || t.type == 'POST')) {  
13 - console.log(e, xhr, t);  
14 - xhr.abort();  
15 - notify_err('监控模式!');  
16 - }  
17 -}  
18 1
19 /* main js */ 2 /* main js */
20 var gb_main_ep = new EventProxy(), 3 var gb_main_ep = new EventProxy(),
src/main/resources/static/real_control_v2/js/north/toolbar.js
1 /* main.html north toolbar js */ 1 /* main.html north toolbar js */
2 2
3 -var gb_northToolbar = (function() { 3 +var gb_northToolbar = (function () {
4 4
5 - var modal_opts={center: true,bgclose: false};  
6 - var currentUser; 5 + var modal_opts = {center: true, bgclose: false};
  6 + var currentUser;
7 7
8 - $.get('/real_control_v2/fragments/north/toolbar.html', function(temp){  
9 - ep.emit("template", temp);  
10 - }); 8 + $.get('/real_control_v2/fragments/north/toolbar.html', function (temp) {
  9 + ep.emit("template", temp);
  10 + });
  11 +
  12 + $.get('/real_control_v2/js/data/json/north_toolbar.json', function (data) {
  13 + ep.emit("data", data);
  14 + });
11 15
12 - $.get('/real_control_v2/js/data/json/north_toolbar.json', function(data){  
13 - ep.emit("data", data);  
14 - }); 16 + //当前用户信息
  17 + $.get('/user/currentUser', function (user) {
  18 + ep.emit("user", user);
  19 + });
15 20
16 - //当前用户信息  
17 - $.get('/user/currentUser', function(user){  
18 - ep.emit("user", user);  
19 - }); 21 + var ep = EventProxy.create("template", "data", "user", function (temp, data, user) {
  22 + currentUser = user;
  23 + var t = $('#north-toolbar-temp', temp).html()
  24 + , htmlStr = template.render(t)({list: data, user: currentUser});
  25 + $('.north .north-toolbar').html(htmlStr);
20 26
21 - var ep = EventProxy.create("template", "data", "user" , function (temp, data, user) {  
22 - currentUser=user;  
23 - var t = $('#north-toolbar-temp', temp).html()  
24 - ,htmlStr = template.render(t)({list: data, user: currentUser});  
25 - $('.north .north-toolbar').html(htmlStr); 27 + //exit
  28 + $('.north .north-toolbar .exit-system').on('click', function () {
  29 + //关闭websocket 连接
  30 + gb_sch_websocket.sock.close();
  31 + window.location.href = '/pages/control/lineallot/allot.html';
  32 + });
  33 + });
26 34
27 - //exit  
28 - $('.north .north-toolbar .exit-system').on('click', function(){  
29 - //关闭websocket 连接  
30 - gb_sch_websocket.sock.close();  
31 - window.location.href='/pages/control/lineallot/allot.html'; 35 + $(document).on('click', '#north_toolbar_panel li.event a', function () {
  36 + var event = $(this).data('event');
  37 + handler[event] && handler[event]();
32 }); 38 });
33 - });  
34 39
35 - $(document).on('click', '#north_toolbar_panel li.event a', function(){  
36 - var event = $(this).data('event');  
37 - handler[event] && handler[event]();  
38 - }); 40 + var handler = {
  41 + // device report list
  42 + device_report: function () {
  43 + open_modal('/real_control_v2/fragments/north/nav/report_80.html', {}, modal_opts);
  44 + },
  45 + directive_history: function () {
  46 + open_modal('/real_control_v2/fragments/north/nav/directive_history.html', {}, modal_opts);
  47 + },
  48 + tts_config: function () {
  49 + open_modal('/real_control_v2/fragments/north/nav/tts_config.html', {}, modal_opts);
  50 + },
  51 + all_devices: function () {
  52 + open_modal('/real_control_v2/fragments/north/nav/all_devices.html', {}, modal_opts);
  53 + },
  54 + device_online_rate: function () {
  55 + open_modal('/real_control_v2/fragments/north/nav/charts/device_online_rate.html', {}, modal_opts);
  56 + },
  57 + turnout_rate: function () {
  58 + open_modal('/real_control_v2/fragments/north/nav/charts/car_out_rate.html', {}, modal_opts);
  59 + },
  60 + s_e_punctuality_rate: function () {
  61 + open_modal('/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate.html', {}, modal_opts);
  62 + },
  63 + s_e_punctuality_rate_line: function () {
  64 + open_modal('/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html', {}, modal_opts);
  65 + },
  66 + history_sch_maintain: function () {
  67 + open_modal('/real_control_v2/fragments/north/nav/history_sch_maintain.html', {}, {
  68 + center: false,
  69 + bgclose: false
  70 + });
  71 + },
  72 + sch_exec_rate: function () {
  73 + open_modal('/real_control_v2/fragments/north/nav/charts/sch_exec_rate.html', {}, modal_opts);
  74 + },
  75 + gps_play_back: function () {
  76 + gb_map_play_back.initParams();
  77 + },
  78 + signal_state: function () {
  79 + open_modal('/real_control_v2/fragments/north/nav/signal_state_config.html', {}, modal_opts);
  80 + }
  81 + }
39 82
40 - var handler = {  
41 - // device report list  
42 - device_report: function(){  
43 - open_modal('/real_control_v2/fragments/north/nav/report_80.html', {}, modal_opts);  
44 - },  
45 - directive_history: function(){  
46 - open_modal('/real_control_v2/fragments/north/nav/directive_history.html', {}, modal_opts);  
47 - },  
48 - tts_config: function(){  
49 - open_modal('/real_control_v2/fragments/north/nav/tts_config.html', {}, modal_opts);  
50 - },  
51 - all_devices: function(){  
52 - open_modal('/real_control_v2/fragments/north/nav/all_devices.html', {}, modal_opts);  
53 - },  
54 - device_online_rate: function(){  
55 - open_modal('/real_control_v2/fragments/north/nav/charts/device_online_rate.html', {}, modal_opts);  
56 - },  
57 - turnout_rate: function () {  
58 - open_modal('/real_control_v2/fragments/north/nav/charts/car_out_rate.html', {}, modal_opts);  
59 - },  
60 - s_e_punctuality_rate: function () {  
61 - open_modal('/real_control_v2/fragments/north/nav/charts/strat_end_punctuality_rate.html', {}, modal_opts);  
62 - },  
63 - s_e_punctuality_rate_line: function () {  
64 - open_modal('/real_control_v2/fragments/north/nav/charts/s_e_punctuality_rate_line.html', {}, modal_opts);  
65 - },  
66 - history_sch_maintain: function () {  
67 - open_modal('/real_control_v2/fragments/north/nav/history_sch_maintain.html', {}, {center: false,bgclose: false});  
68 - },  
69 - sch_exec_rate: function () {  
70 - open_modal('/real_control_v2/fragments/north/nav/charts/sch_exec_rate.html', {}, modal_opts);  
71 - },  
72 - gps_play_back: function () {  
73 - gb_map_play_back.initParams();  
74 - },  
75 - signal_state: function () {  
76 - open_modal('/real_control_v2/fragments/north/nav/signal_state_config.html', {}, modal_opts); 83 + return {
  84 + user: function () {
  85 + return currentUser;
  86 + }
77 } 87 }
78 - }  
79 })(); 88 })();
src/main/resources/static/real_control_v2/js/utils/dispatch_pattern.js 0 → 100644
  1 +/** 调度模式 */
  2 +
  3 +//主调和监控模式
  4 +var operationMode = window.localStorage.getItem('operationMode');
  5 +if (operationMode == 0) {
  6 + $('body>.north').addClass('monitor');
  7 + $(document).on('ajaxSend', interceptPOST);
  8 +}
  9 +else
  10 + $('body>.north').addClass('main');
  11 +
  12 +//拦截POST请求
  13 +function interceptPOST(e, xhr, t) {
  14 + if (t && (t.method == 'POST' || t.type == 'POST')) {
  15 + console.log(e, xhr, t);
  16 + xhr.abort();
  17 + notify_err('监控模式!');
  18 + }
  19 +}
  20 +
  21 +
  22 +//10分钟后提交当班调度数据
  23 +setTimeout(function () {
  24 + debugger
  25 + var user = gb_northToolbar.user();
  26 + var data = {
  27 + uId: user.id,
  28 + uName: user.userName,
  29 + codeIdx: gb_data_basic.line_idx + ',',
  30 + main: operationMode
  31 + };
  32 +
  33 + gb_common.$post('/dutyEmployee', data);
  34 +}, 1000 * 60 * 10);
0 \ No newline at end of file 35 \ No newline at end of file
src/main/resources/static/real_control_v2/js/utils/svg_chart.js
@@ -200,7 +200,7 @@ var gb_svg_chart = (function () { @@ -200,7 +200,7 @@ var gb_svg_chart = (function () {
200 var len = (d.nbbm == false ? 0 : d.nbbm.length) 200 var len = (d.nbbm == false ? 0 : d.nbbm.length)
201 , t = len > 3 ? d.nbbm.substr(len - 3) : d.nbbm; 201 , t = len > 3 ? d.nbbm.substr(len - 3) : d.nbbm;
202 202
203 - if (d.nbbm.indexOf('-') > 1) { 203 + if (d.nbbm.indexOf('-') > 0) {
204 t = d.nbbm.substr(d.nbbm.indexOf('-') - 1, 1) + t; 204 t = d.nbbm.substr(d.nbbm.indexOf('-') - 1, 1) + t;
205 } 205 }
206 return t; 206 return t;
src/main/resources/static/real_control_v2/js/utils/svg_data_convert.js
@@ -29,7 +29,7 @@ var gb_svg_data_convert = (function() { @@ -29,7 +29,7 @@ var gb_svg_data_convert = (function() {
29 var dIndex = station_indexof(down, upS, j); 29 var dIndex = station_indexof(down, upS, j);
30 if (dIndex == -1) { 30 if (dIndex == -1) {
31 op.type = 0; 31 op.type = 0;
32 - op.id = [upS.stationCode, -1]; 32 + op.id = [get_station_code(upS), -1];
33 //占位 33 //占位
34 down.splice(j, 0, {}); 34 down.splice(j, 0, {});
35 } else { 35 } else {
@@ -38,7 +38,7 @@ var gb_svg_data_convert = (function() { @@ -38,7 +38,7 @@ var gb_svg_data_convert = (function() {
38 data.push({ 38 data.push({
39 name: [temp.stationName], 39 name: [temp.stationName],
40 type: 1, 40 type: 1,
41 - id: [temp.stationCode] 41 + id: [get_station_code(temp)]
42 }); 42 });
43 } 43 }
44 //delete 44 //delete
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
@@ -94,6 +94,7 @@ var gb_sch_websocket = (function () { @@ -94,6 +94,7 @@ var gb_sch_websocket = (function () {
94 //到达终点 94 //到达终点
95 var zhongDian = function (msg) { 95 var zhongDian = function (msg) {
96 gb_schedule_table.updateSchedule(msg.t); 96 gb_schedule_table.updateSchedule(msg.t);
  97 + gb_schedule_table.updateSchedule(msg.nt);
97 msg.domId = 'zhongDian_' + msg.t.id + '_' + parseInt(Math.random() * 10000); 98 msg.domId = 'zhongDian_' + msg.t.id + '_' + parseInt(Math.random() * 10000);
98 99
99 var $item = $(temps['sys-note-42_1-temp'](msg)); 100 var $item = $(temps['sys-note-42_1-temp'](msg));
src/main/resources/static/real_control_v2/main.html
@@ -144,6 +144,7 @@ @@ -144,6 +144,7 @@
144 <script src="/real_control_v2/geolib/geolib.js"></script> 144 <script src="/real_control_v2/geolib/geolib.js"></script>
145 145
146 <script src="/real_control_v2/js/signal_state/signal_state.js"></script> 146 <script src="/real_control_v2/js/signal_state/signal_state.js"></script>
  147 + <script src="/real_control_v2/js/utils/dispatch_pattern.js"></script>
147 </body> 148 </body>
148 149
149 </html> 150 </html>
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
@@ -96,7 +96,7 @@ input[type=checkbox].disabled{ @@ -96,7 +96,7 @@ input[type=checkbox].disabled{
96 .real_bottom_panel{ 96 .real_bottom_panel{
97 97
98 position: absolute !important; 98 position: absolute !important;
99 - height: 256px; 99 + height: 192px;
100 bottom: 2px !important; 100 bottom: 2px !important;
101 background: #fff; 101 background: #fff;
102 box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 102 box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
src/main/resources/static/real_control_v2/mapmonitor/js/map/iMap.js
@@ -44,7 +44,7 @@ var gb_map_imap = (function () { @@ -44,7 +44,7 @@ var gb_map_imap = (function () {
44 return mapProxy; 44 return mapProxy;
45 }, 45 },
46 calcGpsMarkerWidth: function (nbbm) { 46 calcGpsMarkerWidth: function (nbbm) {
47 - var width = 0; 47 + /* var width = 0;
48 $.each(nbbm.split(''), function () { 48 $.each(nbbm.split(''), function () {
49 if (!isNaN(this)) 49 if (!isNaN(this))
50 width += 7;//icon_num_width[this]; 50 width += 7;//icon_num_width[this];
@@ -52,8 +52,8 @@ var gb_map_imap = (function () { @@ -52,8 +52,8 @@ var gb_map_imap = (function () {
52 width += 10; 52 width += 10;
53 else 53 else
54 width += 16; 54 width += 16;
55 - });  
56 - return width; 55 + });*/
  56 + return nbbm.length * 9.8;
57 } 57 }
58 }; 58 };
59 59