From 31ce6be2d56798d9509e6d90335999064351f7f3 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期二, 10 十二月 2024 16:06:26 +0800
Subject: [PATCH] 12.10

---
 UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml b/UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
index a10a246..d9e6a0c 100644
--- a/UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
+++ b/UserNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -243,7 +243,8 @@
         </if>
         and id in
         (
-        select driverId from t_driver_work where startTime &lt; now() and state = 1 and `type` like CONCAT('%', #{type}, '%')
+        select driverId from t_driver_work
+        where startTime &lt; now() and state = 1 and `type` like CONCAT('%', #{type}, '%')
         )
         and id in (select driverId from t_driver_orders where `type` = #{type})
         and carId in (select carId from t_car_service where `type` = #{type}
@@ -315,13 +316,15 @@
         (
         (select count(id) from t_order_private_car where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) +
         (select count(id) from t_order_taxi where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) +
-        (select count(id) from t_order_cross_city where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id)
-        ) = 0, 2, 3)) as state,
+        (select count(id) from t_order_cross_city where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) +
+        (select count(id) from t_order_transfer where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id)
+            ) = 0, 2, 3)) as state,
         (
         (select count(id) from t_order_private_car where state in (7, 8, 9) and driverId = a.id) +
         (select count(id) from t_order_taxi where state in (7, 8, 9) and driverId = a.id) +
-        (select count(id) from t_order_cross_city where state in (6, 8, 9) and driverId = a.id)
-        ) as orderNum,
+        (select count(id) from t_order_cross_city where state in (6, 8, 9) and driverId = a.id) +
+         (select count(id) from t_order_transfer where state in (7, 8, 9) and driverId = a.id)
+                ) as orderNum,
         ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(id) from t_order_evaluate where driverId = a.id)) as fraction
         from t_driver a
         left join t_car b on (a.carId = b.id)

--
Gitblit v1.7.1