Commit 96b63a8ec9516a1337bd8c515ac29732a85266e3

Authored by ljq
1 parent 82b25198

智能调度执行记录

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -884,4 +884,14 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -884,4 +884,14 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
884 884
885 return res; 885 return res;
886 } 886 }
  887 +
  888 + /**
  889 + * 智能调度大间隔临加班次
  890 + * @param ids
  891 + * @return
  892 + */
  893 + @RequestMapping(value = "thissch/{ids}", method = RequestMethod.POST)
  894 + public ScheduleRealInfo thissch(@RequestParam Integer ids){
  895 + return scheduleRealInfoService.thissch(ids);
  896 + }
887 } 897 }
src/main/java/com/bsth/controller/zndd/LoggerZnddController.java 0 → 100644
  1 +package com.bsth.controller.zndd;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.zndd.LoggerZndd;
  5 +import com.bsth.entity.zndd.ZnddYuAn;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.bind.annotation.RestController;
  8 +
  9 +@RestController
  10 +@RequestMapping("logZndd")
  11 +public class LoggerZnddController extends BaseController<LoggerZndd, Integer> {
  12 +}
src/main/java/com/bsth/data/zndd/AutomaticSch.java
@@ -10,7 +10,6 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity; @@ -10,7 +10,6 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity;
10 import com.bsth.data.schedule.DayOfSchedule; 10 import com.bsth.data.schedule.DayOfSchedule;
11 import com.bsth.data.schedule.ScheduleComparator; 11 import com.bsth.data.schedule.ScheduleComparator;
12 import com.bsth.data.schedule.late_adjust.LateAdjustHandle; 12 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
13 -import com.bsth.entity.StationRoute;  
14 import com.bsth.entity.directive.D60; 13 import com.bsth.entity.directive.D60;
15 import com.bsth.entity.realcontrol.ScheduleRealInfo; 14 import com.bsth.entity.realcontrol.ScheduleRealInfo;
16 import com.bsth.repository.StationRouteRepository; 15 import com.bsth.repository.StationRouteRepository;
@@ -54,7 +53,9 @@ public class AutomaticSch { @@ -54,7 +53,9 @@ public class AutomaticSch {
54 carMonitor carMonitor; 53 carMonitor carMonitor;
55 @Autowired 54 @Autowired
56 BasicData basicData; 55 BasicData basicData;
57 - 56 +
  57 + Queue<Map> queue = new LinkedList<>();
  58 +
58 private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); 59 private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm");
59 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); 60 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm");
60 61
@@ -62,24 +63,24 @@ public class AutomaticSch { @@ -62,24 +63,24 @@ public class AutomaticSch {
62 private Map<String,Long> drivreMap =new HashMap<>(); //自动重发map 63 private Map<String,Long> drivreMap =new HashMap<>(); //自动重发map
63 // 当日60指令缓存 64 // 当日60指令缓存
64 private ConcurrentMap<Integer, D60> d60Map = new ConcurrentHashMap<>();//d60map 65 private ConcurrentMap<Integer, D60> d60Map = new ConcurrentHashMap<>();//d60map
65 - 66 +
66 String urldkl = "http://10.10.200.202:5580/monitor/api/getMonitorInfoByDay?key=1&solt=1111&t=1&dayStr=2024-07-23"; //大间隔接口 67 String urldkl = "http://10.10.200.202:5580/monitor/api/getMonitorInfoByDay?key=1&solt=1111&t=1&dayStr=2024-07-23"; //大间隔接口
67 68
68 //http://10.10.200.201:8083/wxk-prod-api/service-api/lggj/schedule/drByInfo 维修接口 69 //http://10.10.200.201:8083/wxk-prod-api/service-api/lggj/schedule/drByInfo 维修接口
69 70
70 private Map<String,Long> SFMAP = new HashMap<>(); 71 private Map<String,Long> SFMAP = new HashMap<>();
71 - 72 +
72 //满载 73 //满载
73 public void mz(){ 74 public void mz(){
74 try { 75 try {
75 ScheduleRealInfo sr = dayOfSchedule.executeCurr("S0R-054"); 76 ScheduleRealInfo sr = dayOfSchedule.executeCurr("S0R-054");
76 - ts(addStationPeople(sr, "MZ", 0L));//第二种 设备未离线 出站时间内未出站 77 + ts(addStationPeople(sr, "MZ", 0L));//第二种 设备未离线 出站时间内未出站
77 } 78 }
78 catch (Exception e){ 79 catch (Exception e){
79 logger.error("满载------------------",e); 80 logger.error("满载------------------",e);
80 } 81 }
81 } 82 }
82 - 83 +
83 //大间隔的情况 84 //大间隔的情况
84 public void dfTz(){ 85 public void dfTz(){
85 try{ 86 try{
@@ -88,33 +89,60 @@ public class AutomaticSch { @@ -88,33 +89,60 @@ public class AutomaticSch {
88 return; 89 return;
89 JSONObject obj = JSON.parseObject(sb.toString()); 90 JSONObject obj = JSON.parseObject(sb.toString());
90 List<LargeGap> lgs = JSON.parseArray(obj.getString("largeGap"), LargeGap.class); 91 List<LargeGap> lgs = JSON.parseArray(obj.getString("largeGap"), LargeGap.class);
91 - Long its = 0l; 92 + ScheduleRealInfo sch;
92 //数据转换 并推送 93 //数据转换 并推送
93 for (LargeGap lg : lgs){ 94 for (LargeGap lg : lgs){
94 if(dayOfSchedule.executeCurr(lg.getNbbm()) != null){ 95 if(dayOfSchedule.executeCurr(lg.getNbbm()) != null){
95 - its= dayOfSchedule.executeCurr(lg.getNbbm()).getId(); 96 + sch= dayOfSchedule.executeCurr(lg.getNbbm());
96 }else { 97 }else {
97 continue; 98 continue;
98 } 99 }
99 - ts(ConvertDJK(lg,its.toString())); 100 +
  101 + ts(ConvertDJK(lg,sch));
100 } 102 }
101 - 103 +
102 }catch (Exception e){ 104 }catch (Exception e){
103 logger.error("大间隔推送失败------------------",e); 105 logger.error("大间隔推送失败------------------",e);
104 } 106 }
105 } 107 }
106 - 108 + //发现大客流 -> 大客流情况 ->处置大客流
  109 + public void Dkl(){
  110 + //推送
  111 +
  112 + try{
  113 + Map m = queue.poll();
  114 + if (m != null) {
  115 + if (Integer.valueOf(m.get("num").toString()) > 15) {
  116 + //超过10的时候 判断为大客流
  117 +
  118 + ts(ConvertDKL(m));
  119 +
  120 + }
  121 + }
  122 +
  123 + ScheduleRealInfo sr = dayOfSchedule.findByNbbm("W8A-009").get(0);
  124 + ts(addStationPeople(sr, "DKL", 0L));//大客流
  125 +
  126 +
  127 + }catch (Exception e){
  128 + logger.error("大客流推送失败------------------",e);
  129 + }
  130 +
  131 + }
  132 +
  133 +
  134 +
107 //撤销班次 检测人员或者车辆故障 --//换人换车或烂班 //路牌对调 135 //撤销班次 检测人员或者车辆故障 --//换人换车或烂班 //路牌对调
108 public void cxJC(){ 136 public void cxJC(){
109 137
110 138
111 } 139 }
112 - 140 +
113 //撤销撤销班次 检测人员或者车辆故障 --//换人换车或烂班 //路牌对调 141 //撤销撤销班次 检测人员或者车辆故障 --//换人换车或烂班 //路牌对调
114 public void cxJCX(){ 142 public void cxJCX(){
115 143
116 } 144 }
117 - 145 +
118 //实发未发检测 -- 车辆GPS掉线的情况下,车辆该出站了 146 //实发未发检测 -- 车辆GPS掉线的情况下,车辆该出站了
119 /** 147 /**
120 * 1。已过待发时间还没发车的 148 * 1。已过待发时间还没发车的
@@ -132,80 +160,62 @@ public class AutomaticSch { @@ -132,80 +160,62 @@ public class AutomaticSch {
132 //1.离线 2.实发时间为空 3.已过待发时间还没发车的 160 //1.离线 2.实发时间为空 3.已过待发时间还没发车的
133 long time = System.currentTimeMillis();//实际时间+2分钟 161 long time = System.currentTimeMillis();//实际时间+2分钟
134 //超过待发时间 实发时间还是null的 162 //超过待发时间 实发时间还是null的
135 - if (sr.getFcsjT()+ (1000 * 60 * 3) < time && sr.getFcsjT()+ (1000 * 60 * 7) > time) { 163 + if (sr.getFcsjT() + (1000 * 60 * 3) < time && sr.getFcsjT() + (1000 * 60 * 7) > time) {
136 164
137 - //起点站实际到达时间为null的情况下  
138 - /* if (StringUtils.isEmpty(sr.getQdzArrDatesj())) {  
139 - ScheduleRealInfo prev = dayOfSchedule.prev(sr);  
140 - //上一个班次没有实际终点到达时间  
141 - if (prev != null && StringUtils.isEmpty(prev.getZdsjActual())) {  
142 - continue;  
143 - }  
144 - }*/  
145 //第一种 设备离线的情况下改出站 165 //第一种 设备离线的情况下改出站
146 Integer staus = 0; //状态 166 Integer staus = 0; //状态
147 - if (StringUtils.isEmpty(sr.getFcsjActual())  
148 - && (sr.getBcType().equals("normal") || sr.getBcType().equals("region")) 167 + if (StringUtils.isEmpty(sr.getFcsjActual())
  168 + && (sr.getBcType().equals("normal") || sr.getBcType().equals("region"))
149 && (StringUtils.isEmpty(sr.getRemarks()) || sr.getRemarks().equals("_智能调度-异常实发"))) { 169 && (StringUtils.isEmpty(sr.getRemarks()) || sr.getRemarks().equals("_智能调度-异常实发"))) {
150 170
151 - GpsEntity gps = gpsRealData.getByNbbm(sr.getClZbh());  
152 - //当前设备离线的情况 171 + GpsEntity gps = gpsRealData.getByNbbm(sr.getClZbh());
  172 + //当前设备离线的情况
153 //1。一直没收到gps 173 //1。一直没收到gps
154 //2.gps长时间离线的情况下 174 //2.gps长时间离线的情况下
155 //3.人为调整过的都跳过 175 //3.人为调整过的都跳过
156 - if (gps == null || gps.getTimestamp() + (1000 * 60 * 3) < time || (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))){ 176 + if (gps == null || gps.getTimestamp() + (1000 * 60 * 3) < time || (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))) {
157 ts(addStationPeople(sr, "SFTZ_1", 0L)); 177 ts(addStationPeople(sr, "SFTZ_1", 0L));
158 Gson gson = new Gson(); 178 Gson gson = new Gson();
159 String chartStr = gson.toJsonTree(sr).toString(); 179 String chartStr = gson.toJsonTree(sr).toString();
160 - logger.info("实发调整--"+chartStr); 180 + logger.info("实发调整--" + chartStr);
161 } 181 }
162 } 182 }
163 } 183 }
164 } 184 }
165 - 185 +
166 } 186 }
167 }catch (Exception e){ 187 }catch (Exception e){
168 logger.error("自动调度,实发未发推送失败---",e); 188 logger.error("自动调度,实发未发推送失败---",e);
169 } 189 }
170 logger.warn("实发未发扫描结束"); 190 logger.warn("实发未发扫描结束");
171 } 191 }
172 - 192 +
173 //实发撤销检测 -- 出现快一慢三的情况 && 指令重发 193 //实发撤销检测 -- 出现快一慢三的情况 && 指令重发
174 public void sfCX(){ 194 public void sfCX(){
175 //查询所有班次 195 //查询所有班次
176 //remark 人工干预过的的不检测 196 //remark 人工干预过的的不检测
177 try { 197 try {
178 198
179 - stationRouteRepository.findAll();  
180 -  
181 - Iterator<StationRoute> iterator = stationRouteRepository.findAll().iterator();  
182 -// Map<String, String> stationCode2Name = new HashMap<>();  
183 -// StationRoute sroute;  
184 -// while (iterator.hasNext()) {  
185 -// sroute = iterator.next();  
186 -// stationCode2Name.put(sroute.getLineCode() + "_" + sroute.getDirections() + "_" + sroute.getStationCode(), sroute.getStationMark());  
187 -// }  
188 -//  
189 Map<String, String> lineMap = BasicData.lineCode2NameMap; 199 Map<String, String> lineMap = BasicData.lineCode2NameMap;
190 List<ScheduleRealInfo> oldSchDateList; 200 List<ScheduleRealInfo> oldSchDateList;
191 String lineCode; 201 String lineCode;
192 for (Map.Entry<String, String> ts : lineMap.entrySet()){ 202 for (Map.Entry<String, String> ts : lineMap.entrySet()){
193 lineCode =ts.getKey(); 203 lineCode =ts.getKey();
194 oldSchDateList = dayOfSchedule.findByLineCode(lineCode); 204 oldSchDateList = dayOfSchedule.findByLineCode(lineCode);
195 - 205 +
196 Map m = new HashMap(); 206 Map m = new HashMap();
197 //排序 207 //排序
198 Collections.sort(oldSchDateList, new ScheduleComparator.FCSJ()); 208 Collections.sort(oldSchDateList, new ScheduleComparator.FCSJ());
199 for (ScheduleRealInfo t : oldSchDateList){ 209 for (ScheduleRealInfo t : oldSchDateList){
200 - // 发车误点  
201 - if (t.getDfsj() != null && t.getFcsjActual() != null 210 + // 发车误点
  211 + if (t.getDfsj() != null && t.getFcsjActual() != null
202 && (t.getBcType().equals("normal") || t.getBcType().equals("region")) 212 && (t.getBcType().equals("normal") || t.getBcType().equals("region"))
203 && (StringUtils.isEmpty(t.getRemarks()) || t.getRemarks().equals("_智能调度-异常实发"))) { 213 && (StringUtils.isEmpty(t.getRemarks()) || t.getRemarks().equals("_智能调度-异常实发"))) {
204 214
205 long sjc = t.getFcsjActualTime() - t.getDfsjT(); 215 long sjc = t.getFcsjActualTime() - t.getDfsjT();
206 long time = System.currentTimeMillis();//当前时间 216 long time = System.currentTimeMillis();//当前时间
207 -  
208 - if (t.getDfsjT() > time) { 217 +
  218 + if (t.getDfsjT() > time) {
209 //快1慢3 219 //快1慢3
210 if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { 220 if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) {
211 continue; 221 continue;
@@ -217,36 +227,31 @@ public class AutomaticSch { @@ -217,36 +227,31 @@ public class AutomaticSch {
217 logger.info("实发撤销--" + chartStr); 227 logger.info("实发撤销--" + chartStr);
218 } 228 }
219 } 229 }
220 -  
221 - /* //待发时间要大于当前时间  
222 - //车辆还在站内  
223 - String mark = null;  
224 - if (gps != null){  
225 - mark = stationCode2Name.get(gps.getLineId()+"_"+gps.getUpDown()+"_"+gps.getStopNo());  
226 - }  
227 - if (t.getFcsjT() > time && ((gps!= null && gps.getInstation() == 2)  
228 - || gps == null ||  
229 - (gps!= null && mark!=null && mark.equals("B") && gps.getInstation() == 1) ||  
230 - (gps!= null && mark!=null && mark.equals("E") && gps.getInstation() == 1))) {  
231 -  
232 - }*/  
233 } 230 }
  231 +
234 } 232 }
235 } 233 }
236 }catch (Exception e){ 234 }catch (Exception e){
237 logger.error("实发撤销推送接口出错-----------",e); 235 logger.error("实发撤销推送接口出错-----------",e);
238 } 236 }
239 } 237 }
240 - 238 +
  239 + public Boolean isLines(String line) {
  240 + //新临专线,新芦专线,临港5路,浦东7路,浦东91路
  241 + if (line.equals("10636") || line.equals("200828") || line.equals("211208") || line.equals("230226") || line.equals("201012"))
  242 + return Boolean.valueOf(true);
  243 + return Boolean.valueOf(false);
  244 + }
  245 +
241 //发车信息微调检测 -- 车辆掉线后实发检测,重新计算时间发车时间 246 //发车信息微调检测 -- 车辆掉线后实发检测,重新计算时间发车时间
242 public void updatesf(){ 247 public void updatesf(){
243 - 248 +
244 } 249 }
245 - 250 +
246 //临加班次 -- 检测到大客流 //走落地屏客流接口 251 //临加班次 -- 检测到大客流 //走落地屏客流接口
247 public void ljbc(){ 252 public void ljbc(){
248 -  
249 - 253 +
  254 +
250 } 255 }
251 256
252 /** 257 /**
@@ -265,30 +270,29 @@ public class AutomaticSch { @@ -265,30 +270,29 @@ public class AutomaticSch {
265 String lineCode; 270 String lineCode;
266 for (Map.Entry<String, String> ts : lineMap.entrySet()) { 271 for (Map.Entry<String, String> ts : lineMap.entrySet()) {
267 lineCode = ts.getKey(); 272 lineCode = ts.getKey();
268 - /* if (!lineCode.equals("12101"))  
269 - return;*/  
270 -  
271 - oldSchDateList = dayOfSchedule.findByLineCode(lineCode);  
272 - for (ScheduleRealInfo t : oldSchDateList){  
273 - //指令重发  
274 - //1.班次已经执行过的  
275 - //2.驾驶员未确认的  
276 - //3.  
277 - Long t1 = 1000L * 60 * 5;  
278 - Long sj = new Date().getTime();  
279 - if(t.getStatus() == 2 && t.getDirectiveState() != 200 && t.getBcType().equals("normal")){  
280 - //还未下发的  
281 - if (drivreMap.get(t.getClZbh()) == null){  
282 - //下发或者处置  
283 - drivreMap.put(t.getClZbh(),new Date().getTime());  
284 - directiveService.send60DispatchZndd(t.getId(), "智能调度");  
285 -  
286 - //下发实际超过5分钟的  
287 - } else if (drivreMap.get(t.getClZbh()) + t1 <= sj){  
288 - directiveService.send60DispatchZndd(t.getId(), "智能调度");  
289 - //更新下发时间  
290 - drivreMap.put(t.getClZbh(),new Date().getTime());  
291 - //下发时间未超过5分钟返回 273 + if(isLines(lineCode)) {
  274 +
  275 + oldSchDateList = dayOfSchedule.findByLineCode(lineCode);
  276 + for (ScheduleRealInfo t : oldSchDateList) {
  277 + //指令重发
  278 + //1.班次已经执行过的
  279 + //2.驾驶员未确认的
  280 + Long t1 = 1000L * 60 * 5;
  281 + Long sj = new Date().getTime();
  282 + if (t.getStatus() == 2 && t.getDirectiveState() != 200 && t.getBcType().equals("normal")) {
  283 + //还未下发的
  284 + if (drivreMap.get(t.getClZbh()) == null) {
  285 + //下发或者处置
  286 + drivreMap.put(t.getClZbh(), new Date().getTime());
  287 + directiveService.send60DispatchZndd(t.getId(), "智能调度");
  288 +
  289 + //下发实际超过5分钟的
  290 + } else if (drivreMap.get(t.getClZbh()) + t1 <= sj) {
  291 + directiveService.send60DispatchZndd(t.getId(), "智能调度");
  292 + //更新下发时间
  293 + drivreMap.put(t.getClZbh(), new Date().getTime());
  294 + //下发时间未超过5分钟返回
  295 + }
292 } 296 }
293 } 297 }
294 } 298 }
@@ -312,7 +316,7 @@ public class AutomaticSch { @@ -312,7 +316,7 @@ public class AutomaticSch {
312 if(sch.getDfsjT() > t) 316 if(sch.getDfsjT() > t)
313 break; 317 break;
314 318
315 - /*if(sch.isLate()) 319 + /*if(sch.isLate()) //演示使用 不跳过
316 continue;*/ 320 continue;*/
317 321
318 if(sch.getStatus() == 0 322 if(sch.getStatus() == 0
@@ -344,9 +348,9 @@ public class AutomaticSch { @@ -344,9 +348,9 @@ public class AutomaticSch {
344 } 348 }
345 return null; 349 return null;
346 } 350 }
347 -  
348 -  
349 - 351 +
  352 +
  353 +
350 public void ts(Map m) throws ParseException { 354 public void ts(Map m) throws ParseException {
351 //记录存一下 --超过当前时间的是否推送? 355 //记录存一下 --超过当前时间的是否推送?
352 String st = m.get("lineCode")+"_"+m.get("type")+"_"+m.get("rqStr"); 356 String st = m.get("lineCode")+"_"+m.get("type")+"_"+m.get("rqStr");
@@ -357,7 +361,7 @@ public class AutomaticSch { @@ -357,7 +361,7 @@ public class AutomaticSch {
357 if (ZnddThread.ZNDDTYPEMAP.get(st) != null ) { 361 if (ZnddThread.ZNDDTYPEMAP.get(st) != null ) {
358 list = ZnddThread.ZNDDTYPEMAP.get(st); 362 list = ZnddThread.ZNDDTYPEMAP.get(st);
359 int i = 0; 363 int i = 0;
360 - 364 +
361 for (Long s : list){ //推送过的同样情况1小时内 &&//超过当前时间的不推送&& sj < dsj 365 for (Long s : list){ //推送过的同样情况1小时内 &&//超过当前时间的不推送&& sj < dsj
362 if (Math.abs(s - sj) > (60 * 60 * 1000)){ 366 if (Math.abs(s - sj) > (60 * 60 * 1000)){
363 i ++ ; 367 i ++ ;
@@ -370,13 +374,14 @@ public class AutomaticSch { @@ -370,13 +374,14 @@ public class AutomaticSch {
370 outEntrance.Znddjk(m);//推送 374 outEntrance.Znddjk(m);//推送
371 } 375 }
372 376
  377 +
373 } 378 }
374 379
375 380
376 381
377 382
378 //大间隔数据转换 383 //大间隔数据转换
379 - public Map ConvertDJK(LargeGap lg,String ids){ 384 + public Map ConvertDJK(LargeGap lg,ScheduleRealInfo sch){
380 Map sp = new HashMap(); 385 Map sp = new HashMap();
381 sp.put("uuid",UUID()); 386 sp.put("uuid",UUID());
382 sp.put("lineCode",lg.getLineCode()); 387 sp.put("lineCode",lg.getLineCode());
@@ -390,12 +395,24 @@ public class AutomaticSch { @@ -390,12 +395,24 @@ public class AutomaticSch {
390 sp.put("stationName",lg.getStationName()); 395 sp.put("stationName",lg.getStationName());
391 sp.put("clzbh",lg.getNbbm()); 396 sp.put("clzbh",lg.getNbbm());
392 sp.put("fcsj",lg.getBcfcsj()); 397 sp.put("fcsj",lg.getBcfcsj());
393 - sp.put("ids",ids); 398 + sp.put("ids",sch.getId());
394 sp.put("lg",lg); 399 sp.put("lg",lg);
  400 + sp.put("sch",sch);
395 return sp; 401 return sp;
  402 + }
396 403
  404 + //大间隔数据转换
  405 + public Map ConvertDKL(Map m){
  406 + Map sp = new HashMap();
  407 + sp.put("uuid",UUID());
  408 + sp.put("lineCode",m.get("lineCode"));
  409 + sp.put("lineName",m.get("lineName"));
  410 + sp.put("rqStr",sdf.format(new Date()));
  411 + sp.put("rq",sdfHHmm.format(new Date())); //检测到时间
  412 + return sp;
397 } 413 }
398 414
  415 +
399 //转换 416 //转换
400 public Map addStationPeople(ScheduleRealInfo info,String type,Long sst) throws ParseException{ 417 public Map addStationPeople(ScheduleRealInfo info,String type,Long sst) throws ParseException{
401 Map sp = new HashMap(); 418 Map sp = new HashMap();
src/main/java/com/bsth/data/zndd/OutEntrance.java
1 package com.bsth.data.zndd; 1 package com.bsth.data.zndd;
2 import com.bsth.common.ResponseCode; 2 import com.bsth.common.ResponseCode;
3 import com.bsth.data.schedule.DayOfSchedule; 3 import com.bsth.data.schedule.DayOfSchedule;
  4 +import com.bsth.data.schedule.ScheduleComparator;
  5 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  6 +import com.bsth.entity.zndd.StationPeopleLogger;
  7 +import com.bsth.entity.zndd.StationSignsLogger;
4 import com.bsth.websocket.handler.SendUtils; 8 import com.bsth.websocket.handler.SendUtils;
5 import com.fasterxml.jackson.databind.ObjectMapper; 9 import com.fasterxml.jackson.databind.ObjectMapper;
6 import org.slf4j.Logger; 10 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
8 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.beans.factory.annotation.Value;
9 import org.springframework.web.bind.annotation.*; 14 import org.springframework.web.bind.annotation.*;
10 import java.io.*; 15 import java.io.*;
11 import java.text.SimpleDateFormat; 16 import java.text.SimpleDateFormat;
  17 +import java.time.LocalTime;
  18 +import java.time.format.DateTimeFormatter;
12 import java.util.*; 19 import java.util.*;
13 20
14 /** 21 /**
@@ -26,7 +33,7 @@ public class OutEntrance { @@ -26,7 +33,7 @@ public class OutEntrance {
26 DayOfSchedule dayOfSchedule; 33 DayOfSchedule dayOfSchedule;
27 34
28 35
29 - /* @Value("${dc.imgurl}") 36 + @Value("${dc.imgurl}")
30 private String imgurl; //存储图片地址 37 private String imgurl; //存储图片地址
31 38
32 @Value("${dc.profile}") 39 @Value("${dc.profile}")
@@ -34,12 +41,12 @@ public class OutEntrance { @@ -34,12 +41,12 @@ public class OutEntrance {
34 41
35 static String url= "http://58.34.52.130:9777/xxfb/carMonitor?"; //信息发布地址 42 static String url= "http://58.34.52.130:9777/xxfb/carMonitor?"; //信息发布地址
36 Logger logger = LoggerFactory.getLogger(this.getClass()); 43 Logger logger = LoggerFactory.getLogger(this.getClass());
  44 + @Autowired
  45 + carMonitor carMonitor;
37 46
38 47
39 48
40 - /****  
41 - 调度屏小程序接口。  
42 - 49 + //调度屏小程序接口。
43 @RequestMapping(value = "/OutCar", method = RequestMethod.POST) 50 @RequestMapping(value = "/OutCar", method = RequestMethod.POST)
44 public Map OutCarOutCar(@RequestParam Map m,@RequestBody Map<String, String> map) { 51 public Map OutCarOutCar(@RequestParam Map m,@RequestBody Map<String, String> map) {
45 52
@@ -59,41 +66,39 @@ public class OutEntrance { @@ -59,41 +66,39 @@ public class OutEntrance {
59 //查询班次情况自动回复 66 //查询班次情况自动回复
60 //当前日期 67 //当前日期
61 //String rq = DateUtils.dqDate(); 68 //String rq = DateUtils.dqDate();
62 - List<Map> dzList = carMonitorThread.carMonitor(ssLogger.getLineCode(), ssLogger.getDir(), ssLogger.getStation()); //信息发布接口 69 + List<Map> dzList = carMonitor.carMonitor(ssLogger.getLineCode(), ssLogger.getDir(), ssLogger.getStation()); //信息发布接口
63 if (dzList.size() > 0){ 70 if (dzList.size() > 0){
64 - rtn.put("message","车辆还有"+dzList.get(0).get("sj")+"抵达,请耐心等待"); 71 + rtn.put("message","车辆还有"+dzList.get(0).get("sj")+"抵达,请耐心等待");
65 }else { 72 }else {
66 - //筛选方向  
67 - List<ScheduleRealInfo> rs = dayOfSchedule.findByLineCode(ssLogger.getLineCode());  
68 - //排序  
69 - Collections.sort(rs,new ScheduleComparator.FCSJ());  
70 - SimpleDateFormat sdf= new SimpleDateFormat("HH:ss");  
71 - String sjtext = "";  
72 - LocalTime t1 = LocalTime.parse(sdf.format(new Date()), DateTimeFormatter.ofPattern("HH:mm"));  
73 - for (ScheduleRealInfo sr:rs) {  
74 - LocalTime t2 = LocalTime.parse(sr.getFcsj(), DateTimeFormatter.ofPattern("HH:mm"));  
75 - //判断上下行  
76 - if(t1.isAfter(t2)){  
77 - sjtext = sr.getFcsj();  
78 - }  
79 - }  
80 -  
81 - rtn.put("message","航津路与杨高北路交叉口拥堵,请耐心等待");  
82 - rtn.put("message_els","The intersection of Hangjin Road and Yanggao North Road is congested, please be patient and wait"); 73 + //筛选方向
  74 + List<ScheduleRealInfo> rs = dayOfSchedule.findByLineCode(ssLogger.getLineCode());
  75 + //排序
  76 + Collections.sort(rs,new ScheduleComparator.FCSJ());
  77 + SimpleDateFormat sdf= new SimpleDateFormat("HH:ss");
  78 + String sjtext = "";
  79 + LocalTime t1 = LocalTime.parse(sdf.format(new Date()), DateTimeFormatter.ofPattern("HH:mm"));
  80 + for (ScheduleRealInfo sr:rs) {
  81 + LocalTime t2 = LocalTime.parse(sr.getFcsj(), DateTimeFormatter.ofPattern("HH:mm"));
  82 + //判断上下行
  83 + if(t1.isAfter(t2)){
  84 + sjtext = sr.getFcsj();
  85 + }
  86 + }
  87 +
  88 + rtn.put("message","航津路与杨高北路交叉口拥堵,请耐心等待");
  89 + rtn.put("message_els","The intersection of Hangjin Road and Yanggao North Road is congested, please be patient and wait");
83 } 90 }
84 91
85 -  
86 -  
87 - rtn.put("status",ResponseCode.SUCCESS); 92 + rtn.put("status",ResponseCode.SUCCESS);
88 } catch (Exception e) { 93 } catch (Exception e) {
89 - rtn.put("status", ResponseCode.ERROR);  
90 - logger.info(e.getMessage()); 94 + rtn.put("status", ResponseCode.ERROR);
  95 + logger.info(e.getMessage());
91 } 96 }
92 97
93 - return rtn; 98 + return rtn;
94 } 99 }
95 100
96 - */ 101 +
97 /* 102 /*
98 智能调度接口--通用测试接口 103 智能调度接口--通用测试接口
99 */ 104 */
@@ -115,9 +120,8 @@ public class OutEntrance { @@ -115,9 +120,8 @@ public class OutEntrance {
115 return rtn; 120 return rtn;
116 } 121 }
117 122
118 - /*  
119 - 智能调度接口-大客流  
120 - 123 +
  124 + //智能调度接口-大客流
121 @RequestMapping(value="/dkl",method = RequestMethod.POST) 125 @RequestMapping(value="/dkl",method = RequestMethod.POST)
122 public Map ddkl(@RequestParam Map m) { 126 public Map ddkl(@RequestParam Map m) {
123 Map rtn = new HashMap<>(); 127 Map rtn = new HashMap<>();
@@ -130,7 +134,7 @@ public class OutEntrance { @@ -130,7 +134,7 @@ public class OutEntrance {
130 ssLogger.setType("大客流"); 134 ssLogger.setType("大客流");
131 135
132 //保存记录 136 //保存记录
133 - znddLoggerService.save(ssLogger); 137 + //znddLoggerService.save(ssLogger);
134 //线调页面推送 138 //线调页面推送
135 //sendUtils.sendzndd(ssLogger); 139 //sendUtils.sendzndd(ssLogger);
136 140
@@ -141,7 +145,7 @@ public class OutEntrance { @@ -141,7 +145,7 @@ public class OutEntrance {
141 } 145 }
142 return rtn; 146 return rtn;
143 } 147 }
144 - */ 148 +
145 149
146 150
147 151
@@ -151,7 +155,7 @@ public class OutEntrance { @@ -151,7 +155,7 @@ public class OutEntrance {
151 * @param 上传地址(示例:D:\\1.png) 155 * @param 上传地址(示例:D:\\1.png)
152 * @return 156 * @return
153 */ 157 */
154 - /*public String uploadBase64Img(String base) { 158 + public String uploadBase64Img(String base) {
155 159
156 //获取年月日 160 //获取年月日
157 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 161 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -207,7 +211,7 @@ public class OutEntrance { @@ -207,7 +211,7 @@ public class OutEntrance {
207 } 211 }
208 } 212 }
209 return null; 213 return null;
210 - }*/ 214 + }
211 215
212 216
213 217
src/main/java/com/bsth/data/zndd/ZnddThread.java
@@ -84,6 +84,16 @@ public class ZnddThread extends Thread{ @@ -84,6 +84,16 @@ public class ZnddThread extends Thread{
84 automaticSch.wd(); 84 automaticSch.wd();
85 logger.info("误点执行完毕"); 85 logger.info("误点执行完毕");
86 } 86 }
  87 + if (zs.getType().equals("djg")){
  88 + automaticSch.dfTz();
  89 + logger.info("大间隔执行完毕");
  90 + }
  91 +
  92 + if (zs.getType().equals("dkl")){
  93 + automaticSch.Dkl();
  94 + logger.info("大客流执行完毕");
  95 + }
  96 +
87 } 97 }
88 } 98 }
89 }catch (Exception e){ 99 }catch (Exception e){
src/main/java/com/bsth/entity/zndd/LoggerZndd.java
@@ -22,6 +22,15 @@ public class LoggerZndd implements Serializable { @@ -22,6 +22,15 @@ public class LoggerZndd implements Serializable {
22 // 创建人 22 // 创建人
23 private Integer createBy; 23 private Integer createBy;
24 24
  25 + private String lineCode;
  26 +
  27 + private String LineName;
  28 +
  29 + private String rq;
  30 +
  31 + private String timeStr;
  32 +
  33 + private String dir;
25 34
26 // 创建日期 35 // 创建日期
27 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 36 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
@@ -58,4 +67,44 @@ public class LoggerZndd implements Serializable { @@ -58,4 +67,44 @@ public class LoggerZndd implements Serializable {
58 public void setCreateDate(Date createDate) { 67 public void setCreateDate(Date createDate) {
59 this.createDate = createDate; 68 this.createDate = createDate;
60 } 69 }
  70 +
  71 + public String getLineCode() {
  72 + return lineCode;
  73 + }
  74 +
  75 + public void setLineCode(String lineCode) {
  76 + this.lineCode = lineCode;
  77 + }
  78 +
  79 + public String getLineName() {
  80 + return LineName;
  81 + }
  82 +
  83 + public void setLineName(String lineName) {
  84 + LineName = lineName;
  85 + }
  86 +
  87 + public String getRq() {
  88 + return rq;
  89 + }
  90 +
  91 + public void setRq(String rq) {
  92 + this.rq = rq;
  93 + }
  94 +
  95 + public String getTimeStr() {
  96 + return timeStr;
  97 + }
  98 +
  99 + public void setTimeStr(String timeStr) {
  100 + this.timeStr = timeStr;
  101 + }
  102 +
  103 + public String getDir() {
  104 + return dir;
  105 + }
  106 +
  107 + public void setDir(String dir) {
  108 + this.dir = dir;
  109 + }
61 } 110 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1635,7 +1635,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1635,7 +1635,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1635 rs.put("status", ResponseCode.SUCCESS); 1635 rs.put("status", ResponseCode.SUCCESS);
1636 rs.put("ts", ts); 1636 rs.put("ts", ts);
1637 1637
1638 - LoggerZndd lz = new LoggerZndd(); 1638 + LoggerZndd lz = addZndd(sch);
1639 String text = sch.getXlName()+"_"+sch.getFcsj()+"的班次进行了实发调整"; 1639 String text = sch.getXlName()+"_"+sch.getFcsj()+"的班次进行了实发调整";
1640 lz.setText(text); 1640 lz.setText(text);
1641 lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); 1641 lz.setCreateBy(SecurityUtils.getCurrentUser().getId());
@@ -1652,6 +1652,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1652,6 +1652,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1652 return rs; 1652 return rs;
1653 } 1653 }
1654 1654
  1655 +
  1656 + public LoggerZndd addZndd(ScheduleRealInfo sch){
  1657 + LoggerZndd lz = new LoggerZndd();
  1658 + lz.setLineCode(sch.getXlBm());
  1659 + lz.setLineName(sch.getXlName());
  1660 + lz.setRq(sch.getScheduleDateStr());
  1661 + lz.setTimeStr(sch.getFcsj());
  1662 + lz.setDir(sch.getXlDir());
  1663 + return lz;
  1664 + }
  1665 +
1655 @Override 1666 @Override
1656 public Map<String, Object> revokeDestroy(Long id) { 1667 public Map<String, Object> revokeDestroy(Long id) {
1657 Map<String, Object> rs = new HashMap<>(); 1668 Map<String, Object> rs = new HashMap<>();
@@ -1736,7 +1747,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1736,7 +1747,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1736 1747
1737 dayOfSchedule.save(sch); 1748 dayOfSchedule.save(sch);
1738 1749
1739 - LoggerZndd lz = new LoggerZndd(); 1750 + LoggerZndd lz = addZndd(sch);
1740 String text = sch.getXlName()+"_"+sch.getFcsj()+"的班次进行了实发撤销调整"; 1751 String text = sch.getXlName()+"_"+sch.getFcsj()+"的班次进行了实发撤销调整";
1741 lz.setText(text); 1752 lz.setText(text);
1742 lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); 1753 lz.setCreateBy(SecurityUtils.getCurrentUser().getId());
src/main/java/com/bsth/service/zndd/LoggerZnddService.java 0 → 100644
  1 +package com.bsth.service.zndd;
  2 +
  3 +import com.bsth.entity.zndd.LoggerZndd;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +public interface LoggerZnddService extends BaseService<LoggerZndd, Integer> {
  7 +}
src/main/java/com/bsth/service/zndd/impl/LoggerZnddServiceImpl.java 0 → 100644
  1 +package com.bsth.service.zndd.impl;
  2 +
  3 +import com.bsth.entity.zndd.LoggerZndd;
  4 +import com.bsth.service.impl.BaseServiceImpl;
  5 +import com.bsth.service.zndd.LoggerZnddService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +@Service
  9 +public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> implements LoggerZnddService {
  10 +}
src/main/resources/static/pages/forms/zndd/logger_zndd.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>智能调度执行记录</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_daily">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdmDaily" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_daily">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdmDaily" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="margin-top: 2px"></div>
  39 + <div style="display: inline-block;margin-left: 33px;">
  40 + <span class="item-label" style="width: 80px;">线路: </span>
  41 + <select class="form-control" name="line" id="line" style="width: 180px;">
  42 + <option value="">请选择线路...</option>
  43 + </select>
  44 + </div>
  45 + <div style="display: inline-block;margin-left: 24px;">
  46 + <span class="item-label" style="width: 80px;">&nbsp;时间: </span>
  47 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  48 + </div>
  49 + <div class="form-group">
  50 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  51 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  52 + </div>
  53 + <img src="/profile/avatar/2024/04/07/blob_20240407160316A002.png">
  54 + </form>
  55 + </div>
  56 + <div class="portlet-body">
  57 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  58 + <table class="table table-bordered table-hover table-checkable" id="forms">
  59 + <thead>
  60 + <tr>
  61 + <th colspan="7">智能调度执行记录</th>
  62 + </tr>
  63 +
  64 + <tr>
  65 + <td>线路名称</td>
  66 + <td>时间</td>
  67 + <td>方向</td>
  68 + <td>发车时间</td>
  69 + <td>内容</td>
  70 + <td>处理时间</td>
  71 + </tr>
  72 + </thead>
  73 + <tbody id="tbody">
  74 +
  75 + </tbody>
  76 + </table>
  77 + </div>
  78 + </div>
  79 + </div>
  80 + </div>
  81 +</div>
  82 +
  83 +<script>
  84 + $(function(){
  85 +
  86 + // 关闭左侧栏
  87 + if (!$('body').hasClass('page-sidebar-closed'))
  88 + $('.menu-toggler.sidebar-toggler').click();
  89 +
  90 + $("#date").datetimepicker({
  91 + format : 'YYYY-MM-DD',
  92 + locale : 'zh-cn'
  93 + });
  94 + var fage=false;
  95 + var xlList;
  96 + var obj = [];
  97 +
  98 +
  99 + $.get('/report/lineList',function(result){
  100 + xlList=result;
  101 + $.get('/user/companyData', function(result){
  102 + obj = result;
  103 + var options = '';
  104 + for(var i = 0; i < obj.length; i++){
  105 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  106 + }
  107 +
  108 + if(obj.length ==0){
  109 + $("#gsdmDiv_daily").css('display','none');
  110 + }else if(obj.length ==1){
  111 + $("#gsdmDiv_daily").css('display','none');
  112 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  113 + $('#fgsdmDiv_daily').css('display','none');
  114 + }
  115 + $('#gsdmDaily').html(options);
  116 + updateCompany();
  117 + });
  118 + })
  119 + $("#gsdmDaily").on("change",updateCompany);
  120 + function updateCompany(){
  121 + var company = $('#gsdmDaily').val();
  122 + var options = '';
  123 + for(var i = 0; i < obj.length; i++){
  124 + if(obj[i].companyCode == company){
  125 + var children = obj[i].children;
  126 + for(var j = 0; j < children.length; j++){
  127 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  128 + }
  129 + }
  130 + }
  131 + $('#fgsdmDaily').html(options);
  132 + }
  133 +
  134 + var tempData = {};
  135 + $.get('/report/lineList',function(xlList){
  136 + var data = [];
  137 +// data.push({id: " ", text: "全部线路"});
  138 + $.get('/user/companyData', function(result){
  139 + for(var i = 0; i < result.length; i++){
  140 + var companyCode = result[i].companyCode;
  141 + var children = result[i].children;
  142 + for(var j = 0; j < children.length; j++){
  143 + var code = children[j].code;
  144 + for(var k=0;k < xlList.length;k++ ){
  145 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  146 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  147 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  148 + }
  149 + }
  150 + }
  151 + }
  152 + initPinYinSelect2('#line',data,'');
  153 +
  154 + });
  155 + });
  156 +
  157 + $("#line").on("change", function(){
  158 + if($("#line").val() == " "){
  159 + $("#gsdmDaily").attr("disabled", false);
  160 + $("#fgsdmDaily").attr("disabled", false);
  161 + } else {
  162 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  163 + $("#gsdmDaily").val(temp[0]);
  164 + updateCompany();
  165 + $("#fgsdmDaily").val(temp[1]);
  166 + $("#gsdmDaily").attr("disabled", true);
  167 + $("#fgsdmDaily").attr("disabled", true);
  168 + }
  169 + });
  170 +
  171 +
  172 + var line;
  173 + var date;
  174 + var gsdmDaily;
  175 + var fgsdmDaily;
  176 + var lineName=$("#select2-line-container").html();
  177 + $("#query").on("click",function(){
  178 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  179 + layer.msg("请选择时间");
  180 + return;
  181 + }
  182 + line = $("#line").val();
  183 + date = $("#date").val();
  184 + gsdmDaily=$("#gsdmDaily").val();
  185 + fgsdmDaily = $("#fgsdmDaily").val();
  186 + lineName=$("#select2-line-container").html();
  187 + var i = layer.load(2);
  188 + $get('/logZndd/all',{rq_eq:date,lineCode_eq:line,type:'query'},function(result){
  189 + $("#form_line").text(lineName);
  190 + $("#form_date").text(date);
  191 + // 把数据填充到模版中
  192 + var tbodyHtml = template('dailyInfo',{list:result});
  193 + // 把渲染好的模版html文本追加到表格中
  194 + $('#tbody').html(tbodyHtml);
  195 + layer.close(i);
  196 +
  197 + line = $("#line").val();
  198 + startDate = $("#startDate").val();
  199 + endDate = $("#endDate").val();
  200 + $("#sDate").text(startDate);
  201 + $("#eDate").text(endDate);
  202 +
  203 + var total_zgl = 0,total_ks = 0;
  204 + var total_yh = 0,total_bc = 0;
  205 +
  206 + $.each(result, function(i, obj) {
  207 + total_zgl +=Number(obj.zlc*10000);
  208 + total_ks +=Number(obj.jzl1*10000);
  209 + total_yh += Number(obj.yh*10000);
  210 + total_bc += Number(obj.bc);
  211 +
  212 + });
  213 + $("#total_zgl").text((total_zgl/10000).toFixed(3));
  214 + $("#total_ks").text((total_ks/10000).toFixed(3));
  215 + $("#total_yh").text((total_yh/10000).toFixed(2));
  216 + $("#total_bc").text(total_bc.toFixed(0));
  217 +
  218 + var temp = {};
  219 + var today_account = 0;
  220 +
  221 + temp["line"] = $("#line").text();
  222 + $.each(result, function(i, obj) {
  223 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  224 + today_account++;
  225 + }
  226 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  227 + });
  228 + })
  229 + });
  230 +
  231 + $("#export").on("click",function(){
  232 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  233 + layer.msg("请选择时间");
  234 + return;
  235 + }
  236 + line = $("#line").val();
  237 + date = $("#date").val();
  238 + gsdmDaily=$("#gsdmDaily").val();
  239 + fgsdmDaily = $("#fgsdmDaily").val();
  240 + lineName=$("#select2-line-container").html();
  241 + var i = layer.load(2);
  242 + $post('/znddLogger/list',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily,line:line,date:date,type:'export',lineName:lineName},function(result){
  243 + window.open("/downloadFile/download?fileName="
  244 + +moment(date).format("YYYYMMDD")+"-"+lineName+"-班次日报表");
  245 + layer.close(i);
  246 + });
  247 + });
  248 + });
  249 +</script>
  250 +<script type="text/html" id="dailyInfo">
  251 + {{each list as obj i}}
  252 + <tr>
  253 + <td>{{obj.lineName}}</td>
  254 + <td>{{obj.rq}}</td>
  255 + <td>
  256 + {{if obj.dir == '0'}}
  257 + 上行
  258 + {{else if obj.dir == '1'}}
  259 + 下行
  260 + {{/if}}
  261 + </td>
  262 +
  263 + <td>{{obj.timeStr}}</td>
  264 + <td>{{obj.text}}</td>
  265 + <td>{{obj.createDate}}</td>
  266 + </tr>
  267 + {{/each}}
  268 + {{if list.length == 0}}
  269 + <tr>
  270 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  271 + </tr>
  272 + {{/if}}
  273 +</script>
0 \ No newline at end of file 274 \ No newline at end of file
src/main/resources/static/pages/permission/authorize_all/user_auth.html
@@ -56,6 +56,8 @@ @@ -56,6 +56,8 @@
56 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_message"> 调度消息分析</label></li> 56 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_message"> 调度消息分析</label></li>
57 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_changetochange"> 换人换车情况统计表</label></li> 57 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_changetochange"> 换人换车情况统计表</label></li>
58 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_repairReport"> 维修上报记录</label></li> 58 <li><label><input class="uk-checkbox" type="checkbox" data-event="form_repairReport"> 维修上报记录</label></li>
  59 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_loggerr_zndd"> 智能调度日志</label></li>
  60 +
59 </ul> 61 </ul>
60 </div> 62 </div>
61 63
src/main/resources/static/real_control_v2/js/north/toolbar.js
@@ -248,7 +248,11 @@ var gb_northToolbar = (function () { @@ -248,7 +248,11 @@ var gb_northToolbar = (function () {
248 }, 248 },
249 report_register: function () { 249 report_register: function () {
250 open_modal('/real_control_v2/fragments/north/nav/report_register/manage.html', {}, modal_opts); 250 open_modal('/real_control_v2/fragments/north/nav/report_register/manage.html', {}, modal_opts);
251 - } 251 + },
  252 +
  253 + form_loggerr_zndd: function () {
  254 + gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/zndd/logger_zndd.html', '智能调度执行记录');
  255 + },
252 }; 256 };
253 257
254 return { 258 return {
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 <a href="javascript:;" style="color: #07D;margin-right: 7px;">预计 {{expectStopTime}} 分钟到达终点</a> 39 <a href="javascript:;" style="color: #07D;margin-right: 7px;">预计 {{expectStopTime}} 分钟到达终点</a>
40 {{/if}} 40 {{/if}}
41 <a href="javascript:;" style="float: left;" onclick="javascript:window.open('http://58.34.52.130:4490/transport_server/dvr_monitor2.html?userid=4&zbh={{nbbm}}');">DVR</a> 41 <a href="javascript:;" style="float: left;" onclick="javascript:window.open('http://58.34.52.130:4490/transport_server/dvr_monitor2.html?userid=4&zbh={{nbbm}}');">DVR</a>
42 - <a href="W9:1@139.196.29.203@?method=call&1111:{{dvrcode}}" style="margin-left: 50px;" >拨打电话</a> 42 + <a href="W9:{{dvrcode}}@139.196.29.203?method=call" style="margin-left: 50px;" >拨打电话</a>
43 <a href="javascript:;" style="float: right;" onclick="javascript:gb_map_play_back.initParams({deviceId: '{{deviceId}}', nbbm: '{{nbbm}}'});">轨迹回放</a> 43 <a href="javascript:;" style="float: right;" onclick="javascript:gb_map_play_back.initParams({deviceId: '{{deviceId}}', nbbm: '{{nbbm}}'});">轨迹回放</a>
44 </div> 44 </div>
45 </script> 45 </script>