Explorar o código

车载心跳监测接口修改

gao.qiang hai 9 meses
pai
achega
41877a6e5a

+ 1 - 1
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -2510,7 +2510,7 @@ public class GeoHazardMonitorTokenController {
             if (baseTerminalLogService.save(baseTerminalLog) && update) {
                 if (!ObjectUtils.isEmpty(baseTerminalLog.getTrainNum()) && !ObjectUtils.isEmpty(baseTerminalLog.getFrontTrainNum())) {
                     VehiclePosition vehiclePosition = vehiclePositionService.getOne(new LambdaQueryWrapper<VehiclePosition>().eq(VehiclePosition::getVehicleCode, baseTerminalLog.getTrainNum()).orderByDesc(VehiclePosition::getCreateTime).last("limit 1"));
-                    VehiclePosition positionServiceOne = vehiclePositionService.getOne(new LambdaQueryWrapper<VehiclePosition>().eq(VehiclePosition::getVehicleCode, baseTerminalLog.getFrontTrainNum()).orderByDesc(VehiclePosition::getCreateTime).last("limit 1"));
+                    VehiclePosition positionServiceOne = vehiclePositionService.getOne(new LambdaQueryWrapper<VehiclePosition>().eq(VehiclePosition::getVehicleCode, baseTerminalLog.getFrontTrainNum()).eq(VehiclePosition::getLineDir,vehiclePosition.getLineDir()).orderByDesc(VehiclePosition::getCreateTime).last("limit 1"));
                     Map<String, Object> map = new HashMap<>();
                     if (!ObjectUtils.isEmpty(positionServiceOne) && !ObjectUtils.isEmpty(vehiclePosition)) {
                         int dif = vehiclePosition.getTravelMile() - positionServiceOne.getTravelMile();