|
|
@ -331,6 +331,357 @@ |
|
|
|
lbv.id = #{id} |
|
|
|
lbv.id = #{id} |
|
|
|
AND is_deleted = 0 |
|
|
|
AND is_deleted = 0 |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectInsuranceDeadlineBasicdataVehiclePage" |
|
|
|
|
|
|
|
resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
lbv.id id, |
|
|
|
|
|
|
|
lbv.tenant_id tenantId, |
|
|
|
|
|
|
|
lbv.create_user createUser, |
|
|
|
|
|
|
|
lbv.create_time createTime, |
|
|
|
|
|
|
|
lbv.update_user updateUser, |
|
|
|
|
|
|
|
lbv.update_time updateTime, |
|
|
|
|
|
|
|
lbv.STATUS STATUS, |
|
|
|
|
|
|
|
lbv.create_dept createDept, |
|
|
|
|
|
|
|
lbv.vehicle_nub vehicleNub, |
|
|
|
|
|
|
|
lbv.vehicle_source vehicleSource, |
|
|
|
|
|
|
|
lbv.is_head isHead, |
|
|
|
|
|
|
|
lbv.trailer_type trailerType, |
|
|
|
|
|
|
|
lbv.vehicle_model vehicleModel, |
|
|
|
|
|
|
|
lbv.car_type carType, |
|
|
|
|
|
|
|
lbv.carrier_name carrierName, |
|
|
|
|
|
|
|
lbv.vehicle_commander vehicleCommander, |
|
|
|
|
|
|
|
lbv.vehicle_height vehicleHeight, |
|
|
|
|
|
|
|
lbv.payment_method paymentMethod, |
|
|
|
|
|
|
|
lbv.approved_volume approvedVolume, |
|
|
|
|
|
|
|
lbv.license_plate_color licensePlateColor, |
|
|
|
|
|
|
|
lbv.vehicle_color vehicleColor, |
|
|
|
|
|
|
|
lbv.energy_type energyType, |
|
|
|
|
|
|
|
lbv.license_plate_type licensePlateType, |
|
|
|
|
|
|
|
lbv.notes notes, |
|
|
|
|
|
|
|
lbv.vehicle_owner vehicleOwner, |
|
|
|
|
|
|
|
lbv.vehicle_brand vehicleBrand, |
|
|
|
|
|
|
|
lbv.vehicle_code vehicleCode, |
|
|
|
|
|
|
|
lbv.engine_code engineCode, |
|
|
|
|
|
|
|
lbv.vehicle_quality vehicleQuality, |
|
|
|
|
|
|
|
lbv.curb_weight curbWeight, |
|
|
|
|
|
|
|
lbv.load_mass loadMass, |
|
|
|
|
|
|
|
lbv.outer_width outerWidth, |
|
|
|
|
|
|
|
lbv.expiration_time expirationTime, |
|
|
|
|
|
|
|
lbv.road_transport roadTransport, |
|
|
|
|
|
|
|
lbv.business_license businessLicense, |
|
|
|
|
|
|
|
lbv.vehicle_unit vehicleUnit, |
|
|
|
|
|
|
|
lbv.vehicle_unit_phone vehicleUnitPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_phone vehicleOwnerPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_card vehicleOwnerCard, |
|
|
|
|
|
|
|
lbv.driving_license_photo drivingLicensePhoto, |
|
|
|
|
|
|
|
lbv.driving_license_photo_back drivingLicensePhotoBack, |
|
|
|
|
|
|
|
lbv.license_photo licensePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_photo vehiclePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_rear_photo vehicleRearPhoto, |
|
|
|
|
|
|
|
lbv.road_transport_photo roadTransportPhoto, |
|
|
|
|
|
|
|
lbv.vehicle_people_photo vehiclePeoplePhoto, |
|
|
|
|
|
|
|
lbv.insurance_card_photo insuranceCardPhoto, |
|
|
|
|
|
|
|
lbv.carrier_id carrierId, |
|
|
|
|
|
|
|
lbv.review_time reviewTime, |
|
|
|
|
|
|
|
lbv.review_validity reviewValidity, |
|
|
|
|
|
|
|
lbv.insurance_start_time insuranceStartTime, |
|
|
|
|
|
|
|
lbv.insurance_end_time insuranceEndTime, |
|
|
|
|
|
|
|
lbv.body_advertising bodyAdvertising, |
|
|
|
|
|
|
|
lbv.advertisements_new_times advertisementsNewTimes, |
|
|
|
|
|
|
|
lbv.vehicle_parking_company vehicleParkingCompany, |
|
|
|
|
|
|
|
lbv.with_gps withGps, |
|
|
|
|
|
|
|
lbv.gps_service_provider gpsServiceProvider, |
|
|
|
|
|
|
|
lbv.gps_model gpsModel, |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
group_concat(lbvp.photo_url) |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle_photo lbvp |
|
|
|
|
|
|
|
where |
|
|
|
|
|
|
|
lbvp.master_id = lbv.id |
|
|
|
|
|
|
|
AND lbvp.create_time <= DATE_SUB( CURDATE(), INTERVAL 1 YEAR ) |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
lbvp.create_time |
|
|
|
|
|
|
|
LIMIT 3 |
|
|
|
|
|
|
|
) historicPhotos, |
|
|
|
|
|
|
|
(SELECT GROUP_CONCAT(driver_id SEPARATOR ',') from logpm_basicdata_drivermiddle lbd WHERE lbd.brand_id = lbv.id and lbd.is_deleted = 0) vehicleOwners |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle lbv |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
lbv.is_deleted = 0 |
|
|
|
|
|
|
|
AND lbv.insurance_end_time IS NOT null |
|
|
|
|
|
|
|
AND DATEDIFF(DATE_FORMAT(lbv.insurance_end_time,'%y%m%d'),DATE_FORMAT(NOW(),'%y%m%d')) BETWEEN 1 AND 90 |
|
|
|
|
|
|
|
<if test="param.vehicleNub != null ">and lbv.vehicle_nub like concat('%',#{param.vehicleNub},'%')</if> |
|
|
|
|
|
|
|
<if test="param.vehicleSource != null ">and lbv.vehicle_source = #{param.vehicleSource}</if> |
|
|
|
|
|
|
|
<if test="param.trailerType != null ">and lbv.trailer_type = #{param.trailerType}</if> |
|
|
|
|
|
|
|
<if test="param.vehicleModel != null ">and lbv.vehicle_model = #{param.vehicleModel}</if> |
|
|
|
|
|
|
|
<if test="param.paymentMethod != null ">and lbv.payment_method = #{param.paymentMethod}</if> |
|
|
|
|
|
|
|
<if test="param.carrierId != null ">and lbv.carrier_id = #{param.carrierId}</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectInsuranceExpireBasicdataVehiclePage" |
|
|
|
|
|
|
|
resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
lbv.id id, |
|
|
|
|
|
|
|
lbv.tenant_id tenantId, |
|
|
|
|
|
|
|
lbv.create_user createUser, |
|
|
|
|
|
|
|
lbv.create_time createTime, |
|
|
|
|
|
|
|
lbv.update_user updateUser, |
|
|
|
|
|
|
|
lbv.update_time updateTime, |
|
|
|
|
|
|
|
lbv.STATUS STATUS, |
|
|
|
|
|
|
|
lbv.create_dept createDept, |
|
|
|
|
|
|
|
lbv.vehicle_nub vehicleNub, |
|
|
|
|
|
|
|
lbv.vehicle_source vehicleSource, |
|
|
|
|
|
|
|
lbv.is_head isHead, |
|
|
|
|
|
|
|
lbv.trailer_type trailerType, |
|
|
|
|
|
|
|
lbv.vehicle_model vehicleModel, |
|
|
|
|
|
|
|
lbv.car_type carType, |
|
|
|
|
|
|
|
lbv.carrier_name carrierName, |
|
|
|
|
|
|
|
lbv.vehicle_commander vehicleCommander, |
|
|
|
|
|
|
|
lbv.vehicle_height vehicleHeight, |
|
|
|
|
|
|
|
lbv.payment_method paymentMethod, |
|
|
|
|
|
|
|
lbv.approved_volume approvedVolume, |
|
|
|
|
|
|
|
lbv.license_plate_color licensePlateColor, |
|
|
|
|
|
|
|
lbv.vehicle_color vehicleColor, |
|
|
|
|
|
|
|
lbv.energy_type energyType, |
|
|
|
|
|
|
|
lbv.license_plate_type licensePlateType, |
|
|
|
|
|
|
|
lbv.notes notes, |
|
|
|
|
|
|
|
lbv.vehicle_owner vehicleOwner, |
|
|
|
|
|
|
|
lbv.vehicle_brand vehicleBrand, |
|
|
|
|
|
|
|
lbv.vehicle_code vehicleCode, |
|
|
|
|
|
|
|
lbv.engine_code engineCode, |
|
|
|
|
|
|
|
lbv.vehicle_quality vehicleQuality, |
|
|
|
|
|
|
|
lbv.curb_weight curbWeight, |
|
|
|
|
|
|
|
lbv.load_mass loadMass, |
|
|
|
|
|
|
|
lbv.outer_width outerWidth, |
|
|
|
|
|
|
|
lbv.expiration_time expirationTime, |
|
|
|
|
|
|
|
lbv.road_transport roadTransport, |
|
|
|
|
|
|
|
lbv.business_license businessLicense, |
|
|
|
|
|
|
|
lbv.vehicle_unit vehicleUnit, |
|
|
|
|
|
|
|
lbv.vehicle_unit_phone vehicleUnitPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_phone vehicleOwnerPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_card vehicleOwnerCard, |
|
|
|
|
|
|
|
lbv.driving_license_photo drivingLicensePhoto, |
|
|
|
|
|
|
|
lbv.driving_license_photo_back drivingLicensePhotoBack, |
|
|
|
|
|
|
|
lbv.license_photo licensePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_photo vehiclePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_rear_photo vehicleRearPhoto, |
|
|
|
|
|
|
|
lbv.road_transport_photo roadTransportPhoto, |
|
|
|
|
|
|
|
lbv.vehicle_people_photo vehiclePeoplePhoto, |
|
|
|
|
|
|
|
lbv.insurance_card_photo insuranceCardPhoto, |
|
|
|
|
|
|
|
lbv.carrier_id carrierId, |
|
|
|
|
|
|
|
lbv.review_time reviewTime, |
|
|
|
|
|
|
|
lbv.review_validity reviewValidity, |
|
|
|
|
|
|
|
lbv.insurance_start_time insuranceStartTime, |
|
|
|
|
|
|
|
lbv.insurance_end_time insuranceEndTime, |
|
|
|
|
|
|
|
lbv.body_advertising bodyAdvertising, |
|
|
|
|
|
|
|
lbv.advertisements_new_times advertisementsNewTimes, |
|
|
|
|
|
|
|
lbv.vehicle_parking_company vehicleParkingCompany, |
|
|
|
|
|
|
|
lbv.with_gps withGps, |
|
|
|
|
|
|
|
lbv.gps_service_provider gpsServiceProvider, |
|
|
|
|
|
|
|
lbv.gps_model gpsModel, |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
group_concat(lbvp.photo_url) |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle_photo lbvp |
|
|
|
|
|
|
|
where |
|
|
|
|
|
|
|
lbvp.master_id = lbv.id |
|
|
|
|
|
|
|
AND lbvp.create_time <= DATE_SUB( CURDATE(), INTERVAL 1 YEAR ) |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
lbvp.create_time |
|
|
|
|
|
|
|
LIMIT 3 |
|
|
|
|
|
|
|
) historicPhotos, |
|
|
|
|
|
|
|
(SELECT GROUP_CONCAT(driver_id SEPARATOR ',') from logpm_basicdata_drivermiddle lbd WHERE lbd.brand_id = lbv.id and lbd.is_deleted = 0) vehicleOwners |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle lbv |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
lbv.is_deleted = 0 |
|
|
|
|
|
|
|
AND lbv.insurance_end_time IS NOT null |
|
|
|
|
|
|
|
AND DATEDIFF(DATE_FORMAT(lbv.insurance_end_time,'%y%m%d'),DATE_FORMAT(NOW(),'%y%m%d')) <= 0 |
|
|
|
|
|
|
|
<if test="param.vehicleNub != null ">and lbv.vehicle_nub like concat('%',#{param.vehicleNub},'%')</if> |
|
|
|
|
|
|
|
<if test="param.vehicleSource != null ">and lbv.vehicle_source = #{param.vehicleSource}</if> |
|
|
|
|
|
|
|
<if test="param.trailerType != null ">and lbv.trailer_type = #{param.trailerType}</if> |
|
|
|
|
|
|
|
<if test="param.vehicleModel != null ">and lbv.vehicle_model = #{param.vehicleModel}</if> |
|
|
|
|
|
|
|
<if test="param.paymentMethod != null ">and lbv.payment_method = #{param.paymentMethod}</if> |
|
|
|
|
|
|
|
<if test="param.carrierId != null ">and lbv.carrier_id = #{param.carrierId}</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAnnualDeadlineBasicdataVehiclePage" |
|
|
|
|
|
|
|
resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
lbv.id id, |
|
|
|
|
|
|
|
lbv.tenant_id tenantId, |
|
|
|
|
|
|
|
lbv.create_user createUser, |
|
|
|
|
|
|
|
lbv.create_time createTime, |
|
|
|
|
|
|
|
lbv.update_user updateUser, |
|
|
|
|
|
|
|
lbv.update_time updateTime, |
|
|
|
|
|
|
|
lbv.STATUS STATUS, |
|
|
|
|
|
|
|
lbv.create_dept createDept, |
|
|
|
|
|
|
|
lbv.vehicle_nub vehicleNub, |
|
|
|
|
|
|
|
lbv.vehicle_source vehicleSource, |
|
|
|
|
|
|
|
lbv.is_head isHead, |
|
|
|
|
|
|
|
lbv.trailer_type trailerType, |
|
|
|
|
|
|
|
lbv.vehicle_model vehicleModel, |
|
|
|
|
|
|
|
lbv.car_type carType, |
|
|
|
|
|
|
|
lbv.carrier_name carrierName, |
|
|
|
|
|
|
|
lbv.vehicle_commander vehicleCommander, |
|
|
|
|
|
|
|
lbv.vehicle_height vehicleHeight, |
|
|
|
|
|
|
|
lbv.payment_method paymentMethod, |
|
|
|
|
|
|
|
lbv.approved_volume approvedVolume, |
|
|
|
|
|
|
|
lbv.license_plate_color licensePlateColor, |
|
|
|
|
|
|
|
lbv.vehicle_color vehicleColor, |
|
|
|
|
|
|
|
lbv.energy_type energyType, |
|
|
|
|
|
|
|
lbv.license_plate_type licensePlateType, |
|
|
|
|
|
|
|
lbv.notes notes, |
|
|
|
|
|
|
|
lbv.vehicle_owner vehicleOwner, |
|
|
|
|
|
|
|
lbv.vehicle_brand vehicleBrand, |
|
|
|
|
|
|
|
lbv.vehicle_code vehicleCode, |
|
|
|
|
|
|
|
lbv.engine_code engineCode, |
|
|
|
|
|
|
|
lbv.vehicle_quality vehicleQuality, |
|
|
|
|
|
|
|
lbv.curb_weight curbWeight, |
|
|
|
|
|
|
|
lbv.load_mass loadMass, |
|
|
|
|
|
|
|
lbv.outer_width outerWidth, |
|
|
|
|
|
|
|
lbv.expiration_time expirationTime, |
|
|
|
|
|
|
|
lbv.road_transport roadTransport, |
|
|
|
|
|
|
|
lbv.business_license businessLicense, |
|
|
|
|
|
|
|
lbv.vehicle_unit vehicleUnit, |
|
|
|
|
|
|
|
lbv.vehicle_unit_phone vehicleUnitPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_phone vehicleOwnerPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_card vehicleOwnerCard, |
|
|
|
|
|
|
|
lbv.driving_license_photo drivingLicensePhoto, |
|
|
|
|
|
|
|
lbv.driving_license_photo_back drivingLicensePhotoBack, |
|
|
|
|
|
|
|
lbv.license_photo licensePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_photo vehiclePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_rear_photo vehicleRearPhoto, |
|
|
|
|
|
|
|
lbv.road_transport_photo roadTransportPhoto, |
|
|
|
|
|
|
|
lbv.vehicle_people_photo vehiclePeoplePhoto, |
|
|
|
|
|
|
|
lbv.insurance_card_photo insuranceCardPhoto, |
|
|
|
|
|
|
|
lbv.carrier_id carrierId, |
|
|
|
|
|
|
|
lbv.review_time reviewTime, |
|
|
|
|
|
|
|
lbv.review_validity reviewValidity, |
|
|
|
|
|
|
|
lbv.insurance_start_time insuranceStartTime, |
|
|
|
|
|
|
|
lbv.insurance_end_time insuranceEndTime, |
|
|
|
|
|
|
|
lbv.body_advertising bodyAdvertising, |
|
|
|
|
|
|
|
lbv.advertisements_new_times advertisementsNewTimes, |
|
|
|
|
|
|
|
lbv.vehicle_parking_company vehicleParkingCompany, |
|
|
|
|
|
|
|
lbv.with_gps withGps, |
|
|
|
|
|
|
|
lbv.gps_service_provider gpsServiceProvider, |
|
|
|
|
|
|
|
lbv.gps_model gpsModel, |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
group_concat(lbvp.photo_url) |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle_photo lbvp |
|
|
|
|
|
|
|
where |
|
|
|
|
|
|
|
lbvp.master_id = lbv.id |
|
|
|
|
|
|
|
AND lbvp.create_time <= DATE_SUB( CURDATE(), INTERVAL 1 YEAR ) |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
lbvp.create_time |
|
|
|
|
|
|
|
LIMIT 3 |
|
|
|
|
|
|
|
) historicPhotos, |
|
|
|
|
|
|
|
(SELECT GROUP_CONCAT(driver_id SEPARATOR ',') from logpm_basicdata_drivermiddle lbd WHERE lbd.brand_id = lbv.id and lbd.is_deleted = 0) vehicleOwners |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle lbv |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
lbv.is_deleted = 0 |
|
|
|
|
|
|
|
AND lbv.review_validity IS NOT null |
|
|
|
|
|
|
|
AND DATEDIFF(DATE_FORMAT(lbv.review_validity,'%y%m%d'),DATE_FORMAT(NOW(),'%y%m%d')) BETWEEN 1 AND 90 |
|
|
|
|
|
|
|
<if test="param.vehicleNub != null ">and lbv.vehicle_nub like concat('%',#{param.vehicleNub},'%')</if> |
|
|
|
|
|
|
|
<if test="param.vehicleSource != null ">and lbv.vehicle_source = #{param.vehicleSource}</if> |
|
|
|
|
|
|
|
<if test="param.trailerType != null ">and lbv.trailer_type = #{param.trailerType}</if> |
|
|
|
|
|
|
|
<if test="param.vehicleModel != null ">and lbv.vehicle_model = #{param.vehicleModel}</if> |
|
|
|
|
|
|
|
<if test="param.paymentMethod != null ">and lbv.payment_method = #{param.paymentMethod}</if> |
|
|
|
|
|
|
|
<if test="param.carrierId != null ">and lbv.carrier_id = #{param.carrierId}</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAnnualExpireBasicdataVehiclePage" resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
lbv.id id, |
|
|
|
|
|
|
|
lbv.tenant_id tenantId, |
|
|
|
|
|
|
|
lbv.create_user createUser, |
|
|
|
|
|
|
|
lbv.create_time createTime, |
|
|
|
|
|
|
|
lbv.update_user updateUser, |
|
|
|
|
|
|
|
lbv.update_time updateTime, |
|
|
|
|
|
|
|
lbv.STATUS STATUS, |
|
|
|
|
|
|
|
lbv.create_dept createDept, |
|
|
|
|
|
|
|
lbv.vehicle_nub vehicleNub, |
|
|
|
|
|
|
|
lbv.vehicle_source vehicleSource, |
|
|
|
|
|
|
|
lbv.is_head isHead, |
|
|
|
|
|
|
|
lbv.trailer_type trailerType, |
|
|
|
|
|
|
|
lbv.vehicle_model vehicleModel, |
|
|
|
|
|
|
|
lbv.car_type carType, |
|
|
|
|
|
|
|
lbv.carrier_name carrierName, |
|
|
|
|
|
|
|
lbv.vehicle_commander vehicleCommander, |
|
|
|
|
|
|
|
lbv.vehicle_height vehicleHeight, |
|
|
|
|
|
|
|
lbv.payment_method paymentMethod, |
|
|
|
|
|
|
|
lbv.approved_volume approvedVolume, |
|
|
|
|
|
|
|
lbv.license_plate_color licensePlateColor, |
|
|
|
|
|
|
|
lbv.vehicle_color vehicleColor, |
|
|
|
|
|
|
|
lbv.energy_type energyType, |
|
|
|
|
|
|
|
lbv.license_plate_type licensePlateType, |
|
|
|
|
|
|
|
lbv.notes notes, |
|
|
|
|
|
|
|
lbv.vehicle_owner vehicleOwner, |
|
|
|
|
|
|
|
lbv.vehicle_brand vehicleBrand, |
|
|
|
|
|
|
|
lbv.vehicle_code vehicleCode, |
|
|
|
|
|
|
|
lbv.engine_code engineCode, |
|
|
|
|
|
|
|
lbv.vehicle_quality vehicleQuality, |
|
|
|
|
|
|
|
lbv.curb_weight curbWeight, |
|
|
|
|
|
|
|
lbv.load_mass loadMass, |
|
|
|
|
|
|
|
lbv.outer_width outerWidth, |
|
|
|
|
|
|
|
lbv.expiration_time expirationTime, |
|
|
|
|
|
|
|
lbv.road_transport roadTransport, |
|
|
|
|
|
|
|
lbv.business_license businessLicense, |
|
|
|
|
|
|
|
lbv.vehicle_unit vehicleUnit, |
|
|
|
|
|
|
|
lbv.vehicle_unit_phone vehicleUnitPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_phone vehicleOwnerPhone, |
|
|
|
|
|
|
|
lbv.vehicle_owner_card vehicleOwnerCard, |
|
|
|
|
|
|
|
lbv.driving_license_photo drivingLicensePhoto, |
|
|
|
|
|
|
|
lbv.driving_license_photo_back drivingLicensePhotoBack, |
|
|
|
|
|
|
|
lbv.license_photo licensePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_photo vehiclePhoto, |
|
|
|
|
|
|
|
lbv.vehicle_rear_photo vehicleRearPhoto, |
|
|
|
|
|
|
|
lbv.road_transport_photo roadTransportPhoto, |
|
|
|
|
|
|
|
lbv.vehicle_people_photo vehiclePeoplePhoto, |
|
|
|
|
|
|
|
lbv.insurance_card_photo insuranceCardPhoto, |
|
|
|
|
|
|
|
lbv.carrier_id carrierId, |
|
|
|
|
|
|
|
lbv.review_time reviewTime, |
|
|
|
|
|
|
|
lbv.review_validity reviewValidity, |
|
|
|
|
|
|
|
lbv.insurance_start_time insuranceStartTime, |
|
|
|
|
|
|
|
lbv.insurance_end_time insuranceEndTime, |
|
|
|
|
|
|
|
lbv.body_advertising bodyAdvertising, |
|
|
|
|
|
|
|
lbv.advertisements_new_times advertisementsNewTimes, |
|
|
|
|
|
|
|
lbv.vehicle_parking_company vehicleParkingCompany, |
|
|
|
|
|
|
|
lbv.with_gps withGps, |
|
|
|
|
|
|
|
lbv.gps_service_provider gpsServiceProvider, |
|
|
|
|
|
|
|
lbv.gps_model gpsModel, |
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
group_concat(lbvp.photo_url) |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle_photo lbvp |
|
|
|
|
|
|
|
where |
|
|
|
|
|
|
|
lbvp.master_id = lbv.id |
|
|
|
|
|
|
|
AND lbvp.create_time <= DATE_SUB( CURDATE(), INTERVAL 1 YEAR ) |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
lbvp.create_time |
|
|
|
|
|
|
|
LIMIT 3 |
|
|
|
|
|
|
|
) historicPhotos, |
|
|
|
|
|
|
|
(SELECT GROUP_CONCAT(driver_id SEPARATOR ',') from logpm_basicdata_drivermiddle lbd WHERE lbd.brand_id = lbv.id and lbd.is_deleted = 0) vehicleOwners |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_basicdata_vehicle lbv |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
lbv.is_deleted = 0 |
|
|
|
|
|
|
|
AND lbv.review_validity IS NOT null |
|
|
|
|
|
|
|
AND DATEDIFF(DATE_FORMAT(lbv.review_validity,'%y%m%d'),DATE_FORMAT(NOW(),'%y%m%d')) <= 0 |
|
|
|
|
|
|
|
<if test="param.vehicleNub != null ">and lbv.vehicle_nub like concat('%',#{param.vehicleNub},'%')</if> |
|
|
|
|
|
|
|
<if test="param.vehicleSource != null ">and lbv.vehicle_source = #{param.vehicleSource}</if> |
|
|
|
|
|
|
|
<if test="param.trailerType != null ">and lbv.trailer_type = #{param.trailerType}</if> |
|
|
|
|
|
|
|
<if test="param.vehicleModel != null ">and lbv.vehicle_model = #{param.vehicleModel}</if> |
|
|
|
|
|
|
|
<if test="param.paymentMethod != null ">and lbv.payment_method = #{param.paymentMethod}</if> |
|
|
|
|
|
|
|
<if test="param.carrierId != null ">and lbv.carrier_id = #{param.carrierId}</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
</mapper> |
|
|
|