Commit b8b97276 authored by caotao's avatar caotao

1.处理车辆轨迹划分存在数据转换异常问题。

parent 51a2e513
...@@ -205,7 +205,7 @@ public class JxiopCarIotListerServiceImpl { ...@@ -205,7 +205,7 @@ public class JxiopCarIotListerServiceImpl {
int direction = jsonObject.getIntValue("direction"); int direction = jsonObject.getIntValue("direction");
String waringDate = jsonObject.getString("createdTime"); String waringDate = jsonObject.getString("createdTime");
Double speed = jsonObject.getDoubleValue("fireCar_Speed") > 0 ? jsonObject.getDoubleValue("fireCar_Speed") : jsonObject.getDoubleValue("FireCar_Speed"); Double speed = jsonObject.getDoubleValue("fireCar_Speed") > 0 ? jsonObject.getDoubleValue("fireCar_Speed") : jsonObject.getDoubleValue("FireCar_Speed");
Double maxSpeed = defaultMaxSpeed; Double maxSpeed = 70.0;
// 地图推送消息 // 地图推送消息
Car car = iCarService.getOne(new LambdaQueryWrapper<Car>().eq(Car::getIotCode, iotCode)); Car car = iCarService.getOne(new LambdaQueryWrapper<Car>().eq(Car::getIotCode, iotCode));
if (car != null && startLongitude != 0 && startLatitude != 0) { if (car != null && startLongitude != 0 && startLatitude != 0) {
...@@ -226,8 +226,8 @@ public class JxiopCarIotListerServiceImpl { ...@@ -226,8 +226,8 @@ public class JxiopCarIotListerServiceImpl {
maxSpeed = car.getMaxSpeed(); maxSpeed = car.getMaxSpeed();
} }
iCarService.updateById(car); iCarService.updateById(car);
logger.info("车牌号::" + car.getCarNum() + "最大车速:" + car.getMaxSpeed() + "当前车速::" + speed); logger.info("车牌号::" + car.getCarNum() + "最大车速:" + maxSpeed + "当前车速::" + speed);
if (speed > maxSpeed) { if ((speed - maxSpeed)>0) {
List<CarSpeedWarningRecord> list = wlCarSpeedWaringRecordMapper.selectList(new QueryWrapper<CarSpeedWarningRecord>().eq("car_num",car.getCarNum()).between("waring_date",DateUtil.offsetMinute(new Date(),10),new Date())); List<CarSpeedWarningRecord> list = wlCarSpeedWaringRecordMapper.selectList(new QueryWrapper<CarSpeedWarningRecord>().eq("car_num",car.getCarNum()).between("waring_date",DateUtil.offsetMinute(new Date(),10),new Date()));
if(!(list.size() >0)) { if(!(list.size() >0)) {
CarSpeedWarningRecord carSpeedWarningRecord = new CarSpeedWarningRecord(); CarSpeedWarningRecord carSpeedWarningRecord = new CarSpeedWarningRecord();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment