Commit abd9f44a1ca82ed1ca0aaf7e343a83a5cd238ee5

Authored by 潘钊
1 parent e8f5a912

update...

src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
@@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware { @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 for (String nbbm : keys) { 60 for (String nbbm : keys) {
61 Collections.sort(listMap.get(nbbm), comp); 61 Collections.sort(listMap.get(nbbm), comp);
62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count)); 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63 - /*if(nbbm.equals("W9G-013")) 63 + /*if(nbbm.equals("W7C-001"))
64 new RecoveryThread(listMap.get(nbbm), count).run();*/ 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 } 65 }
66 66
@@ -150,8 +150,6 @@ public class GpsDataRecovery implements ApplicationContextAware { @@ -150,8 +150,6 @@ public class GpsDataRecovery implements ApplicationContextAware {
150 CircleQueue<GpsEntity> prevs; 150 CircleQueue<GpsEntity> prevs;
151 boolean task; 151 boolean task;
152 for (GpsEntity gps : list) { 152 for (GpsEntity gps : list) {
153 - /*if(gps.getTimestamp() > 1491951840000L)  
154 - System.out.print("");*/  
155 153
156 //是否有任务 154 //是否有任务
157 155
src/main/java/com/bsth/data/safe_driv/SafeDrivDataLoadThread.java
@@ -88,7 +88,7 @@ public class SafeDrivDataLoadThread extends Thread{ @@ -88,7 +88,7 @@ public class SafeDrivDataLoadThread extends Thread{
88 httpClient.close(); 88 httpClient.close();
89 response.close(); 89 response.close();
90 } catch (Exception e) { 90 } catch (Exception e) {
91 - logger.error("", e); 91 + logger.error(e.getMessage());
92 } 92 }
93 } 93 }
94 } 94 }
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -148,7 +148,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -148,7 +148,7 @@ public class DayOfSchedule implements CommandLineRunner {
148 //dataRecovery(); 148 //dataRecovery();
149 149
150 //翻班线程 150 //翻班线程
151 - Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 151 +// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
152 //入库 152 //入库
153 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS); 153 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS);
154 //班次误点扫描 154 //班次误点扫描
@@ -242,13 +242,11 @@ public class DayOfSchedule implements CommandLineRunner { @@ -242,13 +242,11 @@ public class DayOfSchedule implements CommandLineRunner {
242 //计算“起点站应到”时间 242 //计算“起点站应到”时间
243 schAttrCalculator.calcQdzTimePlan(lpScheduleMap.get(lineCode + "_" + lp)); 243 schAttrCalculator.calcQdzTimePlan(lpScheduleMap.get(lineCode + "_" + lp));
244 } 244 }
245 - /*Set<String> cars = searchAllCars(list); 245 + Set<String> cars = searchAllCars(list);
246 for (String nbbm : cars) { 246 for (String nbbm : cars) {
247 - //计算“起点站应到”时间  
248 - schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm));  
249 //车辆 ——> 要执行的班次对照 247 //车辆 ——> 要执行的班次对照
250 reCalcExecPlan(nbbm); 248 reCalcExecPlan(nbbm);
251 - }*/ 249 + }
252 250
253 // 页面 翻班通知 251 // 页面 翻班通知
254 //sendUtils.shiftSchedule(lineCode); 252 //sendUtils.shiftSchedule(lineCode);
@@ -267,14 +265,14 @@ public class DayOfSchedule implements CommandLineRunner { @@ -267,14 +265,14 @@ public class DayOfSchedule implements CommandLineRunner {
267 /** 265 /**
268 * @Title: searchAllCars 266 * @Title: searchAllCars
269 * @Description: TODO(搜索班次集合中的车辆) 267 * @Description: TODO(搜索班次集合中的车辆)
270 - 268 + */
271 private Set<String> searchAllCars(List<ScheduleRealInfo> list) { 269 private Set<String> searchAllCars(List<ScheduleRealInfo> list) {
272 Set<String> cars = new HashSet<>(); 270 Set<String> cars = new HashSet<>();
273 for (ScheduleRealInfo sch : list) 271 for (ScheduleRealInfo sch : list)
274 cars.add(sch.getClZbh()); 272 cars.add(sch.getClZbh());
275 273
276 return cars; 274 return cars;
277 - }*/ 275 + }
278 276
279 /** 277 /**
280 * @Title: searchAllCars 278 * @Title: searchAllCars
@@ -902,7 +900,9 @@ public class DayOfSchedule implements CommandLineRunner { @@ -902,7 +900,9 @@ public class DayOfSchedule implements CommandLineRunner {
902 } 900 }
903 901
904 public void reCalcExecPlan(String nbbm){ 902 public void reCalcExecPlan(String nbbm){
905 - carExecutePlanMap.put(nbbm, schAttrCalculator.calcCurrentExecSch(nbbmScheduleMap.get(nbbm))); 903 + List<ScheduleRealInfo> list = nbbmScheduleMap.get(nbbm);
  904 + Collections.sort(list, schFCSJComparator);
  905 + carExecutePlanMap.put(nbbm, schAttrCalculator.calcCurrentExecSch(list));
906 } 906 }
907 907
908 /** 908 /**