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/TOrderPrivateCarController.java | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java index 6ecc3c0..8bcfc80 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java @@ -77,6 +77,9 @@ @Resource private ITUserService userService; + + @Resource + private ITCarService carService; @@ -283,6 +286,8 @@ for (int i = 0; i < 5; i++) { updateTrip = fleetEngineUtil.updateTrip("COMPLETE", null, null, orderPrivateCar.getTripId(), null, null, null, null); if(updateTrip){ + orderPrivateCar.setIsover(1); + tOrderPrivateCarService.updateById(orderPrivateCar); break; } try { @@ -291,6 +296,9 @@ throw new RuntimeException(e); } } + }else{ + orderPrivateCar.setIsover(1); + tOrderPrivateCarService.updateById(orderPrivateCar); } //上报行程 boolean reportBillableEvent = fleetEngineUtil.reportBillableEvent(orderPrivateCar.getTripId()); @@ -631,19 +639,26 @@ orderCancelMapper.insert(orderCancel); //修改行程信息 - boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null); + TCar car = carService.selectById(tOrderPrivateCar.getCarId()); + //修改行程信息 + boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderPrivateCar.getTripId(), null, null, null, null); if(!updateTrip){ for (int i = 0; i < 5; i++) { - updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null); + updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderPrivateCar.getTripId(), null, null, null, null); if(updateTrip){ + tOrderPrivateCar.setIsover(1); + tOrderPrivateCarService.updateById(tOrderPrivateCar); break; } try { Thread.sleep(3000L); - }catch (Exception e){ - e.printStackTrace(); + } catch (InterruptedException e) { + throw new RuntimeException(e); } } + }else{ + tOrderPrivateCar.setIsover(1); + tOrderPrivateCarService.updateById(tOrderPrivateCar); } -- Gitblit v1.7.1