|
@@ -2,7 +2,6 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverInfoMapper">
|
|
<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverInfoMapper">
|
|
|
|
|
|
-
|
|
|
|
<!-- 获得司机总数 -->
|
|
<!-- 获得司机总数 -->
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
<select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
select
|
|
select
|
|
@@ -48,8 +47,6 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<!-- 司机列表查询 -->
|
|
<!-- 司机列表查询 -->
|
|
<select id="getListByCondition" parameterType="Map"
|
|
<select id="getListByCondition" parameterType="Map"
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo">
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo">
|
|
@@ -57,7 +54,7 @@
|
|
d.id,
|
|
d.id,
|
|
case when d.common_id is null then c.id else d.common_id end as commonId,
|
|
case when d.common_id is null then c.id else d.common_id end as commonId,
|
|
case when d.driver_name is null then c.user_name else d.driver_name end as driverName,
|
|
case when d.driver_name is null then c.user_name else d.driver_name end as driverName,
|
|
- case when d.driver_phone is null then c.phone else d.driver_phone end as driverPhone,
|
|
|
|
|
|
+ c.phone as driverPhone,
|
|
d.number_card as numberCard,
|
|
d.number_card as numberCard,
|
|
d.shipments_number as shipmentsNumber,
|
|
d.shipments_number as shipmentsNumber,
|
|
d.favorable_rate as favorableRate,
|
|
d.favorable_rate as favorableRate,
|
|
@@ -130,4 +127,117 @@
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 获得司机信息上报总数 -->
|
|
|
|
+ <select id="getSubmissionCountByCondition" parameterType="Map" resultType="java.lang.Integer">
|
|
|
|
+ select
|
|
|
|
+ count(c.id)
|
|
|
|
+ FROM common_user c
|
|
|
|
+ LEFT JOIN hy_driver_info d on c.id = d.common_id and d.delete_flag = 0
|
|
|
|
+ WHERE c.delete_flag = '0'
|
|
|
|
+ AND c.identification = '1'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND (d.escalation_status_key = '3' OR d.escalation_status_key = '9')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND (d.escalation_status_key = '5' OR d.escalation_status_key = '7')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND d.escalation_status_key = '11'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 4">
|
|
|
|
+ AND d.escalation_status_key = '13'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ AND (DATE_FORMAT(d.create_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
|
+ AND (DATE_FORMAT(d.create_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <!-- 司机信息上报列表查询 -->
|
|
|
|
+ <select id="getSubmissionListByCondition" parameterType="Map"
|
|
|
|
+ resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo">
|
|
|
|
+ SELECT
|
|
|
|
+ d.id,
|
|
|
|
+ case when d.common_id is null then c.id else d.common_id end as commonId,
|
|
|
|
+ d.driver_name as driverName,
|
|
|
|
+ c.phone as driverPhone,
|
|
|
|
+ d.number_card as numberCard,
|
|
|
|
+ d.shipments_number as shipmentsNumber,
|
|
|
|
+ d.favorable_rate as favorableRate,
|
|
|
|
+ d.complaints_number as complaintsNumber,
|
|
|
|
+ d.reported_number as reportedNumber,
|
|
|
|
+ d.accumulated_freight as accumulatedFreight,
|
|
|
|
+ d.advance_payment as advancePayment,
|
|
|
|
+ d.card_address_url as cardAddressUrl,
|
|
|
|
+ d.card_back_address_url as cardBackAddressUrl,
|
|
|
|
+ d.card_validity_date as cardValidityDate,
|
|
|
|
+ d.driver_license_home_page as driverLicenseHomePage,
|
|
|
|
+ d.driver_license_back_page as driverLicenseBackPage,
|
|
|
|
+ d.driver_license_validity_start_date as driverLicenseValidityStartDate,
|
|
|
|
+ d.driver_license_validity_date as driverLicenseValidityDate,
|
|
|
|
+ d.quasi_driving_vehicle as quasiDrivingVehicle,
|
|
|
|
+ d.lssuing_authority as lssuingAuthority,
|
|
|
|
+ d.qualification_certificate as qualificationCertificate,
|
|
|
|
+ d.qualification_certificate_validity_date as qualificationCertificateValidityDate,
|
|
|
|
+ d.qualification_certificate_number as qualificationCertificateNumber,
|
|
|
|
+ d.overdue_flag as overdueFlag,
|
|
|
|
+ d.driver_overdue_flag as driverOverdueFlag,
|
|
|
|
+ d.qualification_overdue_flag as qualificationOverdueFlag,
|
|
|
|
+ d.authentication_status_key as authenticationStatusKey,
|
|
|
|
+ case when d.authentication_status is null then '未认证' else d.authentication_status end as authenticationStatus,
|
|
|
|
+ d.back_stage_status_key as backStageStatusKey,
|
|
|
|
+ case when d.back_stage_status is null then '未认证' else d.back_stage_status end as backStageStatus,
|
|
|
|
+ d.escalation_date as escalationDate,
|
|
|
|
+ d.escalation_status_key as escalationStatusKey,
|
|
|
|
+ case when d.escalation_status is null then '未认证' else d.escalation_status end as escalationStatus,
|
|
|
|
+ d.create_date as createDate,
|
|
|
|
+ d.update_date as updateDate
|
|
|
|
+ FROM common_user c
|
|
|
|
+ LEFT JOIN hy_driver_info d on c.id = d.common_id and d.delete_flag = 0
|
|
|
|
+ WHERE c.delete_flag = '0'
|
|
|
|
+ AND c.identification = '1'
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND (d.escalation_status_key = '3' OR d.escalation_status_key = '9')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND (d.escalation_status_key = '5' OR d.escalation_status_key = '7')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND d.escalation_status_key = '11'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 4">
|
|
|
|
+ AND d.escalation_status_key = '13'
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ AND (DATE_FORMAT(d.create_date,"%Y%m%d") >=
|
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
|
+ AND (DATE_FORMAT(d.create_date,"%Y%m%d") <=
|
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY d.escalation_status_key ASC,d.escalation_date DESC
|
|
|
|
+ <if test="currentPage != null and currentPage != ''">
|
|
|
|
+ LIMIT ${startRecord}, ${pageSize}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|