803 lines
55 KiB
XML
803 lines
55 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.linke.transport.domain.vehicle.repository.mapper.VehicleMapper">
|
|
|
|
<resultMap type="com.linke.transport.domain.vehicle.repository.po.VehiclePo" id="VehicleResult">
|
|
<result property="vehicleId" column="vehicle_id" />
|
|
<result property="vehicleLicensePlateNumber" column="vehicle_license_plate_number" />
|
|
<result property="vehicleTypeId" column="vehicle_type_id" />
|
|
<result property="vehicleTypeName" column="vehicle_type_name" />
|
|
<result property="vehicleSourceId" column="vehicle_source_id" />
|
|
<result property="vehicleSourceName" column="vehicle_source_name" />
|
|
<result property="vehicleUsePerson" column="vehicle_use_person" />
|
|
<result property="vehicleAddress" column="vehicle_address" />
|
|
<result property="vehicleUseNature" column="vehicle_use_nature" />
|
|
<result property="vehicleBrandType" column="vehicle_brand_type" />
|
|
<result property="vehicleIdentificationNumber" column="vehicle_identification_number" />
|
|
<result property="vehicleEngineNumber" column="vehicle_engine_number" />
|
|
<result property="vehicleRegistrationDate" column="vehicle_registration_date" />
|
|
<result property="vehicleIssueDate" column="vehicle_issue_date" />
|
|
<result property="vehicleLicenceIssuingAuthority" column="vehicle_licence_issuing_authority" />
|
|
<result property="vehicleFileNumber" column="vehicle_file_number" />
|
|
<result property="vehicleTotalMass" column="vehicle_total_mass" />
|
|
<result property="vehicleApprovedLoadQuantity" column="vehicle_approved_load_quantity" />
|
|
<result property="vehicleGabariteOne" column="vehicle_gabarite_one" />
|
|
<result property="vehicleGabariteTwo" column="vehicle_gabarite_two" />
|
|
<result property="vehicleGabariteThree" column="vehicle_gabarite_three" />
|
|
<result property="vehicleEnergyTypeId" column="vehicle_energy_type_id" />
|
|
<result property="vehicleEnergyTypeName" column="vehicle_energy_type_name" />
|
|
<result property="vehicleCheckoutPeriodValidity" column="vehicle_checkout_period_validity" />
|
|
<result property="vehicleRemark" column="vehicle_remark" />
|
|
<result property="vehicleDrivingLicenseMain" column="vehicle_driving_license_main" />
|
|
<result property="vehicleDrivingLicenseDeputy" column="vehicle_driving_license_deputy" />
|
|
<result property="vehicleDrivingLicenseDeputyAgainst" column="vehicle_driving_license_deputy_against" />
|
|
<result property="trailerStatus" column="trailer_status" />
|
|
<result property="trailerLicensePlateNumber" column="trailer_license_plate_number" />
|
|
<result property="trailerVehicleTypeId" column="trailer_vehicle_type_id" />
|
|
<result property="trailerVehicleTypeName" column="trailer_vehicle_type_name" />
|
|
<result property="trailerLicensePlateColorId" column="trailer_license_plate_color_id" />
|
|
<result property="trailerLicensePlateColorName" column="trailer_license_plate_color_name" />
|
|
<result property="trailerTotalMass" column="trailer_total_mass" />
|
|
<result property="trailerApprovedLoadQuantity" column="trailer_approved_load_quantity" />
|
|
<result property="trailerDrivingLicenseExpireDate" column="trailer_driving_license_expire_date" />
|
|
<result property="trailerDrivingLicenseLongStatus" column="trailer_driving_license_long_status" />
|
|
<result property="trailerRoadTransportCertificateNo" column="trailer_road_transport_certificate_no" />
|
|
<result property="trailerRoadTransportCertificateExpireDate" column="trailer_road_transport_certificate_expire_date" />
|
|
<result property="trailerRoadTransportCertificateLongStatus" column="trailer_road_transport_certificate_long_status" />
|
|
<result property="trailerDrivingLicenseMain" column="trailer_driving_license_main" />
|
|
<result property="trailerDrivingLicenseDeputy" column="trailer_driving_license_deputy" />
|
|
<result property="trailerRoadTransportCertificateImage" column="trailer_road_transport_certificate_image" />
|
|
<result property="otherLicensePlateColorId" column="other_license_plate_color_id" />
|
|
<result property="otherLicensePlateColorName" column="other_license_plate_color_name" />
|
|
<result property="otherEnergyTypeId" column="other_energy_type_id" />
|
|
<result property="otherEnergyTypeName" column="other_energy_type_name" />
|
|
<result property="otherAxlesNumberId" column="other_axles_number_id" />
|
|
<result property="otherAxlesNumberName" column="other_axles_number_name" />
|
|
<result property="otherCarLengthId" column="other_car_length_id" />
|
|
<result property="otherCarLengthName" column="other_car_length_name" />
|
|
<result property="otherVehicleVolumeId" column="other_vehicle_volume_id" />
|
|
<result property="otherVehicleVolumeName" column="other_vehicle_volume_name" />
|
|
<result property="otherHeadstockImage" column="other_headstock_image" />
|
|
<result property="otherBodyworkImage" column="other_bodywork_image" />
|
|
<result property="otherPersonCarImage" column="other_person_car_image" />
|
|
<result property="roadTransportCertificateNo" column="road_transport_certificate_no" />
|
|
<result property="roadTransportCertificateExpireDate" column="road_transport_certificate_expire_date" />
|
|
<result property="roadTransportCertificateLongStatus" column="road_transport_certificate_long_status" />
|
|
<result property="roadTransportCertificateImage" column="road_transport_certificate_image" />
|
|
<result property="businessLicenseNumber" column="business_license_number" />
|
|
<result property="specializedHouseholdsName" column="specialized_households_name" />
|
|
<result property="businessLicenseExpireStartDate" column="business_license_expire_start_date" />
|
|
<result property="businessLicenseExpireEndDate" column="business_license_expire_end_date" />
|
|
<result property="businessLicenseLongStatus" column="business_license_long_status" />
|
|
<result property="businessLicenseImage" column="business_license_image" />
|
|
<result property="authenticationStatus" column="authentication_status" />
|
|
<result property="rejectReason" column="reject_reason" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="userName" column="user_name" />
|
|
<result property="userPhone" column="user_phone" />
|
|
<result property="motorcadeId" column="motorcade_id" />
|
|
<result property="motorcadeName" column="motorcade_name" />
|
|
<result property="carryStatus" column="carry_status" />
|
|
<result property="roadTransportCertificateCheckoutStatus" column="road_transport_certificate_checkout_status" />
|
|
<result property="businessLicenseCheckoutStatus" column="business_license_checkout_status" />
|
|
<result property="netInStatus" column="net_in_status" />
|
|
<result property="netInDate" column="net_in_date" />
|
|
<result property="useStatus" column="use_status" />
|
|
<result property="organizationId" column="organization_id" />
|
|
<result property="organizationName" column="organization_name" />
|
|
<result property="checkoutPersonId" column="checkout_person_id" />
|
|
<result property="checkoutPersonName" column="checkout_person_name" />
|
|
<result property="checkoutDate" column="checkout_date" />
|
|
<result property="vehicleDrivingLicenseAuthStatus" column="vehicle_driving_license_auth_status" />
|
|
<result property="vehicleAuthStatus" column="vehicle_auth_status" />
|
|
<result property="trailerLicensePlateAuthStatus" column="trailer_license_plate_auth_status" />
|
|
<result property="roadTransportCertificateAuthStatus" column="road_transport_certificate_auth_status" />
|
|
<result property="businessLicenseExpireAuthStatus" column="business_license_expire_auth_status" />
|
|
<result property="authStatus" column="auth_status" />
|
|
<result property="roadTransportCertificateCheckStatus" column="road_transport_certificate_check_status" />
|
|
<result property="businessLicenseExpireCheckStatus" column="business_license_expire_check_status" />
|
|
<result property="blacklistStatus" column="blacklist_status" />
|
|
<result property="blacklistRemark" column="blacklist_remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createByName" column="create_by_name" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateByName" column="update_by_name" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="userName" column="user_name" />
|
|
<result property="userPhone" column="user_phone" />
|
|
</resultMap>
|
|
|
|
<sql id="selectVehicleVo">
|
|
SELECT
|
|
*
|
|
FROM
|
|
vehicle
|
|
|
|
</sql>
|
|
|
|
<select id="selectVehicleList" parameterType="com.linke.transport.domain.vehicle.repository.po.VehiclePo" resultMap="VehicleResult">
|
|
<include refid="selectVehicleVo"/>
|
|
<where>
|
|
del_flag = 1
|
|
<if test="vehicleLicensePlateNumber != null and vehicleLicensePlateNumber != ''"> and vehicle_license_plate_number like concat('%', #{vehicleLicensePlateNumber}, '%')</if>
|
|
<if test="vehicleTypeId != null and vehicleTypeId != ''"> and vehicle_type_id = #{vehicleTypeId}</if>
|
|
<if test="vehicleBody != null and vehicleBody!='' "> and vehicle_body like concat('%', #{vehicleBody}, '%') </if>
|
|
<if test="vehicleSourceId != null and vehicleTypeId != ''"> and vehicle_source_id = #{vehicleSourceId}</if>
|
|
<if test="vehicleSource != null"> and vehicle_source = #{vehicleSource}</if>
|
|
<if test="trailerLicensePlateNumber != null and trailerLicensePlateNumber != ''"> and trailer_license_plate_number like concat('%', #{trailerLicensePlateNumber}, '%')</if>
|
|
<if test="authenticationStatus != null "> and authentication_status = #{authenticationStatus}</if>
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
<if test="motorcadeName != null and motorcadeName != ''"> and motorcade_name like concat('%', #{motorcadeName}, '%')</if>
|
|
<if test="carryStatus != null "> and carry_status = #{carryStatus}</if>
|
|
<if test="vehicleUseNature != null and vehicleUseNature != ''"> and vehicle_use_nature like concat('%', #{vehicleUseNature}, '%')</if>
|
|
<if test="vehicleTotalMassStart != null">
|
|
AND IFNULL(vehicle_total_mass,0) >= #{vehicleTotalMassStart}
|
|
</if>
|
|
<if test="vehicleTotalMassEnd != null">
|
|
AND IFNULL(vehicle_total_mass,0) <![CDATA[<=]]> #{vehicleTotalMassEnd}
|
|
</if>
|
|
<if test="vehicleApprovedLoadQuantityStart != null">
|
|
AND IFNULL(vehicle_approved_load_quantity,0) >= #{vehicleApprovedLoadQuantityStart}
|
|
</if>
|
|
<if test="vehicleApprovedLoadQuantityEnd != null">
|
|
AND IFNULL(vehicle_approved_load_quantity,0) <![CDATA[<=]]> #{vehicleApprovedLoadQuantityEnd}
|
|
</if>
|
|
<if test="otherAxlesNumberNameStart != null">
|
|
AND IFNULL(other_axles_number_name,0) >= #{otherAxlesNumberNameStart}
|
|
</if>
|
|
<if test="otherAxlesNumberNameEnd != null">
|
|
AND IFNULL(other_axles_number_name,0) <![CDATA[<=]]> #{otherAxlesNumberNameEnd}
|
|
</if>
|
|
<if test="otherCarLengthNameStart != null">
|
|
AND IFNULL(other_car_length_name,0) >= #{otherCarLengthNameStart}
|
|
</if>
|
|
<if test="otherCarLengthNameEnd != null">
|
|
AND IFNULL(other_car_length_name,0) <![CDATA[<=]]> #{otherCarLengthNameEnd}
|
|
</if>
|
|
<if test="otherVehicleVolumeNameStart != null">
|
|
AND IFNULL(other_vehicle_volume_name,0) >= #{otherVehicleVolumeNameStart}
|
|
</if>
|
|
<if test="otherVehicleVolumeNameEnd != null">
|
|
AND IFNULL(other_vehicle_volume_name,0) <![CDATA[<=]]> #{otherVehicleVolumeNameEnd}
|
|
</if>
|
|
<if test="otherLicensePlateColorId != null and otherLicensePlateColorId != ''"> and other_license_plate_color_id = #{otherLicensePlateColorId}</if>
|
|
<if test="vehicleCheckoutPeriodValidityStart != null">
|
|
AND vehicle_checkout_period_validity >= #{vehicleCheckoutPeriodValidityStart}
|
|
</if>
|
|
<if test="vehicleCheckoutPeriodValidityEnd != null">
|
|
AND vehicle_checkout_period_validity <![CDATA[<=]]> #{vehicleCheckoutPeriodValidityEnd}
|
|
</if>
|
|
<if test="trailerRoadTransportCertificateNo != null and trailerRoadTransportCertificateNo != ''"> and trailer_road_transport_certificate_no = #{trailerRoadTransportCertificateNo}</if>
|
|
<if test="roadTransportCertificateExpireDateStart != null">
|
|
AND trailer_road_transport_certificate_expire_date >= #{roadTransportCertificateExpireDateStart}
|
|
</if>
|
|
<if test="roadTransportCertificateExpireDateEnd != null">
|
|
AND trailer_road_transport_certificate_expire_date <![CDATA[<=]]> #{roadTransportCertificateExpireDateEnd}
|
|
</if>
|
|
<if test="roadTransportCertificateCheckoutStatus != null "> and road_transport_certificate_checkout_status = #{roadTransportCertificateCheckoutStatus}</if>
|
|
<if test="businessLicenseNumber != null and businessLicenseNumber != ''"> and business_license_number = #{businessLicenseNumber}</if>
|
|
<if test="businessLicenseExpireEndDateStart != null">
|
|
AND business_license_expire_end_date >= #{businessLicenseExpireEndDateStart}
|
|
</if>
|
|
<if test="businessLicenseExpireEndDateStart != null">
|
|
AND business_license_expire_end_date <![CDATA[<=]]> #{businessLicenseExpireEndDateStart}
|
|
</if>
|
|
<if test="businessLicenseCheckoutStatus != null "> and business_license_checkout_status = #{businessLicenseCheckoutStatus}</if>
|
|
<if test="netInStatus != null "> and net_in_status = #{netInStatus}</if>
|
|
<if test="netInDateStart != null">
|
|
AND net_in_date >= #{netInDateStart}
|
|
</if>
|
|
<if test="netInDateEnd != null">
|
|
AND net_in_date <![CDATA[<=]]> #{netInDateEnd}
|
|
</if>
|
|
<if test="useStatus != null "> and use_status = #{useStatus}</if>
|
|
<if test="organizationId != null "> and organization_id = #{organizationId}</if>
|
|
<if test="organizationName != null "> and organization_id like concat('%', #{organizationName}, '%')</if>
|
|
<if test="checkoutPersonName != null and checkoutPersonName != ''"> and checkout_person_name like concat('%', #{checkoutPersonName}, '%')</if>
|
|
<if test="checkoutDateStart != null">
|
|
AND checkout_date >= #{checkoutDateStart}
|
|
</if>
|
|
<if test="checkoutDateEnd != null">
|
|
AND checkout_date <![CDATA[<=]]> #{checkoutDateEnd}
|
|
</if>
|
|
<if test="createByName != null and createByName != ''"> and create_by_name like concat('%', #{createByName}, '%')</if>
|
|
<if test="createTimeStart != null">
|
|
AND date_format(create_time,'%Y-%m-%d') >= date_format(#{createTimeStart},'%Y-%m-%d')
|
|
</if>
|
|
<if test="createTimeEnd != null">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> date_format(#{createTimeEnd},'%Y-%m-%d')
|
|
</if>
|
|
<if test="createTimeFrom != null">
|
|
AND date_format(create_time,'%Y-%m-%d') >= date_format(#{createTimeFrom},'%Y-%m-%d')
|
|
</if>
|
|
<if test="createTimeTo != null">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> date_format(#{createTimeTo},'%Y-%m-%d')
|
|
</if>
|
|
<if test="createBy != null"> and create_by = #{createBy}</if>
|
|
<if test="organizationIdList != null ">
|
|
AND organization_id in
|
|
<foreach item="id" collection="organizationIdList" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
<if test="vehicleIdList != null ">
|
|
AND vehicle_id in
|
|
<foreach item="id" collection="vehicleIdList" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
<if test="vehicleBindIdList != null and vehicleBindIdList.size > 0">
|
|
AND vehicle_id not in
|
|
<foreach item="id" collection="vehicleBindIdList" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
order by create_time DESC
|
|
</select>
|
|
|
|
<select id="selectStowageVehiclelist" parameterType="com.linke.transport.domain.vehicle.repository.po.VehiclePo" resultMap="VehicleResult">
|
|
SELECT
|
|
v.vehicle_id,
|
|
v.vehicle_license_plate_number,
|
|
v.vehicle_type_id,
|
|
v.vehicle_type_name,
|
|
v.vehicle_approved_load_quantity,
|
|
v.vehicle_source_id,
|
|
v.vehicle_source_name,
|
|
v.user_id,
|
|
v.user_name,
|
|
v.user_phone,
|
|
COALESCE(CONCAT( v.vehicle_license_plate_number, ' ', v.vehicle_type_name, ' ', v.vehicle_approved_load_quantity, 'kg', ' ', v.vehicle_source_name )
|
|
,v.vehicle_license_plate_number, ' ', v.vehicle_type_name, ' ', v.vehicle_approved_load_quantity, 'kg', ' ', v.vehicle_source_name) AS label
|
|
FROM
|
|
vehicle v
|
|
<where>
|
|
v.del_flag = 1 and v.authentication_status = 3
|
|
<choose>
|
|
<when test="userAccountType != null and userAccountType == 3 and topOrganizationId != null">
|
|
and v.top_organization_id = #{topOrganizationId}
|
|
</when>
|
|
<otherwise>
|
|
and (v.organization_id = #{organizationId} or v.organization_id = #{topOrganizationId})
|
|
</otherwise>
|
|
</choose>
|
|
<!-- <if test="createBy != null"> and v.create_by = #{createBy}</if>-->
|
|
<!-- <if test="createBy != null and organizationIdList == null">-->
|
|
<!-- and v.create_by = #{createBy}</if>-->
|
|
<!-- <if test="organizationIdList != null and createBy == null">-->
|
|
<!-- and v.organization_id in-->
|
|
<!-- <foreach item="id" collection="organizationIdList" open="(" separator="," close=")">-->
|
|
<!-- #{id}-->
|
|
<!-- </foreach>-->
|
|
<!-- </if>-->
|
|
<!-- <if test="organizationIdList != null and createBy != null">-->
|
|
<!-- and (v.organization_id in-->
|
|
<!-- <foreach item="id" collection="organizationIdList" open="(" separator="," close=")">-->
|
|
<!-- #{id}-->
|
|
<!-- </foreach>-->
|
|
<!-- or v.create_by = #{createBy})-->
|
|
<!-- </if>-->
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectVehicleByVehicleId" parameterType="java.lang.Long" resultMap="VehicleResult">
|
|
<include refid="selectVehicleVo"/>
|
|
where vehicle_id = #{vehicleId} and del_flag = 1
|
|
</select>
|
|
|
|
<select id="selectVehiclePoByVehicleId" parameterType="java.lang.Long" resultType="com.mhd.common.core.domain.po.VehiclePo">
|
|
<include refid="selectVehicleVo"/>
|
|
where vehicle_id = #{vehicleId} and del_flag = 1
|
|
</select>
|
|
<insert id="insertVehicle" parameterType="com.linke.transport.domain.vehicle.entity.Vehicle" useGeneratedKeys = "true" keyProperty = "vehicleId">
|
|
insert into vehicle
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="vehicleLicensePlateNumber != null">vehicle_license_plate_number,</if>
|
|
<if test="vehicleTypeId != null">vehicle_type_id,</if>
|
|
<if test="vehicleTypeName != null">vehicle_type_name,</if>
|
|
<if test="vehicleSourceId != null">vehicle_source_id,</if>
|
|
<if test="vehicleSourceName != null">vehicle_source_name,</if>
|
|
<if test="vehicleUsePerson != null">vehicle_use_person,</if>
|
|
<if test="vehicleAddress != null">vehicle_address,</if>
|
|
<if test="vehicleUseNature != null">vehicle_use_nature,</if>
|
|
<if test="vehicleBrandType != null">vehicle_brand_type,</if>
|
|
<if test="vehicleIdentificationNumber != null">vehicle_identification_number,</if>
|
|
<if test="vehicleEngineNumber != null">vehicle_engine_number,</if>
|
|
<if test="vehicleRegistrationDate != null">vehicle_registration_date,</if>
|
|
<if test="vehicleIssueDate != null">vehicle_issue_date,</if>
|
|
<if test="vehicleLicenceIssuingAuthority != null">vehicle_licence_issuing_authority,</if>
|
|
<if test="vehicleFileNumber != null">vehicle_file_number,</if>
|
|
<if test="vehicleTotalMass != null">vehicle_total_mass,</if>
|
|
<if test="vehicleApprovedLoadQuantity != null">vehicle_approved_load_quantity,</if>
|
|
<if test="vehicleGabariteOne != null">vehicle_gabarite_one,</if>
|
|
<if test="vehicleGabariteTwo != null">vehicle_gabarite_two,</if>
|
|
<if test="vehicleGabariteThree != null">vehicle_gabarite_three,</if>
|
|
<if test="vehicleEnergyTypeId != null">vehicle_energy_type_id,</if>
|
|
<if test="vehicleEnergyTypeName != null">vehicle_energy_type_name,</if>
|
|
<if test="vehicleCheckoutPeriodValidity != null">vehicle_checkout_period_validity,</if>
|
|
<if test="vehicleRemark != null">vehicle_remark,</if>
|
|
<if test="vehicleDrivingLicenseMain != null">vehicle_driving_license_main,</if>
|
|
<if test="vehicleDrivingLicenseDeputy != null">vehicle_driving_license_deputy,</if>
|
|
<if test="vehicleDrivingLicenseDeputyAgainst != null">vehicle_driving_license_deputy_against,</if>
|
|
<if test="trailerStatus != null">trailer_status,</if>
|
|
<if test="trailerLicensePlateNumber != null">trailer_license_plate_number,</if>
|
|
<if test="trailerVehicleTypeId != null">trailer_vehicle_type_id,</if>
|
|
<if test="trailerVehicleTypeName != null">trailer_vehicle_type_name,</if>
|
|
<if test="trailerLicensePlateColorId != null">trailer_license_plate_color_id,</if>
|
|
<if test="trailerLicensePlateColorName != null">trailer_license_plate_color_name,</if>
|
|
<if test="trailerTotalMass != null">trailer_total_mass,</if>
|
|
<if test="trailerApprovedLoadQuantity != null">trailer_approved_load_quantity,</if>
|
|
<if test="trailerDrivingLicenseExpireDate != null">trailer_driving_license_expire_date,</if>
|
|
<if test="trailerDrivingLicenseLongStatus != null">trailer_driving_license_long_status,</if>
|
|
<if test="trailerRoadTransportCertificateNo != null">trailer_road_transport_certificate_no,</if>
|
|
<if test="trailerRoadTransportCertificateExpireDate != null">trailer_road_transport_certificate_expire_date,</if>
|
|
<if test="trailerRoadTransportCertificateLongStatus != null">trailer_road_transport_certificate_long_status,</if>
|
|
<if test="trailerDrivingLicenseMain != null">trailer_driving_license_main,</if>
|
|
<if test="trailerDrivingLicenseDeputy != null">trailer_driving_license_deputy,</if>
|
|
<if test="trailerRoadTransportCertificateImage != null">trailer_road_transport_certificate_image,</if>
|
|
<if test="otherLicensePlateColorId != null">other_license_plate_color_id,</if>
|
|
<if test="otherLicensePlateColorName != null">other_license_plate_color_name,</if>
|
|
<if test="otherEnergyTypeId != null">other_energy_type_id,</if>
|
|
<if test="otherEnergyTypeName != null">other_energy_type_name,</if>
|
|
<if test="otherAxlesNumberId != null">other_axles_number_id,</if>
|
|
<if test="otherAxlesNumberName != null">other_axles_number_name,</if>
|
|
<if test="otherCarLengthId != null">other_car_length_id,</if>
|
|
<if test="otherCarLengthName != null">other_car_length_name,</if>
|
|
<if test="otherVehicleVolumeId != null">other_vehicle_volume_id,</if>
|
|
<if test="otherVehicleVolumeName != null">other_vehicle_volume_name,</if>
|
|
<if test="otherHeadstockImage != null">other_headstock_image,</if>
|
|
<if test="otherBodyworkImage != null">other_bodywork_image,</if>
|
|
<if test="otherPersonCarImage != null">other_person_car_image,</if>
|
|
<if test="roadTransportCertificateNo != null">road_transport_certificate_no,</if>
|
|
<if test="roadTransportCertificateExpireDate != null">road_transport_certificate_expire_date,</if>
|
|
<if test="roadTransportCertificateLongStatus != null">road_transport_certificate_long_status,</if>
|
|
<if test="roadTransportCertificateImage != null">road_transport_certificate_image,</if>
|
|
<if test="businessLicenseNumber != null">business_license_number,</if>
|
|
<if test="specializedHouseholdsName != null">specialized_households_name,</if>
|
|
<if test="businessLicenseExpireStartDate != null">business_license_expire_start_date,</if>
|
|
<if test="businessLicenseExpireEndDate != null">business_license_expire_end_date,</if>
|
|
<if test="businessLicenseLongStatus != null">business_license_long_status,</if>
|
|
<if test="businessLicenseImage != null">business_license_image,</if>
|
|
<if test="authenticationStatus != null">authentication_status,</if>
|
|
<if test="rejectReason != null">reject_reason,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="userName != null">user_name,</if>
|
|
<if test="userPhone != null">user_phone,</if>
|
|
<if test="motorcadeId != null">motorcade_id,</if>
|
|
<if test="motorcadeName != null">motorcade_name,</if>
|
|
<if test="carryStatus != null">carry_status,</if>
|
|
<if test="roadTransportCertificateCheckoutStatus != null">road_transport_certificate_checkout_status,</if>
|
|
<if test="businessLicenseCheckoutStatus != null">business_license_checkout_status,</if>
|
|
<if test="netInStatus != null">net_in_status,</if>
|
|
<if test="netInDate != null">net_in_date,</if>
|
|
<if test="useStatus != null">use_status,</if>
|
|
<if test="organizationId != null">organization_id,</if>
|
|
<if test="organizationName != null">organization_name,</if>
|
|
<if test="checkoutPersonId != null">checkout_person_id,</if>
|
|
<if test="checkoutPersonName != null">checkout_person_name,</if>
|
|
<if test="checkoutDate != null">checkout_date,</if>
|
|
<if test="vehicleDrivingLicenseAuthStatus != null">vehicle_driving_license_auth_status,</if>
|
|
<if test="vehicleAuthStatus != null">vehicle_auth_status,</if>
|
|
<if test="trailerLicensePlateAuthStatus != null">trailer_license_plate_auth_status,</if>
|
|
<if test="roadTransportCertificateAuthStatus != null">road_transport_certificate_auth_status,</if>
|
|
<if test="businessLicenseExpireAuthStatus != null">business_license_expire_auth_status,</if>
|
|
<if test="authStatus != null">auth_status,</if>
|
|
<if test="roadTransportCertificateCheckStatus != null">road_transport_certificate_check_status,</if>
|
|
<if test="businessLicenseExpireCheckStatus != null">business_license_expire_check_status,</if>
|
|
<if test="blacklistStatus != null">blacklist_status,</if>
|
|
<if test="blacklistRemark != null">blacklist_remark,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createByName != null">create_by_name,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateByName != null">update_by_name,</if>
|
|
<if test="delFlag != null">del_flag,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="vehicleLicensePlateNumber != null">#{vehicleLicensePlateNumber},</if>
|
|
<if test="vehicleTypeId != null">#{vehicleTypeId},</if>
|
|
<if test="vehicleTypeName != null">#{vehicleTypeName},</if>
|
|
<if test="vehicleSourceId != null">#{vehicleSourceId},</if>
|
|
<if test="vehicleSourceName != null">#{vehicleSourceName},</if>
|
|
<if test="vehicleUsePerson != null">#{vehicleUsePerson},</if>
|
|
<if test="vehicleAddress != null">#{vehicleAddress},</if>
|
|
<if test="vehicleUseNature != null">#{vehicleUseNature},</if>
|
|
<if test="vehicleBrandType != null">#{vehicleBrandType},</if>
|
|
<if test="vehicleIdentificationNumber != null">#{vehicleIdentificationNumber},</if>
|
|
<if test="vehicleEngineNumber != null">#{vehicleEngineNumber},</if>
|
|
<if test="vehicleRegistrationDate != null">#{vehicleRegistrationDate},</if>
|
|
<if test="vehicleIssueDate != null">#{vehicleIssueDate},</if>
|
|
<if test="vehicleLicenceIssuingAuthority != null">#{vehicleLicenceIssuingAuthority},</if>
|
|
<if test="vehicleFileNumber != null">#{vehicleFileNumber},</if>
|
|
<if test="vehicleTotalMass != null">#{vehicleTotalMass},</if>
|
|
<if test="vehicleApprovedLoadQuantity != null">#{vehicleApprovedLoadQuantity},</if>
|
|
<if test="vehicleGabariteOne != null">#{vehicleGabariteOne},</if>
|
|
<if test="vehicleGabariteTwo != null">#{vehicleGabariteTwo},</if>
|
|
<if test="vehicleGabariteThree != null">#{vehicleGabariteThree},</if>
|
|
<if test="vehicleEnergyTypeId != null">#{vehicleEnergyTypeId},</if>
|
|
<if test="vehicleEnergyTypeName != null">#{vehicleEnergyTypeName},</if>
|
|
<if test="vehicleCheckoutPeriodValidity != null">#{vehicleCheckoutPeriodValidity},</if>
|
|
<if test="vehicleRemark != null">#{vehicleRemark},</if>
|
|
<if test="vehicleDrivingLicenseMain != null">#{vehicleDrivingLicenseMain},</if>
|
|
<if test="vehicleDrivingLicenseDeputy != null">#{vehicleDrivingLicenseDeputy},</if>
|
|
<if test="vehicleDrivingLicenseDeputyAgainst != null">#{vehicleDrivingLicenseDeputyAgainst},</if>
|
|
<if test="trailerStatus != null">#{trailerStatus},</if>
|
|
<if test="trailerLicensePlateNumber != null">#{trailerLicensePlateNumber},</if>
|
|
<if test="trailerVehicleTypeId != null">#{trailerVehicleTypeId},</if>
|
|
<if test="trailerVehicleTypeName != null">#{trailerVehicleTypeName},</if>
|
|
<if test="trailerLicensePlateColorId != null">#{trailerLicensePlateColorId},</if>
|
|
<if test="trailerLicensePlateColorName != null">#{trailerLicensePlateColorName},</if>
|
|
<if test="trailerTotalMass != null">#{trailerTotalMass},</if>
|
|
<if test="trailerApprovedLoadQuantity != null">#{trailerApprovedLoadQuantity},</if>
|
|
<if test="trailerDrivingLicenseExpireDate != null">#{trailerDrivingLicenseExpireDate},</if>
|
|
<if test="trailerDrivingLicenseLongStatus != null">#{trailerDrivingLicenseLongStatus},</if>
|
|
<if test="trailerRoadTransportCertificateNo != null">#{trailerRoadTransportCertificateNo},</if>
|
|
<if test="trailerRoadTransportCertificateExpireDate != null">#{trailerRoadTransportCertificateExpireDate},</if>
|
|
<if test="trailerRoadTransportCertificateLongStatus != null">#{trailerRoadTransportCertificateLongStatus},</if>
|
|
<if test="trailerDrivingLicenseMain != null">#{trailerDrivingLicenseMain},</if>
|
|
<if test="trailerDrivingLicenseDeputy != null">#{trailerDrivingLicenseDeputy},</if>
|
|
<if test="trailerRoadTransportCertificateImage != null">#{trailerRoadTransportCertificateImage},</if>
|
|
<if test="otherLicensePlateColorId != null">#{otherLicensePlateColorId},</if>
|
|
<if test="otherLicensePlateColorName != null">#{otherLicensePlateColorName},</if>
|
|
<if test="otherEnergyTypeId != null">#{otherEnergyTypeId},</if>
|
|
<if test="otherEnergyTypeName != null">#{otherEnergyTypeName},</if>
|
|
<if test="otherAxlesNumberId != null">#{otherAxlesNumberId},</if>
|
|
<if test="otherAxlesNumberName != null">#{otherAxlesNumberName},</if>
|
|
<if test="otherCarLengthId != null">#{otherCarLengthId},</if>
|
|
<if test="otherCarLengthName != null">#{otherCarLengthName},</if>
|
|
<if test="otherVehicleVolumeId != null">#{otherVehicleVolumeId},</if>
|
|
<if test="otherVehicleVolumeName != null">#{otherVehicleVolumeName},</if>
|
|
<if test="otherHeadstockImage != null">#{otherHeadstockImage},</if>
|
|
<if test="otherBodyworkImage != null">#{otherBodyworkImage},</if>
|
|
<if test="otherPersonCarImage != null">#{otherPersonCarImage},</if>
|
|
<if test="roadTransportCertificateNo != null">#{roadTransportCertificateNo},</if>
|
|
<if test="roadTransportCertificateExpireDate != null">#{roadTransportCertificateExpireDate},</if>
|
|
<if test="roadTransportCertificateLongStatus != null">#{roadTransportCertificateLongStatus},</if>
|
|
<if test="roadTransportCertificateImage != null">#{roadTransportCertificateImage},</if>
|
|
<if test="businessLicenseNumber != null">#{businessLicenseNumber},</if>
|
|
<if test="specializedHouseholdsName != null">#{specializedHouseholdsName},</if>
|
|
<if test="businessLicenseExpireStartDate != null">#{businessLicenseExpireStartDate},</if>
|
|
<if test="businessLicenseExpireEndDate != null">#{businessLicenseExpireEndDate},</if>
|
|
<if test="businessLicenseLongStatus != null">#{businessLicenseLongStatus},</if>
|
|
<if test="businessLicenseImage != null">#{businessLicenseImage},</if>
|
|
<if test="authenticationStatus != null">#{authenticationStatus},</if>
|
|
<if test="rejectReason != null">#{rejectReason},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="userName != null">#{userName},</if>
|
|
<if test="userPhone != null">#{userPhone},</if>
|
|
<if test="motorcadeId != null">#{motorcadeId},</if>
|
|
<if test="motorcadeName != null">#{motorcadeName},</if>
|
|
<if test="carryStatus != null">#{carryStatus},</if>
|
|
<if test="roadTransportCertificateCheckoutStatus != null">#{roadTransportCertificateCheckoutStatus},</if>
|
|
<if test="businessLicenseCheckoutStatus != null">#{businessLicenseCheckoutStatus},</if>
|
|
<if test="netInStatus != null">#{netInStatus},</if>
|
|
<if test="netInDate != null">#{netInDate},</if>
|
|
<if test="useStatus != null">#{useStatus},</if>
|
|
<if test="organizationId != null">#{organizationId},</if>
|
|
<if test="organizationName != null">#{organizationName},</if>
|
|
<if test="checkoutPersonId != null">#{checkoutPersonId},</if>
|
|
<if test="checkoutPersonName != null">#{checkoutPersonName},</if>
|
|
<if test="checkoutDate != null">#{checkoutDate},</if>
|
|
<if test="vehicleDrivingLicenseAuthStatus != null">#{vehicleDrivingLicenseAuthStatus},</if>
|
|
<if test="vehicleAuthStatus != null">#{vehicleAuthStatus},</if>
|
|
<if test="trailerLicensePlateAuthStatus != null">#{trailerLicensePlateAuthStatus},</if>
|
|
<if test="roadTransportCertificateAuthStatus != null">#{roadTransportCertificateAuthStatus},</if>
|
|
<if test="businessLicenseExpireAuthStatus != null">#{businessLicenseExpireAuthStatus},</if>
|
|
<if test="authStatus != null">#{authStatus},</if>
|
|
<if test="roadTransportCertificateCheckStatus != null">#{roadTransportCertificateCheckStatus},</if>
|
|
<if test="businessLicenseExpireCheckStatus != null">#{businessLicenseExpireCheckStatus},</if>
|
|
<if test="blacklistStatus != null">#{blacklistStatus},</if>
|
|
<if test="blacklistRemark != null">#{blacklistRemark},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createByName != null">#{createByName},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateByName != null">#{updateByName},</if>
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateVehicle" parameterType="com.linke.transport.domain.vehicle.entity.Vehicle">
|
|
update vehicle
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="vehicleLicensePlateNumber != null">vehicle_license_plate_number = #{vehicleLicensePlateNumber},</if>
|
|
<if test="vehicleTypeId != null">vehicle_type_id = #{vehicleTypeId},</if>
|
|
<if test="vehicleTypeName != null">vehicle_type_name = #{vehicleTypeName},</if>
|
|
<if test="vehicleSourceId != null">vehicle_source_id = #{vehicleSourceId},</if>
|
|
<if test="vehicleSourceName != null">vehicle_source_name = #{vehicleSourceName},</if>
|
|
<if test="vehicleUsePerson != null">vehicle_use_person = #{vehicleUsePerson},</if>
|
|
<if test="vehicleAddress != null">vehicle_address = #{vehicleAddress},</if>
|
|
<if test="vehicleUseNature != null">vehicle_use_nature = #{vehicleUseNature},</if>
|
|
<if test="vehicleBrandType != null">vehicle_brand_type = #{vehicleBrandType},</if>
|
|
<if test="vehicleIdentificationNumber != null">vehicle_identification_number = #{vehicleIdentificationNumber},</if>
|
|
<if test="vehicleEngineNumber != null">vehicle_engine_number = #{vehicleEngineNumber},</if>
|
|
<if test="vehicleRegistrationDate != null">vehicle_registration_date = #{vehicleRegistrationDate},</if>
|
|
<if test="vehicleIssueDate != null">vehicle_issue_date = #{vehicleIssueDate},</if>
|
|
<if test="vehicleLicenceIssuingAuthority != null">vehicle_licence_issuing_authority = #{vehicleLicenceIssuingAuthority},</if>
|
|
<if test="vehicleFileNumber != null">vehicle_file_number = #{vehicleFileNumber},</if>
|
|
<if test="vehicleTotalMass != null">vehicle_total_mass = #{vehicleTotalMass},</if>
|
|
<if test="vehicleApprovedLoadQuantity != null">vehicle_approved_load_quantity = #{vehicleApprovedLoadQuantity},</if>
|
|
<if test="vehicleGabariteOne != null">vehicle_gabarite_one = #{vehicleGabariteOne},</if>
|
|
<if test="vehicleGabariteTwo != null">vehicle_gabarite_two = #{vehicleGabariteTwo},</if>
|
|
<if test="vehicleGabariteThree != null">vehicle_gabarite_three = #{vehicleGabariteThree},</if>
|
|
<if test="vehicleEnergyTypeId != null">vehicle_energy_type_id = #{vehicleEnergyTypeId},</if>
|
|
<if test="vehicleEnergyTypeName != null">vehicle_energy_type_name = #{vehicleEnergyTypeName},</if>
|
|
<if test="vehicleCheckoutPeriodValidity != null">vehicle_checkout_period_validity = #{vehicleCheckoutPeriodValidity},</if>
|
|
<if test="vehicleRemark != null">vehicle_remark = #{vehicleRemark},</if>
|
|
<if test="vehicleDrivingLicenseMain != null">vehicle_driving_license_main = #{vehicleDrivingLicenseMain},</if>
|
|
<if test="vehicleDrivingLicenseDeputy != null">vehicle_driving_license_deputy = #{vehicleDrivingLicenseDeputy},</if>
|
|
<if test="vehicleDrivingLicenseDeputyAgainst != null">vehicle_driving_license_deputy_against = #{vehicleDrivingLicenseDeputyAgainst},</if>
|
|
<if test="trailerStatus != null">trailer_status = #{trailerStatus},</if>
|
|
<if test="trailerLicensePlateNumber != null">trailer_license_plate_number = #{trailerLicensePlateNumber},</if>
|
|
<if test="trailerVehicleTypeId != null">trailer_vehicle_type_id = #{trailerVehicleTypeId},</if>
|
|
<if test="trailerVehicleTypeName != null">trailer_vehicle_type_name = #{trailerVehicleTypeName},</if>
|
|
<if test="trailerLicensePlateColorId != null">trailer_license_plate_color_id = #{trailerLicensePlateColorId},</if>
|
|
<if test="trailerLicensePlateColorName != null">trailer_license_plate_color_name = #{trailerLicensePlateColorName},</if>
|
|
<if test="trailerTotalMass != null">trailer_total_mass = #{trailerTotalMass},</if>
|
|
<if test="trailerApprovedLoadQuantity != null">trailer_approved_load_quantity = #{trailerApprovedLoadQuantity},</if>
|
|
<if test="trailerDrivingLicenseExpireDate != null">trailer_driving_license_expire_date = #{trailerDrivingLicenseExpireDate},</if>
|
|
<if test="trailerDrivingLicenseLongStatus != null">trailer_driving_license_long_status = #{trailerDrivingLicenseLongStatus},</if>
|
|
<if test="trailerRoadTransportCertificateNo != null">trailer_road_transport_certificate_no = #{trailerRoadTransportCertificateNo},</if>
|
|
<if test="trailerRoadTransportCertificateExpireDate != null">trailer_road_transport_certificate_expire_date = #{trailerRoadTransportCertificateExpireDate},</if>
|
|
<if test="trailerRoadTransportCertificateLongStatus != null">trailer_road_transport_certificate_long_status = #{trailerRoadTransportCertificateLongStatus},</if>
|
|
<if test="trailerDrivingLicenseMain != null">trailer_driving_license_main = #{trailerDrivingLicenseMain},</if>
|
|
<if test="trailerDrivingLicenseDeputy != null">trailer_driving_license_deputy = #{trailerDrivingLicenseDeputy},</if>
|
|
<if test="trailerRoadTransportCertificateImage != null">trailer_road_transport_certificate_image = #{trailerRoadTransportCertificateImage},</if>
|
|
<if test="otherLicensePlateColorId != null">other_license_plate_color_id = #{otherLicensePlateColorId},</if>
|
|
<if test="otherLicensePlateColorName != null">other_license_plate_color_name = #{otherLicensePlateColorName},</if>
|
|
<if test="otherEnergyTypeId != null">other_energy_type_id = #{otherEnergyTypeId},</if>
|
|
<if test="otherEnergyTypeName != null">other_energy_type_name = #{otherEnergyTypeName},</if>
|
|
<if test="otherAxlesNumberId != null">other_axles_number_id = #{otherAxlesNumberId},</if>
|
|
<if test="otherAxlesNumberName != null">other_axles_number_name = #{otherAxlesNumberName},</if>
|
|
<if test="otherCarLengthId != null">other_car_length_id = #{otherCarLengthId},</if>
|
|
<if test="otherCarLengthName != null">other_car_length_name = #{otherCarLengthName},</if>
|
|
<if test="otherVehicleVolumeId != null">other_vehicle_volume_id = #{otherVehicleVolumeId},</if>
|
|
<if test="otherVehicleVolumeName != null">other_vehicle_volume_name = #{otherVehicleVolumeName},</if>
|
|
<if test="otherHeadstockImage != null">other_headstock_image = #{otherHeadstockImage},</if>
|
|
<if test="otherBodyworkImage != null">other_bodywork_image = #{otherBodyworkImage},</if>
|
|
<if test="otherPersonCarImage != null">other_person_car_image = #{otherPersonCarImage},</if>
|
|
<if test="roadTransportCertificateNo != null">road_transport_certificate_no = #{roadTransportCertificateNo},</if>
|
|
<if test="roadTransportCertificateExpireDate != null">road_transport_certificate_expire_date = #{roadTransportCertificateExpireDate},</if>
|
|
<if test="roadTransportCertificateLongStatus != null">road_transport_certificate_long_status = #{roadTransportCertificateLongStatus},</if>
|
|
<if test="roadTransportCertificateImage != null">road_transport_certificate_image = #{roadTransportCertificateImage},</if>
|
|
<if test="businessLicenseNumber != null">business_license_number = #{businessLicenseNumber},</if>
|
|
<if test="specializedHouseholdsName != null">specialized_households_name = #{specializedHouseholdsName},</if>
|
|
<if test="businessLicenseExpireStartDate != null">business_license_expire_start_date = #{businessLicenseExpireStartDate},</if>
|
|
<if test="businessLicenseExpireEndDate != null">business_license_expire_end_date = #{businessLicenseExpireEndDate},</if>
|
|
<if test="businessLicenseLongStatus != null">business_license_long_status = #{businessLicenseLongStatus},</if>
|
|
<if test="businessLicenseImage != null">business_license_image = #{businessLicenseImage},</if>
|
|
<if test="authenticationStatus != null">authentication_status = #{authenticationStatus},</if>
|
|
<if test="rejectReason != null">reject_reason = #{rejectReason},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="userName != null">user_name = #{userName},</if>
|
|
<if test="userPhone != null">user_phone = #{userPhone},</if>
|
|
<if test="motorcadeId != null">motorcade_id = #{motorcadeId},</if>
|
|
<if test="motorcadeName != null">motorcade_name = #{motorcadeName},</if>
|
|
<if test="carryStatus != null">carry_status = #{carryStatus},</if>
|
|
<if test="roadTransportCertificateCheckoutStatus != null">road_transport_certificate_checkout_status = #{roadTransportCertificateCheckoutStatus},</if>
|
|
<if test="businessLicenseCheckoutStatus != null">business_license_checkout_status = #{businessLicenseCheckoutStatus},</if>
|
|
<if test="netInStatus != null">net_in_status = #{netInStatus},</if>
|
|
<if test="netInDate != null">net_in_date = #{netInDate},</if>
|
|
<if test="useStatus != null">use_status = #{useStatus},</if>
|
|
<if test="organizationId != null">organization_id = #{organizationId},</if>
|
|
<if test="organizationName != null">organization_name = #{organizationName},</if>
|
|
<if test="checkoutPersonId != null">checkout_person_id = #{checkoutPersonId},</if>
|
|
<if test="checkoutPersonName != null">checkout_person_name = #{checkoutPersonName},</if>
|
|
<if test="checkoutDate != null">checkout_date = #{checkoutDate},</if>
|
|
<if test="vehicleDrivingLicenseAuthStatus != null">vehicle_driving_license_auth_status = #{vehicleDrivingLicenseAuthStatus},</if>
|
|
<if test="vehicleAuthStatus != null">vehicle_auth_status = #{vehicleAuthStatus},</if>
|
|
<if test="trailerLicensePlateAuthStatus != null">trailer_license_plate_auth_status = #{trailerLicensePlateAuthStatus},</if>
|
|
<if test="roadTransportCertificateAuthStatus != null">road_transport_certificate_auth_status = #{roadTransportCertificateAuthStatus},</if>
|
|
<if test="businessLicenseExpireAuthStatus != null">business_license_expire_auth_status = #{businessLicenseExpireAuthStatus},</if>
|
|
<if test="authStatus != null">auth_status = #{authStatus},</if>
|
|
<if test="roadTransportCertificateCheckStatus != null">road_transport_certificate_check_status = #{roadTransportCertificateCheckStatus},</if>
|
|
<if test="businessLicenseExpireCheckStatus != null">business_license_expire_check_status = #{businessLicenseExpireCheckStatus},</if>
|
|
<if test="blacklistStatus != null">blacklist_status = #{blacklistStatus},</if>
|
|
<if test="blacklistRemark != null">blacklist_remark = #{blacklistRemark},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createByName != null">create_by_name = #{createByName},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateByName != null">update_by_name = #{updateByName},</if>
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
</trim>
|
|
where vehicle_id = #{vehicleId}
|
|
</update>
|
|
|
|
<update id="batchUpdateVehicle" parameterType="java.util.List">
|
|
|
|
<foreach collection="vehicleList" item="item" index="index" separator=";">
|
|
update vehicle
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="item.organizationId != null">
|
|
organization_id = #{item.organizationId},
|
|
</if>
|
|
<if test="item.organizationName != null">
|
|
organization_name = #{item.organizationName},
|
|
</if>
|
|
<if test="item.blacklistStatus != null">
|
|
blacklist_status = #{item.blacklistStatus},
|
|
</if>
|
|
<if test="item.blacklistRemark != null">
|
|
blacklist_remark = #{item.blacklistRemark},
|
|
</if>
|
|
<if test="item.useStatus != null">
|
|
use_status = #{item.useStatus},
|
|
</if>
|
|
<if test="item.tmsPushStatus != null">
|
|
tms_push_status = #{item.tmsPushStatus},
|
|
</if>
|
|
<if test="item.motorcadeId != null">
|
|
motorcade_id = #{item.motorcadeId},
|
|
</if>
|
|
<if test="item.motorcadeName != null">
|
|
motorcade_name = #{item.motorcadeName},
|
|
</if>
|
|
</trim>
|
|
where vehicle_id = #{item.vehicleId}
|
|
</foreach>
|
|
</update>
|
|
<update id="updatePilotDriver" parameterType="com.linke.transport.interfaces.dto.vehicle.VehicleDto">
|
|
UPDATE ngwl_test_transport.vehicle v
|
|
SET
|
|
<if test="pilot1Id != null and pilot1Id != ''">
|
|
v.pilot1_id = #{pilot1Id},
|
|
</if>
|
|
<if test="pilot1 != null and pilot1 != ''">
|
|
v.pilot1 = #{pilot1},
|
|
</if>
|
|
<if test="pilot2Id != null and pilot2Id != ''">
|
|
v.pilot2_id = #{pilot2Id},
|
|
</if>
|
|
<if test="pilot2 != null and pilot2 != ''">
|
|
v.pilot2 = #{pilot2},
|
|
</if>
|
|
v.update_time = NOW()
|
|
WHERE v.vehicle_id = #{vehicleId};
|
|
</update>
|
|
|
|
<delete id="deleteVehicleByVehicleId" parameterType="Long">
|
|
delete from vehicle where vehicle_id = #{vehicleId}
|
|
</delete>
|
|
|
|
<delete id="deleteVehicleByVehicleIds" parameterType="String">
|
|
delete from vehicle where vehicle_id in
|
|
<foreach item="vehicleId" collection="array" open="(" separator="," close=")">
|
|
#{vehicleId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
|
|
<select id="getVehicleByIds" resultType="com.linke.transport.domain.vehicle.entity.Vehicle" parameterType="java.util.List">
|
|
SELECT
|
|
*
|
|
FROM
|
|
vehicle a
|
|
WHERE
|
|
a.del_flag = 1
|
|
<include refid="common_where_two"></include>
|
|
</select>
|
|
|
|
<select id="selectVehicleByVehicleIdAndPlan" resultType="com.linke.transport.domain.vehicle.repository.po.VehiclePo">
|
|
SELECT
|
|
*
|
|
FROM
|
|
vehicle a
|
|
WHERE
|
|
a.del_flag = 1
|
|
<include refid="common_where_three"></include>
|
|
</select>
|
|
|
|
<select id="selectVehicleAppById" resultType="com.linke.transport.domain.vehicle.repository.po.VehicleAppPo" parameterType="java.lang.Long">
|
|
SELECT
|
|
*
|
|
FROM
|
|
vehicle
|
|
WHERE
|
|
del_flag = 1
|
|
AND vehicle_id = #{vehicleId}
|
|
</select>
|
|
|
|
<select id="ownerBindCarList" resultType="com.linke.transport.domain.vehicle.repository.po.DriverVehicleBindPo" parameterType="com.mhd.common.core.domain.dto.DriverVehicleBindDto">
|
|
SELECT
|
|
v.vehicle_id,
|
|
v.user_id,
|
|
v.user_name AS bindDriverName,
|
|
v.user_phone AS bindDriverPhone,
|
|
v.top_organization_id,
|
|
v.organization_id,
|
|
v.vehicle_license_plate_number,
|
|
v.vehicle_type_name,
|
|
v.vehicle_approved_load_quantity,
|
|
v.authentication_status,
|
|
v.other_headstock_image,
|
|
v.other_license_plate_color_id,
|
|
v.other_license_plate_color_name,
|
|
v.vehicle_type_id,
|
|
v.reject_reason
|
|
FROM
|
|
vehicle v
|
|
WHERE
|
|
v.del_flag = 1
|
|
<include refid="where_two"></include>
|
|
ORDER BY v.create_time DESC
|
|
</select>
|
|
|
|
<select id="driverBindMyCarList" resultType="com.linke.transport.domain.vehicle.repository.po.DriverVehicleBindPo" parameterType="com.mhd.common.core.domain.dto.DriverVehicleBindDto">
|
|
SELECT
|
|
v.vehicle_id,
|
|
v.user_id,
|
|
v.user_name AS bindDriverName,
|
|
v.user_phone AS bindDriverPhone,
|
|
v.top_organization_id,
|
|
v.organization_id,
|
|
v.vehicle_license_plate_number,
|
|
v.vehicle_type_name,
|
|
v.vehicle_approved_load_quantity,
|
|
v.authentication_status,
|
|
v.other_headstock_image,
|
|
v.other_license_plate_color_id,
|
|
v.other_license_plate_color_name,
|
|
v.vehicle_type_id,
|
|
v.reject_reason
|
|
FROM
|
|
vehicle v
|
|
WHERE
|
|
v.del_flag = 1
|
|
AND v.authentication_status = 3
|
|
<include refid="where_two"></include>
|
|
ORDER BY v.create_time DESC
|
|
</select>
|
|
<select id="findVehicleByPlateNumber"
|
|
resultType="com.linke.transport.domain.vehicle.repository.po.VehiclePo">
|
|
select *
|
|
from vehicle
|
|
where del_flag = 1 and vehicle_license_plate_number = #{plateNumber};
|
|
</select>
|
|
|
|
<sql id="where_two">
|
|
<if test="driverVehicleBindDto.userId != null">
|
|
AND v.user_id = #{driverVehicleBindDto.userId}
|
|
</if>
|
|
<if test="driverVehicleBindDto.queryInfo !=null and driverVehicleBindDto.queryInfo !=''">
|
|
AND (v.user_name like concat('%' , #{driverVehicleBindDto.queryInfo } , '%') OR v.vehicle_license_plate_number like concat('%' , #{driverVehicleBindDto.queryInfo } , '%'))
|
|
</if>
|
|
<if test="driverVehicleBindDto.vehicleIdList !=null and driverVehicleBindDto.vehicleIdList.size() > 0">
|
|
and v.vehicle_id not in
|
|
<foreach item="vehicleId" index="index" collection="driverVehicleBindDto.vehicleIdList" open="(" separator=" , " close=")">
|
|
#{vehicleId}
|
|
</foreach>
|
|
</if>
|
|
</sql>
|
|
|
|
<sql id="common_where_three">
|
|
<if test="vehicleDto.vehicleLicensePlateNumber != null and vehicleDto.vehicleLicensePlateNumber != ''">
|
|
and a.vehicle_license_plate_number = #{vehicleDto.vehicleLicensePlateNumber}
|
|
</if>
|
|
<if test="vehicleDto.vehicleId != null">
|
|
and a.vehicle_id = #{vehicleDto.vehicleId}
|
|
</if>
|
|
<if test="vehicleDto.topOrganizationId != null">
|
|
and a.top_organization_id = #{vehicleDto.topOrganizationId}
|
|
</if>
|
|
</sql>
|
|
|
|
<sql id="common_where_two">
|
|
<if test="vehicleIdList != null ">
|
|
AND a.vehicle_id in
|
|
<foreach item="id" collection="vehicleIdList" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</sql>
|
|
|
|
</mapper>
|