From f3839fff3c7da7f1942cfad520cfe393def35a04 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 12 三月 2025 18:28:00 +0800 Subject: [PATCH] 修改bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java index 2f022f8..199c357 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java @@ -7,6 +7,7 @@ import com.stylefeng.guns.core.util.SinataUtil; import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; import com.stylefeng.guns.modular.system.model.*; +import com.stylefeng.guns.modular.system.service.ITCarService; import com.stylefeng.guns.modular.system.service.ITDriverService; import com.stylefeng.guns.modular.system.service.ITUserService; import com.stylefeng.guns.modular.system.util.GoogleMap.FleetEngineUtil; @@ -50,6 +51,12 @@ @Resource private OrderCancelMapper orderCancelMapper; + + @Resource + private ITCarService carService; + + + /** * 跳转到小件物流订单首页 @@ -139,19 +146,26 @@ orderCancelMapper.insert(orderCancel); //修改行程信息 - boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null); + TCar car = carService.selectById(tOrderLogistics.getCarId()); + //修改行程信息 + boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null); if(!updateTrip){ for (int i = 0; i < 5; i++) { - updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null); + updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null); if(updateTrip){ + tOrderLogistics.setIsover(1); + tOrderLogisticsService.updateById(tOrderLogistics); break; } try { Thread.sleep(3000L); - }catch (Exception e){ - e.printStackTrace(); + } catch (InterruptedException e) { + throw new RuntimeException(e); } } + }else{ + tOrderLogistics.setIsover(1); + tOrderLogisticsService.updateById(tOrderLogistics); } -- Gitblit v1.7.1