Commit 414a27904d550bbee47d6f5d61f5831c67b9c997

Authored by 潘钊
2 parents ecf3fa00 abd9f44a

Merge branch 'minhang' into pudong

src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
... ... @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 60 for (String nbbm : keys) {
61 61 Collections.sort(listMap.get(nbbm), comp);
62 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63   - /*if(nbbm.equals("W9G-013"))
  63 + /*if(nbbm.equals("W7C-001"))
64 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 65 }
66 66  
... ... @@ -150,8 +150,6 @@ public class GpsDataRecovery implements ApplicationContextAware {
150 150 CircleQueue<GpsEntity> prevs;
151 151 boolean task;
152 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 88 httpClient.close();
89 89 response.close();
90 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
... ... @@ -242,13 +242,11 @@ public class DayOfSchedule implements CommandLineRunner {
242 242 //计算“起点站应到”时间
243 243 schAttrCalculator.calcQdzTimePlan(lpScheduleMap.get(lineCode + "_" + lp));
244 244 }
245   - /*Set<String> cars = searchAllCars(list);
  245 + Set<String> cars = searchAllCars(list);
246 246 for (String nbbm : cars) {
247   - //计算“起点站应到”时间
248   - schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm));
249 247 //车辆 ——> 要执行的班次对照
250 248 reCalcExecPlan(nbbm);
251   - }*/
  249 + }
252 250  
253 251 // 页面 翻班通知
254 252 //sendUtils.shiftSchedule(lineCode);
... ... @@ -267,14 +265,14 @@ public class DayOfSchedule implements CommandLineRunner {
267 265 /**
268 266 * @Title: searchAllCars
269 267 * @Description: TODO(搜索班次集合中的车辆)
270   -
  268 + */
271 269 private Set<String> searchAllCars(List<ScheduleRealInfo> list) {
272 270 Set<String> cars = new HashSet<>();
273 271 for (ScheduleRealInfo sch : list)
274 272 cars.add(sch.getClZbh());
275 273  
276 274 return cars;
277   - }*/
  275 + }
278 276  
279 277 /**
280 278 * @Title: searchAllCars
... ... @@ -334,12 +332,16 @@ public class DayOfSchedule implements CommandLineRunner {
334 332 }
335 333  
336 334 //清理路牌对照
  335 + List<String> lprms = new ArrayList<>();
337 336 Set<String> lps = lpScheduleMap.keySet();
338 337 for(String lp : lps){
339 338 if(lp.indexOf(lineCode + "_") != -1)
340   - lpScheduleMap.removeAll(lp);
  339 + lprms.add(lp);
341 340 }
342 341  
  342 + for(String lp : lprms)
  343 + lpScheduleMap.removeAll(lp);
  344 +
343 345 logger.info(lineCode + "排班清理 " + count);
344 346 }
345 347  
... ... @@ -898,7 +900,9 @@ public class DayOfSchedule implements CommandLineRunner {
898 900 }
899 901  
900 902 public void reCalcExecPlan(String nbbm){
901   - 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));
902 906 }
903 907  
904 908 /**
... ...