Commit c53c11799c3c7ca1165194090aeaa31834ad4046
1 parent
80fc0669
update...
Showing
1 changed file
with
23 additions
and
25 deletions
src/main/java/com/bsth/data/gpsdata_v2/DataHandleProcess.java
| ... | ... | @@ -129,36 +129,34 @@ public class DataHandleProcess { |
| 129 | 129 | |
| 130 | 130 | @Override |
| 131 | 131 | public void run() { |
| 132 | - //try { | |
| 133 | - Collections.sort(list, comp); | |
| 134 | - for (GpsEntity gps : list) { | |
| 135 | - try { | |
| 136 | - if(StringUtils.isEmpty(gps.getNbbm())) | |
| 137 | - continue; | |
| 138 | - if (Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) > 1000 * 60 * 20) | |
| 139 | - continue; | |
| 140 | - | |
| 141 | - gpsStateProcess.process(gps);//状态处理 | |
| 142 | - stationInsideProcess.process(gps);//场站内外判定 | |
| 143 | - reverseRouteProcess.process(gps);//反向路由处理 | |
| 144 | - abnormalStateProcess.process(gps);//超速越界 | |
| 145 | - | |
| 146 | - inStationProcess.process(gps);//进站 | |
| 147 | - outStationProcess.process(gps);//出站 | |
| 148 | - | |
| 149 | - GpsCacheData.putGps(gps);//历史gps缓存 | |
| 150 | - } catch (Exception e) { | |
| 151 | - logger.error("", e); | |
| 132 | + try { | |
| 133 | + Collections.sort(list, comp); | |
| 134 | + for (GpsEntity gps : list) { | |
| 135 | + try { | |
| 136 | + if (StringUtils.isEmpty(gps.getNbbm())) | |
| 137 | + continue; | |
| 138 | + if (Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) > 1000 * 60 * 20) | |
| 139 | + continue; | |
| 140 | + | |
| 141 | + gpsStateProcess.process(gps);//状态处理 | |
| 142 | + stationInsideProcess.process(gps);//场站内外判定 | |
| 143 | + reverseRouteProcess.process(gps);//反向路由处理 | |
| 144 | + abnormalStateProcess.process(gps);//超速越界 | |
| 145 | + | |
| 146 | + inStationProcess.process(gps);//进站 | |
| 147 | + outStationProcess.process(gps);//出站 | |
| 148 | + | |
| 149 | + GpsCacheData.putGps(gps);//历史gps缓存 | |
| 150 | + } catch (Exception e) { | |
| 151 | + logger.error("", e); | |
| 152 | + } | |
| 152 | 153 | } |
| 153 | - } | |
| 154 | 154 | |
| 155 | - logger.info(Thread.currentThread().getName() + " -countDown : " + count.getCount()); | |
| 156 | - count.countDown(); | |
| 157 | - /*} finally { | |
| 155 | + } finally { | |
| 158 | 156 | if (count != null) |
| 159 | 157 | count.countDown(); |
| 160 | 158 | logger.info(Thread.currentThread().getName() + " -countDown : " + count.getCount()); |
| 161 | - }*/ | |
| 159 | + } | |
| 162 | 160 | } |
| 163 | 161 | } |
| 164 | 162 | ... | ... |