Commit 2cfcc62be23b6b1ac221eb90b75dd308300dba5c
1 parent
cb9e67ff
update...
Showing
2 changed files
with
13 additions
and
1 deletions
src/main/java/com/bsth/data/gpsdata_v2/cache/GpsCacheData.java
| ... | ... | @@ -33,6 +33,15 @@ public class GpsCacheData { |
| 33 | 33 | return gpsCacheMap.get(device); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + /** | |
| 37 | + * 清除车辆的轨迹数据 | |
| 38 | + * @param nbbm | |
| 39 | + */ | |
| 40 | + public static void remove(String nbbm){ | |
| 41 | + logger.info("清除车辆到离站轨迹, " + nbbm); | |
| 42 | + trailListMultimap.removeAll(nbbm); | |
| 43 | + } | |
| 44 | + | |
| 36 | 45 | public static GpsExecTrail gpsExecTrail(String nbbm){ |
| 37 | 46 | List<GpsExecTrail> list = trailListMultimap.get(nbbm); |
| 38 | 47 | ... | ... |
src/main/java/com/bsth/data/schedule/thread/ScheduleRefreshThread.java
| ... | ... | @@ -3,6 +3,7 @@ package com.bsth.data.schedule.thread; |
| 3 | 3 | import com.bsth.data.BasicData; |
| 4 | 4 | import com.bsth.data.LineConfigData; |
| 5 | 5 | import com.bsth.data.directive.DayOfDirectives; |
| 6 | +import com.bsth.data.gpsdata_v2.cache.GpsCacheData; | |
| 6 | 7 | import com.bsth.data.pilot80.PilotReport; |
| 7 | 8 | import com.bsth.data.schedule.DayOfSchedule; |
| 8 | 9 | import com.bsth.data.schedule.f_a_l.FirstAndLastHandler; |
| ... | ... | @@ -60,8 +61,10 @@ public class ScheduleRefreshThread extends Thread{ |
| 60 | 61 | try{ |
| 61 | 62 | //清除指令数据 |
| 62 | 63 | Set<String> cars = dayOfSchedule.findCarByLineCode(lineCode); |
| 63 | - for(String car : cars) | |
| 64 | + for(String car : cars){ | |
| 64 | 65 | dayOfDirectives.clear(BasicData.deviceId2NbbmMap.inverse().get(car)); |
| 66 | + GpsCacheData.remove(car); | |
| 67 | + } | |
| 65 | 68 | //清除驾驶员上报数据 |
| 66 | 69 | pilotReport.clear(lineCode); |
| 67 | 70 | }catch (Exception e){ | ... | ... |