From 099a8569927167ebbbc570531c85d231bfca6d2b Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期一, 12 八月 2024 11:41:16 +0800
Subject: [PATCH] 修改2.0 bug

---
 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
index 29e067b..85085e0 100644
--- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
+++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -209,7 +209,7 @@
     private ICarService carService;
     
     @Resource
-    private DriverWorkMapper driverWorkMapper;
+    private IDriverWorkService driverWorkService;
     
     
     @Value("${filePath}")
@@ -564,8 +564,8 @@
                                 }
     
                                 Driver driver1 = driverService.selectById(driver.getId());
-                                DriverWork driverWork = driverWorkMapper.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId())
-                                        .eq("state", 1).like("type", "4").getEntity());
+                                DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId())
+                                        .eq("state", 1).like("type", "4"));
                                 if(null == driverWork || driver1.getState() != 2){
                                     continue;
                                 }
@@ -890,8 +890,8 @@
                     }
     
                     Driver driver1 = driverService.selectById(dr.getId());
-                    DriverWork driverWork = driverWorkMapper.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId())
-                            .eq("state", 1).like("type", "4").getEntity());
+                    DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", driver1.getId())
+                            .eq("state", 1).like("type", "4"));
                     if(driver1.getState() == 2 || null != driverWork){
                         orderLogistics.setDriverId(dr.getId());
                         orderLogistics.setCompanyId(dr.getFranchiseeId() != null && dr.getFranchiseeId() != 0 ? dr.getFranchiseeId() : (
@@ -2981,7 +2981,7 @@
         if(null == orderLogistics){
             return ResultUtil.error(language == 1 ? "取消订单失败,订单信息有误" : language == 2 ? "Failed to cancel order, order-information error." : "Échec de l’annulation de la commande, erreur d’information de commande.");
         }
-        if(orderLogistics.getState() > 5 && orderLogistics.getState() != 12){
+        if(orderLogistics.getState() > 5 && orderLogistics.getState() != 11 && orderLogistics.getState() != 12){
             return ResultUtil.error(language == 1 ? "取消订单失败,不合法的操作" : language == 2 ? "Failed to cancel order, illegal operation." : "Échec de l’annulation de la commande, opération illégale.");
         }
     
@@ -3049,7 +3049,7 @@
             driverService.updateById(driver);
         }
         
-        if(orderLogistics.getState() == 10 || orderLogistics.getState() == 12){
+        if((orderLogistics.getState() == 10 || orderLogistics.getState() == 12) && null != orderLogistics.getDriverId()){
             //修改行程信息
             fleetEngineUtil.updateTrip("CANCELED", null, null, orderLogistics.getTripId(), null, null, null, null);
         }

--
Gitblit v1.7.1