From 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 28 三月 2025 19:57:56 +0800 Subject: [PATCH] 修改bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml | 29 ++++++++++------------------- 1 files changed, 10 insertions(+), 19 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml index ea54609..84646ae 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml @@ -45,6 +45,7 @@ <result column="GPSInstallDate" property="GPSInstallDate"/> <result column="registerDate" property="registerDate"/> <result column="commercialType" property="commercialType"/> + <result column="driverId" property="driverId"/> </resultMap> <!-- 通用查询结果列 --> @@ -54,7 +55,7 @@ <!--根据条件查询车辆列表--> <select id="getCarList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> - SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,dd.`name` as driverName,cc.* from t_car as cc + SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,CONCAT(dd.firstName, ' ', dd.lastName) as driverName,cc.* from t_car as cc LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId @@ -62,11 +63,7 @@ LEFT JOIN ( SELECT GROUP_CONCAT(case when type = 1 then '专车' - when type = 2 then '出租车' - when type = 3 then '跨城出行' - when type = 4 then '小件物流-同城' - when type = 5 then '小件物流-跨城' - when type = 6 then '包车' + when type = 4 then '市内小件物流' else '' end ) as serverStr,carId from t_car_service GROUP BY carId) as ds on ds.carId = cc.id LEFT JOIN (select * from t_driver where flag != 3) AS dd on dd.carId = cc.id) as o <where> @@ -111,7 +108,7 @@ order by o.id desc </select> <select id="getCarListAuth" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> - SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,dd.`name` as driverName,cc.* from t_car as cc + SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat, ifnull(CONCAT(dd.firstName, ' ', dd.lastName), CONCAT(ee.firstName, ' ', ee.lastName)) as driverName,cc.* from t_car as cc LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId @@ -119,13 +116,11 @@ LEFT JOIN ( SELECT GROUP_CONCAT(case when type = 1 then '专车' - when type = 2 then '出租车' - when type = 3 then '跨城出行' - when type = 4 then '小件物流-同城' - when type = 5 then '小件物流-跨城' - when type = 6 then '包车' + when type = 4 then '市内小件物流' else '' end ) as serverStr,carId from t_car_service GROUP BY carId) as ds on ds.carId = cc.id - LEFT JOIN (select * from t_driver where flag != 3) AS dd on dd.carId = cc.id) as o + LEFT JOIN (select * from t_driver where flag != 3) AS dd on dd.carId = cc.id + LEFT JOIN (select * from t_driver where flag != 3) AS ee on ee.id = cc.driverId + ) as o <where> o.state = 1 and authState=1 <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> @@ -170,7 +165,7 @@ <!--根据条件查询车辆列表不分页--> <select id="getCarListNoPage" resultType="map"> - SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,dd.`name` as driverName,cc.* from t_car as cc + SELECT * FROM (SELECT ds.serverStr,cb.`name` as brandName,cm.`name` as modelName,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,CONCAT(dd.firstName, ' ', dd.lastName) as driverName,cc.* from t_car as cc LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId @@ -178,11 +173,7 @@ LEFT JOIN ( SELECT GROUP_CONCAT(case when type = 1 then '专车' - when type = 2 then '出租车' - when type = 3 then '跨城出行' - when type = 4 then '小件物流-同城' - when type = 5 then '小件物流-跨城' - when type = 6 then '包车' + when type = 4 then '市内小件物流' else '' end ) as serverStr,carId from t_car_service GROUP BY carId) as ds on ds.carId = cc.id LEFT JOIN (select * from t_driver where flag != 3) AS dd on dd.carId = cc.id) as o <where> -- Gitblit v1.7.1