|
@@ -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();
|