报文容错处理
This commit is contained in:
parent
649c8bcf73
commit
ca2c32462e
@ -67,8 +67,11 @@ public class ReoprtHandler {
|
|||||||
redisUtil.set(deviceId, resGpsDto);
|
redisUtil.set(deviceId, resGpsDto);
|
||||||
double[] doubles = CoordinateUtil.WGS84ToGCJ02(resGpsDto.getLongitude(), resGpsDto.getLatitude());
|
double[] doubles = CoordinateUtil.WGS84ToGCJ02(resGpsDto.getLongitude(), resGpsDto.getLatitude());
|
||||||
redisUtil.addLocation(new Point(doubles[0], doubles[1]),deviceId);
|
redisUtil.addLocation(new Point(doubles[0], doubles[1]),deviceId);
|
||||||
|
boolean outOfChina = CoordinateUtil.outOfChina(doubles[0], doubles[1]);
|
||||||
|
if (!outOfChina) {
|
||||||
EbikeTracking ebikeTracking = new EbikeTracking(deviceId,doubles[1], doubles[0]);
|
EbikeTracking ebikeTracking = new EbikeTracking(deviceId,doubles[1], doubles[0]);
|
||||||
operateFeignClient.saveEbikeTracking(ebikeTracking);
|
operateFeignClient.saveEbikeTracking(ebikeTracking);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user