From bfa0b11dfbfe5b71e11f4544e688e4d9f325d1b5 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 09 六月 2025 10:26:51 +0800 Subject: [PATCH] 修改bug和管理后台报表 --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml index 0bb523e..9e3b0cd 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml @@ -90,10 +90,10 @@ <if test="null != companyId"> <choose> <when test="companyId != 1"> - and companyId = #{companyId} or franchiseeId = #{companyId} + and companyId = #{companyId} </when> <otherwise> - and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 + and companyId is null or companyId = 0 or companyId = 1 </otherwise> </choose> @@ -117,10 +117,10 @@ <if test="null != companyId"> <choose> <when test="companyId != 1"> - and companyId = #{companyId} or franchiseeId = #{companyId} + and companyId = #{companyId} </when> <otherwise> - and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 + and companyId is null or companyId = 0 or companyId = 1 </otherwise> </choose> @@ -157,9 +157,8 @@ CONCAT(F.`name`, d.`name`, '.', c.carColor) as carName, (select sum(fraction) / count(id) from t_order_evaluate where driverId = a.id) as score, ( - (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) + (select count(id) from t_order_private_car where driverId = a.id and state in (6, 7, 8, 9)) + + (select count(id) from t_order_logistics where driverId = a.id and state in (6, 7, 8, 9)) ) as num, DATE_FORMAT(b.startServiceTime, '%m月%d日 %H:%i') as `time`, b.startAddress as `start`, @@ -205,9 +204,8 @@ (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_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) + (select count(id) from t_order_private_car where driverId = a.id and state in (6, 7, 8, 9)) + + (select count(id) from t_order_logistics where driverId = a.id and state in (6, 7, 8, 9)) ) 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 -- Gitblit v1.7.1