|
|
|
@ -252,6 +252,85 @@
|
|
|
|
|
and vehicle_nub like concat('%',#{carNumber},'%') |
|
|
|
|
limit 10 |
|
|
|
|
</select> |
|
|
|
|
<select id="getVehicleDetail" resultType="com.logpm.basicdata.entity.BasicdataVehicleEntity"> |
|
|
|
|
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.id = #{id} |
|
|
|
|
AND is_deleted = 0 |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|