Commit 92a8cfa6f9ab6b01100bfce17e19c31d3520b0ac
1 parent
6a337488
1.线调获取GPS数据加入日志、逻辑变更
Showing
2 changed files
with
7 additions
and
5 deletions
src/main/java/com/bsth/data/gpsdata_v2/load/GatewayHttpLoader.java
| ... | ... | @@ -64,6 +64,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{ |
| 64 | 64 | response = httpClient.execute(get); |
| 65 | 65 | entity = response.getEntity(); |
| 66 | 66 | |
| 67 | + logger.info("entity:" + entity); | |
| 67 | 68 | if(null == entity) |
| 68 | 69 | return list; |
| 69 | 70 | |
| ... | ... | @@ -74,6 +75,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{ |
| 74 | 75 | while ((str = br.readLine()) != null) |
| 75 | 76 | sb.append(str); |
| 76 | 77 | |
| 78 | + logger.info("gps:" + sb.toString()); | |
| 77 | 79 | list = JSON.parseArray(JSON.parseObject(sb.toString()).getString("data"), GpsEntity.class); |
| 78 | 80 | //过滤掉无效的点位 |
| 79 | 81 | list = GpsDataUtils.clearInvalid(list); | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/thread/GpsDataLoaderThread.java
| ... | ... | @@ -32,11 +32,11 @@ public class GpsDataLoaderThread extends Thread { |
| 32 | 32 | @Override |
| 33 | 33 | public void run() { |
| 34 | 34 | try { |
| 35 | - List<GpsEntity> list; | |
| 36 | - if (flag == 0) | |
| 37 | - list = SocketClientLoader.load(); | |
| 38 | - else | |
| 39 | - list = GatewayHttpLoader.load(); | |
| 35 | + List<GpsEntity> list = GatewayHttpLoader.load(); | |
| 36 | +// if (flag == 0) | |
| 37 | +// list = SocketClientLoader.load(); | |
| 38 | +// else | |
| 39 | +// list = GatewayHttpLoader.load(); | |
| 40 | 40 | |
| 41 | 41 | if(null != list && list.size() > 0) |
| 42 | 42 | handleProcess.handle(list); | ... | ... |