From b1f2f102034b4433201225b67a9fc78c08e532f0 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 06 六月 2025 18:35:03 +0800 Subject: [PATCH] 修改bug和管理后台报表 --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml index 6871d80..462cc7c 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml @@ -83,7 +83,7 @@ <select id="getAuthDriverList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ds.serverStr,dd.* from t_driver as dd LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId - LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId + LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.companyId LEFT JOIN ( SELECT GROUP_CONCAT(case when type = 1 then '专车' @@ -145,7 +145,7 @@ from t_driver as dd LEFT JOIN t_driver_team tdt on dd.teamId=tdt.id and tdt.state!=3 LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId - LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId + LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.companyId LEFT JOIN (select * from t_car where state = 1) as ci on ci.id = dd.carId LEFT JOIN ( SELECT @@ -188,10 +188,10 @@ and o.authState = #{authState} </if> <if test="roleType != null and roleType != '' and roleType == 2"> - and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) + and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) </if> <if test="roleType != null and roleType != '' and roleType == 3"> - and o.franchiseeId = #{nowUserId} + and o.companyId = #{nowUserId} </if> <if test="state != null and state != ''"> and o.state = #{state} @@ -242,10 +242,10 @@ and o.serverStr LIKE CONCAT('%',#{serverStr},'%') </if> <if test="roleType != null and roleType != '' and roleType == 2"> - and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where type = 3 and superiorId = #{nowUserId} GROUP BY superiorId))) + and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where type = 3 and superiorId = #{nowUserId} GROUP BY superiorId))) </if> <if test="roleType != null and roleType != '' and roleType == 3"> - and o.franchiseeId = #{nowUserId} + and o.companyId = #{nowUserId} </if> </where> order by o.id desc @@ -257,7 +257,7 @@ <set> <if test="authState != null"> authState = #{authState} </if> </set> - where companyId = #{companyId} and (franchiseeId = 0 or franchiseeId is null) + where companyId = #{companyId} </update> <!--修改加盟商司机的状态--> @@ -266,7 +266,7 @@ <set> <if test="authState != null"> authState = #{authState} </if> </set> - where franchiseeId = #{franchiseeId} + where companyId = #{franchiseeId} </update> <!--根据审核通过的司机列表无分页--> @@ -274,7 +274,7 @@ SELECT * FROM (SELECT cc1.`name` as companyName,cc2.`name` as franchiseeName,ci.carLicensePlate,ds.serverStr,IFNULL(oe.evaluateNum,0) as evaluateNum, (IFNULL(ot1.taxiNum, 0) + IFNULL(ot3.num, 0) + IFNULL(ot5.num, 0)) as historyNum,(IFNULL(ot2.taxiMoney, 0)+ IFNULL(ot4.money, 0) + IFNULL(ot6.money, 0)) as historyMoney,dd.* from t_driver as dd LEFT JOIN (select * from t_company where type = 2 and flag != 3) as cc1 on cc1.id = dd.companyId - LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.franchiseeId + LEFT JOIN (select * from t_company where type = 3 and flag != 3) as cc2 on cc2.id = dd.companyId LEFT JOIN (select * from t_car where state = 1) as ci on ci.id = dd.carId LEFT JOIN ( SELECT @@ -295,10 +295,10 @@ and FIND_IN_SET(o.authState,'2,3') </if> <if test="roleType != null and roleType != '' and roleType == 2"> - and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) + and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) </if> <if test="roleType != null and roleType != '' and roleType == 3"> - and o.franchiseeId = #{nowUserId} + and o.companyId = #{nowUserId} </if> </where> order by o.id desc -- Gitblit v1.7.1