From 73b750200f25df08aa64124da49e7461f9de6653 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 13 十二月 2024 15:09:49 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/NTTravel

---
 DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml b/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
index 0e8369e..31ddaa7 100644
--- a/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
+++ b/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -311,14 +311,16 @@
         (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
         (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
         (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9) and to_days(insertTime) = to_days(now())) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and to_days(insertTime) = to_days(now()))
-        ) as dayNum,
+        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and to_days(insertTime) = to_days(now()))+
+        (select count(id) from t_order_transfer where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now()))
+            ) as dayNum,
         (
         (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
         (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
         (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m'))
-        ) as mouthNum,
+        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m'))+
+        (select count(id) from t_order_transfer where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m'))
+            ) as mouthNum,
         ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(fraction) from t_order_evaluate where driverId = a.id)) as score,
         if((select count(id) from t_driver_work where driverId = a.id and state = 1) != 0, 1, 2) as `work`
         from t_driver a
@@ -336,6 +338,7 @@
         a.sex as sex,
         a.`name` as `name`,
         a.phone as phone,
+        a.wechatPic as wechatPic,
         a.laveActivityMoney as balance,
         a.laveActivityMoney as laveActivityMoney,
         a.activityMoney as activityMoney,
@@ -359,10 +362,9 @@
         CONCAT(d.`name`, c.`name`) as brand,
         (
         (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9)) +
-        (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9)) +
         (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9)) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9))
-        ) as orderNum,
+        (select count(id) from t_order_transfer where driverId = a.id and state in (7, 8, 9))
+            ) as orderNum,
         ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(fraction) from t_order_evaluate where driverId = a.id)) as score
         from t_driver a
         left join t_car b on (a.carId = b.id)

--
Gitblit v1.7.1