liujie
5 天以前 4c8c5c3051944e26f2d6f9352879a4a5891e8f1d
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml
@@ -54,7 +54,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,    (select GROUP_CONCAT(name SEPARATOR ',') AS driverNames from t_driver where  FIND_IN_SET(id, cc.bindDriverId)) as driverNames,c1.`name` as companyName,c2.`name` as franchiseeName,cm.seat,dd.`name` 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
@@ -68,7 +68,7 @@
        when type = 5 then '小件物流-跨城'
        when type = 6 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.id = cc.useDriverId) as o
        <where>
            o.state = 1
            <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
@@ -93,7 +93,7 @@
                and o.carLicensePlate  LIKE CONCAT('%',#{carLicensePlate},'%')
            </if>
            <if test="driverName != null and driverName != ''">
                and o.driverName  LIKE CONCAT('%',#{driverName},'%')
                and o.driverNames  LIKE CONCAT('%',#{driverName},'%')
            </if>
            <if test="companyName != null and companyName != ''">
                and o.companyName  LIKE CONCAT('%',#{companyName},'%')