zhangback
8 天以前 3974fad5d836431e417e99220cc07bb5b0aba331
tms/src/main/resources/mapper/tms/TmsVehicleMapper.xml
@@ -51,10 +51,13 @@
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="carrierType"    column="carrier_type"    />
        <result property="settlementId"    column="settlement_id"    />
        <result property="settlementName"    column="settlement_name"    />
        <result property="carKeyNo"    column="car_key_no"    />
    </resultMap>
    <sql id="selectTmsVehicleVo">
        select thisTab.id, thisTab.system_code, thisTab.service_provider_id, thisTab.vehicle_type, thisTab.service_provider_name, thisTab.internal_code, thisTab.license_plate, thisTab.license_hk, thisTab.license_mo, thisTab.license_color, thisTab.owner, thisTab.is_blacklist, thisTab.is_customs_control, thisTab.is_trailer, thisTab.main_driver, thisTab.main_driver_phone, thisTab.assistant_driver, thisTab.assistant_driver_phone, thisTab.has_task, thisTab.vehicle_usage_status, thisTab.body_color, thisTab.frame_number, thisTab.engine_number, thisTab.energy_type, thisTab.empty_load_fuel, thisTab.full_load_fuel, thisTab.purchase_date, thisTab.purchase_price, thisTab.mandatory_scrap_date, thisTab.last_annual_inspection, thisTab.commercial_insurance_expiry, thisTab.traffic_insurance_expiry, thisTab.actual_length, thisTab.actual_width, thisTab.actual_height, thisTab.load_volume, thisTab.load_weight, thisTab.emission_standard, thisTab.engine_power, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.carrier_type from tms_vehicle AS thisTab
        select thisTab.id, thisTab.system_code, thisTab.service_provider_id, thisTab.vehicle_type, thisTab.service_provider_name, thisTab.internal_code, thisTab.license_plate, thisTab.license_hk, thisTab.license_mo, thisTab.license_color, thisTab.owner, thisTab.is_blacklist, thisTab.is_customs_control, thisTab.is_trailer, thisTab.main_driver, thisTab.main_driver_phone, thisTab.assistant_driver, thisTab.assistant_driver_phone, thisTab.has_task, thisTab.vehicle_usage_status, thisTab.body_color, thisTab.frame_number, thisTab.engine_number, thisTab.energy_type, thisTab.empty_load_fuel, thisTab.full_load_fuel, thisTab.purchase_date, thisTab.purchase_price, thisTab.mandatory_scrap_date, thisTab.last_annual_inspection, thisTab.commercial_insurance_expiry, thisTab.traffic_insurance_expiry, thisTab.actual_length, thisTab.actual_width, thisTab.actual_height, thisTab.load_volume, thisTab.load_weight, thisTab.emission_standard, thisTab.engine_power, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark,thisTab.carrier_type, thisTab.settlement_id, thisTab.settlement_name, thisTab.car_key_no from tms_vehicle AS thisTab
    </sql>
    <sql id="selectTmsVehicleVoCount">
        select count(0) from tms_vehicle as thisTab
@@ -70,6 +73,9 @@
        <if test="vehicleUsageStatus != null "> and thisTab.vehicle_usage_status = #{vehicleUsageStatus}</if>
        <if test="status != null "> and thisTab.status = #{status}</if>
        <if test="carrierType != null "> and thisTab.carrier_type = #{carrierType}</if>
        <if test="settlementId != null "> and thisTab.settlement_id = #{settlementId}</if>
        <if test="settlementName != null  and settlementName != ''"> and  thisTab.settlement_name like concat('%', #{settlementName}, '%')</if>
        <if test="carKeyNo != null "> and thisTab.car_key_no = #{carKeyNo}</if>
    </sql>
    <!--查询-->
@@ -142,6 +148,9 @@
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="carrierType != null">carrier_type,</if>
            <if test="settlementId != null">settlement_id,</if>
            <if test="settlementName != null">settlement_name,</if>
            <if test="carKeyNo != null">car_key_no,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
@@ -189,17 +198,20 @@
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="carrierType != null">#{carrierType},</if>
            <if test="settlementId != null">#{settlementId},</if>
            <if test="settlementName != null">#{settlementName},</if>
            <if test="carKeyNo != null">#{carKeyNo},</if>
        </trim>
    </insert>
    <insert id="insertTmsVehicleBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into tms_vehicle
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,system_code,service_provider_id,vehicle_type,service_provider_name,internal_code,license_plate,license_hk,license_mo,license_color,owner,is_blacklist,is_customs_control,is_trailer,main_driver,main_driver_phone,assistant_driver,assistant_driver_phone,has_task,vehicle_usage_status,body_color,frame_number,engine_number,energy_type,empty_load_fuel,full_load_fuel,purchase_date,purchase_price,mandatory_scrap_date,last_annual_inspection,commercial_insurance_expiry,traffic_insurance_expiry,actual_length,actual_width,actual_height,load_volume,load_weight,emission_standard,engine_power,status,create_by,create_time,update_by,update_time,remark,carrier_type,
            id,system_code,service_provider_id,vehicle_type,service_provider_name,internal_code,license_plate,license_hk,license_mo,license_color,owner,is_blacklist,is_customs_control,is_trailer,main_driver,main_driver_phone,assistant_driver,assistant_driver_phone,has_task,vehicle_usage_status,body_color,frame_number,engine_number,energy_type,empty_load_fuel,full_load_fuel,purchase_date,purchase_price,mandatory_scrap_date,last_annual_inspection,commercial_insurance_expiry,traffic_insurance_expiry,actual_length,actual_width,actual_height,load_volume,load_weight,emission_standard,engine_power,status,create_by,create_time,update_by,update_time,remark,carrier_type,settlement_id,settlement_name,car_key_no,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.systemCode},#{item.serviceProviderId},#{item.vehicleType},#{item.serviceProviderName},#{item.internalCode},#{item.licensePlate},#{item.licenseHk},#{item.licenseMo},#{item.licenseColor},#{item.owner},#{item.isBlacklist},#{item.isCustomsControl},#{item.isTrailer},#{item.mainDriver},#{item.mainDriverPhone},#{item.assistantDriver},#{item.assistantDriverPhone},#{item.hasTask},#{item.vehicleUsageStatus},#{item.bodyColor},#{item.frameNumber},#{item.engineNumber},#{item.energyType},#{item.emptyLoadFuel},#{item.fullLoadFuel},#{item.purchaseDate},#{item.purchasePrice},#{item.mandatoryScrapDate},#{item.lastAnnualInspection},#{item.commercialInsuranceExpiry},#{item.trafficInsuranceExpiry},#{item.actualLength},#{item.actualWidth},#{item.actualHeight},#{item.loadVolume},#{item.loadWeight},#{item.emissionStandard},#{item.enginePower},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.carrierType},
                #{item.id},#{item.systemCode},#{item.serviceProviderId},#{item.vehicleType},#{item.serviceProviderName},#{item.internalCode},#{item.licensePlate},#{item.licenseHk},#{item.licenseMo},#{item.licenseColor},#{item.owner},#{item.isBlacklist},#{item.isCustomsControl},#{item.isTrailer},#{item.mainDriver},#{item.mainDriverPhone},#{item.assistantDriver},#{item.assistantDriverPhone},#{item.hasTask},#{item.vehicleUsageStatus},#{item.bodyColor},#{item.frameNumber},#{item.engineNumber},#{item.energyType},#{item.emptyLoadFuel},#{item.fullLoadFuel},#{item.purchaseDate},#{item.purchasePrice},#{item.mandatoryScrapDate},#{item.lastAnnualInspection},#{item.commercialInsuranceExpiry},#{item.trafficInsuranceExpiry},#{item.actualLength},#{item.actualWidth},#{item.actualHeight},#{item.loadVolume},#{item.loadWeight},#{item.emissionStandard},#{item.enginePower},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.carrierType},#{item.settlementId},#{item.settlementName},#{item.carKeyNo},
            </trim>
        </foreach>
    </insert>
@@ -253,6 +265,9 @@
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="carrierType != null">carrier_type = #{carrierType},</if>
            <if test="settlementId != null">settlement_id = #{settlementId},</if>
            <if test="settlementName != null">settlement_name = #{settlementName},</if>
            <if test="carKeyNo != null">car_key_no = #{carKeyNo},</if>
        </trim>
        where id = #{id}
    </update>
@@ -306,6 +321,9 @@
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
                <if test="item.carrierType != null">carrier_type = #{item.carrierType},</if>
                <if test="item.settlementId != null">settlement_id = #{item.settlementId},</if>
                <if test="item.settlementName != null">settlement_name = #{item.settlementName},</if>
                <if test="item.carKeyNo != null">car_key_no = #{item.carKeyNo},</if>
            </trim>
            where id = #{item.id}
        </foreach>