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

---
 DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml |  623 ++++++--------------------------------------------------
 1 files changed, 72 insertions(+), 551 deletions(-)

diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
index 4b0c750..0643a44 100644
--- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
+++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -8,9 +8,11 @@
         <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="withdrawPassword" property="withdrawPassword"/>
-        <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" />
@@ -33,7 +35,9 @@
         <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="email" property="email"/>
         <result column="driverType" property="driverType" />
         <result column="getDriverLicenseDate" property="getDriverLicenseDate" />
         <result column="driverLicenseOn" property="driverLicenseOn" />
@@ -69,6 +73,7 @@
         <result column="laveBusinessMoney" property="laveBusinessMoney" />
         <result column="placeOfPractice" property="placeOfPractice"/>
         <result column="appletsOpenId" property="appletsOpenId"/>
+        <result column="language" property="language"/>
 
         <result column="flag" property="flag"/>
         <result column="insertTime" property="insertTime"/>
@@ -82,145 +87,13 @@
 
 
     <select id="queryByPhone" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
+        select *
         from t_driver where flag != 3 and authState != 4 and phone = #{phone}
     </select>
 
 
     <select id="queryAccount" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
+        select *
         from t_driver where flag != 3 and authState != 4 and account = #{account}
     </select>
 
@@ -228,73 +101,7 @@
 
 
     <select id="queryByPhone_" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
+        select *
         from t_driver where flag != 3 and authState = #{authState} and phone = #{phone}
     </select>
 
@@ -308,18 +115,18 @@
     <select id="queryHomeData" resultType="map">
         select
         b.carLicensePlate as licensePlate,
-        CONCAT(d.`name`, c.`name`, ' . ', b.carColor) as brand,
+        CONCAT(d.`name`, ' ', c.`name`, ' . ', b.carColor) as brand,
         (
         (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
         (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) +
         (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9) and to_days(insertTime) = to_days(now())) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and to_days(insertTime) = to_days(now()))
+        (select count(id) from t_order_logistics where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now()))
         ) as dayNum,
         (
         (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
         (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
         (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m')) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m'))
+        (select count(id) from t_order_logistics where driverId = a.id and state in (7, 8, 9) and DATE_FORMAT(insertTime, '%Y%m') = DATE_FORMAT(now(), '%Y%m'))
         ) as mouthNum,
         ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(fraction) from t_order_evaluate where driverId = a.id)) as score,
         if((select count(id) from t_driver_work where driverId = a.id and state = 1) != 0, 1, 2) as `work`
@@ -336,9 +143,15 @@
         a.id as id,
         a.headImgUrl as avatar,
         a.sex as sex,
-        a.`name` as `name`,
+        a.lastName as lastName,
+        a.firstName as firstName,
+        a.phoneOperator as phoneOperator,
         a.phone as phone,
+        DATE_FORMAT(a.birthday, '%Y-%m-%d') as birthday,
+        a.email,
+        a.driverAddress,
         a.qrCode,
+        a.language,
         a.laveActivityMoney as balance,
         a.laveActivityMoney as laveActivityMoney,
         a.activityMoney as activityMoney,
@@ -354,19 +167,20 @@
         DATE_FORMAT(a.getDriverLicenseDate, '%Y-%m-%d') as getDriverLicenseDate,
         (select GROUP_CONCAT(type Separator ',') from t_driver_service where driverId = a.id) as `type`,
         a.placeOfPractice as placeOfPractice,
-        a.driveCardImgUrl as driveCardImgUrl,
+        a.driveCardImgUrl1 as driveCardImgUrl,
+        a.driveCardImgUrl2 as driveCardImgUrl2,
         b.drivingLicensePhoto,b.carModelId,b.carBrandId,a.carId,
         a.networkCarlssueImg as networkCarlssueImg,
         a.placeOfEmployment as placeOfEmployment,
+        (select id from t_city where chineseName = a.placeOfPractice or englishName = a.placeOfPractice or frenchName = a.placeOfPractice)placeOfPracticeId,
         (select `name` from t_company where 1 = 1 and if(a.companyId is null or a.companyId = 0, id = 1, if(a.franchiseeId is null or a.franchiseeId = 0, id = a.companyId, id = a.franchiseeId))) as company,
         b.carLicensePlate as licensePlate,
         b.carColor as carColor,
-        CONCAT(d.`name`, c.`name`) as brand,
+        b.vehicleId,
+        CONCAT(d.`name`, ' ', c.`name`) as brand,
         (
-        (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9)) +
-        (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9)) +
-        (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9)) +
-        (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9))
+        (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(fraction) from t_order_evaluate where driverId = a.id)) as score
         from t_driver a
@@ -379,146 +193,14 @@
 
 
     <select id="queryByJobNum" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
-        from t_driver where flag != 3 and jobNumber = #{jobNum}
+        select * from t_driver where flag != 3 and jobNumber = #{jobNum}
     </select>
 
 
 
     <select id="queryWorkDriver" resultType="Driver">
         select
-        a.id as id,
-        a.account as account,
-        a.jobNumber as jobNumber,
-        a.phone as phone,
-        a.password as password,
-        a.name as name,
-        a.sex as sex,
-        a.idCard as idCard,
-        a.companyId as companyId,
-        a.franchiseeId as franchiseeId,
-        a.headImgUrl as headImgUrl,
-        a.faceImgUrl as faceImgUrl,
-        a.idCardImgUrl1 as idCardImgUrl1,
-        a.idCardImgUrl2 as idCardImgUrl2,
-        a.placeOfEmployment as placeOfEmployment,
-        a.birthday as birthday,
-        a.bankCardNumber as bankCardNumber,
-        a.driverNationality as driverNationality,
-        a.driverNation as driverNation,
-        a.driverMaritalStatus as driverMaritalStatus,
-        a.driverLanguageLevel as driverLanguageLevel,
-        a.driverEducation as driverEducation,
-        a.driverCensus as driverCensus,
-        a.driverAddress as driverAddress,
-        a.driverContactAddress as driverContactAddress,
-        a.driverAge as driverAge,
-        a.driveCard as driveCard,
-        a.driveCardImgUrl as driveCardImgUrl,
-        a.driverType as driverType,
-        a.getDriverLicenseDate as getDriverLicenseDate,
-        a.driverLicenseOn as driverLicenseOn,
-        a.driverLicenseOff as driverLicenseOff,
-        a.taxiDriver as taxiDriver,
-        a.taxiAptitudeCard as taxiAptitudeCard,
-        a.networkCarlssueImg as networkCarlssueImg,
-        a.networkCarlssueOrganization as networkCarlssueOrganization,
-        a.networkCarlssueDate as networkCarlssueDate,
-        a.getNetworkCarProofDate as getNetworkCarProofDate,
-        a.networkCarProofOn as networkCarProofOn,
-        a.networkCarProofOff as networkCarProofOff,
-        a.registerDate as registerDate,
-        a.fullTimeDriver as fullTimeDriver,
-        a.inDriverBlacklist as inDriverBlacklist,
-        a.commercialType as commercialType,
-        a.contractCompany as contractCompany,
-        a.contractOn as contractOn,
-        a.contractOff as contractOff,
-        a.emergencyContact as emergencyContact,
-        a.emergencyContactPhone as emergencyContactPhone,
-        a.emergencyContactAddress as emergencyContactAddress,
-        a.remark as remark,
-        a.isPlatCar as isPlatCar,
-        a.carId as carId,
-        a.authState as authState,
-        a.state as state,
-        a.addType as addType,
-        a.balance as balance,
-        a.activityMoney as activityMoney,
-        a.laveActivityMoney as laveActivityMoney,
-        a.businessMoney as businessMoney,
-        a.laveBusinessMoney as laveBusinessMoney,
-        a.flag as flag,
-        a.insertTime as insertTime,
-        a.insertUser as insertUser,
-        a.updateTime as updateTime,
-        a.updateUser as updateUser
+        a.*
         from t_driver a
         left join t_driver_work b on (a.id = b.driverId)
         where flag != 3 and b.state = 1
@@ -532,74 +214,8 @@
 
 
     <select id="queryByCompanyId" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
-        from t_driver where flag != 3
+        select *
+        from t_driver where flag != 3 and authState = 2
         <choose>
             <when test="companyId == 1">
                 and (companyId = 1 or companyId is null or companyId = 0) and (franchiseeId = 0 or franchiseeId is null)
@@ -613,73 +229,7 @@
 
 
     <select id="queryByIdentification" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
+        select *
         from t_driver where flag != 3 and idCard = #{identification}
     </select>
 
@@ -687,83 +237,18 @@
 
 
     <select id="queryByTaxiAptitudeCard" resultType="Driver">
-        select
-        id as id,
-        account as account,
-        jobNumber as jobNumber,
-        phone as phone,
-        password as password,
-        name as name,
-        sex as sex,
-        idCard as idCard,
-        companyId as companyId,
-        franchiseeId as franchiseeId,
-        headImgUrl as headImgUrl,
-        faceImgUrl as faceImgUrl,
-        idCardImgUrl1 as idCardImgUrl1,
-        idCardImgUrl2 as idCardImgUrl2,
-        placeOfEmployment as placeOfEmployment,
-        birthday as birthday,
-        bankCardNumber as bankCardNumber,
-        driverNationality as driverNationality,
-        driverNation as driverNation,
-        driverMaritalStatus as driverMaritalStatus,
-        driverLanguageLevel as driverLanguageLevel,
-        driverEducation as driverEducation,
-        driverCensus as driverCensus,
-        driverAddress as driverAddress,
-        driverContactAddress as driverContactAddress,
-        driverAge as driverAge,
-        driveCard as driveCard,
-        driveCardImgUrl as driveCardImgUrl,
-        driverType as driverType,
-        getDriverLicenseDate as getDriverLicenseDate,
-        driverLicenseOn as driverLicenseOn,
-        driverLicenseOff as driverLicenseOff,
-        taxiDriver as taxiDriver,
-        taxiAptitudeCard as taxiAptitudeCard,
-        networkCarlssueImg as networkCarlssueImg,
-        networkCarlssueOrganization as networkCarlssueOrganization,
-        networkCarlssueDate as networkCarlssueDate,
-        getNetworkCarProofDate as getNetworkCarProofDate,
-        networkCarProofOn as networkCarProofOn,
-        networkCarProofOff as networkCarProofOff,
-        registerDate as registerDate,
-        fullTimeDriver as fullTimeDriver,
-        inDriverBlacklist as inDriverBlacklist,
-        commercialType as commercialType,
-        contractCompany as contractCompany,
-        contractOn as contractOn,
-        contractOff as contractOff,
-        emergencyContact as emergencyContact,
-        emergencyContactPhone as emergencyContactPhone,
-        emergencyContactAddress as emergencyContactAddress,
-        remark as remark,
-        isPlatCar as isPlatCar,
-        carId as carId,
-        authState as authState,
-        state as state,
-        addType as addType,
-        balance as balance,
-        activityMoney as activityMoney,
-        laveActivityMoney as laveActivityMoney,
-        businessMoney as businessMoney,
-        laveBusinessMoney as laveBusinessMoney,
-        flag as flag,
-        insertTime as insertTime,
-        insertUser as insertUser,
-        updateTime as updateTime,
-        updateUser as updateUser
+        select *
         from t_driver where flag != 3 and taxiAptitudeCard = #{taxiAptitudeCard}
     </select>
 
     <select id="queryMyInviteDriverList" resultType="map">
         select
             id as id,
+            phoneOperator as phoneOperator,
             phone as phone,
-            name as name,
+            CONCAT(firstName, " ", lastName) as name,
             headImgUrl as avatar,
-            DATE_FORMAT(insertTime,'%Y/%m/%d %H:%i') as insertTime
+            DATE_FORMAT(insertTime,'%Y-%m-%d %H:%i') as insertTime
         from
             t_driver
             where uid=#{uid}
@@ -822,4 +307,40 @@
             date_format(insertTime, '%Y-%m-%d')
         ) = YEARWEEK(now())
     </select>
+    
+    
+    <select id="queryIdleDriver_" resultType="Driver">
+        select * from (
+        select
+        *
+        from t_driver
+        where flag != 3 and state = 2 and authState = 2
+        <if test="null != companyId">
+            <choose>
+                <when test="companyId != 1">
+                    and companyId = #{companyId} or franchiseeId = #{companyId}
+                </when>
+                <otherwise>
+                    and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0
+                </otherwise>
+            </choose>
+        
+        </if>
+        and id in
+        (
+        select driverId from t_driver_work where startTime &lt; now() and state = 1 and `type` like CONCAT('%', #{type}, '%')
+        )
+        and id in (select driverId from t_driver_orders where `type` = #{type})
+        and carId in (select carId from t_car_service where `type` = #{type}
+        
+        <if test="null != serverCarModelId">
+            and serverCarModelId = #{serverCarModelId}
+        </if>
+        )
+        ) as aa <!--where aa.id not in (
+        select driverId from t_order_private_car where isDelete = 1 and driverPay = 1 and state in (7, 8, 9)
+        union all
+        select driverId from t_order_logistics where isDelete = 1 and driverPay = 1 and state != 10
+        )-->
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1