Commit 407a932c1c814c91e4a63a1f19088dbf80545151

Authored by 王通
1 parent df8d79a0

1.

src/main/java/com/bsth/data/gpsdata_v2/handlers/GpsStateProcess.java
... ... @@ -65,9 +65,9 @@ public class GpsStateProcess {
65 65 else
66 66 stateDiffMap.put(device, 0);
67 67  
68   -// if (gps.getUpDown() != upDown) {
69   -// gps.setUpDown((byte) upDown);//修正走向
70   -// }
  68 + if (gps.getUpDown() != upDown) {
  69 + gps.setUpDown((byte) upDown);//修正走向
  70 + }
71 71  
72 72 if(gps.getState() != schState){
73 73 gps.setState(schState);//修正营运状态
... ...
src/main/java/com/bsth/data/gpsdata_v2/handlers/StationInsideProcess.java
... ... @@ -22,19 +22,16 @@ public class StationInsideProcess {
22 22  
23 23 if (parkCode != null) {
24 24 gps.setInstation(2);
  25 + gps.setStopNo(parkCode);
25 26 gps.setCarparkNo(parkCode);
26 27 }
27 28  
28 29 //是否在站内
29 30 List<StationRoute> srs = GeoCacheData.getStationRoute(gps.getLineId(), gps.getUpDown());
30   - StationRoute station = null;
31   - for (StationRoute sr : srs) {
32   - if (sr.getCode().equals(gps.getStopNo())) {
33   - station = sr;
34   - }
35   - }
36   - if (gps.getInOrOutStation() == 1) {
  31 + StationRoute station = GeoUtils.gpsInStation(gps, srs);
  32 + if (station != null) {
37 33 gps.setInstation(1);
  34 + gps.setStopNo(station.getCode());
38 35 gps.setStation(station);
39 36 }
40 37  
... ... @@ -51,9 +48,9 @@ public class StationInsideProcess {
51 48 gps.setPremiseCode(prev.getPremiseCode());
52 49  
53 50 //在场,站外
54   -// if (gps.getInstation() == 0) {
55   -// gps.setStopNo(prev.getStopNo());//继承上一个点的站点编码
56   -// }
  51 + if (gps.getInstation() == 0) {
  52 + gps.setStopNo(prev.getStopNo());//继承上一个点的站点编码
  53 + }
57 54 }
58 55 }
59 56 }
... ...