Commit 001a923a56d2f95029704f808e7ec6f259c2444f

Authored by 徐烜
2 parents f5fa9566 cdb2d69a

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

Showing 38 changed files with 1182 additions and 95 deletions
src/main/java/com/bsth/controller/gps/GpsController.java
... ... @@ -3,6 +3,8 @@ package com.bsth.controller.gps;
3 3 import com.bsth.data.BasicData;
4 4 import com.bsth.data.gpsdata_v2.GpsRealData;
5 5 import com.bsth.data.gpsdata_v2.entity.GpsEntity;
  6 +import com.bsth.data.gpsdata_v2.handlers.overspeed.GpsOverspeed;
  7 +import com.bsth.data.gpsdata_v2.handlers.overspeed.OverspeedProcess;
6 8 import com.bsth.service.gps.GpsService;
7 9 import com.bsth.service.gps.entity.GpsSpeed;
8 10 import com.google.common.base.Splitter;
... ... @@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
12 14 import javax.servlet.http.HttpServletResponse;
13 15 import java.text.ParseException;
14 16 import java.util.ArrayList;
  17 +import java.util.HashMap;
15 18 import java.util.List;
16 19 import java.util.Map;
17 20  
... ... @@ -25,6 +28,9 @@ public class GpsController {
25 28 @Autowired
26 29 GpsService gpsService;
27 30  
  31 + @Autowired
  32 + OverspeedProcess overspeedProcess;
  33 +
28 34 @RequestMapping(value = "/real/all")
29 35 public Map<String, Object> search(@RequestParam Map<String, Object> map,
30 36 @RequestParam(defaultValue = "0") int page,
... ... @@ -42,8 +48,17 @@ public class GpsController {
42 48 }
43 49  
44 50 @RequestMapping(value = "/real/line")
45   - public List<GpsEntity> findByLineCodes(@RequestParam String lineCodes) {
46   - return gpsRealData.get(Splitter.on(",").splitToList(lineCodes));
  51 + public Map<String, Object> findByLineCodes(@RequestParam String lineCodes) {
  52 + Map<String, Object> rs = new HashMap();
  53 + List<String> lineArray = Splitter.on(",").splitToList(lineCodes);
  54 + //实时gps
  55 + List<GpsEntity> gpsList = gpsRealData.get(lineArray);
  56 +
  57 + //超速信息
  58 + List<GpsOverspeed> overspeedList = overspeedProcess.findByLines(lineArray);
  59 + rs.put("gpsList", gpsList);
  60 + rs.put("overspeedList", overspeedList);
  61 + return rs;
47 62 }
48 63  
49 64 @RequestMapping(value = "/allDevices")
... ...
src/main/java/com/bsth/controller/oil/YlxxbController.java
... ... @@ -65,4 +65,16 @@ public class YlxxbController extends BaseController&lt;Ylxxb, Integer&gt;{
65 65 return list;
66 66 }
67 67  
  68 + @RequestMapping(value="/saveYlxxb",method = RequestMethod.POST)
  69 + public Map<String, Object> savejzl(@RequestParam Map<String, Object> map){
  70 + Map<String, Object> maps=new HashMap<>();
  71 + try {
  72 + maps = service.saveYlxxb(map);
  73 + } catch (Exception e) {
  74 + // TODO Auto-generated catch block
  75 + e.printStackTrace();
  76 + }
  77 + return maps;
  78 + }
  79 +
68 80 }
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -483,6 +483,11 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
483 483 public Map<String, Object> MapById(@RequestParam("id") Long id){
484 484 return scheduleRealInfoService.MapById(id);
485 485 }
  486 +
  487 + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET)
  488 + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){
  489 + return scheduleRealInfoService.MapByIdQp(id);
  490 + }
486 491  
487 492 /**
488 493 * @Title: scheduleDaily
... ...
src/main/java/com/bsth/data/gpsdata_v2/DataHandleProcess.java
1 1 package com.bsth.data.gpsdata_v2;
2 2  
  3 +import com.alibaba.fastjson.JSON;
3 4 import com.bsth.data.gpsdata_v2.cache.GpsCacheData;
4 5 import com.bsth.data.gpsdata_v2.entity.GpsEntity;
5 6 import com.bsth.data.gpsdata_v2.handlers.*;
... ... @@ -11,7 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
11 12 import org.springframework.stereotype.Component;
12 13  
13 14 import java.util.*;
14   -import java.util.concurrent.*;
  15 +import java.util.concurrent.CountDownLatch;
  16 +import java.util.concurrent.ExecutorService;
  17 +import java.util.concurrent.Executors;
15 18  
16 19 /**
17 20 * 实时信号数据处理
... ... @@ -38,7 +41,7 @@ public class DataHandleProcess {
38 41  
39 42 static Logger logger = LoggerFactory.getLogger(DataHandleProcess.class);
40 43  
41   - final static int POOL_SIZE = 25;
  44 + final static int POOL_SIZE = 20;
42 45  
43 46 static ExecutorService threadPool = Executors.newFixedThreadPool(POOL_SIZE + 1);
44 47 public static CountDownLatch count;
... ... @@ -73,9 +76,10 @@ public class DataHandleProcess {
73 76 logger.info("analyse gps size: " + list.size() + ", ks: " + ks.size());
74 77 count = new CountDownLatch(ks.size());
75 78  
76   - List<Future> fRs = new ArrayList<>(ks.size());
  79 + logger.info(JSON.toJSONString(ks));
77 80 for (Integer index : ks) {
78   - threadPool.submit(new SignalHandleThread(dataListMap.get(index), count));
  81 + //logger.info("execute index: " + index);
  82 + threadPool.execute(new SignalHandleThread(dataListMap.get(index), count));
79 83 }
80 84  
81 85  
... ... @@ -108,7 +112,13 @@ public class DataHandleProcess {
108 112 public void run() {
109 113 try {
110 114 Collections.sort(list, comp);
111   - for (GpsEntity gps : list) {
  115 + //logger.info("sort end --" + Thread.currentThread().getName() + " -list size: " + list.size());
  116 +
  117 + GpsEntity gps;
  118 + for(int i = 0,len = list.size(); i< len ;i ++){
  119 + gps = list.get(i);
  120 +
  121 + //logger.info("run |--" + Thread.currentThread().getName() + " -i: " + i);
112 122 try {
113 123 if (StringUtils.isEmpty(gps.getNbbm()))
114 124 continue;
... ... @@ -123,16 +133,21 @@ public class DataHandleProcess {
123 133 inStationProcess.process(gps);//进站
124 134 outStationProcess.process(gps);//出站
125 135  
  136 +
  137 + //logger.info("put start --" + Thread.currentThread().getName() + " -i: " + i);
126 138 GpsCacheData.putGps(gps);//历史gps缓存
127   - } catch (Exception e) {
  139 + //logger.info("put end --" + Thread.currentThread().getName() + " -i: " + i);
  140 + } catch (Throwable e) {
128 141 logger.error("", e);
129 142 }
130 143 }
131 144  
  145 + //logger.info("for end --" + Thread.currentThread().getName() + " -list size: " + list.size());
  146 +
132 147 } finally {
133 148 if (count != null)
134 149 count.countDown();
135   - logger.info(Thread.currentThread().getName() + " -countDown : " + count.getCount());
  150 + //logger.info(Thread.currentThread().getName() + " -countDown : " + count.getCount());
136 151 }
137 152 }
138 153 }
... ...
src/main/java/com/bsth/data/gpsdata_v2/handlers/AbnormalStateProcess.java
... ... @@ -3,8 +3,10 @@ package com.bsth.data.gpsdata_v2.handlers;
3 3 import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
4 4 import com.bsth.data.gpsdata_v2.entity.CtLineString;
5 5 import com.bsth.data.gpsdata_v2.entity.GpsEntity;
  6 +import com.bsth.data.gpsdata_v2.handlers.overspeed.OverspeedProcess;
6 7 import com.bsth.data.gpsdata_v2.utils.GeoUtils;
7 8 import com.bsth.util.Geo.Point;
  9 +import org.springframework.beans.factory.annotation.Autowired;
8 10 import org.springframework.stereotype.Component;
9 11  
10 12 import java.util.List;
... ... @@ -17,19 +19,18 @@ import java.util.List;
17 19 public class AbnormalStateProcess {
18 20  
19 21 /**
20   - * 默认限速
21   - */
22   - private static final double DEFAULT_SPEED_LIMIT = 60;
23   - /**
24 22 * 越界阈值
25 23 */
26 24 private static final double OUT_BOUNDS_THRESHOLD = 100;
27 25  
  26 + @Autowired
  27 + OverspeedProcess overspeedProcess;
  28 +
28 29 public void process(GpsEntity gps) {
29 30 if (isOffline(gps))
30 31 return;
31 32  
32   - if (overspeed(gps))
  33 + if (overspeedProcess.process(gps))
33 34 return;
34 35  
35 36 if (outOfBounds((gps)))
... ... @@ -41,14 +42,14 @@ public class AbnormalStateProcess {
41 42 }
42 43  
43 44  
44   - /**
  45 +/* *//**
45 46 * 是否超速
46 47 *
47 48 * @param gps
48 49 * @return
49   - */
  50 +
50 51 private boolean overspeed(GpsEntity gps) {
51   - double maxSpeed = DEFAULT_SPEED_LIMIT;
  52 + *//*double maxSpeed = DEFAULT_SPEED_LIMIT;
52 53 if (GeoCacheData.speedLimit(gps.getLineId()) != null)
53 54 maxSpeed = GeoCacheData.speedLimit(gps.getLineId());
54 55  
... ... @@ -56,8 +57,9 @@ public class AbnormalStateProcess {
56 57 gps.setAbnormalStatus("overspeed");
57 58 return true;
58 59 }
59   - return false;
60   - }
  60 + return false;*//*
  61 + return overspeedProcess.process(gps);
  62 + }*/
61 63  
62 64  
63 65 /**
... ...
src/main/java/com/bsth/data/gpsdata_v2/handlers/overspeed/GpsOverspeed.java 0 → 100644
  1 +package com.bsth.data.gpsdata_v2.handlers.overspeed;
  2 +
  3 +/**
  4 + * gps 超速信息
  5 + * Created by panzhao on 2018/1/9.
  6 + */
  7 +public class GpsOverspeed {
  8 +
  9 + private String device;
  10 +
  11 + private String nbbm;
  12 +
  13 + private String lineCode;
  14 +
  15 + /**
  16 + * 开始超速时间 HH:mm
  17 + */
  18 + private String sts;
  19 +
  20 + private long st;
  21 +
  22 + /**
  23 + * 结束超速时间 HH:mm
  24 + */
  25 + private String ets;
  26 +
  27 + /**
  28 + * 最新速度值
  29 + */
  30 + private float speed;
  31 +
  32 + /**
  33 + * 0:结束超速, 1:离线
  34 + */
  35 + private int eType;
  36 +
  37 + public String getDevice() {
  38 + return device;
  39 + }
  40 +
  41 + public void setDevice(String device) {
  42 + this.device = device;
  43 + }
  44 +
  45 + public String getNbbm() {
  46 + return nbbm;
  47 + }
  48 +
  49 + public void setNbbm(String nbbm) {
  50 + this.nbbm = nbbm;
  51 + }
  52 +
  53 + public String getLineCode() {
  54 + return lineCode;
  55 + }
  56 +
  57 + public void setLineCode(String lineCode) {
  58 + this.lineCode = lineCode;
  59 + }
  60 +
  61 + public String getSts() {
  62 + return sts;
  63 + }
  64 +
  65 + public void setSts(String sts) {
  66 + this.sts = sts;
  67 + }
  68 +
  69 + public long getSt() {
  70 + return st;
  71 + }
  72 +
  73 + public void setSt(long st) {
  74 + this.st = st;
  75 + }
  76 +
  77 + public String getEts() {
  78 + return ets;
  79 + }
  80 +
  81 + public void setEts(String ets) {
  82 + this.ets = ets;
  83 + }
  84 +
  85 + public float getSpeed() {
  86 + return speed;
  87 + }
  88 +
  89 + public void setSpeed(float speed) {
  90 + this.speed = speed;
  91 + }
  92 +
  93 + public int geteType() {
  94 + return eType;
  95 + }
  96 +
  97 + public void seteType(int eType) {
  98 + this.eType = eType;
  99 + }
  100 +}
... ...
src/main/java/com/bsth/data/gpsdata_v2/handlers/overspeed/OverspeedProcess.java 0 → 100644
  1 +package com.bsth.data.gpsdata_v2.handlers.overspeed;
  2 +
  3 +import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
  4 +import com.bsth.data.gpsdata_v2.entity.GpsEntity;
  5 +import com.google.common.collect.ArrayListMultimap;
  6 +import org.joda.time.format.DateTimeFormat;
  7 +import org.joda.time.format.DateTimeFormatter;
  8 +import org.slf4j.Logger;
  9 +import org.slf4j.LoggerFactory;
  10 +import org.springframework.stereotype.Component;
  11 +
  12 +import java.util.*;
  13 +
  14 +/**
  15 + * 超速处理
  16 + * Created by panzhao on 2018/1/9.
  17 + */
  18 +@Component
  19 +public class OverspeedProcess {
  20 +
  21 +
  22 + private static final double DEFAULT_SPEED_LIMIT = 60;
  23 +
  24 + private static final double INVALID_SPEED_LIMIT = 110;
  25 +
  26 + private static final int CONT_SPEED_SIZE = 6;
  27 +
  28 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  29 +
  30 + private static GpsOverspeedComp comp = new GpsOverspeedComp();
  31 + /**
  32 + * 按线路分组的超速信息
  33 + */
  34 + private static ArrayListMultimap<String, GpsOverspeed> multimap;
  35 +
  36 + /**
  37 + * 设备号 --> 当前超速
  38 + */
  39 + private static Map<String, GpsOverspeed> realOverspeedMap;
  40 +
  41 + /**
  42 + * 设备号 --> 连续超速次数
  43 + */
  44 + private static Map<String, Integer> contSpeedMap;
  45 +
  46 + Logger logger = LoggerFactory.getLogger(this.getClass());
  47 +
  48 + static{
  49 + multimap = ArrayListMultimap.create();
  50 + contSpeedMap = new HashMap();
  51 + realOverspeedMap = new HashMap();
  52 + }
  53 +
  54 + public static void clear(){
  55 + multimap = null;
  56 + multimap = ArrayListMultimap.create();
  57 +
  58 + contSpeedMap = null;
  59 + contSpeedMap = new HashMap();
  60 +
  61 + realOverspeedMap = null;
  62 + realOverspeedMap = new HashMap();
  63 + }
  64 +
  65 + public boolean process(GpsEntity gps){
  66 + if(gps.getSpeed() >= INVALID_SPEED_LIMIT){
  67 + return false;//无效的速度
  68 + }
  69 +
  70 + Double maxSpeed = GeoCacheData.speedLimit(gps.getLineId());
  71 + if(null == maxSpeed)
  72 + maxSpeed = DEFAULT_SPEED_LIMIT;
  73 +
  74 + if(gps.getSpeed() > maxSpeed){
  75 + overspeed(gps, maxSpeed);
  76 + }
  77 + else if(realOverspeedMap.containsKey(gps.getDeviceId())){
  78 + String device = gps.getDeviceId();
  79 + //结束超速
  80 + GpsOverspeed sp = realOverspeedMap.get(device);
  81 + sp.setEts(fmtHHmm.print(gps.getTimestamp()));
  82 +
  83 + realOverspeedMap.remove(device);
  84 + contSpeedMap.put(device, 0);
  85 + }
  86 + return false;
  87 + }
  88 +
  89 + private void overspeed(GpsEntity gps, Double maxSpeed) {
  90 + String device = gps.getDeviceId();
  91 + Integer cont = contSpeedMap.get(device);
  92 +
  93 + if(null == cont)
  94 + cont = 1;
  95 +
  96 + cont++;
  97 +
  98 + if(gps.getSpeed() - maxSpeed > (maxSpeed * 0.1))
  99 + cont++;
  100 +
  101 + if(cont >= CONT_SPEED_SIZE){
  102 + if(realOverspeedMap.containsKey(device)){
  103 + //正在超速,更新速度
  104 + realOverspeedMap.get(device).setSpeed(gps.getSpeed());
  105 + }
  106 + else{
  107 + logger.info("开始超速..." + gps.getNbbm());
  108 + GpsOverspeed sp = new GpsOverspeed();
  109 + sp.setLineCode(gps.getLineId());
  110 + sp.setDevice(device);
  111 + sp.setSpeed(gps.getSpeed());
  112 + sp.setNbbm(gps.getNbbm());
  113 + sp.setSts(fmtHHmm.print(gps.getTimestamp()));
  114 + sp.setSt(gps.getTimestamp());
  115 +
  116 + realOverspeedMap.put(device, sp);
  117 + multimap.put(sp.getLineCode(), sp);
  118 + }
  119 + //标记gps超速
  120 + gps.setAbnormalStatus("overspeed");
  121 + }
  122 +
  123 + contSpeedMap.put(device, cont);
  124 + }
  125 +
  126 + /**
  127 + * 设备掉线
  128 + * @param device
  129 + */
  130 + public void offline(String device){
  131 + if(realOverspeedMap.containsKey(device)){
  132 + //结束超速
  133 + GpsOverspeed sp = realOverspeedMap.get(device);
  134 + sp.setEts(fmtHHmm.print(System.currentTimeMillis()));
  135 + sp.seteType(1);
  136 +
  137 + realOverspeedMap.remove(device);
  138 + contSpeedMap.put(device, 0);
  139 + }
  140 + }
  141 +
  142 +
  143 + public List<GpsOverspeed> findByLines(List<String> lineArray){
  144 + List<GpsOverspeed> rs = new ArrayList<>();
  145 +
  146 + for(String code : lineArray){
  147 + rs.addAll(multimap.get(code));
  148 + }
  149 +
  150 + //按发送时间排序
  151 + Collections.sort(rs, comp);
  152 + if(rs.size() > 50)
  153 + rs = rs.subList(0, 50);
  154 +
  155 + return rs;
  156 + }
  157 +
  158 +
  159 + public static class GpsOverspeedComp implements Comparator<GpsOverspeed>{
  160 +
  161 + @Override
  162 + public int compare(GpsOverspeed o1, GpsOverspeed o2) {
  163 + return (int) (o2.getSt() - o1.getSt());
  164 + }
  165 + }
  166 +}
... ...
src/main/java/com/bsth/data/gpsdata_v2/load/GatewayHttpLoader.java
... ... @@ -51,8 +51,8 @@ public class GatewayHttpLoader implements ApplicationContextAware{
51 51 httpClient = HttpClients.createDefault();
52 52 get = new HttpGet(url);
53 53 requestConfig = RequestConfig.custom()
54   - .setConnectTimeout(1500).setConnectionRequestTimeout(1000)
55   - .setSocketTimeout(1500).build();
  54 + .setConnectTimeout(2500).setConnectionRequestTimeout(2000)
  55 + .setSocketTimeout(2500).build();
56 56 get.setConfig(requestConfig);
57 57 }
58 58  
... ...
src/main/java/com/bsth/data/gpsdata_v2/load/SocketClientLoader.java
... ... @@ -44,8 +44,8 @@ public class SocketClientLoader {
44 44 httpClient = HttpClients.createDefault();
45 45 get = new HttpGet(url);
46 46 requestConfig = RequestConfig.custom()
47   - .setConnectTimeout(1500).setConnectionRequestTimeout(1000)
48   - .setSocketTimeout(1500).build();
  47 + .setConnectTimeout(2500).setConnectionRequestTimeout(2000)
  48 + .setSocketTimeout(2500).build();
49 49 get.setConfig(requestConfig);
50 50 }
51 51  
... ...
src/main/java/com/bsth/data/gpsdata_v2/thread/OfflineMonitorThread.java
... ... @@ -2,6 +2,7 @@ package com.bsth.data.gpsdata_v2.thread;
2 2  
3 3 import com.bsth.data.gpsdata_v2.GpsRealData;
4 4 import com.bsth.data.gpsdata_v2.entity.GpsEntity;
  5 +import com.bsth.data.gpsdata_v2.handlers.overspeed.OverspeedProcess;
5 6 import com.bsth.websocket.handler.SendUtils;
6 7 import org.slf4j.Logger;
7 8 import org.slf4j.LoggerFactory;
... ... @@ -28,6 +29,9 @@ public class OfflineMonitorThread extends Thread{
28 29 @Autowired
29 30 SendUtils sendUtils;
30 31  
  32 + @Autowired
  33 + OverspeedProcess overspeedProcess;
  34 +
31 35 //无任务时 离线阈值
32 36 //private final static int OFFLINE_TIME = 1000 * 60 * 10;
33 37  
... ... @@ -47,6 +51,8 @@ public class OfflineMonitorThread extends Thread{
47 51 if (t - gps.getTimestamp() > LOSE_TIME){
48 52 gps.offline();
49 53  
  54 + //结束超速
  55 + overspeedProcess.offline(gps.getDeviceId());
50 56 //通知页面有设备掉线
51 57 sendUtils.deviceOffline(gps);
52 58 }
... ...
src/main/java/com/bsth/data/schedule/thread/CalcOilThread.java
1 1 package com.bsth.data.schedule.thread;
2 2  
  3 +import com.bsth.data.gpsdata_v2.handlers.overspeed.OverspeedProcess;
3 4 import com.bsth.service.oil.DlbService;
4 5 import com.bsth.data.safe_driv.SafeDrivCenter;
5 6 import com.bsth.service.oil.YlbService;
... ... @@ -38,6 +39,8 @@ public class CalcOilThread extends Thread{
38 39 logger.info("计算班次准点率结束!");
39 40 //清除安全驾驶数据 先临时蹭这个线程
40 41 SafeDrivCenter.clear();
  42 + //清除超速缓存数据
  43 + OverspeedProcess.clear();
41 44 } catch(Exception e){
42 45 logger.error("计算路单里程加注量失败",e);
43 46 }
... ...
src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
... ... @@ -688,10 +688,11 @@ public class GeoDataServiceImpl implements GeoDataService {
688 688 //重新排序路由
689 689 for (int i = 0, size = routes.size(); i < size; i++) {
690 690 sr = routes.get(i);
691   - sr.setStationRouteCode(no += step);
  691 + sr.setStationRouteCode(no);
  692 + no += step;
692 693 if (sr.getId().intValue() == prevRouteId) {
693   - no += step;
694 694 currentNo = no;
  695 + no += step;
695 696 }
696 697 }
697 698  
... ... @@ -817,11 +818,22 @@ public class GeoDataServiceImpl implements GeoDataService {
817 818 String sql = "update bsth_c_ls_stationroute set destroy=1 where id=?";
818 819 jdbcTemplate.update(sql, station.getId());
819 820  
820   - //重新排序路由,标记mark
  821 + /**
  822 + * ########## 重新排序路由,标记mark #########
  823 + */
821 824 sql = "select * from bsth_c_ls_stationroute where line_code='" + station.getLineCode() + "' and directions=" + station.getDirections() + " and destroy=0 and versions=" + station.getVersions();
822 825 List<SaveStationRouteDTO> routes = jdbcTemplate.query(sql, BeanPropertyRowMapper.newInstance(SaveStationRouteDTO.class));
823 826 Collections.sort(routes, new StationRouteComp());
824 827  
  828 + int no = 0,
  829 + step = 100;
  830 + SaveStationRouteDTO sr;
  831 + //重新排序路由
  832 + for (int i = 0, size = routes.size(); i < size; i++) {
  833 + sr = routes.get(i);
  834 + sr.setStationRouteCode(no += step);
  835 + }
  836 +
825 837 for (int i = 0, size = routes.size(); i < size; i++) {
826 838 routes.get(i).setStationMark("Z");
827 839 }
... ...
src/main/java/com/bsth/service/oil/YlxxbService.java
... ... @@ -14,5 +14,7 @@ public interface YlxxbService extends BaseService&lt;Ylxxb, Integer&gt;{
14 14  
15 15 Map<String, Object> checkJsy(Map<String, Object> map) throws Exception;
16 16 Map<String, Object> checkNbbm(Map<String, Object> map) throws Exception;
  17 +
  18 + Map<String, Object> saveYlxxb(Map<String, Object> map);
17 19  
18 20 }
... ...
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
... ... @@ -268,4 +268,23 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
268 268 }
269 269 return newMap;
270 270 }
  271 + @Override
  272 + public Map<String, Object> saveYlxxb(Map<String, Object> map) {
  273 + // TODO Auto-generated method stub
  274 + Map<String, Object> newMap=new HashMap<String,Object>();
  275 + try{
  276 + Integer id=Integer.parseInt(map.get("id").toString());
  277 + Ylxxb t=repository.findOne(id);
  278 + t.setJzl(Double.parseDouble(map.get("jzl").toString().trim()));
  279 + t.setNbbm(map.get("nbbm").toString().trim());
  280 + t.setJsy(map.get("jsy").toString().trim());
  281 + repository.save(t);
  282 + newMap.put("status", ResponseCode.SUCCESS);
  283 + }catch(Exception e){
  284 + newMap.put("status", ResponseCode.ERROR);
  285 + logger.error("save erro.", e);
  286 + throw e;
  287 + }
  288 + return newMap;
  289 + }
271 290 }
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -144,6 +144,8 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
144 144 Map<String,Object> historySave(ScheduleRealInfo sch);
145 145  
146 146 Map<String, Object> MapById(Long id) ;
  147 + Map<String, Object> MapByIdQp(Long id) ;
  148 +
147 149  
148 150 Map<String,Object> svgAttr(String jsonStr);
149 151  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -3732,22 +3732,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3732 3732 }
3733 3733  
3734 3734 //计算里程和班次数,并放入Map里
3735   - map = new HashMap<String, Object>();
  3735 + map = findKMBCQp(clZbh, date, line);
3736 3736 map.put("jzl", jzl);
3737   - map.put("jhlc", format.format(jhlc + jcclc));
3738   - map.put("yygljh", format.format(jhlc));
3739   - map.put("ssgl", format.format(remMileage));
3740   - map.put("ksgl", format.format(ksgl));
3741   - map.put("yyglsj", format.format(yygl));
3742   - map.put("jhbc", jhbc);
3743   - map.put("jcclc", jcclc);
3744   -
3745   - map.put("ljgl", format.format(addMileage));
3746   - map.put("ssbc", cjbc);
3747   - map.put("ysgl", format.format(yygl));
3748   - map.put("sjbc", jhbc - cjbc + ljbc);
3749   - map.put("zgl", format.format(yygl + ksgl + jcclc));
3750   - map.put("ljbc", ljbc);
  3737 +// map.put("jhlc", format.format(jhlc + jcclc));
  3738 +// map.put("yygljh", format.format(jhlc));
  3739 +// map.put("ssgl", format.format(remMileage));
  3740 +// map.put("ksgl", format.format(ksgl));
  3741 +// map.put("yyglsj", format.format(yygl));
  3742 +// map.put("jhbc", jhbc);
  3743 +// map.put("jcclc", jcclc);
  3744 +//
  3745 +// map.put("ljgl", format.format(addMileage));
  3746 +// map.put("ssbc", cjbc);
  3747 +// map.put("ysgl", format.format(yygl));
  3748 +// map.put("sjbc", jhbc - cjbc + ljbc);
  3749 +// map.put("zgl", format.format(yygl + ksgl + jcclc));
  3750 +// map.put("ljbc", ljbc);
  3751 +
3751 3752 String zdp = "", zwdp = "", wdp = "";
3752 3753 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
3753 3754 List<DutyEmployee> listDtuy = dutyEmployeeService.getDutyEmployee(line, date + "00:00", date + "23:59");
... ... @@ -4006,6 +4007,141 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4006 4007 map.put("dbdp", dbdp);
4007 4008 return map;
4008 4009 }
  4010 +
  4011 + @Override
  4012 + public Map<String, Object> MapByIdQp(Long id) {
  4013 + // TODO Auto-generated method stub
  4014 + Map<String, Object> map = new HashMap<String, Object>();
  4015 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
  4016 + ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(id);
  4017 + String xlbm = s.getXlBm();
  4018 + String fcrq = s.getScheduleDateStr();
  4019 +
  4020 + int type=0;
  4021 + Double ccyl = 0.0;
  4022 + Double jcyl = 0.0;
  4023 + Double yh = 0.0;
  4024 + Double jzl = 0.0;
  4025 + Double zlc=0.0;
  4026 +// List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
  4027 +// List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
  4028 +// if(listYlb.size()>0){
  4029 +// type=0;
  4030 +// for (int i = 0; i < listYlb.size(); i++) {
  4031 +// Ylb y = listYlb.get(i);
  4032 +// if(y.getLp()==null){
  4033 +// ccyl=Arith.add(ccyl, y.getCzyl());
  4034 +// jcyl=Arith.add(jcyl, y.getJzyl());
  4035 +// yh =Arith.add(yh ,y.getYh());
  4036 +// jzl =Arith.add(jzl, y.getJzl());
  4037 +// zlc =Arith.add(zlc, y.getZlc());
  4038 +// }else{
  4039 +// if(y.getLp().equals(s.getLpName())){
  4040 +// ccyl=Arith.add(ccyl, y.getCzyl());
  4041 +// jcyl=Arith.add(jcyl, y.getJzyl());
  4042 +// yh =Arith.add(yh ,y.getYh());
  4043 +// jzl =Arith.add(jzl, y.getJzl());
  4044 +// zlc =Arith.add(zlc, y.getZlc());
  4045 +// }
  4046 +// }
  4047 +//
  4048 +// }
  4049 +// }else{
  4050 +// type=1;
  4051 +// for (int i = 0; i < listDlb.size(); i++) {
  4052 +// Dlb d=listDlb.get(i);
  4053 +// if(d.getLp()==null){
  4054 +// ccyl=Arith.add(ccyl, d.getCzcd());
  4055 +// jcyl=Arith.add(jcyl, d.getJzcd());
  4056 +// yh =Arith.add(yh ,d.getHd());
  4057 +// jzl =Arith.add(jzl, d.getCdl());
  4058 +// zlc =Arith.add(zlc, d.getZlc());
  4059 +// }else{
  4060 +// if(d.getLp().equals(s.getLpName())){
  4061 +// ccyl=Arith.add(ccyl, d.getCzcd());
  4062 +// jcyl=Arith.add(jcyl, d.getJzcd());
  4063 +// yh =Arith.add(yh ,d.getHd());
  4064 +// jzl =Arith.add(jzl, d.getCdl());
  4065 +// zlc =Arith.add(zlc, d.getZlc());
  4066 +// }
  4067 +// }
  4068 +//
  4069 +// }
  4070 +// }
  4071 +
  4072 + List<Ylxxb> listylxxb=ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq);
  4073 + for (int i = 0; i < listylxxb.size(); i++) {
  4074 + Ylxxb t=listylxxb.get(i);
  4075 + jzl =Arith.add(jzl, t.getJzl());
  4076 + }
  4077 + map.put("jzl", jzl);
  4078 + map.put("yh", yh);
  4079 + map.put("ccyl", ccyl);
  4080 + map.put("jcyl", jcyl);
  4081 + map.put("type", type);
  4082 + map.put("zlc", zlc);
  4083 + map.put("xlName", s.getXlName());
  4084 + map.put("clZbh", s.getClZbh());
  4085 + map.put("plate", BasicData.nbbmCompanyPlateMap.get(s.getClZbh()));
  4086 + map.put("fcsjActual", s.getFcsjActual());
  4087 + map.put("zdzName", s.getZdzName());
  4088 + map.put("scheduleDate", s.getScheduleDateStr());
  4089 + map.put("lpName", s.getLpName());
  4090 + String zdp = "", zwdp = "", wdp = "";
  4091 + String zdpT = "", zwdpT = "", wdpT = "";
  4092 + String dbdp="";
  4093 + List<DutyEmployee> list = dutyEmployeeService.getDutyEmployee(xlbm, fcrq + "00:01", fcrq + "23:59");
  4094 + try {
  4095 + Long fcsj1 = sdf.parse(fcrq + " 00:01").getTime();
  4096 + Long fcsj2 = sdf.parse(fcrq + " 11:00").getTime();
  4097 + Long fcsj3 = sdf.parse(fcrq + " 23:59").getTime();
  4098 + for (int i = 0; i < list.size(); i++) {
  4099 + DutyEmployee t = list.get(i);
  4100 + if(dbdp.indexOf(t.getuName()) == -1){
  4101 + if(!(dbdp.length()>0)){
  4102 + dbdp =t.getuName();
  4103 + }else{
  4104 + dbdp +=","+t.getuName();
  4105 + }
  4106 + }
  4107 + Long ts = t.getTs();
  4108 + if (ts > fcsj1 && ts < fcsj2) {
  4109 + if (zdp.indexOf(t.getuName()) == -1) {
  4110 + if (!(zdp.length() > 0)) {
  4111 + zdpT = t.getuName() + "...";
  4112 + }
  4113 + zdp += t.getuName() + ",";
  4114 +
  4115 + }
  4116 + } else if (ts > fcsj2 && ts < fcsj3) {
  4117 + if (zwdp.indexOf(t.getuName()) == -1) {
  4118 + if (!(zwdp.length() > 0)) {
  4119 + zwdpT = t.getuName() + "...";
  4120 + }
  4121 + zwdp += t.getuName() + ",";
  4122 + }
  4123 + } else {
  4124 + if (wdp.indexOf(t.getuName()) == -1) {
  4125 + if (!(wdp.length() > 0)) {
  4126 + wdpT = t.getuName() + "...";
  4127 + }
  4128 + wdp += t.getuName() + ",";
  4129 + }
  4130 + }
  4131 + }
  4132 + } catch (ParseException e) {
  4133 + // TODO Auto-generated catch block
  4134 + e.printStackTrace();
  4135 + }
  4136 + map.put("zdp", zdp);
  4137 + map.put("zwdp", zwdp);
  4138 + map.put("wdp", wdp);
  4139 + map.put("zdpT", zdpT);
  4140 + map.put("zwdpT", zwdpT);
  4141 + map.put("wdpT", wdpT);
  4142 + map.put("dbdp", dbdp);
  4143 + return map;
  4144 + }
4009 4145  
4010 4146 @Override
4011 4147 public List<Map<String, Object>> scheduleDailyQp(String line, String date) {
... ...
src/main/resources/static/pages/base/geo_data_edit/css/mian.css
... ... @@ -734,11 +734,42 @@ div[id*=&#39;PanoramaFlashWraperTANGRAM&#39;]{
734 734 text-align: center;
735 735 color: red;
736 736 }
737   -/*
738   -div[id*='PanoramaFlashWraperTANGRAM']:before{
739   - content: "如果你使用的是chrome浏览器,请在设置里允许当前页面IP启用flash";
740   - position: absolute;
741   - top: 50px;
742   - left: calc(50% - 220px);
743   - font-size: 18px;
744   -}*/
  737 +
  738 +._line_name a{
  739 + color: #484848;
  740 +}
  741 +
  742 +.clock_enable_version:empty{
  743 + display: none;
  744 +}
  745 +
  746 +.line_change_panel ul>li>div{
  747 + display: inline-block;
  748 + font-size: 14px;
  749 +}
  750 +
  751 +.line_change_panel div.name{
  752 + width: 140px;
  753 +}
  754 +
  755 +.line_change_panel div.code{
  756 + font-size: 12px;
  757 + font-family: 'Roboto Mono',monospace;
  758 + color: #f0506e;
  759 + white-space: nowrap;
  760 + padding: 2px 6px;
  761 + background: #f8f8f8;
  762 +}
  763 +
  764 +.line_change_panel ul>li:hover{
  765 + background: #f8f8f8;
  766 + cursor: pointer;
  767 +}
  768 +
  769 +.line_change_panel .uk-list>li:nth-child(n+2),.line_change_panel .uk-list>li>ul{
  770 + margin-top: 0;
  771 +}
  772 +
  773 +.line_change_panel .uk-list>li{
  774 + padding: 5px;
  775 +}
745 776 \ No newline at end of file
... ...
src/main/resources/static/pages/base/geo_data_edit/js/change_line.js 0 → 100644
  1 +/**
  2 + * 线路切换面板
  3 + */
  4 +
  5 +var gb_change_line = (function () {
  6 +
  7 + var data;
  8 +
  9 + var init = function () {
  10 +
  11 + var ep = EventProxy.create("findLine", "findCompanyData", function (lines, comps) {
  12 + //根据公司权限过滤线路
  13 + var lineArray = [];
  14 + for(var i=0,line;line=lines[i++];){
  15 + if(comps.indexOf(line.company + '_' + line.brancheCompany)){
  16 + //拼音映射
  17 + lineArray.push({
  18 + name: line.name,
  19 + code: line.lineCode,
  20 + came: pinyin.getCamelChars(line.name),
  21 + full: pinyin.getFullChars(line.name).toUpperCase()
  22 + });
  23 + }
  24 + }
  25 +
  26 + data = lineArray;
  27 +
  28 + //按更新时间排序
  29 + lineArray.sort(function (a, b) {
  30 + return b.updateDate - a.updateDate;
  31 + });
  32 +
  33 + //渲染页面
  34 + var htmlStr = template('geo_d_e_dropdown_list-temp', {list: lineArray.slice(0, 10), ellipsis: lineArray.length > 10});
  35 + $('.line_change_panel ul.uk-list').html(htmlStr);
  36 + });
  37 +
  38 + $.get('/line/all', {destroy_eq: 0}, function (rs) {
  39 + ep.emit('findLine', rs);
  40 + });
  41 +
  42 + $.get('/user/companyData', {}, function (rs) {
  43 + var filters = [];
  44 + for(var i=0,obj;obj=rs[i++];){
  45 +
  46 + for(var j=0,sCom;sCom=obj.children[j++];){
  47 + filters.push(obj.companyCode + '_' + sCom.code);
  48 + }
  49 + }
  50 + ep.emit('findCompanyData', filters);
  51 + });
  52 + };
  53 +
  54 + /**
  55 + * 线路搜索
  56 + */
  57 + var search_k;
  58 + var search_flag;
  59 + $('.line_change_panel #line_search_input').on('input', function () {
  60 + search_k = $(this).val();
  61 + if(search_flag)
  62 + return;
  63 + search_flag = true;
  64 +
  65 + setTimeout(function () {
  66 + _search(search_k);
  67 + search_flag = false;
  68 + }, 300);
  69 + });
  70 +
  71 + function _search(v) {
  72 + v = v.toUpperCase();
  73 + var rs = [], ellipsis;
  74 + for(var i=0,obj;obj=data[i++];){
  75 + if(obj.came.indexOf(v)!=-1
  76 + || obj.full.indexOf(v)!=-1
  77 + || obj.name.indexOf(v)!=-1)
  78 + rs.push(obj);
  79 +
  80 + if(rs.length >= 10){
  81 + ellipsis = true;
  82 + break;
  83 + }
  84 + }
  85 +
  86 + var htmlStr = template('geo_d_e_dropdown_list-temp', {list: rs, ellipsis: ellipsis});
  87 + $('.line_change_panel ul.uk-list').empty().html(htmlStr);
  88 + }
  89 +
  90 + /**
  91 + * 点击切换线路 data-code
  92 + */
  93 + $('.line_change_panel ul.uk-list').on('click', 'li[data-code]', function () {
  94 + var lineCode = $(this).data('code');
  95 + storage.setItem('geo_data_edit_line_code' , lineCode);
  96 + storage.removeItem('geo_data_edit_line_version');
  97 +
  98 + $loadPanel.show();
  99 + clearAll();
  100 + startup();
  101 + });
  102 +
  103 + return {
  104 + init: init
  105 + };
  106 +})();
0 107 \ No newline at end of file
... ...
src/main/resources/static/pages/base/geo_data_edit/js/map.js
... ... @@ -320,8 +320,10 @@ var gb_ct_map = function () {
320 320 break;
321 321 }
322 322 }
  323 + var point = new BMap.Point(p.ct_data.cp.longitude, p.ct_data.cp.latitude);
  324 + openRoadInfoWin(p, point);
323 325  
324   - openRoadInfoWin(p, new BMap.Point(p.ct_data.cp.longitude, p.ct_data.cp.latitude));
  326 + map.setCenter(point);
325 327 };
326 328  
327 329 var exitEditBufferStatus = function (s) {
... ... @@ -869,6 +871,7 @@ var gb_ct_map = function () {
869 871 editCircle = null;
870 872 editPolygon = null;
871 873 dragMarker = null;
  874 + initFlag = false;
872 875  
873 876 map.clearOverlays();
874 877  
... ...
src/main/resources/static/pages/base/geo_data_edit/js/road_route.js
... ... @@ -28,7 +28,7 @@ var gb_road_route = function () {
28 28 });
29 29  
30 30 //加载数据
31   - var version = storage.getItem("geo_data_edit_line_version");
  31 + var version = g_version;
32 32 gb_common.$get('/_geo_data/findGeoRoad', {lineCode: lineCode,version:version}, function (rs) {
33 33 rs.list.sort(function (a, b) {
34 34 return parseInt(a.sectionrouteCode) - parseInt(b.sectionrouteCode);
... ... @@ -88,7 +88,7 @@ var gb_road_route = function () {
88 88 var focus = function (data) {
89 89 clearFocus();
90 90 //sectionCode
91   - var elem = $('.up_down_route_list>li>.road_route .r_r_item a[data-code='+data.sectionCode+']');
  91 + var elem = $('.up_down_route_list>li.uk-active>.road_route .r_r_item a[data-code='+data.sectionCode+']');
92 92 elem = elem.parent();
93 93 elem.addClass('ct_active');
94 94  
... ...
src/main/resources/static/pages/base/geo_data_edit/js/station_route.js
... ... @@ -5,7 +5,7 @@ var gb_station_route = function () {
5 5 var station_maps;
6 6 //绘制线路路由
7 7 var init = function (cb) {
8   - var lineCode = storage.getItem("geo_data_edit_line_code");
  8 + var lineCode = g_line_code;
9 9  
10 10 var ep = EventProxy.create("data", "temp", function (data, temp) {
11 11 station_maps = data;
... ... @@ -25,7 +25,7 @@ var gb_station_route = function () {
25 25 cb && cb();
26 26 });
27 27  
28   - var version = storage.getItem("geo_data_edit_line_version");
  28 + var version = g_version;
29 29 //加载数据
30 30 gb_common.$get('/_geo_data/findGeoStations', {lineCode: lineCode, version: version}, function (rs) {
31 31 rs.list.sort(function (a, b) {
... ... @@ -35,6 +35,7 @@ var gb_station_route = function () {
35 35 //线路当前启用的线路版本
36 36 storage.setItem("geo_data_enable_version" , rs['currentVersion']);
37 37 //当前编辑的线路版本
  38 + g_version = rs['editVersion'];
38 39 storage.setItem("geo_data_edit_line_version" , rs['editVersion']);
39 40  
40 41 var data = {0:[],1:[]};
... ...
src/main/resources/static/pages/base/geo_data_edit/js/submit.js
... ... @@ -69,8 +69,8 @@ var gb_data_submit = function () {
69 69 data.stationName = $.trim(data.stationName);
70 70  
71 71 UIkit.modal.confirm('确定新增站点【'+data.stationName+'】?').then(function() {
72   - data.lineCode = storage.getItem('geo_data_edit_line_code');
73   - data.versions = storage.getItem('geo_data_edit_line_version');
  72 + data.lineCode = g_line_code;
  73 + data.versions = g_version;
74 74 data.upDown = getUpDown();
75 75 data.prevRouteId = gb_station_route.getAddPrevId();
76 76 data.lng = data.gLonx;
... ... @@ -98,8 +98,8 @@ var gb_data_submit = function () {
98 98 var data = f.serializeJSON();
99 99  
100 100 UIkit.modal.confirm('确定新增路段【'+data.sectionName+'('+data.crosesRoad+')】?').then(function() {
101   - data.lineCode = storage.getItem('geo_data_edit_line_code');
102   - data.versions = storage.getItem('geo_data_edit_line_version');
  101 + data.lineCode = g_line_code;
  102 + data.versions = g_version;
103 103 data.upDown = getUpDown();
104 104  
105 105 data.prevRouteId = gb_road_route.getAddPrevId();
... ... @@ -162,11 +162,12 @@ var gb_data_submit = function () {
162 162 $(document).on('click', '#add_line_versions_modal ._submit', function (e) {
163 163 var f = $('form', '#add_line_versions_modal');
164 164 var data = f.serializeJSON();
165   - data.lineCode = storage.getItem('geo_data_edit_line_code');
  165 + data.lineCode = g_line_code;
166 166  
167 167 UIkit.modal.confirm('确定线路版本【'+data.name+'】?').then(function() {
168 168 $loadPanel.show();
169 169 gb_common.$post('/_geo_data/addNewLineVersion', data, function (rs) {
  170 + g_version = rs['newVersion'];
170 171 storage.setItem("geo_data_edit_line_version", rs['newVersion']);
171 172 clearAll();
172 173 startup();
... ...
src/main/resources/static/pages/base/geo_data_edit/js/version_manage.js
... ... @@ -9,7 +9,7 @@ var gb_version_manage = function () {
9 9  
10 10 var temps;
11 11 var init = function (enableVersion) {
12   - var lineCode = storage.getItem("geo_data_edit_line_code");
  12 + var lineCode = g_line_code;
13 13  
14 14 var ep = EventProxy.create("data", "temp", function () {
15 15 if(!current){
... ... @@ -17,7 +17,7 @@ var gb_version_manage = function () {
17 17 }
18 18  
19 19 //线路名称
20   - $('.main_left_panel>._line_info>._line_name>span').text(lineName);
  20 + $('.main_left_panel>._line_info>._line_name>.dropdown_txt').text(lineName);
21 21 //当前版本
22 22 $('.main_left_panel ._version_dropdown_wrap>._version_text')
23 23 .html(current.name + '<i uk-icon="icon: chevron-down;ratio:.6"></i>').removeClass('e0 e1 e2').addClass('e' + current.status);
... ... @@ -126,7 +126,7 @@ var gb_version_manage = function () {
126 126 $(document).on('click', v_e_edit_modal + ' button._submit', function () {
127 127 var f = $('form', v_e_edit_modal);
128 128 var data = f.serializeJSON();
129   - data.lineCode = storage.getItem('geo_data_edit_line_code');
  129 + data.lineCode = g_line_code;
130 130  
131 131 gb_common.$post('/_geo_data/addEnableInfo', data, function () {
132 132 UIkit.modal(v_e_edit_modal).hide();
... ... @@ -257,7 +257,7 @@ var gb_version_manage = function () {
257 257 $(document).on('click', '#enable_line_versions_modal button._submit', function () {
258 258 var f = $('form', '#enable_line_versions_modal');
259 259 var data = f.serializeJSON();
260   - data.lineCode = storage.getItem('geo_data_edit_line_code');
  260 + data.lineCode = g_line_code;
261 261  
262 262 gb_common.$post('/_geo_data/addEnableInfo', data, function () {
263 263 UIkit.modal('#enable_line_versions_modal').hide();
... ...
src/main/resources/static/pages/base/geo_data_edit/main.html
... ... @@ -25,7 +25,14 @@
25 25 <div class="main_left_panel">
26 26 <div class="_line_info">
27 27 <div class="_line_name">
28   - <span></span>
  28 + <a class="dropdown_txt"></a>
  29 + <div class="line_change_panel" uk-dropdown="mode: click">
  30 + <div class="uk-inline">
  31 + <a class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></a>
  32 + <input class="uk-input" type="text" id="line_search_input">
  33 + </div>
  34 + <ul class="uk-list"></ul>
  35 + </div>
29 36  
30 37 <a uk-icon="icon: trash" class="remove_line_version_icon uk-animation-slide-right-small" title="删除线路版本" style="display: none" uk-tooltip></a>
31 38 <a uk-icon="icon: plus" class="add_line_version_icon" title="新增一个线路版本" uk-tooltip></a>
... ... @@ -45,7 +52,6 @@
45 52 <li><a>上行</a></li>
46 53 <li><a>下行</a></li>
47 54  
48   - <!--<span class="rt_show_version_txt uk-badge uk-disabled uk-animation-slide-top-small"></span>-->
49 55 </ul>
50 56  
51 57 <ul class="uk-switcher uk-margin up_down_route_list">
... ... @@ -92,6 +98,18 @@
92 98 {{/if}}
93 99 </ul>
94 100 </script>
  101 +
  102 +<script id="geo_d_e_dropdown_list-temp" type="text/html">
  103 + {{each list as obj i}}
  104 + <li data-code="{{obj.code}}">
  105 + <div class="name">{{obj.name}}</div>
  106 + <div class="code">{{obj.code}}</div>
  107 + </li>
  108 + {{/each}}
  109 + {{if ellipsis}}
  110 + <li>...</li>
  111 + {{/if}}
  112 +</script>
95 113 <!-- 百度 -->
96 114 <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
97 115 <script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
... ... @@ -116,6 +134,7 @@
116 134 <!-- flatpickr -->
117 135 <script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
118 136 <script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  137 +<script src="/assets/plugins/pinyin.js"></script>
119 138  
120 139 <script>
121 140 var $loadPanel = $('body>.loading');
... ... @@ -147,9 +166,15 @@
147 166 var res_load_ep = EventProxy.create('load_common_data', 'load_station_route','load_road_route'
148 167 , 'load_version_manage', 'load_history_edit_logs', 'load_map', function () {
149 168 startup();
  169 +
  170 + gb_change_line.init();
150 171 });
151 172  
  173 + var g_line_code;
  174 + var g_version;
152 175 var startup = function () {
  176 + g_line_code = storage.getItem('geo_data_edit_line_code');
  177 +
153 178 gb_main_ep = new EventProxy();
154 179 var eq = gb_main_ep;
155 180  
... ... @@ -221,6 +246,8 @@
221 246 <script src="/pages/base/geo_data_edit/js/map.js" ></script>
222 247 <script src="/pages/base/geo_data_edit/js/submit.js" ></script>
223 248 <script src="/pages/base/geo_data_edit/js/search.js" ></script>
  249 +<script src="/pages/base/geo_data_edit/js/change_line.js" ></script>
  250 +
224 251 <script type="text/javascript"
225 252 src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>
226 253 </body>
... ...
src/main/resources/static/pages/forms/statement/waybillQp.html
... ... @@ -173,7 +173,7 @@
173 173  
174 174 var id = $("#"+params[0]).val();
175 175  
176   - $get('/realSchedule/MapById',{id:id},function(result){
  176 + $get('/realSchedule/MapByIdQp',{id:id},function(result){
177 177 // result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
178 178 var ludan_1 = template('ludan_1',{map:result});
179 179 //var ludan_4 = template('ludan_4',result);
... ...
src/main/resources/static/pages/oil/oillist/list.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>进出场存油量</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  9 + <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li>
  10 + <li><span class="active">进出场存油量</span></li>
  11 +</ul>
  12 +
  13 +<div class="row" id="ll_oil_list">
  14 + <div class="col-md-12">
  15 + <!-- Begin: life time stats -->
  16 + <div class="portlet light portlet-fit portlet-datatable bordered">
  17 + <div class="portlet-title">
  18 + <div class="caption">
  19 + <i class="fa fa-fire-extinguisher"></i> <span
  20 + class="caption-subject font-dark sbold uppercase">进出场存油量表</span>
  21 + </div>
  22 + <div class="actions">
  23 + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加</a>
  24 + <button type="button" class="btn btn-circle blue" id="removeButton"><i class="fa fa-trash-o"></i> 删除</button>
  25 +<!-- <button type="button" class="btn btn-circle blue" id="sortButton"><i class="fa fa-minus-square"></i> -->
  26 +<!-- 拆分/保存 -->
  27 +<!-- </button> -->
  28 + <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
  29 + <div class="btn-group">
  30 + <a class="btn red btn-outline btn-circle" href="javascript:;"
  31 + data-toggle="dropdown"> <i class="fa fa-share"></i> <span
  32 + class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i>
  33 + </a>
  34 + <ul class="dropdown-menu pull-right" id="datatable_ajax_tools">
  35 + <li><a href="javascript:;" data-action="0"
  36 + class="tool-action" id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息
  37 + </a></li>
  38 + <li><a href="javascript:;" data-action="1"
  39 + class="tool-action" id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场)
  40 + </a></li>
  41 + <li><a href="javascript:;" id="checkYl" data-action="3"
  42 + class="tool-action"> <i class="fa fa-gg-circle"></i>
  43 + 核对加注量(有加油无里程)
  44 + </a></li>
  45 + <li class="divider"></li>
  46 + <li><a href="javascript:;" data-action="3"
  47 + class="tool-action" id="export"> <i class="fa fa-file-excel-o"></i>
  48 + 导出Excel
  49 + </a></li>
  50 + </ul>
  51 + </div>
  52 + </div>
  53 + </div>
  54 + <div class="portlet-body">
  55 + <div class="table-container" style="margin-top: 10px">
  56 + <table
  57 + class="table table-striped table-bordered table-hover table-checkable"
  58 + id="datatable_ylxxb">
  59 + <thead>
  60 + <tr role="row" class="filter">
  61 +
  62 + <td>
  63 + 日期:
  64 + </td>
  65 + <td>
  66 + <input type="text" style="width: 80px" name="yyrq_eq" id="yyrq"/>
  67 + </td>
  68 +
  69 + <td >
  70 + 内部编码:
  71 + </td>
  72 + <td colspan="3">
  73 + <input type="text" class="form-control" name="nbbm_like" id="nbbm" style="width: 120px;"></input>
  74 + </td>
  75 + <td colspan="4">
  76 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right:0px">
  77 + <i class="fa fa-search"></i> 搜索
  78 + </button>
  79 +
  80 + <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px">
  81 + <i class="fa fa-times"></i> 重置
  82 + </button>
  83 +
  84 + </td>
  85 + </tr>
  86 + <tr role="row" class="heading">
  87 + <th >#</th>
  88 + <th >日期</th>
  89 + <th >自编号</th>
  90 + <th >加油量</th>
  91 + <th >驾驶员</th>
  92 + <th >加油类型</th>
  93 + <!-- <th width="5%">操作</th> -->
  94 + </tr>
  95 + </thead>
  96 + <tbody></tbody>
  97 + </table>
  98 + <div style="text-align: right;">
  99 + <ul id="pagination" class="pagination"></ul>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 + </div>
  105 +</div>
  106 +
  107 +<script id="ylxxb_list_temp" type="text/html">
  108 + {{each list as obj i}}
  109 + <tr>
  110 + <td style="vertical-align: middle;">
  111 + <input type="radio" name="id" class="group-checkable icheck" data-id="{{obj.id}}">
  112 + </td>
  113 +
  114 + <td>
  115 + {{obj.yyrq}}
  116 + </td>
  117 + <td>
  118 + <input type="text" data-id="{{obj.id}}" class="in_ylxx_nbbm" value="{{obj.nbbm}}">
  119 + </td>
  120 + <td>
  121 + <input type="text" data-id="{{obj.id}}" class="in_ylxx_jzl" value="{{obj.jzl}}">
  122 + </td>
  123 + <td>
  124 + <input type="text" data-id="{{obj.id}}" class="in_ylxx_jsy" value="{{obj.jsy}}">
  125 + </td>
  126 + <td>
  127 + {{obj.jylx}}
  128 + </td>
  129 + <td>
  130 +
  131 +<button type="button" class="btn btn-sm blue btn-ylxxbList"
  132 + data-id="{{obj.id}}">保存</button> </td>
  133 + </tr>
  134 + {{/each}}
  135 + {{if list.length == 0}}
  136 + <tr>
  137 + <td colspan=20><h6 class="muted">没有找到相关数据</h6></td>
  138 + </tr>
  139 + {{/if}}
  140 +</script>
  141 +
  142 +<script>
  143 + $(function () {
  144 + $("#yyrq").datetimepicker({
  145 + format: 'YYYY-MM-DD',
  146 + locale: 'zh-cn'
  147 + });
  148 +
  149 + var page = 0, initPagination;
  150 + var icheckOptions = {
  151 + radioClass: 'iradio_square-blue icheck',
  152 + increaseArea: '20%'
  153 + }
  154 +
  155 + //重置
  156 + $('tr.filter .filter-cancel').on('click', function () {
  157 + $('tr.filter input, select').val('').change();
  158 + });
  159 +
  160 + //提交
  161 + $('tr.filter .filter-submit').on('click', function () {
  162 + if ($("#yyrq").val() == "" || $("#yyrq").val() ==null){
  163 + layer.msg('请选择日期.');
  164 + }else {
  165 + var cells = $('tr.filter')[0].cells
  166 + , params = {}
  167 + , name;
  168 + $.each(cells, function (i, cell) {
  169 + var items = $('input,select', cell);
  170 + for (var j = 0, item; item = items[j++];) {
  171 + name = $(item).attr('name');
  172 + if (name) {
  173 + params[name] = $(item).val();
  174 + }
  175 + }
  176 + });
  177 + page = 0;
  178 + jsDoQuery(params, true);
  179 + }
  180 + });
  181 +
  182 + /*
  183 + * 获取数据 p: 要提交的参数, pagination: 是否重新分页
  184 + */
  185 + function jsDoQuery(p, pagination) {
  186 + var params = {};
  187 + if (p)
  188 + params = p;
  189 + //更新时间排序
  190 + params['order'] = 'nbbm';
  191 + params['page'] = page;
  192 + params['rq'] = $("#rq").val();
  193 +
  194 + var i = layer.load(2);
  195 + $get('/ylxxb', params, function (data) {
  196 + $.each(data.content, function (i, obj) {
  197 + obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD");
  198 + });
  199 + var bodyHtm = template('ylxxb_list_temp', {list: data.content});
  200 +
  201 + $('#datatable_ylxxb tbody').html(bodyHtm)
  202 + .find('.icheck').iCheck(icheckOptions)
  203 + .on('ifChanged', iCheckChange);
  204 + if (pagination && data.content.length > 0) {
  205 + //重新分页
  206 + initPagination = true;
  207 + showPagination(data);
  208 + }
  209 + $('.btn-ylxxbList').on('click', saveYlxxbList);
  210 + layer.close(i);
  211 +
  212 + });
  213 + }
  214 + function showPagination(data) {
  215 + //分页
  216 + $('#pagination').jqPaginator({
  217 + totalPages: data.totalPages,
  218 + visiblePages: 6,
  219 + currentPage: page + 1,
  220 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  221 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  222 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  223 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  224 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  225 + onPageChange: function (num, type) {
  226 + if (initPagination) {
  227 + initPagination = false;
  228 + return;
  229 + }
  230 +
  231 + var cells = $('tr.filter')[0].cells
  232 + , params = {}
  233 + , name;
  234 + $.each(cells, function (i, cell) {
  235 + var items = $('input,select', cell);
  236 + for (var j = 0, item; item = items[j++];) {
  237 + name = $(item).attr('name');
  238 + if (name) {
  239 + params[name] = $(item).val();
  240 + }
  241 + }
  242 + });
  243 + page = num - 1;
  244 + jsDoQuery(params, true);
  245 + }
  246 + });
  247 + }
  248 +
  249 + function saveYlxxbList(){
  250 + var id = $(this).data('id');
  251 + var jsy=$('.in_ylxx_jsy[data-id='+id+']', '#datatable_ylxxb').val();
  252 + var nbbm=$('.in_ylxx_nbbm[data-id='+id+']', '#datatable_ylxxb').val();
  253 + var jzl=$('.in_ylxx_jzl[data-id='+id+']', '#datatable_ylxxb').val();
  254 + var i = layer.load(2);
  255 + $post('/ylxxb/saveYlxxb', {id:id,nbbm:nbbm,jsy:jsy,jzl:jzl}, function () {
  256 + layer.close(i);
  257 + $('tr.filter .filter-submit').click();
  258 + });
  259 + }
  260 + function iCheckChange() {
  261 + var tr = $(this).parents('tr');
  262 + if (this.checked)
  263 + tr.addClass('row-active');
  264 + else
  265 + tr.removeClass('row-active');
  266 +
  267 + /* if($('#datatable_resource input.icheck:checked').length == 1)
  268 + $('#removeButton').removeAttr('disabled');
  269 + else
  270 + $('#removeButton').attr('disabled', 'disabled'); */
  271 + }
  272 +
  273 +
  274 +
  275 + //删除
  276 + $('#removeButton').on('click', function () {
  277 + if ($(this).attr('disabled'))
  278 + return;
  279 +
  280 + var id = $('input.icheck:checked').data('id');
  281 + removeConfirm('确定要删除选中的数据?', '/ylxxb/' + id, function () {
  282 + $('tr.filter .filter-submit').click();
  283 + });
  284 + });
  285 +
  286 +
  287 + });
  288 +</script>
0 289 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/alone_page/map/alone_data_gps.js
... ... @@ -41,7 +41,7 @@ var gb_data_gps = (function () {
41 41 upDownChange = [];
42 42  
43 43 var schArray;
44   - $.each(rs, function () {
  44 + $.each(rs.gpsList, function () {
45 45 old = realData[this.deviceId];
46 46 if (old) {
47 47 if (this.timestamp > old.timestamp) {
... ... @@ -54,12 +54,12 @@ var gb_data_gps = (function () {
54 54 } else
55 55 addArr.push(this);
56 56  
57   - /* //班次信息
  57 + //班次信息
58 58 if (this.schId) {
59 59 schArray = gb_schedule_table.findScheduleByLine(this.lineId);
60 60 if (schArray)
61 61 this.sch = schArray[this.schId];
62   - }*/
  62 + }
63 63  
64 64 //时间格式化
65 65 this.dateStr = moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss');
... ... @@ -69,9 +69,12 @@ var gb_data_gps = (function () {
69 69 //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length);
70 70 //CCCallFuncN
71 71 $.each(refreshEventCallbacks, function (i, cb) {
72   - cb(addArr, upArr, upDownChange);
  72 + cb(addArr, upArr, upDownChange, rs.overspeedList);
73 73 });
74 74  
  75 + //超速数据回调
  76 + //console.log('超速,,,', rs.overspeedList);
  77 +
75 78 };
76 79  
77 80 var startFixedTime;
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -1754,4 +1754,50 @@ dl.active&gt;dd.disabled{
1754 1754 vertical-align: bottom;
1755 1755 color: #ff2f2f;
1756 1756 text-decoration: underline;
  1757 +}
  1758 +
  1759 +.c_b_abnorm_notice {
  1760 + position: absolute;
  1761 + bottom: 0;
  1762 + margin: auto;
  1763 + width: 351px;
  1764 + padding: 7px;
  1765 + background: #ffffff;
  1766 + box-shadow: 5px 5px 15px rgba(90, 90, 90, 0.48);
  1767 + max-height: 290px;
  1768 + overflow-y: auto;
  1769 + min-height: 40px;
  1770 +}
  1771 +
  1772 +.c_b_abnorm_notice:before{
  1773 + content: "-超速报警-";
  1774 + color: #000000;
  1775 + font-size: 12px;
  1776 + font-family: 微软雅黑;
  1777 + position: fixed;
  1778 + background: #ffd967;
  1779 + margin-top: -10px;
  1780 + margin-left: -6px;
  1781 + padding: 0 7px;
  1782 + box-shadow: 2px 4px 7px rgba(90, 90, 90, 0.25);
  1783 +}
  1784 +
  1785 +.c_b_item {
  1786 + margin: 7px 0;
  1787 + padding: 7px 12px;
  1788 + box-shadow: 0px 0px 10px rgba(90, 90, 90, 0.29);
  1789 + color: #FF5722;
  1790 + cursor: pointer;
  1791 +}
  1792 +
  1793 +.c_b_abnorm_notice>.c_b_item:first-child{
  1794 + margin-top: 20px;
  1795 +}
  1796 +
  1797 +.c_b_item.over{
  1798 + color: grey;
  1799 +}
  1800 +
  1801 +.c_b_item>span.c_b_over{
  1802 + float: right;
1757 1803 }
1758 1804 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/home/line_panel.html
... ... @@ -29,7 +29,7 @@
29 29 <dl id="home_gps_{{deviceId}}" data-device-id="{{deviceId}}" {{if abnormalStatus=='offline'}}class="offline"{{/if}}>
30 30 <dd title="{{nbbm}}"><a>{{nbbm}}</a></dd>
31 31 <dd></dd>
32   - <dd>{{speed}}</dd>
  32 + <dd>{{speed>99?'..':speed}}</dd>
33 33 <dd>{{expectStopTime}}</dd>
34 34 <dd>
35 35 {{if abnormalStatus != null}}
... ...
src/main/resources/static/real_control_v2/fragments/home/tooltip.html
... ... @@ -34,7 +34,7 @@
34 34 <span class="field">坐标:</span>{{lon}} {{lat}}
35 35 </div>
36 36 <div>
37   - <span class="field">速度:</span>{{speed}}</div>
  37 + <span class="field">速度:</span>{{speed>99?'..':speed}}</div>
38 38 <div>
39 39 <span class="field">时间:</span>{{dateStr}}</div>
40 40 {{if expectStopTime!=null}}
... ...
src/main/resources/static/real_control_v2/js/data/data_gps.js
... ... @@ -14,6 +14,9 @@ var gb_data_gps = (function () {
14 14 refreshEventCallbacks.push(cb);
15 15 };
16 16  
  17 + //超速数据回调
  18 + //var overspeedEventCallbacks = [];
  19 +
17 20 var refresh = function (cb) {
18 21 $.ajax({
19 22 url: '/gps/real/line',
... ... @@ -43,7 +46,7 @@ var gb_data_gps = (function () {
43 46 upDownChange = [];
44 47  
45 48 var schArray;
46   - $.each(rs, function () {
  49 + $.each(rs.gpsList, function () {
47 50 old = realData[this.deviceId];
48 51 if (old) {
49 52 if (this.timestamp > old.timestamp) {
... ... @@ -71,9 +74,12 @@ var gb_data_gps = (function () {
71 74 //console.log('add array size: ' + addArr.length, 'up array size: ' + upArr.length);
72 75 //CCCallFuncN
73 76 $.each(refreshEventCallbacks, function (i, cb) {
74   - cb(addArr, upArr, upDownChange);
  77 + cb(addArr, upArr, upDownChange, rs.overspeedList);
75 78 });
76 79  
  80 + //超速数据回调
  81 + //console.log('超速,,,', rs.overspeedList);
  82 +
77 83 };
78 84  
79 85 var startFixedTime;
... ...
src/main/resources/static/real_control_v2/js/safe_driv/CallCenterPluginDemo.html deleted 100644 → 0
1   -<!DOCTYPE html>
2   -<html>
3   -<head>
4   - <meta charset="utf-8" />
5   - <title></title>
6   -</head>
7   -<body>
8   - <script src="http://180.168.57.114:4244/Scripts/CallCenterPlugin.js" type="text/javascript"></script>
9   -</body>
10   -</html>
11 0 \ No newline at end of file
src/main/resources/static/real_control_v2/js/safe_driv/call_phone.js
... ... @@ -4,7 +4,51 @@ var gb_call_phone = function () {
4 4 var wsUri = "ws://180.168.57.114:21892/";
5 5  
6 6 var nbbm2tel = {
7   -
  7 + "S0E-178": "915618938041",
  8 + "S0E-179": "915618937546",
  9 + "S0E-182": "915618938047",
  10 + "S0E-183": "915618937940",
  11 + "S0E-186": "915601997470",
  12 + "S0E-187": "915618846405",
  13 + "S0E-043": "915618847457",
  14 + "S0E-044": "915618845487",
  15 + "S2F-070": "915618846479",
  16 + "S2F-071": "915618820024",
  17 + "S2F-072": "915618937945",
  18 + "S2F-073": "915618937845",
  19 + "S2F-075": "915618847416",
  20 + "S2F-076": "915618847410",
  21 + "S2F-077": "915618847413",
  22 + "S2F-078": "915618847415",
  23 + "S2F-079": "915618847417",
  24 + "S2F-080": "915618847418",
  25 + "S2F-083": "915618847420",
  26 + "S2F-119": "915618951184",
  27 + "W0F-018": "915618209534",
  28 + "W0F-019": "915618951364",
  29 + "W0F-020": "915618278604",
  30 + "W0F-021": "915618278614",
  31 + "W0F-022": "915618012546",
  32 + "W0F-023": "915618278704",
  33 + "W0F-024": "915618278594",
  34 + "W0F-025": "915601989450",
  35 + "W0F-026": "915618209194",
  36 + "W0F-027": "915618208724",
  37 + "W0F-028": "915618278624",
  38 + "W0F-029": "915601988491",
  39 + "W0F-030": "915618209324",
  40 + "W0F-031": "915618928940",
  41 + "W0F-069": "915618011142",
  42 + "W0F-070": "915618279534",
  43 + "W0F-071": "915618847426",
  44 + "W0F-072": "915618011245",
  45 + "W0F-073": "915618010242",
  46 + "W0F-074": "915618279594",
  47 + "W0F-075": "915618588143",
  48 + "W0F-089": "915618011747",
  49 + "W0F-090": "915618279574",
  50 + "S2F-069": "915618938143",
  51 + "S2F-081": "915618950034"
8 52 };
9 53  
10 54 var locData = window.localStorage.getItem('test_nbbm2tel_json');
... ... @@ -13,8 +57,8 @@ var gb_call_phone = function () {
13 57 }
14 58  
15 59 var login = function (cb) {
16   - var agentID = '1002';
17   - var dn = '6006';
  60 + var agentID = '1002';
  61 + var dn = '6002';
18 62  
19 63 var options = {
20 64 AgentID: agentID,
... ... @@ -47,14 +91,15 @@ var gb_call_phone = function () {
47 91 }, 1000);
48 92 }
49 93 else{
50   - loginFailed && loginFailed();
  94 + //loginFailed && loginFailed();
51 95 }
52 96 });
53 97 };
54   -
  98 +
55 99 var hangup = function () {
56 100 console.log('hangup...');
57 101 $.CallCenterPublicFun.Hangup();
  102 + $.CallCenterPublicFun.LoginOff();
58 103 };
59 104  
60 105 return {
... ...
src/main/resources/static/real_control_v2/js/signal_state/signal_state.js
... ... @@ -17,14 +17,14 @@ var gb_signal_state = (function () {
17 17 enable = false;
18 18  
19 19 var init = function () {
20   - $.get('/signalState/multi', {idx: gb_data_basic.line_idx}, function (rs) {
  20 + /*$.get('/signalState/multi', {idx: gb_data_basic.line_idx}, function (rs) {
21 21 //按班次ID分组
22 22 signal_state_data = gb_common.groupBy(rs, 'schId');
23 23  
24 24 for (var schId in signal_state_data) {
25 25 multi_render(signal_state_data[schId]);
26 26 }
27   - });
  27 + });*/
28 28 };
29 29  
30 30 var multi_render = function (list) {
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
... ... @@ -28,7 +28,7 @@
28 28 {{/if}}
29 29 </p>
30 30 <p>设备号:{{deviceId}}</p>
31   - <p>速度:{{speed}}</p>
  31 + <p>速度:{{speed>99?'..':speed}}</p>
32 32 <p>角度:{{direction}}</p>
33 33 <p>经度:{{lon}}</p>
34 34 <p>纬度:{{lat}}</p>
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
... ... @@ -233,6 +233,10 @@ var gb_map_gps_tree = (function () {
233 233 var deviceId = gb_data_basic.nbbm2deviceMap()[data.value]
234 234 ,gps = gb_data_gps.findOne(deviceId);
235 235  
  236 + if(gps.upDown==-1){
  237 + UIkit.notify(data.value + " 未知上下行!", {pos:'top-center'});
  238 + return;
  239 + }
236 240 //展开线路节点
237 241 tree.open_node(tree.get_node('map_tree_line_' + gps.lineId), function () {
238 242 //展开走向节点
... ... @@ -287,6 +291,7 @@ var gb_map_gps_tree = (function () {
287 291 create_node: create_node,
288 292 changeUpDown: changeUpDown,
289 293 update_node: update_node,
290   - refresh: refresh
  294 + refresh: refresh,
  295 + selectitem: selectitem
291 296 };
292 297 })();
293 298 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
... ... @@ -7,7 +7,8 @@ var gb_map_overlay_mge = (function () {
7 7 temps = gb_common.compileTempByDom(dom, {compress: true});
8 8 });
9 9  
10   - var gpsRefresh = function (addArr, upArr, upDownChange) {
  10 + var $abnormNoticePanel = $('.c_b_abnorm_notice');
  11 + var gpsRefresh = function (addArr, upArr, upDownChange, overspeedList) {
11 12 if(!$('.main-container .map-panel').is(':visible'))
12 13 return;
13 14 //如果地图正在重绘,暂时不刷新GPS
... ... @@ -16,8 +17,28 @@ var gb_map_overlay_mge = (function () {
16 17 //var all = addArr.concat(upArr).concat(upDownChange);
17 18 gpsRefreshAll(addArr, upArr, upDownChange);
18 19  
  20 + //渲染超速信息
  21 + overspeedList.sort(overspeed_sort);
  22 + var htmlStr = template('map_abnorm_overspeed_list-temp', {list: overspeedList});
  23 + $abnormNoticePanel.html(htmlStr).scrollTop($abnormNoticePanel[0].scrollHeight);
19 24 };
20 25  
  26 + var overspeed_sort = function (a, b) {
  27 + if(a.ets && !b.ets)
  28 + return -1;
  29 + if(!a.ets && b.ets)
  30 + return 1;
  31 + return a.st - b.st;
  32 + };
  33 +
  34 + /**
  35 + * 超速点击
  36 + */
  37 + $abnormNoticePanel.on('click', '.c_b_item', function () {
  38 + var nbbm = $(this).data('nbbm');
  39 + gb_map_gps_tree.selectitem(null, {value: nbbm});
  40 + });
  41 +
21 42 var gpsRefreshAll = function (addArr, upArr, upDownChange) {
22 43 //更新设备树菜单
23 44 if(gb_map_gps_tree.readyStatus()){
... ... @@ -87,7 +108,11 @@ var gb_map_overlay_mge = (function () {
87 108  
88 109 gb_map_imap.call('clearAll');
89 110  
90   - drawAllSection();
  111 + try{
  112 + drawAllSection();
  113 + }catch (e){
  114 + console.log(e);
  115 + }
91 116 //重绘GPS
92 117 gb_map_imap.call('drawRealGpsMarker', {gpsList: gb_common.get_vals(gb_data_gps.allGps)});
93 118  
... ...
src/main/resources/static/real_control_v2/mapmonitor/real.html
... ... @@ -53,6 +53,21 @@
53 53 </div>
54 54 </div>
55 55  
  56 +
  57 +<div class="c_b_abnorm_notice"></div>
  58 +
  59 +<script id="map_abnorm_overspeed_list-temp" type="text/html">
  60 + {{each list as obj i}}
  61 + <div class="c_b_item {{obj.ets!=null?'over':''}}" data-nbbm="{{obj.nbbm}}">
  62 + {{obj.sts}} - {{obj.nbbm}} 开始超速({{obj.speed}})
  63 +
  64 + {{if obj.ets!=null}}
  65 + <span class="c_b_over"> {{obj.ets}} 结束</span>
  66 + {{/if}}
  67 + </div>
  68 + {{/each}}
  69 +</script>
  70 +
56 71 <script src="/real_control_v2/assets/js/GeoUtils_min.js" merge="map_plugins"></script>
57 72 <script src="/real_control_v2/mapmonitor/js/config.js" merge="map_custom_js"></script>
58 73 <script src="/real_control_v2/mapmonitor/js/gps_tree.js" merge="map_custom_js"></script>
... ...