Commit 01360ea5963dc0a5ec9d66f762834b51c70c12a6

Authored by panzhaov5
1 parent 43c1ea3c

update...

src/main/java/com/bsth/XDApplication.java
... ... @@ -160,7 +160,7 @@ public class XDApplication implements CommandLineRunner {
160 160  
161 161 /** 线调业务 */
162 162 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
163   - sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 15, TimeUnit.SECONDS);//检查班次误点
  163 + sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
164 164 sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
165 165 sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
166 166  
... ...
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
... ... @@ -109,8 +109,18 @@ public class LateAdjustHandle implements ApplicationContextAware {
109 109 if (gps.getInstation() <= 0 || null == sch)
110 110 return;
111 111  
112   - if (!lateSchMap.containsKey(sch.getId()))
113   - return;
  112 + if (!lateSchMap.containsKey(sch.getId())) {
  113 + //班次是否误点(可能处于误点线程扫描的空隙,所以再判定一次)
  114 + if (sch.getDfsjT() <= gps.getTimestamp()) {
  115 + putLate(sch);
  116 +
  117 + if (!lateSchMap.containsKey(sch.getId()))
  118 + return;
  119 +
  120 + logger.info("线程空隙漏掉的误点,id: " + sch.getId());
  121 + } else
  122 + return;
  123 + }
114 124  
115 125  
116 126 //可能是延迟信号,gps时间没有误点
... ...
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
... ... @@ -743,11 +743,12 @@ public class GpsServiceImpl implements GpsService {
743 743 row.setHeight((short) (1.5 * 256));
744 744 row.createCell(0).setCellValue("序号");
745 745 row.createCell(1).setCellValue("车辆");
746   - row.createCell(2).setCellValue("所在道路");
747   - row.createCell(3).setCellValue("经度");
748   - row.createCell(4).setCellValue("纬度");
749   - row.createCell(5).setCellValue("时间");
750   - row.createCell(6).setCellValue("速度");
  746 + row.createCell(2).setCellValue("牌照号");
  747 + row.createCell(3).setCellValue("所在道路");
  748 + row.createCell(4).setCellValue("经度");
  749 + row.createCell(5).setCellValue("纬度");
  750 + row.createCell(6).setCellValue("时间");
  751 + row.createCell(7).setCellValue("速度");
751 752 //数据
752 753 DateTimeFormatter fmtHHmmss = DateTimeFormat.forPattern("HH:mm.ss"),
753 754 fmt = DateTimeFormat.forPattern("yyyyMMddHHmm");
... ... @@ -757,11 +758,12 @@ public class GpsServiceImpl implements GpsService {
757 758 row = sheet.createRow(i + 1);
758 759 row.createCell(0).setCellValue(i + 1);
759 760 row.createCell(1).setCellValue(nbbm);
760   - row.createCell(2).setCellValue(gps.getSection_name());
761   - row.createCell(3).setCellValue(gps.getLon());
762   - row.createCell(4).setCellValue(gps.getLat());
763   - row.createCell(5).setCellValue(fmtHHmmss.print(gps.getTimestamp()));
764   - row.createCell(6).setCellValue(gps.getSpeed());
  761 + row.createCell(2).setCellValue(BasicData.nbbmCompanyPlateMap.get(nbbm));
  762 + row.createCell(3).setCellValue(gps.getSection_name());
  763 + row.createCell(4).setCellValue(gps.getLon());
  764 + row.createCell(5).setCellValue(gps.getLat());
  765 + row.createCell(6).setCellValue(fmtHHmmss.print(gps.getTimestamp()));
  766 + row.createCell(7).setCellValue(gps.getSpeed());
765 767 }
766 768  
767 769 st = st * 1000;
... ...
src/main/resources/static/pages/permission/authorize_all/user_auth.html
... ... @@ -149,7 +149,7 @@
149 149 var fgs_name_mapp={
150 150 '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)',
151 151 '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)',
152   - '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_5': '南汇公司(南汇公司)', '26_6': '南汇公司(航头枢纽站)',
  152 + '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_5': '南汇公司(南汇公司)', '26_6': '南汇公司(南汇六分)',
153 153 '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)',
154 154 '77_78': '闵行公司', '99_100': '青浦公交','24_1': '一车队', '24_2': '二车队', '24_3': '三车队'
155 155 };
... ...
src/main/resources/static/real_control_v2/js/utils/svg_data_convert_bf.js deleted 100644 → 0
1   -var gb_svg_data_convert = (function () {
2   -
3   - /**
4   - * 合并上下行路由
5   - * type 0 上行 1 下行 2 同名合并 3 异名合并
6   - *
7   - * enableAttr: 是否启用配置信息
8   - */
9   - function mergeRoute(routes, enableAttr, lineCode, loopLine) {
10   - console.log('routesroutes', routes);
11   - //按上下行拆分
12   - routes = gb_common.groupBy(routes, 'directions');
13   - var up = routes[0],
14   - down = routes[1];
15   - //排序
16   - up.sort(upSort);
17   - down.sort(downSort);
18   - var data = [];
19   -
20   - //根据配置处理一下数据
21   - if (enableAttr) {
22   - var svgAttr = gb_data_basic.getSvgAttr(lineCode);
23   - if (svgAttr) {
24   - up = filterByAttrs(svgAttr, up);
25   - down = filterByAttrs(svgAttr, down);
26   - }
27   - }
28   -
29   - //环线 只画上行
30   - if(loopLine){
31   - for (var j = 0; j < up.length; j++) {
32   - var upS = nvl_get(up, j);
33   - op = {
34   - name: [upS.stationName],
35   - id: [get_station_code(upS)],
36   - type: 0,
37   - stationMark: upS.stationMark
38   - };
39   - data.push(op);
40   - }
41   -
42   - //上下行GPS容器
43   - $.each(data, function () {
44   - this.gpsUps = [];
45   - this.gpsDowns = [];
46   - });
47   -
48   - return data;
49   - }
50   -
51   -
52   - //同名站点合并
53   - for (var j = 0; j < up.length; j++) {
54   - var upS = nvl_get(up, j),
55   - downS = nvl_get(down, j),
56   - op = {
57   - name: [upS.stationName],
58   - id: [get_station_code(upS), get_station_code(downS)],
59   - type: 2,
60   - stationMark: upS.stationMark//站点标记
61   - };
62   -
63   - if (upS.stationName != downS.stationName) {
64   - //下行站点在上行路由中是否存在
65   - var dIndex = station_indexof(down, upS, j);
66   - //上行站点在下行路由中是否存在
67   - var uIndex = station_indexof(up, downS, j);
68   - if (dIndex == -1 || dIndex - j > 4) {
69   - if (uIndex == -1 && dIndex - j < 4) {
70   - op.type = 3;
71   - op.name = [upS.stationName, downS.stationName];
72   - }
73   - else {
74   - op.type = 0;
75   - op.id = [get_station_code(upS), -1];
76   - //占位
77   - down.splice(j, 0, {});
78   - }
79   - } else {
80   - for (var t = j; t < dIndex - 1; t++) {
81   - var temp = down[t];
82   - data.push({
83   - name: [temp.stationName],
84   - type: 1,
85   - id: [get_station_code(temp)]
86   - });
87   - }
88   - //delete
89   - down.splice(j, dIndex - 1 - j);
90   - j--;
91   - continue;
92   - }
93   - }
94   - data.push(op);
95   - }
96   -
97   - //将上下行挨着的异名站点合并
98   - var len = data.length - 1,
99   - first, sec;
100   - for (var s = 0; s < len; s++) {
101   - first = data[s];
102   - sec = data[s + 1];
103   -
104   - if (first.type == 0 &&
105   - sec.type == 1) {
106   - data.splice(s, 2, {
107   - name: [first['name'][0], sec['name'][0]],
108   - type: 3,
109   - id: [first['id'][0], sec['id'][0]]
110   - });
111   - len--;
112   - } else if (first.type == 1 && sec.type == 0) {
113   - data.splice(s, 2, {
114   - name: [first['name'][0], sec['name'][0]],
115   - type: 3,
116   - id: [first['id'][0], sec['id'][0]]
117   - });
118   - len--;
119   - }
120   - }
121   -
122   - //上下行GPS容器
123   - $.each(data, function () {
124   - this.gpsUps = [];
125   - this.gpsDowns = [];
126   - });
127   - return data;
128   - };
129   -
130   - var filterByAttrs = function (svgAttr, routes) {
131   - var hideStations = svgAttr.hideStations ? svgAttr.hideStations : [];
132   - var nicknames = svgAttr.nicknames ? svgAttr.nicknames : {};
133   - var stationCode;
134   - $.each(routes, function (i) {
135   - stationCode = this.stationCode
136   - //要隐藏的站点
137   - $.each(hideStations, function (j, hide) {
138   - if (stationCode == hide)
139   - delete routes[i];
140   - });
141   -
142   - //要重命名的站点
143   - if (nicknames[this.stationName]) {
144   - this.stationName = nicknames[this.stationName];
145   - }
146   - });
147   -
148   - var newRoutes = [];
149   - $.each(routes, function (i, station) {
150   - if(station)
151   - newRoutes.push(station);
152   - });
153   -
154   - return newRoutes;
155   - };
156   -
157   - var upSort = function (a, b) {
158   - return a.stationRouteCode - b.stationRouteCode;
159   - };
160   -
161   - var downSort = function (a, b) {
162   - return b.stationRouteCode - a.stationRouteCode;
163   - };
164   -
165   - var station_indexof = function (array, station, start) {
166   - var res = -1;
167   - for (var i = start, obj; obj = array[i++];) {
168   - if (obj.stationName == station.stationName) {
169   - res = i;
170   - break;
171   - }
172   - }
173   - return res;
174   - };
175   -
176   - var get_station_code = function (station) {
177   - return station.stationCode + '_' + station.directions;
178   - };
179   -
180   - var nvl_get = function (list, index) {
181   - return list[index] == null ? {} : list[index];
182   - };
183   -
184   - var groupByStationAndUpdown = function (data) {
185   - //gb_common.groupBy(data, 'stopNo')
186   - var rs = {},
187   - key;
188   - $.each(data, function () {
189   - key = this['stopNo'] + '_' + this['upDown'];
190   - if (!rs[key])
191   - rs[key] = [];
192   -
193   - rs[key].push(this);
194   - });
195   -
196   - return rs;
197   - };
198   - return {mergeRoute: mergeRoute, groupByStationAndUpdown: groupByStationAndUpdown};
199   -})();