<?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.steerinfo.appservice.apppretrackscale.mapper.AppPreTrackScaleMapper">
    <resultMap id="BaseResultMap" type="com.steerinfo.appservice.apppretrackscale.model.AppPreTrackScale">
        <id column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
        <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
        <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
        <result column="TRAILER_NO" jdbcType="VARCHAR" property="trailerNo" />
        <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
        <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
        <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo" />
        <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo" />
        <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo" />
        <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName" />
        <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
        <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
        <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
        <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
        <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
        <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
        <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
        <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo" />
        <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName" />
        <result column="SHIPMENT_GROSS_WEIGHT" jdbcType="DECIMAL" property="shipmentGrossWeight" />
        <result column="SHIPMENT_NET_WEIGHT" jdbcType="DECIMAL" property="shipmentNetWeight" />
        <result column="SHIPMENT_NUM" jdbcType="DECIMAL" property="shipmentNum" />
        <result column="ADD_WEIGHT_SUM" jdbcType="DECIMAL" property="addWeightSum" />
        <result column="BIND_CARD_NO" jdbcType="VARCHAR" property="bindCardNo" />
        <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
        <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
        <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
        <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
        <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
        <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
        <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
        <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
        <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
        <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
        <result column="USED_TYPE" jdbcType="VARCHAR" property="usedType" />
        <result column="EFFECTIVE_START_TIME" jdbcType="TIMESTAMP" property="effectiveStartTime" />
        <result column="EFFECTIVE_END_TIME" jdbcType="TIMESTAMP" property="effectiveEndTime" />
        <result column="EFFECTIVE_WEIGHT" jdbcType="DECIMAL" property="effectiveWeight" />
        <result column="EFFECTIVE_NUM" jdbcType="DECIMAL" property="effectiveNum" />
        <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
        <result column="METER_NUM" jdbcType="DECIMAL" property="meterNum" />
        <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
        <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
        <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
        <result column="MEMO" jdbcType="VARCHAR" property="memo" />
        <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
        <result column="USED_TIME" jdbcType="TIMESTAMP" property="usedTime" />
        <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
        <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
        <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
        <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
        <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
        <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
        <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
        <result column="P_VALUE_FLAG" jdbcType="VARCHAR" property="pValueFlag" />
        <result column="CAR_ALLOCATION_TIME" jdbcType="TIMESTAMP" property="carAllocationTime" />
        <result column="IS_COMPLETED" jdbcType="VARCHAR" property="isCompleted" />
        <result column="LIMS_SAMPLING_FLAG" jdbcType="VARCHAR" property="limsSamplingFlag" />
        <result column="HEAT_NO" jdbcType="VARCHAR" property="heatNo" />
        <result column="ID_NUM" jdbcType="VARCHAR" property="idNum" />
        <result column="PREDICTION_SOURCE" jdbcType="VARCHAR" property="predictionSource" />
        <result column="METER_PIER_NAME" jdbcType="VARCHAR" property="meterPierName" />
        <result column="METER_PIER_NO" jdbcType="VARCHAR" property="meterPierNo" />
        <result column="CREATE_DEPNAME" jdbcType="VARCHAR" property="createDepname" />
        <result column="CREATE_DEPID" jdbcType="VARCHAR" property="createDepid" />
        <result column="LINE_DESC" jdbcType="VARCHAR" property="lineDesc" />
        <result column="LINE_CODE" jdbcType="VARCHAR" property="lineCode" />
        <result column="SHIP_NO" jdbcType="VARCHAR" property="shipNo" />
    </resultMap>
    <sql id="columns">
        PREDICTION_NO, NOTICE_NO, CAR_NO, TRAILER_NO, MATTER_NO, MATTER_NAME, CONTRACT_NO, 
    BATCH_NO, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, SOURCE_AREA, FORWARDING_UNIT_NO, 
    FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME, MATERIAL_NO, MATERIAL_NAME, 
    SPEC_NO, SPEC_NAME, SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, ADD_WEIGHT_SUM, 
    BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, 
    CARRIER_UNIT_NAME, PREDICTION_TYPE, PREDICTION_COMBINATION, METER_TYPE_NO, METER_TYPE_NAME, 
    USED_TYPE, EFFECTIVE_START_TIME, EFFECTIVE_END_TIME, EFFECTIVE_WEIGHT, EFFECTIVE_NUM, 
    METER_WEIGHT, METER_NUM, RAILWAY_NO, METER_PROCESS_NO, METER_PROCESS_EDITION_NO, 
    MEMO, VALUE_FLAG, USED_TIME, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
    UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, P_VALUE_FLAG, 
    CAR_ALLOCATION_TIME, IS_COMPLETED, LIMS_SAMPLING_FLAG, HEAT_NO, ID_NUM, PREDICTION_SOURCE, 
    METER_PIER_NAME, METER_PIER_NO, CREATE_DEPNAME, CREATE_DEPID, LINE_DESC, LINE_CODE, 
    SHIP_NO
    </sql>
    <sql id="columns_alias">
        t.PREDICTION_NO, t.NOTICE_NO, t.CAR_NO, t.TRAILER_NO, t.MATTER_NO, t.MATTER_NAME, 
    t.CONTRACT_NO, t.BATCH_NO, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, t.SOURCE_AREA, 
    t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME, t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, 
    t.MATERIAL_NO, t.MATERIAL_NAME, t.SPEC_NO, t.SPEC_NAME, t.SHIPMENT_GROSS_WEIGHT, 
    t.SHIPMENT_NET_WEIGHT, t.SHIPMENT_NUM, t.ADD_WEIGHT_SUM, t.BIND_CARD_NO, t.LOAD_POINT_NO, 
    t.LOAD_POINT_NAME, t.SAMPLE_NO, t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO, t.CARRIER_UNIT_NAME, 
    t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, t.METER_TYPE_NO, t.METER_TYPE_NAME, 
    t.USED_TYPE, t.EFFECTIVE_START_TIME, t.EFFECTIVE_END_TIME, t.EFFECTIVE_WEIGHT, t.EFFECTIVE_NUM, 
    t.METER_WEIGHT, t.METER_NUM, t.RAILWAY_NO, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, 
    t.MEMO, t.VALUE_FLAG, t.USED_TIME, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, 
    t.DELETE_TIME, t.P_VALUE_FLAG, t.CAR_ALLOCATION_TIME, t.IS_COMPLETED, t.LIMS_SAMPLING_FLAG, 
    t.HEAT_NO, t.ID_NUM, t.PREDICTION_SOURCE, t.METER_PIER_NAME, t.METER_PIER_NO, t.CREATE_DEPNAME, 
    t.CREATE_DEPID, t.LINE_DESC, t.LINE_CODE, t.SHIP_NO
    </sql>
    <sql id="select">
        SELECT <include refid="columns"/> FROM PRE_TRACK_SCALE
    </sql>
    <sql id="select_alias">
        SELECT <include refid="columns_alias"/> FROM PRE_TRACK_SCALE t
    </sql>
    <sql id="where">
        <where>
            <if test="predictionNo != null and predictionNo != ''">
                and PREDICTION_NO = #{predictionNo}
            </if>
            <if test="noticeNo != null and noticeNo != ''">
                and NOTICE_NO = #{noticeNo}
            </if>
            <if test="carNo != null and carNo != ''">
                and CAR_NO = #{carNo}
            </if>
            <if test="trailerNo != null and trailerNo != ''">
                and TRAILER_NO = #{trailerNo}
            </if>
            <if test="matterNo != null and matterNo != ''">
                and MATTER_NO = #{matterNo}
            </if>
            <if test="matterName != null and matterName != ''">
                and MATTER_NAME = #{matterName}
            </if>
            <if test="contractNo != null and contractNo != ''">
                and CONTRACT_NO = #{contractNo}
            </if>
            <if test="batchNo != null and batchNo != ''">
                and BATCH_NO = #{batchNo}
            </if>
            <if test="customerSupplierNo != null and customerSupplierNo != ''">
                and CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
            </if>
            <if test="customerSupplierName != null and customerSupplierName != ''">
                and CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
            </if>
            <if test="sourceArea != null and sourceArea != ''">
                and SOURCE_AREA = #{sourceArea}
            </if>
            <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
                and FORWARDING_UNIT_NO = #{forwardingUnitNo}
            </if>
            <if test="forwardingUnitName != null and forwardingUnitName != ''">
                and FORWARDING_UNIT_NAME = #{forwardingUnitName}
            </if>
            <if test="receivingUintNo != null and receivingUintNo != ''">
                and RECEIVING_UINT_NO = #{receivingUintNo}
            </if>
            <if test="receivingUintName != null and receivingUintName != ''">
                and RECEIVING_UINT_NAME = #{receivingUintName}
            </if>
            <if test="materialNo != null and materialNo != ''">
                and MATERIAL_NO = #{materialNo}
            </if>
            <if test="materialName != null and materialName != ''">
                and MATERIAL_NAME = #{materialName}
            </if>
            <if test="specNo != null and specNo != ''">
                and SPEC_NO = #{specNo}
            </if>
            <if test="specName != null and specName != ''">
                and SPEC_NAME = #{specName}
            </if>
            <if test="shipmentGrossWeight != null">
                and SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
            </if>
            <if test="shipmentNetWeight != null">
                and SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
            </if>
            <if test="shipmentNum != null">
                and SHIPMENT_NUM = #{shipmentNum}
            </if>
            <if test="addWeightSum != null">
                and ADD_WEIGHT_SUM = #{addWeightSum}
            </if>
            <if test="bindCardNo != null and bindCardNo != ''">
                and BIND_CARD_NO = #{bindCardNo}
            </if>
            <if test="loadPointNo != null and loadPointNo != ''">
                and LOAD_POINT_NO = #{loadPointNo}
            </if>
            <if test="loadPointName != null and loadPointName != ''">
                and LOAD_POINT_NAME = #{loadPointName}
            </if>
            <if test="sampleNo != null and sampleNo != ''">
                and SAMPLE_NO = #{sampleNo}
            </if>
            <if test="sampleVoucher != null and sampleVoucher != ''">
                and SAMPLE_VOUCHER = #{sampleVoucher}
            </if>
            <if test="carrierUnitNo != null and carrierUnitNo != ''">
                and CARRIER_UNIT_NO = #{carrierUnitNo}
            </if>
            <if test="carrierUnitName != null and carrierUnitName != ''">
                and CARRIER_UNIT_NAME = #{carrierUnitName}
            </if>
            <if test="predictionType != null and predictionType != ''">
                and PREDICTION_TYPE = #{predictionType}
            </if>
            <if test="predictionCombination != null and predictionCombination != ''">
                and PREDICTION_COMBINATION = #{predictionCombination}
            </if>
            <if test="meterTypeNo != null and meterTypeNo != ''">
                and METER_TYPE_NO = #{meterTypeNo}
            </if>
            <if test="meterTypeName != null and meterTypeName != ''">
                and METER_TYPE_NAME = #{meterTypeName}
            </if>
            <if test="usedType != null and usedType != ''">
                and USED_TYPE = #{usedType}
            </if>
            <if test="effectiveStartTime != null">
                and TO_CHAR(EFFECTIVE_START_TIME,'yyyy-MM-dd') = #{effectiveStartTime}
            </if>
            <if test="effectiveEndTime != null">
                and TO_CHAR(EFFECTIVE_END_TIME,'yyyy-MM-dd') = #{effectiveEndTime}
            </if>
            <if test="effectiveWeight != null">
                and EFFECTIVE_WEIGHT = #{effectiveWeight}
            </if>
            <if test="effectiveNum != null">
                and EFFECTIVE_NUM = #{effectiveNum}
            </if>
            <if test="meterWeight != null">
                and METER_WEIGHT = #{meterWeight}
            </if>
            <if test="meterNum != null">
                and METER_NUM = #{meterNum}
            </if>
            <if test="railwayNo != null and railwayNo != ''">
                and RAILWAY_NO = #{railwayNo}
            </if>
            <if test="meterProcessNo != null and meterProcessNo != ''">
                and METER_PROCESS_NO = #{meterProcessNo}
            </if>
            <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
                and METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
            </if>
            <if test="memo != null and memo != ''">
                and MEMO = #{memo}
            </if>
            <if test="valueFlag != null and valueFlag != ''">
                and VALUE_FLAG = #{valueFlag}
            </if>
            <if test="usedTime != null">
                and TO_CHAR(USED_TIME,'yyyy-MM-dd') = #{usedTime}
            </if>
            <if test="createManNo != null and createManNo != ''">
                and CREATE_MAN_NO = #{createManNo}
            </if>
            <if test="createManName != null and createManName != ''">
                and CREATE_MAN_NAME = #{createManName}
            </if>
            <if test="createTime != null">
                and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
            </if>
            <if test="updateManNo != null and updateManNo != ''">
                and UPDATE_MAN_NO = #{updateManNo}
            </if>
            <if test="updateManName != null and updateManName != ''">
                and UPDATE_MAN_NAME = #{updateManName}
            </if>
            <if test="updateTime != null">
                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
            </if>
            <if test="deleteManNo != null and deleteManNo != ''">
                and DELETE_MAN_NO = #{deleteManNo}
            </if>
            <if test="deleteManName != null and deleteManName != ''">
                and DELETE_MAN_NAME = #{deleteManName}
            </if>
            <if test="deleteTime != null">
                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
            </if>
            <if test="pValueFlag != null and pValueFlag != ''">
                and P_VALUE_FLAG = #{pValueFlag}
            </if>
            <if test="carAllocationTime != null">
                and TO_CHAR(CAR_ALLOCATION_TIME,'yyyy-MM-dd') = #{carAllocationTime}
            </if>
            <if test="isCompleted != null and isCompleted != ''">
                and IS_COMPLETED = #{isCompleted}
            </if>
            <if test="limsSamplingFlag != null and limsSamplingFlag != ''">
                and LIMS_SAMPLING_FLAG = #{limsSamplingFlag}
            </if>
            <if test="heatNo != null and heatNo != ''">
                and HEAT_NO = #{heatNo}
            </if>
            <if test="idNum != null and idNum != ''">
                and ID_NUM = #{idNum}
            </if>
            <if test="predictionSource != null and predictionSource != ''">
                and PREDICTION_SOURCE = #{predictionSource}
            </if>
            <if test="meterPierName != null and meterPierName != ''">
                and METER_PIER_NAME = #{meterPierName}
            </if>
            <if test="meterPierNo != null and meterPierNo != ''">
                and METER_PIER_NO = #{meterPierNo}
            </if>
            <if test="createDepname != null and createDepname != ''">
                and CREATE_DEPNAME = #{createDepname}
            </if>
            <if test="createDepid != null and createDepid != ''">
                and CREATE_DEPID = #{createDepid}
            </if>
            <if test="lineDesc != null and lineDesc != ''">
                and LINE_DESC = #{lineDesc}
            </if>
            <if test="lineCode != null and lineCode != ''">
                and LINE_CODE = #{lineCode}
            </if>
            <if test="shipNo != null and shipNo != ''">
                and SHIP_NO = #{shipNo}
            </if>
        </where>
    </sql>
    <sql id="whereLike">
        <where>
            <if test="predictionNo != null and predictionNo != ''">
                and PREDICTION_NO LIKE '%${predictionNo}%'
            </if>
            <if test="noticeNo != null and noticeNo != ''">
                and NOTICE_NO LIKE '%${noticeNo}%'
            </if>
            <if test="carNo != null and carNo != ''">
                and CAR_NO LIKE '%${carNo}%'
            </if>
            <if test="trailerNo != null and trailerNo != ''">
                and TRAILER_NO LIKE '%${trailerNo}%'
            </if>
            <if test="matterNo != null and matterNo != ''">
                and MATTER_NO LIKE '%${matterNo}%'
            </if>
            <if test="matterName != null and matterName != ''">
                and MATTER_NAME LIKE '%${matterName}%'
            </if>
            <if test="contractNo != null and contractNo != ''">
                and CONTRACT_NO LIKE '%${contractNo}%'
            </if>
            <if test="batchNo != null and batchNo != ''">
                and BATCH_NO LIKE '%${batchNo}%'
            </if>
            <if test="customerSupplierNo != null and customerSupplierNo != ''">
                and CUSTOMER_SUPPLIER_NO LIKE '%${customerSupplierNo}%'
            </if>
            <if test="customerSupplierName != null and customerSupplierName != ''">
                and CUSTOMER_SUPPLIER_NAME LIKE '%${customerSupplierName}%'
            </if>
            <if test="sourceArea != null and sourceArea != ''">
                and SOURCE_AREA LIKE '%${sourceArea}%'
            </if>
            <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
                and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
            </if>
            <if test="forwardingUnitName != null and forwardingUnitName != ''">
                and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
            </if>
            <if test="receivingUintNo != null and receivingUintNo != ''">
                and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
            </if>
            <if test="receivingUintName != null and receivingUintName != ''">
                and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
            </if>
            <if test="materialNo != null and materialNo != ''">
                and MATERIAL_NO LIKE '%${materialNo}%'
            </if>
            <if test="materialName != null and materialName != ''">
                and MATERIAL_NAME LIKE '%${materialName}%'
            </if>
            <if test="specNo != null and specNo != ''">
                and SPEC_NO LIKE '%${specNo}%'
            </if>
            <if test="specName != null and specName != ''">
                and SPEC_NAME LIKE '%${specName}%'
            </if>
            <if test="shipmentGrossWeight != null">
                and SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
            </if>
            <if test="shipmentNetWeight != null">
                and SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
            </if>
            <if test="shipmentNum != null">
                and SHIPMENT_NUM = #{shipmentNum}
            </if>
            <if test="addWeightSum != null">
                and ADD_WEIGHT_SUM = #{addWeightSum}
            </if>
            <if test="bindCardNo != null and bindCardNo != ''">
                and BIND_CARD_NO LIKE '%${bindCardNo}%'
            </if>
            <if test="loadPointNo != null and loadPointNo != ''">
                and LOAD_POINT_NO LIKE '%${loadPointNo}%'
            </if>
            <if test="loadPointName != null and loadPointName != ''">
                and LOAD_POINT_NAME LIKE '%${loadPointName}%'
            </if>
            <if test="sampleNo != null and sampleNo != ''">
                and SAMPLE_NO LIKE '%${sampleNo}%'
            </if>
            <if test="sampleVoucher != null and sampleVoucher != ''">
                and SAMPLE_VOUCHER LIKE '%${sampleVoucher}%'
            </if>
            <if test="carrierUnitNo != null and carrierUnitNo != ''">
                and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
            </if>
            <if test="carrierUnitName != null and carrierUnitName != ''">
                and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
            </if>
            <if test="predictionType != null and predictionType != ''">
                and PREDICTION_TYPE LIKE '%${predictionType}%'
            </if>
            <if test="predictionCombination != null and predictionCombination != ''">
                and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
            </if>
            <if test="meterTypeNo != null and meterTypeNo != ''">
                and METER_TYPE_NO LIKE '%${meterTypeNo}%'
            </if>
            <if test="meterTypeName != null and meterTypeName != ''">
                and METER_TYPE_NAME LIKE '%${meterTypeName}%'
            </if>
            <if test="usedType != null and usedType != ''">
                and USED_TYPE LIKE '%${usedType}%'
            </if>
            <if test="effectiveStartTime != null">
                and TO_CHAR(EFFECTIVE_START_TIME,'yyyy-MM-dd') = #{effectiveStartTime}
            </if>
            <if test="effectiveEndTime != null">
                and TO_CHAR(EFFECTIVE_END_TIME,'yyyy-MM-dd') = #{effectiveEndTime}
            </if>
            <if test="effectiveWeight != null">
                and EFFECTIVE_WEIGHT = #{effectiveWeight}
            </if>
            <if test="effectiveNum != null">
                and EFFECTIVE_NUM = #{effectiveNum}
            </if>
            <if test="meterWeight != null">
                and METER_WEIGHT = #{meterWeight}
            </if>
            <if test="meterNum != null">
                and METER_NUM = #{meterNum}
            </if>
            <if test="railwayNo != null and railwayNo != ''">
                and RAILWAY_NO LIKE '%${railwayNo}%'
            </if>
            <if test="meterProcessNo != null and meterProcessNo != ''">
                and METER_PROCESS_NO LIKE '%${meterProcessNo}%'
            </if>
            <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
                and METER_PROCESS_EDITION_NO LIKE '%${meterProcessEditionNo}%'
            </if>
            <if test="memo != null and memo != ''">
                and MEMO LIKE '%${memo}%'
            </if>
            <if test="valueFlag != null and valueFlag != ''">
                and VALUE_FLAG LIKE '%${valueFlag}%'
            </if>
            <if test="usedTime != null">
                and TO_CHAR(USED_TIME,'yyyy-MM-dd') = #{usedTime}
            </if>
            <if test="createManNo != null and createManNo != ''">
                and CREATE_MAN_NO LIKE '%${createManNo}%'
            </if>
            <if test="createManName != null and createManName != ''">
                and CREATE_MAN_NAME LIKE '%${createManName}%'
            </if>
            <if test="createTime != null">
                and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
            </if>
            <if test="updateManNo != null and updateManNo != ''">
                and UPDATE_MAN_NO LIKE '%${updateManNo}%'
            </if>
            <if test="updateManName != null and updateManName != ''">
                and UPDATE_MAN_NAME LIKE '%${updateManName}%'
            </if>
            <if test="updateTime != null">
                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
            </if>
            <if test="deleteManNo != null and deleteManNo != ''">
                and DELETE_MAN_NO LIKE '%${deleteManNo}%'
            </if>
            <if test="deleteManName != null and deleteManName != ''">
                and DELETE_MAN_NAME LIKE '%${deleteManName}%'
            </if>
            <if test="deleteTime != null">
                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
            </if>
            <if test="pValueFlag != null and pValueFlag != ''">
                and P_VALUE_FLAG LIKE '%${pValueFlag}%'
            </if>
            <if test="carAllocationTime != null">
                and TO_CHAR(CAR_ALLOCATION_TIME,'yyyy-MM-dd') = #{carAllocationTime}
            </if>
            <if test="isCompleted != null and isCompleted != ''">
                and IS_COMPLETED LIKE '%${isCompleted}%'
            </if>
            <if test="limsSamplingFlag != null and limsSamplingFlag != ''">
                and LIMS_SAMPLING_FLAG LIKE '%${limsSamplingFlag}%'
            </if>
            <if test="heatNo != null and heatNo != ''">
                and HEAT_NO LIKE '%${heatNo}%'
            </if>
            <if test="idNum != null and idNum != ''">
                and ID_NUM LIKE '%${idNum}%'
            </if>
            <if test="predictionSource != null and predictionSource != ''">
                and PREDICTION_SOURCE LIKE '%${predictionSource}%'
            </if>
            <if test="meterPierName != null and meterPierName != ''">
                and METER_PIER_NAME LIKE '%${meterPierName}%'
            </if>
            <if test="meterPierNo != null and meterPierNo != ''">
                and METER_PIER_NO LIKE '%${meterPierNo}%'
            </if>
            <if test="createDepname != null and createDepname != ''">
                and CREATE_DEPNAME LIKE '%${createDepname}%'
            </if>
            <if test="createDepid != null and createDepid != ''">
                and CREATE_DEPID LIKE '%${createDepid}%'
            </if>
            <if test="lineDesc != null and lineDesc != ''">
                and LINE_DESC LIKE '%${lineDesc}%'
            </if>
            <if test="lineCode != null and lineCode != ''">
                and LINE_CODE LIKE '%${lineCode}%'
            </if>
            <if test="shipNo != null and shipNo != ''">
                and SHIP_NO LIKE '%${shipNo}%'
            </if>
        </where>
    </sql>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete from PRE_TRACK_SCALE
        where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
    </delete>
    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
        delete from PRE_TRACK_SCALE
        where 1!=1
        <if test="noticeNo != null and noticeNo != ''">
            or NOTICE_NO = #{noticeNo}
        </if>
        <if test="carNo != null and carNo != ''">
            or CAR_NO = #{carNo}
        </if>
        <if test="trailerNo != null and trailerNo != ''">
            or TRAILER_NO = #{trailerNo}
        </if>
        <if test="matterNo != null and matterNo != ''">
            or MATTER_NO = #{matterNo}
        </if>
        <if test="matterName != null and matterName != ''">
            or MATTER_NAME = #{matterName}
        </if>
        <if test="contractNo != null and contractNo != ''">
            or CONTRACT_NO = #{contractNo}
        </if>
        <if test="batchNo != null and batchNo != ''">
            or BATCH_NO = #{batchNo}
        </if>
        <if test="customerSupplierNo != null and customerSupplierNo != ''">
            or CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
        </if>
        <if test="customerSupplierName != null and customerSupplierName != ''">
            or CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
        </if>
        <if test="sourceArea != null and sourceArea != ''">
            or SOURCE_AREA = #{sourceArea}
        </if>
        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
            or FORWARDING_UNIT_NO = #{forwardingUnitNo}
        </if>
        <if test="forwardingUnitName != null and forwardingUnitName != ''">
            or FORWARDING_UNIT_NAME = #{forwardingUnitName}
        </if>
        <if test="receivingUintNo != null and receivingUintNo != ''">
            or RECEIVING_UINT_NO = #{receivingUintNo}
        </if>
        <if test="receivingUintName != null and receivingUintName != ''">
            or RECEIVING_UINT_NAME = #{receivingUintName}
        </if>
        <if test="materialNo != null and materialNo != ''">
            or MATERIAL_NO = #{materialNo}
        </if>
        <if test="materialName != null and materialName != ''">
            or MATERIAL_NAME = #{materialName}
        </if>
        <if test="specNo != null and specNo != ''">
            or SPEC_NO = #{specNo}
        </if>
        <if test="specName != null and specName != ''">
            or SPEC_NAME = #{specName}
        </if>
        <if test="shipmentGrossWeight != null">
            or SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
        </if>
        <if test="shipmentNetWeight != null">
            or SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
        </if>
        <if test="shipmentNum != null">
            or SHIPMENT_NUM = #{shipmentNum}
        </if>
        <if test="addWeightSum != null">
            or ADD_WEIGHT_SUM = #{addWeightSum}
        </if>
        <if test="bindCardNo != null and bindCardNo != ''">
            or BIND_CARD_NO = #{bindCardNo}
        </if>
        <if test="loadPointNo != null and loadPointNo != ''">
            or LOAD_POINT_NO = #{loadPointNo}
        </if>
        <if test="loadPointName != null and loadPointName != ''">
            or LOAD_POINT_NAME = #{loadPointName}
        </if>
        <if test="sampleNo != null and sampleNo != ''">
            or SAMPLE_NO = #{sampleNo}
        </if>
        <if test="sampleVoucher != null and sampleVoucher != ''">
            or SAMPLE_VOUCHER = #{sampleVoucher}
        </if>
        <if test="carrierUnitNo != null and carrierUnitNo != ''">
            or CARRIER_UNIT_NO = #{carrierUnitNo}
        </if>
        <if test="carrierUnitName != null and carrierUnitName != ''">
            or CARRIER_UNIT_NAME = #{carrierUnitName}
        </if>
        <if test="predictionType != null and predictionType != ''">
            or PREDICTION_TYPE = #{predictionType}
        </if>
        <if test="predictionCombination != null and predictionCombination != ''">
            or PREDICTION_COMBINATION = #{predictionCombination}
        </if>
        <if test="meterTypeNo != null and meterTypeNo != ''">
            or METER_TYPE_NO = #{meterTypeNo}
        </if>
        <if test="meterTypeName != null and meterTypeName != ''">
            or METER_TYPE_NAME = #{meterTypeName}
        </if>
        <if test="usedType != null and usedType != ''">
            or USED_TYPE = #{usedType}
        </if>
        <if test="effectiveStartTime != null">
            or TO_CHAR(EFFECTIVE_START_TIME,'yyyy-MM-dd') = '#{effectiveStartTime}'
        </if>
        <if test="effectiveEndTime != null">
            or TO_CHAR(EFFECTIVE_END_TIME,'yyyy-MM-dd') = '#{effectiveEndTime}'
        </if>
        <if test="effectiveWeight != null">
            or EFFECTIVE_WEIGHT = #{effectiveWeight}
        </if>
        <if test="effectiveNum != null">
            or EFFECTIVE_NUM = #{effectiveNum}
        </if>
        <if test="meterWeight != null">
            or METER_WEIGHT = #{meterWeight}
        </if>
        <if test="meterNum != null">
            or METER_NUM = #{meterNum}
        </if>
        <if test="railwayNo != null and railwayNo != ''">
            or RAILWAY_NO = #{railwayNo}
        </if>
        <if test="meterProcessNo != null and meterProcessNo != ''">
            or METER_PROCESS_NO = #{meterProcessNo}
        </if>
        <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
            or METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
        </if>
        <if test="memo != null and memo != ''">
            or MEMO = #{memo}
        </if>
        <if test="valueFlag != null and valueFlag != ''">
            or VALUE_FLAG = #{valueFlag}
        </if>
        <if test="usedTime != null">
            or TO_CHAR(USED_TIME,'yyyy-MM-dd') = '#{usedTime}'
        </if>
        <if test="createManNo != null and createManNo != ''">
            or CREATE_MAN_NO = #{createManNo}
        </if>
        <if test="createManName != null and createManName != ''">
            or CREATE_MAN_NAME = #{createManName}
        </if>
        <if test="createTime != null">
            or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
        </if>
        <if test="updateManNo != null and updateManNo != ''">
            or UPDATE_MAN_NO = #{updateManNo}
        </if>
        <if test="updateManName != null and updateManName != ''">
            or UPDATE_MAN_NAME = #{updateManName}
        </if>
        <if test="updateTime != null">
            or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
        </if>
        <if test="deleteManNo != null and deleteManNo != ''">
            or DELETE_MAN_NO = #{deleteManNo}
        </if>
        <if test="deleteManName != null and deleteManName != ''">
            or DELETE_MAN_NAME = #{deleteManName}
        </if>
        <if test="deleteTime != null">
            or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
        </if>
        <if test="pValueFlag != null and pValueFlag != ''">
            or P_VALUE_FLAG = #{pValueFlag}
        </if>
        <if test="carAllocationTime != null">
            or TO_CHAR(CAR_ALLOCATION_TIME,'yyyy-MM-dd') = '#{carAllocationTime}'
        </if>
        <if test="isCompleted != null and isCompleted != ''">
            or IS_COMPLETED = #{isCompleted}
        </if>
        <if test="limsSamplingFlag != null and limsSamplingFlag != ''">
            or LIMS_SAMPLING_FLAG = #{limsSamplingFlag}
        </if>
        <if test="heatNo != null and heatNo != ''">
            or HEAT_NO = #{heatNo}
        </if>
        <if test="idNum != null and idNum != ''">
            or ID_NUM = #{idNum}
        </if>
        <if test="predictionSource != null and predictionSource != ''">
            or PREDICTION_SOURCE = #{predictionSource}
        </if>
        <if test="meterPierName != null and meterPierName != ''">
            or METER_PIER_NAME = #{meterPierName}
        </if>
        <if test="meterPierNo != null and meterPierNo != ''">
            or METER_PIER_NO = #{meterPierNo}
        </if>
        <if test="createDepname != null and createDepname != ''">
            or CREATE_DEPNAME = #{createDepname}
        </if>
        <if test="createDepid != null and createDepid != ''">
            or CREATE_DEPID = #{createDepid}
        </if>
        <if test="lineDesc != null and lineDesc != ''">
            or LINE_DESC = #{lineDesc}
        </if>
        <if test="lineCode != null and lineCode != ''">
            or LINE_CODE = #{lineCode}
        </if>
        <if test="shipNo != null and shipNo != ''">
            or SHIP_NO = #{shipNo}
        </if>
    </delete>
    <insert id="insert" parameterType="com.steerinfo.appservice.apppretrackscale.model.AppPreTrackScale">
        insert into PRE_TRACK_SCALE (PREDICTION_NO, NOTICE_NO, CAR_NO,
                                     TRAILER_NO, MATTER_NO, MATTER_NAME,
                                     CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO,
                                     CUSTOMER_SUPPLIER_NAME, SOURCE_AREA, FORWARDING_UNIT_NO,
                                     FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
                                     MATERIAL_NO, MATERIAL_NAME, SPEC_NO,
                                     SPEC_NAME, SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT,
                                     SHIPMENT_NUM, ADD_WEIGHT_SUM, BIND_CARD_NO,
                                     LOAD_POINT_NO, LOAD_POINT_NAME, SAMPLE_NO,
                                     SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME,
                                     PREDICTION_TYPE, PREDICTION_COMBINATION,
                                     METER_TYPE_NO, METER_TYPE_NAME, USED_TYPE,
                                     EFFECTIVE_START_TIME, EFFECTIVE_END_TIME,
                                     EFFECTIVE_WEIGHT, EFFECTIVE_NUM, METER_WEIGHT,
                                     METER_NUM, RAILWAY_NO, METER_PROCESS_NO,
                                     METER_PROCESS_EDITION_NO, MEMO, VALUE_FLAG,
                                     USED_TIME, CREATE_MAN_NO, CREATE_MAN_NAME,
                                     CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
                                     UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME,
                                     DELETE_TIME, P_VALUE_FLAG, CAR_ALLOCATION_TIME,
                                     IS_COMPLETED, LIMS_SAMPLING_FLAG, HEAT_NO,
                                     ID_NUM, PREDICTION_SOURCE, METER_PIER_NAME,
                                     METER_PIER_NO, CREATE_DEPNAME, CREATE_DEPID,
                                     LINE_DESC, LINE_CODE, SHIP_NO
        )
        values (#{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR},
                #{trailerNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR},
                #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR},
                #{customerSupplierName,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR},
                #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, #{receivingUintName,jdbcType=VARCHAR},
                #{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{specNo,jdbcType=VARCHAR},
                #{specName,jdbcType=VARCHAR}, #{shipmentGrossWeight,jdbcType=DECIMAL}, #{shipmentNetWeight,jdbcType=DECIMAL},
                #{shipmentNum,jdbcType=DECIMAL}, #{addWeightSum,jdbcType=DECIMAL}, #{bindCardNo,jdbcType=VARCHAR},
                #{loadPointNo,jdbcType=VARCHAR}, #{loadPointName,jdbcType=VARCHAR}, #{sampleNo,jdbcType=VARCHAR},
                #{sampleVoucher,jdbcType=VARCHAR}, #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR},
                #{predictionType,jdbcType=VARCHAR}, #{predictionCombination,jdbcType=VARCHAR},
                #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR}, #{usedType,jdbcType=VARCHAR},
                #{effectiveStartTime,jdbcType=TIMESTAMP}, #{effectiveEndTime,jdbcType=TIMESTAMP},
                #{effectiveWeight,jdbcType=DECIMAL}, #{effectiveNum,jdbcType=DECIMAL}, #{meterWeight,jdbcType=DECIMAL},
                #{meterNum,jdbcType=DECIMAL}, #{railwayNo,jdbcType=VARCHAR}, #{meterProcessNo,jdbcType=VARCHAR},
                #{meterProcessEditionNo,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR},
                #{usedTime,jdbcType=TIMESTAMP}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
                #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR},
                #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR},
                #{deleteTime,jdbcType=TIMESTAMP}, #{pValueFlag,jdbcType=VARCHAR}, #{carAllocationTime,jdbcType=TIMESTAMP},
                #{isCompleted,jdbcType=VARCHAR}, #{limsSamplingFlag,jdbcType=VARCHAR}, #{heatNo,jdbcType=VARCHAR},
                #{idNum,jdbcType=VARCHAR}, #{predictionSource,jdbcType=VARCHAR}, #{meterPierName,jdbcType=VARCHAR},
                #{meterPierNo,jdbcType=VARCHAR}, #{createDepname,jdbcType=VARCHAR}, #{createDepid,jdbcType=VARCHAR},
                #{lineDesc,jdbcType=VARCHAR}, #{lineCode,jdbcType=VARCHAR}, #{shipNo,jdbcType=VARCHAR}
               )
    </insert>
    <insert id="insertSelective" parameterType="com.steerinfo.appservice.apppretrackscale.model.AppPreTrackScale">
        insert into PRE_TRACK_SCALE
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="predictionNo != null">
                PREDICTION_NO,
            </if>
            <if test="noticeNo != null">
                NOTICE_NO,
            </if>
            <if test="carNo != null">
                CAR_NO,
            </if>
            <if test="trailerNo != null">
                TRAILER_NO,
            </if>
            <if test="matterNo != null">
                MATTER_NO,
            </if>
            <if test="matterName != null">
                MATTER_NAME,
            </if>
            <if test="contractNo != null">
                CONTRACT_NO,
            </if>
            <if test="batchNo != null">
                BATCH_NO,
            </if>
            <if test="customerSupplierNo != null">
                CUSTOMER_SUPPLIER_NO,
            </if>
            <if test="customerSupplierName != null">
                CUSTOMER_SUPPLIER_NAME,
            </if>
            <if test="sourceArea != null">
                SOURCE_AREA,
            </if>
            <if test="forwardingUnitNo != null">
                FORWARDING_UNIT_NO,
            </if>
            <if test="forwardingUnitName != null">
                FORWARDING_UNIT_NAME,
            </if>
            <if test="receivingUintNo != null">
                RECEIVING_UINT_NO,
            </if>
            <if test="receivingUintName != null">
                RECEIVING_UINT_NAME,
            </if>
            <if test="materialNo != null">
                MATERIAL_NO,
            </if>
            <if test="materialName != null">
                MATERIAL_NAME,
            </if>
            <if test="specNo != null">
                SPEC_NO,
            </if>
            <if test="specName != null">
                SPEC_NAME,
            </if>
            <if test="shipmentGrossWeight != null">
                SHIPMENT_GROSS_WEIGHT,
            </if>
            <if test="shipmentNetWeight != null">
                SHIPMENT_NET_WEIGHT,
            </if>
            <if test="shipmentNum != null">
                SHIPMENT_NUM,
            </if>
            <if test="addWeightSum != null">
                ADD_WEIGHT_SUM,
            </if>
            <if test="bindCardNo != null">
                BIND_CARD_NO,
            </if>
            <if test="loadPointNo != null">
                LOAD_POINT_NO,
            </if>
            <if test="loadPointName != null">
                LOAD_POINT_NAME,
            </if>
            <if test="sampleNo != null">
                SAMPLE_NO,
            </if>
            <if test="sampleVoucher != null">
                SAMPLE_VOUCHER,
            </if>
            <if test="carrierUnitNo != null">
                CARRIER_UNIT_NO,
            </if>
            <if test="carrierUnitName != null">
                CARRIER_UNIT_NAME,
            </if>
            <if test="predictionType != null">
                PREDICTION_TYPE,
            </if>
            <if test="predictionCombination != null">
                PREDICTION_COMBINATION,
            </if>
            <if test="meterTypeNo != null">
                METER_TYPE_NO,
            </if>
            <if test="meterTypeName != null">
                METER_TYPE_NAME,
            </if>
            <if test="usedType != null">
                USED_TYPE,
            </if>
            <if test="effectiveStartTime != null">
                EFFECTIVE_START_TIME,
            </if>
            <if test="effectiveEndTime != null">
                EFFECTIVE_END_TIME,
            </if>
            <if test="effectiveWeight != null">
                EFFECTIVE_WEIGHT,
            </if>
            <if test="effectiveNum != null">
                EFFECTIVE_NUM,
            </if>
            <if test="meterWeight != null">
                METER_WEIGHT,
            </if>
            <if test="meterNum != null">
                METER_NUM,
            </if>
            <if test="railwayNo != null">
                RAILWAY_NO,
            </if>
            <if test="meterProcessNo != null">
                METER_PROCESS_NO,
            </if>
            <if test="meterProcessEditionNo != null">
                METER_PROCESS_EDITION_NO,
            </if>
            <if test="memo != null">
                MEMO,
            </if>
            <if test="valueFlag != null">
                VALUE_FLAG,
            </if>
            <if test="usedTime != null">
                USED_TIME,
            </if>
            <if test="createManNo != null">
                CREATE_MAN_NO,
            </if>
            <if test="createManName != null">
                CREATE_MAN_NAME,
            </if>
            <if test="createTime != null">
                CREATE_TIME,
            </if>
            <if test="updateManNo != null">
                UPDATE_MAN_NO,
            </if>
            <if test="updateManName != null">
                UPDATE_MAN_NAME,
            </if>
            <if test="updateTime != null">
                UPDATE_TIME,
            </if>
            <if test="deleteManNo != null">
                DELETE_MAN_NO,
            </if>
            <if test="deleteManName != null">
                DELETE_MAN_NAME,
            </if>
            <if test="deleteTime != null">
                DELETE_TIME,
            </if>
            <if test="pValueFlag != null">
                P_VALUE_FLAG,
            </if>
            <if test="carAllocationTime != null">
                CAR_ALLOCATION_TIME,
            </if>
            <if test="isCompleted != null">
                IS_COMPLETED,
            </if>
            <if test="limsSamplingFlag != null">
                LIMS_SAMPLING_FLAG,
            </if>
            <if test="heatNo != null">
                HEAT_NO,
            </if>
            <if test="idNum != null">
                ID_NUM,
            </if>
            <if test="predictionSource != null">
                PREDICTION_SOURCE,
            </if>
            <if test="meterPierName != null">
                METER_PIER_NAME,
            </if>
            <if test="meterPierNo != null">
                METER_PIER_NO,
            </if>
            <if test="createDepname != null">
                CREATE_DEPNAME,
            </if>
            <if test="createDepid != null">
                CREATE_DEPID,
            </if>
            <if test="lineDesc != null">
                LINE_DESC,
            </if>
            <if test="lineCode != null">
                LINE_CODE,
            </if>
            <if test="shipNo != null">
                SHIP_NO,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="predictionNo != null">
                #{predictionNo,jdbcType=VARCHAR},
            </if>
            <if test="noticeNo != null">
                #{noticeNo,jdbcType=VARCHAR},
            </if>
            <if test="carNo != null">
                #{carNo,jdbcType=VARCHAR},
            </if>
            <if test="trailerNo != null">
                #{trailerNo,jdbcType=VARCHAR},
            </if>
            <if test="matterNo != null">
                #{matterNo,jdbcType=VARCHAR},
            </if>
            <if test="matterName != null">
                #{matterName,jdbcType=VARCHAR},
            </if>
            <if test="contractNo != null">
                #{contractNo,jdbcType=VARCHAR},
            </if>
            <if test="batchNo != null">
                #{batchNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierNo != null">
                #{customerSupplierNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierName != null">
                #{customerSupplierName,jdbcType=VARCHAR},
            </if>
            <if test="sourceArea != null">
                #{sourceArea,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitNo != null">
                #{forwardingUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitName != null">
                #{forwardingUnitName,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintNo != null">
                #{receivingUintNo,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintName != null">
                #{receivingUintName,jdbcType=VARCHAR},
            </if>
            <if test="materialNo != null">
                #{materialNo,jdbcType=VARCHAR},
            </if>
            <if test="materialName != null">
                #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="specNo != null">
                #{specNo,jdbcType=VARCHAR},
            </if>
            <if test="specName != null">
                #{specName,jdbcType=VARCHAR},
            </if>
            <if test="shipmentGrossWeight != null">
                #{shipmentGrossWeight,jdbcType=DECIMAL},
            </if>
            <if test="shipmentNetWeight != null">
                #{shipmentNetWeight,jdbcType=DECIMAL},
            </if>
            <if test="shipmentNum != null">
                #{shipmentNum,jdbcType=DECIMAL},
            </if>
            <if test="addWeightSum != null">
                #{addWeightSum,jdbcType=DECIMAL},
            </if>
            <if test="bindCardNo != null">
                #{bindCardNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointNo != null">
                #{loadPointNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointName != null">
                #{loadPointName,jdbcType=VARCHAR},
            </if>
            <if test="sampleNo != null">
                #{sampleNo,jdbcType=VARCHAR},
            </if>
            <if test="sampleVoucher != null">
                #{sampleVoucher,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitNo != null">
                #{carrierUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitName != null">
                #{carrierUnitName,jdbcType=VARCHAR},
            </if>
            <if test="predictionType != null">
                #{predictionType,jdbcType=VARCHAR},
            </if>
            <if test="predictionCombination != null">
                #{predictionCombination,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeNo != null">
                #{meterTypeNo,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeName != null">
                #{meterTypeName,jdbcType=VARCHAR},
            </if>
            <if test="usedType != null">
                #{usedType,jdbcType=VARCHAR},
            </if>
            <if test="effectiveStartTime != null">
                #{effectiveStartTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveEndTime != null">
                #{effectiveEndTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveWeight != null">
                #{effectiveWeight,jdbcType=DECIMAL},
            </if>
            <if test="effectiveNum != null">
                #{effectiveNum,jdbcType=DECIMAL},
            </if>
            <if test="meterWeight != null">
                #{meterWeight,jdbcType=DECIMAL},
            </if>
            <if test="meterNum != null">
                #{meterNum,jdbcType=DECIMAL},
            </if>
            <if test="railwayNo != null">
                #{railwayNo,jdbcType=VARCHAR},
            </if>
            <if test="meterProcessNo != null">
                #{meterProcessNo,jdbcType=VARCHAR},
            </if>
            <if test="meterProcessEditionNo != null">
                #{meterProcessEditionNo,jdbcType=VARCHAR},
            </if>
            <if test="memo != null">
                #{memo,jdbcType=VARCHAR},
            </if>
            <if test="valueFlag != null">
                #{valueFlag,jdbcType=VARCHAR},
            </if>
            <if test="usedTime != null">
                #{usedTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createManNo != null">
                #{createManNo,jdbcType=VARCHAR},
            </if>
            <if test="createManName != null">
                #{createManName,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateManNo != null">
                #{updateManNo,jdbcType=VARCHAR},
            </if>
            <if test="updateManName != null">
                #{updateManName,jdbcType=VARCHAR},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="deleteManNo != null">
                #{deleteManNo,jdbcType=VARCHAR},
            </if>
            <if test="deleteManName != null">
                #{deleteManName,jdbcType=VARCHAR},
            </if>
            <if test="deleteTime != null">
                #{deleteTime,jdbcType=TIMESTAMP},
            </if>
            <if test="pValueFlag != null">
                #{pValueFlag,jdbcType=VARCHAR},
            </if>
            <if test="carAllocationTime != null">
                #{carAllocationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="isCompleted != null">
                #{isCompleted,jdbcType=VARCHAR},
            </if>
            <if test="limsSamplingFlag != null">
                #{limsSamplingFlag,jdbcType=VARCHAR},
            </if>
            <if test="heatNo != null">
                #{heatNo,jdbcType=VARCHAR},
            </if>
            <if test="idNum != null">
                #{idNum,jdbcType=VARCHAR},
            </if>
            <if test="predictionSource != null">
                #{predictionSource,jdbcType=VARCHAR},
            </if>
            <if test="meterPierName != null">
                #{meterPierName,jdbcType=VARCHAR},
            </if>
            <if test="meterPierNo != null">
                #{meterPierNo,jdbcType=VARCHAR},
            </if>
            <if test="createDepname != null">
                #{createDepname,jdbcType=VARCHAR},
            </if>
            <if test="createDepid != null">
                #{createDepid,jdbcType=VARCHAR},
            </if>
            <if test="lineDesc != null">
                #{lineDesc,jdbcType=VARCHAR},
            </if>
            <if test="lineCode != null">
                #{lineCode,jdbcType=VARCHAR},
            </if>
            <if test="shipNo != null">
                #{shipNo,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.steerinfo.appservice.apppretrackscale.model.AppPreTrackScale">
        update PRE_TRACK_SCALE
        set NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
            CAR_NO = #{carNo,jdbcType=VARCHAR},
            TRAILER_NO = #{trailerNo,jdbcType=VARCHAR},
            MATTER_NO = #{matterNo,jdbcType=VARCHAR},
            MATTER_NAME = #{matterName,jdbcType=VARCHAR},
            CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
            BATCH_NO = #{batchNo,jdbcType=VARCHAR},
            CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
            CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
            SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
            FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
            FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
            RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
            RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
            MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
            MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
            SPEC_NO = #{specNo,jdbcType=VARCHAR},
            SPEC_NAME = #{specName,jdbcType=VARCHAR},
            SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight,jdbcType=DECIMAL},
            SHIPMENT_NET_WEIGHT = #{shipmentNetWeight,jdbcType=DECIMAL},
            SHIPMENT_NUM = #{shipmentNum,jdbcType=DECIMAL},
            ADD_WEIGHT_SUM = #{addWeightSum,jdbcType=DECIMAL},
            BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
            LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
            LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
            SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
            SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
            CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
            CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
            PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
            PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
            METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
            METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
            USED_TYPE = #{usedType,jdbcType=VARCHAR},
            EFFECTIVE_START_TIME = #{effectiveStartTime,jdbcType=TIMESTAMP},
            EFFECTIVE_END_TIME = #{effectiveEndTime,jdbcType=TIMESTAMP},
            EFFECTIVE_WEIGHT = #{effectiveWeight,jdbcType=DECIMAL},
            EFFECTIVE_NUM = #{effectiveNum,jdbcType=DECIMAL},
            METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
            METER_NUM = #{meterNum,jdbcType=DECIMAL},
            RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
            METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
            METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
            MEMO = #{memo,jdbcType=VARCHAR},
            VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
            USED_TIME = #{usedTime,jdbcType=TIMESTAMP},
            CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
            CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
            CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
            UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
            UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
            DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
            DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
            DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
            P_VALUE_FLAG = #{pValueFlag,jdbcType=VARCHAR},
            CAR_ALLOCATION_TIME = #{carAllocationTime,jdbcType=TIMESTAMP},
            IS_COMPLETED = #{isCompleted,jdbcType=VARCHAR},
            LIMS_SAMPLING_FLAG = #{limsSamplingFlag,jdbcType=VARCHAR},
            HEAT_NO = #{heatNo,jdbcType=VARCHAR},
            ID_NUM = #{idNum,jdbcType=VARCHAR},
            PREDICTION_SOURCE = #{predictionSource,jdbcType=VARCHAR},
            METER_PIER_NAME = #{meterPierName,jdbcType=VARCHAR},
            METER_PIER_NO = #{meterPierNo,jdbcType=VARCHAR},
            CREATE_DEPNAME = #{createDepname,jdbcType=VARCHAR},
            CREATE_DEPID = #{createDepid,jdbcType=VARCHAR},
            LINE_DESC = #{lineDesc,jdbcType=VARCHAR},
            LINE_CODE = #{lineCode,jdbcType=VARCHAR},
            SHIP_NO = #{shipNo,jdbcType=VARCHAR}
        where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.appservice.apppretrackscale.model.AppPreTrackScale">
        update PRE_TRACK_SCALE
        <set>
            <if test="noticeNo != null">
                NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
            </if>
            <if test="carNo != null">
                CAR_NO = #{carNo,jdbcType=VARCHAR},
            </if>
            <if test="trailerNo != null">
                TRAILER_NO = #{trailerNo,jdbcType=VARCHAR},
            </if>
            <if test="matterNo != null">
                MATTER_NO = #{matterNo,jdbcType=VARCHAR},
            </if>
            <if test="matterName != null">
                MATTER_NAME = #{matterName,jdbcType=VARCHAR},
            </if>
            <if test="contractNo != null">
                CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
            </if>
            <if test="batchNo != null">
                BATCH_NO = #{batchNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierNo != null">
                CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
            </if>
            <if test="customerSupplierName != null">
                CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
            </if>
            <if test="sourceArea != null">
                SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitNo != null">
                FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="forwardingUnitName != null">
                FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintNo != null">
                RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
            </if>
            <if test="receivingUintName != null">
                RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
            </if>
            <if test="materialNo != null">
                MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
            </if>
            <if test="materialName != null">
                MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
            </if>
            <if test="specNo != null">
                SPEC_NO = #{specNo,jdbcType=VARCHAR},
            </if>
            <if test="specName != null">
                SPEC_NAME = #{specName,jdbcType=VARCHAR},
            </if>
            <if test="shipmentGrossWeight != null">
                SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight,jdbcType=DECIMAL},
            </if>
            <if test="shipmentNetWeight != null">
                SHIPMENT_NET_WEIGHT = #{shipmentNetWeight,jdbcType=DECIMAL},
            </if>
            <if test="shipmentNum != null">
                SHIPMENT_NUM = #{shipmentNum,jdbcType=DECIMAL},
            </if>
            <if test="addWeightSum != null">
                ADD_WEIGHT_SUM = #{addWeightSum,jdbcType=DECIMAL},
            </if>
            <if test="bindCardNo != null">
                BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointNo != null">
                LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
            </if>
            <if test="loadPointName != null">
                LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
            </if>
            <if test="sampleNo != null">
                SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
            </if>
            <if test="sampleVoucher != null">
                SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitNo != null">
                CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
            </if>
            <if test="carrierUnitName != null">
                CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
            </if>
            <if test="predictionType != null">
                PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
            </if>
            <if test="predictionCombination != null">
                PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeNo != null">
                METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
            </if>
            <if test="meterTypeName != null">
                METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
            </if>
            <if test="usedType != null">
                USED_TYPE = #{usedType,jdbcType=VARCHAR},
            </if>
            <if test="effectiveStartTime != null">
                EFFECTIVE_START_TIME = #{effectiveStartTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveEndTime != null">
                EFFECTIVE_END_TIME = #{effectiveEndTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveWeight != null">
                EFFECTIVE_WEIGHT = #{effectiveWeight,jdbcType=DECIMAL},
            </if>
            <if test="effectiveNum != null">
                EFFECTIVE_NUM = #{effectiveNum,jdbcType=DECIMAL},
            </if>
            <if test="meterWeight != null">
                METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
            </if>
            <if test="meterNum != null">
                METER_NUM = #{meterNum,jdbcType=DECIMAL},
            </if>
            <if test="railwayNo != null">
                RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
            </if>
            <if test="meterProcessNo != null">
                METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
            </if>
            <if test="meterProcessEditionNo != null">
                METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
            </if>
            <if test="memo != null">
                MEMO = #{memo,jdbcType=VARCHAR},
            </if>
            <if test="valueFlag != null">
                VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
            </if>
            <if test="usedTime != null">
                USED_TIME = #{usedTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createManNo != null">
                CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
            </if>
            <if test="createManName != null">
                CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateManNo != null">
                UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
            </if>
            <if test="updateManName != null">
                UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
            </if>
            <if test="updateTime != null">
                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="deleteManNo != null">
                DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
            </if>
            <if test="deleteManName != null">
                DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
            </if>
            <if test="deleteTime != null">
                DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
            </if>
            <if test="pValueFlag != null">
                P_VALUE_FLAG = #{pValueFlag,jdbcType=VARCHAR},
            </if>
            <if test="carAllocationTime != null">
                CAR_ALLOCATION_TIME = #{carAllocationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="isCompleted != null">
                IS_COMPLETED = #{isCompleted,jdbcType=VARCHAR},
            </if>
            <if test="limsSamplingFlag != null">
                LIMS_SAMPLING_FLAG = #{limsSamplingFlag,jdbcType=VARCHAR},
            </if>
            <if test="heatNo != null">
                HEAT_NO = #{heatNo,jdbcType=VARCHAR},
            </if>
            <if test="idNum != null">
                ID_NUM = #{idNum,jdbcType=VARCHAR},
            </if>
            <if test="predictionSource != null">
                PREDICTION_SOURCE = #{predictionSource,jdbcType=VARCHAR},
            </if>
            <if test="meterPierName != null">
                METER_PIER_NAME = #{meterPierName,jdbcType=VARCHAR},
            </if>
            <if test="meterPierNo != null">
                METER_PIER_NO = #{meterPierNo,jdbcType=VARCHAR},
            </if>
            <if test="createDepname != null">
                CREATE_DEPNAME = #{createDepname,jdbcType=VARCHAR},
            </if>
            <if test="createDepid != null">
                CREATE_DEPID = #{createDepid,jdbcType=VARCHAR},
            </if>
            <if test="lineDesc != null">
                LINE_DESC = #{lineDesc,jdbcType=VARCHAR},
            </if>
            <if test="lineCode != null">
                LINE_CODE = #{lineCode,jdbcType=VARCHAR},
            </if>
            <if test="shipNo != null">
                SHIP_NO = #{shipNo,jdbcType=VARCHAR},
            </if>
        </set>
        where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
    </update>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        <include refid="select"/>
        where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
    </select>
    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <include refid="where"/>
        order by  CREATE_TIME desc
    </select>
    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <include refid="whereLike"/>
        order by  CREATE_TIME desc
    </select>
    <insert id="batchInsert" parameterType="java.util.List">
        insert into PRE_TRACK_SCALE
        (PREDICTION_NO,
        NOTICE_NO, CAR_NO, TRAILER_NO,
        MATTER_NO, MATTER_NAME, CONTRACT_NO,
        BATCH_NO, CUSTOMER_SUPPLIER_NO,
        CUSTOMER_SUPPLIER_NAME, SOURCE_AREA,
        FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME,
        RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
        MATERIAL_NO, MATERIAL_NAME, SPEC_NO,
        SPEC_NAME, SHIPMENT_GROSS_WEIGHT,
        SHIPMENT_NET_WEIGHT, SHIPMENT_NUM,
        ADD_WEIGHT_SUM, BIND_CARD_NO, LOAD_POINT_NO,
        LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER,
        CARRIER_UNIT_NO, CARRIER_UNIT_NAME,
        PREDICTION_TYPE, PREDICTION_COMBINATION,
        METER_TYPE_NO, METER_TYPE_NAME, USED_TYPE,
        EFFECTIVE_START_TIME, EFFECTIVE_END_TIME,
        EFFECTIVE_WEIGHT, EFFECTIVE_NUM,
        METER_WEIGHT, METER_NUM, RAILWAY_NO,
        METER_PROCESS_NO, METER_PROCESS_EDITION_NO,
        MEMO, VALUE_FLAG, USED_TIME,
        CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
        UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
        DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME,
        P_VALUE_FLAG, CAR_ALLOCATION_TIME,
        IS_COMPLETED, LIMS_SAMPLING_FLAG,
        HEAT_NO, ID_NUM, PREDICTION_SOURCE,
        METER_PIER_NAME, METER_PIER_NO, CREATE_DEPNAME,
        CREATE_DEPID, LINE_DESC, LINE_CODE,
        SHIP_NO)
        ( <foreach collection="list" item="item" separator="union all">
        select
        #{item.predictionNo,jdbcType=VARCHAR},
        #{item.noticeNo,jdbcType=VARCHAR}, #{item.carNo,jdbcType=VARCHAR}, #{item.trailerNo,jdbcType=VARCHAR},
        #{item.matterNo,jdbcType=VARCHAR}, #{item.matterName,jdbcType=VARCHAR}, #{item.contractNo,jdbcType=VARCHAR},
        #{item.batchNo,jdbcType=VARCHAR}, #{item.customerSupplierNo,jdbcType=VARCHAR},
        #{item.customerSupplierName,jdbcType=VARCHAR}, #{item.sourceArea,jdbcType=VARCHAR},
        #{item.forwardingUnitNo,jdbcType=VARCHAR}, #{item.forwardingUnitName,jdbcType=VARCHAR},
        #{item.receivingUintNo,jdbcType=VARCHAR}, #{item.receivingUintName,jdbcType=VARCHAR},
        #{item.materialNo,jdbcType=VARCHAR}, #{item.materialName,jdbcType=VARCHAR}, #{item.specNo,jdbcType=VARCHAR},
        #{item.specName,jdbcType=VARCHAR}, #{item.shipmentGrossWeight,jdbcType=DECIMAL},
        #{item.shipmentNetWeight,jdbcType=DECIMAL}, #{item.shipmentNum,jdbcType=DECIMAL},
        #{item.addWeightSum,jdbcType=DECIMAL}, #{item.bindCardNo,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR},
        #{item.loadPointName,jdbcType=VARCHAR}, #{item.sampleNo,jdbcType=VARCHAR}, #{item.sampleVoucher,jdbcType=VARCHAR},
        #{item.carrierUnitNo,jdbcType=VARCHAR}, #{item.carrierUnitName,jdbcType=VARCHAR},
        #{item.predictionType,jdbcType=VARCHAR}, #{item.predictionCombination,jdbcType=VARCHAR},
        #{item.meterTypeNo,jdbcType=VARCHAR}, #{item.meterTypeName,jdbcType=VARCHAR}, #{item.usedType,jdbcType=VARCHAR},
        #{item.effectiveStartTime,jdbcType=TIMESTAMP}, #{item.effectiveEndTime,jdbcType=TIMESTAMP},
        #{item.effectiveWeight,jdbcType=DECIMAL}, #{item.effectiveNum,jdbcType=DECIMAL},
        #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterNum,jdbcType=DECIMAL}, #{item.railwayNo,jdbcType=VARCHAR},
        #{item.meterProcessNo,jdbcType=VARCHAR}, #{item.meterProcessEditionNo,jdbcType=VARCHAR},
        #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, #{item.usedTime,jdbcType=TIMESTAMP},
        #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
        #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
        #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
        #{item.pValueFlag,jdbcType=VARCHAR}, #{item.carAllocationTime,jdbcType=TIMESTAMP},
        #{item.isCompleted,jdbcType=VARCHAR}, #{item.limsSamplingFlag,jdbcType=VARCHAR},
        #{item.heatNo,jdbcType=VARCHAR}, #{item.idNum,jdbcType=VARCHAR}, #{item.predictionSource,jdbcType=VARCHAR},
        #{item.meterPierName,jdbcType=VARCHAR}, #{item.meterPierNo,jdbcType=VARCHAR}, #{item.createDepname,jdbcType=VARCHAR},
        #{item.createDepid,jdbcType=VARCHAR}, #{item.lineDesc,jdbcType=VARCHAR}, #{item.lineCode,jdbcType=VARCHAR},
        #{item.shipNo,jdbcType=VARCHAR} from dual
    </foreach> )
    </insert>
    <update id="batchUpdate" parameterType="java.util.List">
        update PRE_TRACK_SCALE
        set
        PREDICTION_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionNo,jdbcType=VARCHAR}
        </foreach>
        ,NOTICE_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
        ,CAR_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
        </foreach>
        ,TRAILER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trailerNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
        </foreach>
        ,CONTRACT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
        </foreach>
        ,BATCH_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
        </foreach>
        ,SOURCE_AREA=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
        </foreach>
        ,SHIPMENT_GROSS_WEIGHT=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentGrossWeight,jdbcType=DECIMAL}
        </foreach>
        ,SHIPMENT_NET_WEIGHT=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentNetWeight,jdbcType=DECIMAL}
        </foreach>
        ,SHIPMENT_NUM=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentNum,jdbcType=DECIMAL}
        </foreach>
        ,ADD_WEIGHT_SUM=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.addWeightSum,jdbcType=DECIMAL}
        </foreach>
        ,BIND_CARD_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.bindCardNo,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
        </foreach>
        ,SAMPLE_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sampleNo,jdbcType=VARCHAR}
        </foreach>
        ,SAMPLE_VOUCHER=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sampleVoucher,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
        </foreach>
        ,PREDICTION_TYPE=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
        </foreach>
        ,PREDICTION_COMBINATION=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
        </foreach>
        ,USED_TYPE=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.usedType,jdbcType=VARCHAR}
        </foreach>
        ,EFFECTIVE_START_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveStartTime,jdbcType=TIMESTAMP}
        </foreach>
        ,EFFECTIVE_END_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveEndTime,jdbcType=TIMESTAMP}
        </foreach>
        ,EFFECTIVE_WEIGHT=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveWeight,jdbcType=DECIMAL}
        </foreach>
        ,EFFECTIVE_NUM=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveNum,jdbcType=DECIMAL}
        </foreach>
        ,METER_WEIGHT=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
        </foreach>
        ,METER_NUM=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterNum,jdbcType=DECIMAL}
        </foreach>
        ,RAILWAY_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_PROCESS_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterProcessNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_PROCESS_EDITION_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterProcessEditionNo,jdbcType=VARCHAR}
        </foreach>
        ,MEMO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        ,VALUE_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
        </foreach>
        ,USED_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.usedTime,jdbcType=TIMESTAMP}
        </foreach>
        ,CREATE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,DELETE_MAN_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_MAN_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
        </foreach>
        ,P_VALUE_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.pValueFlag,jdbcType=VARCHAR}
        </foreach>
        ,CAR_ALLOCATION_TIME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carAllocationTime,jdbcType=TIMESTAMP}
        </foreach>
        ,IS_COMPLETED=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.isCompleted,jdbcType=VARCHAR}
        </foreach>
        ,LIMS_SAMPLING_FLAG=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.limsSamplingFlag,jdbcType=VARCHAR}
        </foreach>
        ,HEAT_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.heatNo,jdbcType=VARCHAR}
        </foreach>
        ,ID_NUM=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.idNum,jdbcType=VARCHAR}
        </foreach>
        ,PREDICTION_SOURCE=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionSource,jdbcType=VARCHAR}
        </foreach>
        ,METER_PIER_NAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterPierName,jdbcType=VARCHAR}
        </foreach>
        ,METER_PIER_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterPierNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_DEPNAME=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createDepname,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_DEPID=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createDepid,jdbcType=VARCHAR}
        </foreach>
        ,LINE_DESC=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.lineDesc,jdbcType=VARCHAR}
        </foreach>
        ,LINE_CODE=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.lineCode,jdbcType=VARCHAR}
        </foreach>
        ,SHIP_NO=
        <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
            when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipNo,jdbcType=VARCHAR}
        </foreach>
        where PREDICTION_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.predictionNo,jdbcType=VARCHAR}
        </foreach>
    </update>
    <delete id="batchDelete" parameterType="java.util.List">
        delete from PRE_TRACK_SCALE
        where PREDICTION_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </delete>
    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->

    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
    <select id="selectPreTrackScaleByCompany" parameterType="map" resultMap="BaseResultMap">
        SELECT
        <include refid="columns"/>
        from PRE_TRACK_SCALE t
        <where>
            <if test="receivingUintNo != null and  customerSupplierNo == null ">
                and t.Receiving_Uint_No = #{receivingUintNo}
            </if>
            <if test="customerSupplierNo != null and receivingUintNo == null ">
                and t.customer_supplier_no = #{customerSupplierNo}
            </if>
            <if test="customerSupplierNo != null and receivingUintNo != null ">
                and (t.customer_supplier_no = #{customerSupplierNo} or t.Receiving_Uint_No = #{receivingUintNo})
            </if>
            <if test="meterTypeNos != null and meterTypeNos.size()>0">
                and t.meter_type_no in
                <foreach collection="meterTypeNos" index="index" item="item" separator="," open="(" close=")">
                    #{item}
                </foreach>
            </if>
            and t.value_flag in ('0','1') order by value_flag asc,CAR_ALLOCATION_TIME desc
        </where>
    </select>

    <select id="selectPreTrackScaleByCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
        SELECT
        <include refid="columns"/>
        from PRE_TRACK_SCALE t
        <where>
            t.value_flag in ('1','4')
            <if test="carNo != null and carNo != ''">
                and CAR_NO = #{carNo,jdbcType=VARCHAR}
            </if>
        </where>
        order by t.value_flag desc,t.LIMS_SAMPLING_FLAG desc,t.car_allocation_time desc
    </select>

    <!--按照车号查询已使用完成的预报信息-->
    <select id="selectPreTrackScaleByCarNoAll" parameterType="java.lang.String" resultMap="BaseResultMap">
        SELECT
        <include refid="columns"/>
        from PRE_TRACK_SCALE t
        <where>
            <if test="carNo != null and carNo != ''">
                and CAR_NO = #{carNo,jdbcType=VARCHAR}
            </if>
            and t.value_flag ='2'
            and t.CAR_ALLOCATION_TIME>sysdate -7 order by value_flag asc,t.CAR_ALLOCATION_TIME desc
        </where>
    </select>

    <select id="selectPreHD" parameterType="java.util.List" resultMap="BaseResultMap">
        select *
        from PRE_TRACK_SCALE
        where CUSTOMER_SUPPLIER_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
        and value_flag in ('0','1')
        order by value_flag asc,CAR_ALLOCATION_TIME desc
    </select>

    <!--查询预报时，查询他自己的数据-->
    <select id="selectPreHDandCreate" parameterType="java.util.List" resultMap="BaseResultMap">
        select *
        from PRE_TRACK_SCALE
        where (CUSTOMER_SUPPLIER_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
        or create_Man_No = #{customerSupplierNo})
        and value_flag in ('0','1')
        order by value_flag asc,CAR_ALLOCATION_TIME desc
    </select>
</mapper>