puzhibing
2024-02-07 387f61d55a8e20bc772b026cba4f8c34dfce5665
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
@@ -8,8 +8,10 @@
        <result column="account" property="account" />
        <result column="jobNumber" property="jobNumber" />
        <result column="phone" property="phone" />
        <result column="phoneOperator" property="phoneOperator"/>
        <result column="password" property="password" />
        <result column="name" property="name" />
        <result column="lastName" property="lastName" />
        <result column="firstName" property="firstName" />
        <result column="sex" property="sex" />
        <result column="idCard" property="idCard" />
        <result column="companyId" property="companyId" />
@@ -19,6 +21,7 @@
        <result column="idCardImgUrl2" property="idCardImgUrl2" />
        <result column="placeOfEmployment" property="placeOfEmployment" />
        <result column="birthday" property="birthday" />
        <result column="email" property="email"/>
        <result column="bankCardNumber" property="bankCardNumber" />
        <result column="driverNationality" property="driverNationality" />
        <result column="driverNation" property="driverNation" />
@@ -30,7 +33,8 @@
        <result column="driverContactAddress" property="driverContactAddress" />
        <result column="driverAge" property="driverAge" />
        <result column="driveCard" property="driveCard" />
        <result column="driveCardImgUrl" property="driveCardImgUrl" />
        <result column="driveCardImgUrl1" property="driveCardImgUrl1" />
        <result column="driveCardImgUrl2" property="driveCardImgUrl2" />
        <result column="driverType" property="driverType" />
        <result column="getDriverLicenseDate" property="getDriverLicenseDate" />
        <result column="driverLicenseOn" property="driverLicenseOn" />
@@ -72,7 +76,7 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, account, jobNumber, phone, password, name, sex, idCard, companyId, headImgUrl, faceImgUrl, idCardImgUrl1, idCardImgUrl2, placeOfEmployment, birthday, bankCardNumber, driverNationality, driverNation, driverMaritalStatus, driverLanguageLevel, driverEducation, driverCensus, driverAddress, driverContactAddress, licenseCode, licenselImgUrl, driverAge, driveCard, driveCardImgUrl, driverType, getDriverLicenseDate, driverLicenseOn, driverLicenseOff, taxiDriver, taxiAptitudeCard, networkCarlssueImg, networkCarlssueOrganization, networkCarlssueDate, getNetworkCarProofDate, networkCarProofOn, networkCarProofOff, registerDate, fullTimeDriver, inDriverBlacklist, commercialType, contractCompany, contractOn, contractOff, emergencyContact, emergencyContactPhone, emergencyContactAddress, remark, isPlatCar, carId, authState, state, flag, insertTime, insertUser, updateTime, updateUser, addType,uid,teamId
        id, account, jobNumber, phone, phoneOperator, password, lastName, firstName, sex, idCard, companyId, headImgUrl, faceImgUrl, idCardImgUrl1, idCardImgUrl2, placeOfEmployment, birthday, bankCardNumber, driverNationality, driverNation, driverMaritalStatus, driverLanguageLevel, driverEducation, driverCensus, driverAddress, driverContactAddress, licenseCode, licenselImgUrl, driverAge, driveCard, driveCardImgUrl, driverType, getDriverLicenseDate, driverLicenseOn, driverLicenseOff, taxiDriver, taxiAptitudeCard, networkCarlssueImg, networkCarlssueOrganization, networkCarlssueDate, getNetworkCarProofDate, networkCarProofOn, networkCarProofOff, registerDate, fullTimeDriver, inDriverBlacklist, commercialType, contractCompany, contractOn, contractOff, emergencyContact, emergencyContactPhone, emergencyContactAddress, remark, isPlatCar, carId, authState, state, flag, insertTime, insertUser, updateTime, updateUser, addType,uid,teamId
    </sql>
    <!--根据条件查询待审核司机列表-->
@@ -83,11 +87,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,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id
        ) as o
        <where>
@@ -125,11 +125,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 SEPARATOR '、') as serverStr,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id
        where dd.id = #{driverId}
    </select>
@@ -145,11 +141,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,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id
        LEFT JOIN (SELECT IFNULL(SUM(fraction)/COUNT(id),0) as evaluateNum,driverId FROM t_order_evaluate GROUP BY driverId) as oe on oe.driverId = dd.id
        LEFT JOIN (SELECT COUNT(id) as taxiNum,driverId FROM t_order_taxi where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot1 on ot1.driverId = dd.id
@@ -173,7 +165,7 @@
                and o.phone  LIKE CONCAT('%',#{phone},'%')
            </if>
            <if test="name != null and name != ''">
                and o.name  LIKE CONCAT('%',#{name},'%')
                and o.lastName  LIKE CONCAT('%',#{name},'%') or o.firstName  LIKE CONCAT('%',#{name},'%')
            </if>
            <if test="addType != null and addType != ''">
                and o.addType = #{addType}
@@ -213,11 +205,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 = ci.id) as o
        <where>
            o.state = 1
@@ -277,11 +265,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,driverId from t_driver_service GROUP BY driverId) as ds on ds.driverId = dd.id
        LEFT JOIN (SELECT IFNULL(SUM(fraction)/COUNT(id),0) as evaluateNum,driverId FROM t_order_evaluate GROUP BY driverId) as oe on oe.driverId = dd.id
        LEFT JOIN (SELECT COUNT(id) as taxiNum,driverId FROM t_order_taxi where FIND_IN_SET(state,'7,8,9') GROUP BY driverId) as ot1 on ot1.driverId = dd.id
@@ -311,7 +295,7 @@
        select
        concat('user_',id) as id,
        phone as phone,
        IFNULL(name,nickName) as name,
        IFNULL(CONCAT(firstName, ' ', lastName),nickName) as name,
        1 as uType,
        insertTime as insertTime
        from t_user
@@ -321,7 +305,7 @@
        select
        concat('driver_',id) as id,
        phone as phone,
        name as name,
        CONCAT(firstName, " ", lastName) as name,
        2 as uType,
        insertTime as insertTime
        from
@@ -338,7 +322,7 @@
    <select id="queryDriverIncomeData" parameterType="com.baomidou.mybatisplus.plugins.Page" resultType="map">
        SELECT
            td.id as id,
            td.`name` as driverName,
            CONCAT(td.firstName, " ", td.lastName) as driverName,
            tc1.name as companyName,
            tc2.name as franchiseeName,
            <if test="1 == type">
@@ -397,7 +381,7 @@
    <select id="queryDriverIncomeDataNoPage"  resultType="map">
        SELECT
        td.id as id,
        td.`name` as driverName,
        CONCAT(td.firstName, " ", td.lastName) as driverName,
        tc1.name as companyName,
        tc2.name as franchiseeName,
        <if test="1 == type">