<?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.pretrack.prerailwayscale.mapper.PreRailwayScaleMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale">
    <id column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
    <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
    <result column="RAILWAY_CARRIAGE_NO" jdbcType="VARCHAR" property="railwayCarriageNo" />
    <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="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="EFFECTIVE_START_TIME" jdbcType="TIMESTAMP" property="effectiveStartTime" />
    <result column="EFFECTIVE_END_TIME" jdbcType="TIMESTAMP" property="effectiveEndTime" />
    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
    <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="IS_CHEMICAL" jdbcType="VARCHAR" property="isChemical" />
    <result column="LIMIT_WEIGHT" jdbcType="DECIMAL" property="limitWeight" />
    <result column="RAILWAY_MODEL_NO" jdbcType="VARCHAR" property="railwayModelNo" />
    <result column="RAILWAY_MODEL_NAME" jdbcType="VARCHAR" property="railwayModelName" />
    <result column="ARRIVAL" jdbcType="VARCHAR" property="arrival" />
    <result column="STATION" jdbcType="VARCHAR" property="station" />
    <result column="VOUCHER_IDENTITY" jdbcType="VARCHAR" property="voucherIdentity" />
    <result column="VOUCHER_ITEM" jdbcType="VARCHAR" property="voucherItem" />
    <result column="BUSINESS_GROUP" jdbcType="VARCHAR" property="businessGroup" />
    <result column="TEMP_CONVEYANCE" jdbcType="VARCHAR" property="tempConveyance" />
    <result column="CONVEYANCE_TYPE" jdbcType="VARCHAR" property="conveyanceType" />
    <result column="RESOURCE_SYSTEM" jdbcType="VARCHAR" property="resourceSystem" />
    <result column="GROUP_PACKAGE_AMOUNT" jdbcType="DECIMAL" property="groupPackageAmount" />
    <result column="GROUP_PACKAGE_UNIT" jdbcType="VARCHAR" property="groupPackageUnit" />
    <result column="PACKAGE_AMOUNT" jdbcType="DECIMAL" property="packageAmount" />
    <result column="PACKAGE_UNIT" jdbcType="VARCHAR" property="packageUnit" />
    <result column="THEORY_AMOUNT" jdbcType="DECIMAL" property="theoryAmount" />
    <result column="MEASURE_BATCH" jdbcType="VARCHAR" property="measureBatch" />
    <result column="MEASURE_BATCH_COUNT" jdbcType="DECIMAL" property="measureBatchCount" />
    <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
    <result column="SENDER_REMARK" jdbcType="VARCHAR" property="senderRemark" />
    <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
    <result column="RECEIVER_REMARK" jdbcType="VARCHAR" property="receiverRemark" />
    <result column="TRUST_DEPARTMENT_NAME" jdbcType="VARCHAR" property="trustDepartmentName" />
    <result column="TRUST_DEPARTMENT" jdbcType="VARCHAR" property="trustDepartment" />
    <result column="TRUSTOR" jdbcType="VARCHAR" property="trustor" />
    <result column="TRUST_DATE_TIME" jdbcType="TIMESTAMP" property="trustDateTime" />
    <result column="TRUST_AVAILABILITY_TIME" jdbcType="TIMESTAMP" property="trustAvailabilityTime" />
    <result column="TRUST_IP" jdbcType="VARCHAR" property="trustIp" />
    <result column="STATION_TYPE" jdbcType="VARCHAR" property="stationType" />
    <result column="MEASURE_STATION" jdbcType="VARCHAR" property="measureStation" />
    <result column="MEASURE_STATION_NAME" jdbcType="VARCHAR" property="measureStationName" />
    <result column="AMOUNT_UNIT" jdbcType="VARCHAR" property="amountUnit" />
    <result column="TRUST_DAY" jdbcType="DECIMAL" property="trustDay" />
    <result column="CONVEYANCE_GROUP" jdbcType="VARCHAR" property="conveyanceGroup" />
    <result column="UPLOAD_FLAG" jdbcType="VARCHAR" property="uploadFlag" />
  </resultMap>
  <sql id="columns">
    PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_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, 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, 
    EFFECTIVE_START_TIME, EFFECTIVE_END_TIME, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 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, 
    IS_CHEMICAL, LIMIT_WEIGHT, RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, ARRIVAL, STATION, 
    VOUCHER_IDENTITY, VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE, CONVEYANCE_TYPE, 
    RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, PACKAGE_UNIT, 
    THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, 
    RECEIVER_REMARK, TRUST_DEPARTMENT_NAME, TRUST_DEPARTMENT, TRUSTOR, TRUST_DATE_TIME, 
    TRUST_AVAILABILITY_TIME, TRUST_IP, STATION_TYPE, MEASURE_STATION, MEASURE_STATION_NAME, 
    AMOUNT_UNIT, TRUST_DAY, CONVEYANCE_GROUP, UPLOAD_FLAG
  </sql>
  <sql id="columns_alias">
    t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_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.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.EFFECTIVE_START_TIME, t.EFFECTIVE_END_TIME, 
    t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME, 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.IS_CHEMICAL, 
    t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME, t.ARRIVAL, t.STATION, t.VOUCHER_IDENTITY, 
    t.VOUCHER_ITEM, t.BUSINESS_GROUP, t.TEMP_CONVEYANCE, t.CONVEYANCE_TYPE, t.RESOURCE_SYSTEM, 
    t.GROUP_PACKAGE_AMOUNT, t.GROUP_PACKAGE_UNIT, t.PACKAGE_AMOUNT, t.PACKAGE_UNIT, t.THEORY_AMOUNT, 
    t.MEASURE_BATCH, t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, t.SENDER_REMARK, t.RECEIVER_TYPE, 
    t.RECEIVER_REMARK, t.TRUST_DEPARTMENT_NAME, t.TRUST_DEPARTMENT, t.TRUSTOR, t.TRUST_DATE_TIME, 
    t.TRUST_AVAILABILITY_TIME, t.TRUST_IP, t.STATION_TYPE, t.MEASURE_STATION, t.MEASURE_STATION_NAME, 
    t.AMOUNT_UNIT, t.TRUST_DAY, t.CONVEYANCE_GROUP, t.UPLOAD_FLAG
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM PRE_RAILWAY_SCALE
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM PRE_RAILWAY_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="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO = #{railwayNo}
      </if>
      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
        and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
      </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="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="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="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO = #{railwayTypeNo}
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME = #{railwayTypeName}
      </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="isChemical != null and isChemical != ''">
        and IS_CHEMICAL = #{isChemical}
      </if>
      <if test="limitWeight != null">
        and LIMIT_WEIGHT = #{limitWeight}
      </if>
      <if test="railwayModelNo != null and railwayModelNo != ''">
        and RAILWAY_MODEL_NO = #{railwayModelNo}
      </if>
      <if test="railwayModelName != null and railwayModelName != ''">
        and RAILWAY_MODEL_NAME = #{railwayModelName}
      </if>
      <if test="arrival != null and arrival != ''">
        and ARRIVAL = #{arrival}
      </if>
      <if test="station != null and station != ''">
        and STATION = #{station}
      </if>
      <if test="voucherIdentity != null and voucherIdentity != ''">
        and VOUCHER_IDENTITY = #{voucherIdentity}
      </if>
      <if test="voucherItem != null and voucherItem != ''">
        and VOUCHER_ITEM = #{voucherItem}
      </if>
      <if test="businessGroup != null and businessGroup != ''">
        and BUSINESS_GROUP = #{businessGroup}
      </if>
      <if test="tempConveyance != null and tempConveyance != ''">
        and TEMP_CONVEYANCE = #{tempConveyance}
      </if>
      <if test="conveyanceType != null and conveyanceType != ''">
        and CONVEYANCE_TYPE = #{conveyanceType}
      </if>
      <if test="resourceSystem != null and resourceSystem != ''">
        and RESOURCE_SYSTEM = #{resourceSystem}
      </if>
      <if test="groupPackageAmount != null">
        and GROUP_PACKAGE_AMOUNT = #{groupPackageAmount}
      </if>
      <if test="groupPackageUnit != null and groupPackageUnit != ''">
        and GROUP_PACKAGE_UNIT = #{groupPackageUnit}
      </if>
      <if test="packageAmount != null">
        and PACKAGE_AMOUNT = #{packageAmount}
      </if>
      <if test="packageUnit != null and packageUnit != ''">
        and PACKAGE_UNIT = #{packageUnit}
      </if>
      <if test="theoryAmount != null">
        and THEORY_AMOUNT = #{theoryAmount}
      </if>
      <if test="measureBatch != null and measureBatch != ''">
        and MEASURE_BATCH = #{measureBatch}
      </if>
      <if test="measureBatchCount != null">
        and MEASURE_BATCH_COUNT = #{measureBatchCount}
      </if>
      <if test="senderType != null and senderType != ''">
        and SENDER_TYPE = #{senderType}
      </if>
      <if test="senderRemark != null and senderRemark != ''">
        and SENDER_REMARK = #{senderRemark}
      </if>
      <if test="receiverType != null and receiverType != ''">
        and RECEIVER_TYPE = #{receiverType}
      </if>
      <if test="receiverRemark != null and receiverRemark != ''">
        and RECEIVER_REMARK = #{receiverRemark}
      </if>
      <if test="trustDepartmentName != null and trustDepartmentName != ''">
        and TRUST_DEPARTMENT_NAME = #{trustDepartmentName}
      </if>
      <if test="trustDepartment != null and trustDepartment != ''">
        and TRUST_DEPARTMENT = #{trustDepartment}
      </if>
      <if test="trustor != null and trustor != ''">
        and TRUSTOR = #{trustor}
      </if>
      <if test="trustDateTime != null">
        and TO_CHAR(TRUST_DATE_TIME,'yyyy-MM-dd') = #{trustDateTime}
      </if>
      <if test="trustAvailabilityTime != null">
        and TO_CHAR(TRUST_AVAILABILITY_TIME,'yyyy-MM-dd') = #{trustAvailabilityTime}
      </if>
      <if test="trustIp != null and trustIp != ''">
        and TRUST_IP = #{trustIp}
      </if>
      <if test="stationType != null and stationType != ''">
        and STATION_TYPE = #{stationType}
      </if>
      <if test="measureStation != null and measureStation != ''">
        and MEASURE_STATION = #{measureStation}
      </if>
      <if test="measureStationName != null and measureStationName != ''">
        and MEASURE_STATION_NAME = #{measureStationName}
      </if>
      <if test="amountUnit != null and amountUnit != ''">
        and AMOUNT_UNIT = #{amountUnit}
      </if>
      <if test="trustDay != null">
        and TRUST_DAY = #{trustDay}
      </if>
      <if test="conveyanceGroup != null and conveyanceGroup != ''">
        and CONVEYANCE_GROUP = #{conveyanceGroup}
      </if>
      <if test="uploadFlag != null and uploadFlag != ''">
        and UPLOAD_FLAG = #{uploadFlag}
      </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="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO LIKE '%${railwayNo}%'
      </if>
      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
        and RAILWAY_CARRIAGE_NO LIKE '%${railwayCarriageNo}%'
      </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="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="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="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
      </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="isChemical != null and isChemical != ''">
        and IS_CHEMICAL LIKE '%${isChemical}%'
      </if>
      <if test="limitWeight != null">
        and LIMIT_WEIGHT = #{limitWeight}
      </if>
      <if test="railwayModelNo != null and railwayModelNo != ''">
        and RAILWAY_MODEL_NO LIKE '%${railwayModelNo}%'
      </if>
      <if test="railwayModelName != null and railwayModelName != ''">
        and RAILWAY_MODEL_NAME LIKE '%${railwayModelName}%'
      </if>
      <if test="arrival != null and arrival != ''">
        and ARRIVAL LIKE '%${arrival}%'
      </if>
      <if test="station != null and station != ''">
        and STATION LIKE '%${station}%'
      </if>
      <if test="voucherIdentity != null and voucherIdentity != ''">
        and VOUCHER_IDENTITY LIKE '%${voucherIdentity}%'
      </if>
      <if test="voucherItem != null and voucherItem != ''">
        and VOUCHER_ITEM LIKE '%${voucherItem}%'
      </if>
      <if test="businessGroup != null and businessGroup != ''">
        and BUSINESS_GROUP LIKE '%${businessGroup}%'
      </if>
      <if test="tempConveyance != null and tempConveyance != ''">
        and TEMP_CONVEYANCE LIKE '%${tempConveyance}%'
      </if>
      <if test="conveyanceType != null and conveyanceType != ''">
        and CONVEYANCE_TYPE LIKE '%${conveyanceType}%'
      </if>
      <if test="resourceSystem != null and resourceSystem != ''">
        and RESOURCE_SYSTEM LIKE '%${resourceSystem}%'
      </if>
      <if test="groupPackageAmount != null">
        and GROUP_PACKAGE_AMOUNT = #{groupPackageAmount}
      </if>
      <if test="groupPackageUnit != null and groupPackageUnit != ''">
        and GROUP_PACKAGE_UNIT LIKE '%${groupPackageUnit}%'
      </if>
      <if test="packageAmount != null">
        and PACKAGE_AMOUNT = #{packageAmount}
      </if>
      <if test="packageUnit != null and packageUnit != ''">
        and PACKAGE_UNIT LIKE '%${packageUnit}%'
      </if>
      <if test="theoryAmount != null">
        and THEORY_AMOUNT = #{theoryAmount}
      </if>
      <if test="measureBatch != null and measureBatch != ''">
        and MEASURE_BATCH LIKE '%${measureBatch}%'
      </if>
      <if test="measureBatchCount != null">
        and MEASURE_BATCH_COUNT = #{measureBatchCount}
      </if>
      <if test="senderType != null and senderType != ''">
        and SENDER_TYPE LIKE '%${senderType}%'
      </if>
      <if test="senderRemark != null and senderRemark != ''">
        and SENDER_REMARK LIKE '%${senderRemark}%'
      </if>
      <if test="receiverType != null and receiverType != ''">
        and RECEIVER_TYPE LIKE '%${receiverType}%'
      </if>
      <if test="receiverRemark != null and receiverRemark != ''">
        and RECEIVER_REMARK LIKE '%${receiverRemark}%'
      </if>
      <if test="trustDepartmentName != null and trustDepartmentName != ''">
        and TRUST_DEPARTMENT_NAME LIKE '%${trustDepartmentName}%'
      </if>
      <if test="trustDepartment != null and trustDepartment != ''">
        and TRUST_DEPARTMENT LIKE '%${trustDepartment}%'
      </if>
      <if test="trustor != null and trustor != ''">
        and TRUSTOR LIKE '%${trustor}%'
      </if>
      <if test="trustDateTime != null">
        and TO_CHAR(TRUST_DATE_TIME,'yyyy-MM-dd') = #{trustDateTime}
      </if>
      <if test="trustAvailabilityTime != null">
        and TO_CHAR(TRUST_AVAILABILITY_TIME,'yyyy-MM-dd') = #{trustAvailabilityTime}
      </if>
      <if test="trustIp != null and trustIp != ''">
        and TRUST_IP LIKE '%${trustIp}%'
      </if>
      <if test="stationType != null and stationType != ''">
        and STATION_TYPE LIKE '%${stationType}%'
      </if>
      <if test="measureStation != null and measureStation != ''">
        and MEASURE_STATION LIKE '%${measureStation}%'
      </if>
      <if test="measureStationName != null and measureStationName != ''">
        and MEASURE_STATION_NAME LIKE '%${measureStationName}%'
      </if>
      <if test="amountUnit != null and amountUnit != ''">
        and AMOUNT_UNIT LIKE '%${amountUnit}%'
      </if>
      <if test="trustDay != null">
        and TRUST_DAY = #{trustDay}
      </if>
      <if test="conveyanceGroup != null and conveyanceGroup != ''">
        and CONVEYANCE_GROUP LIKE '%${conveyanceGroup}%'
      </if>
      <if test="uploadFlag != null and uploadFlag != ''">
        and UPLOAD_FLAG LIKE '%${uploadFlag}%'
      </if>
    </where>
  </sql>
  <sql id="whereLikeWeb">
    <where>
      1 = 1
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO LIKE '%${railwayNo}%'
      </if>
    </where>
  </sql>
  <sql id="TSDGwhereLike">
    <where>
      1 = 1
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO LIKE '%${railwayNo}'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from PRE_RAILWAY_SCALE
    where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from PRE_RAILWAY_SCALE
    where 1!=1 
      <if test="noticeNo != null and noticeNo != ''">
        or NOTICE_NO = #{noticeNo}
      </if>
      <if test="railwayNo != null and railwayNo != ''">
        or RAILWAY_NO = #{railwayNo}
      </if>
      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
        or RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
      </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="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="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="railwayTypeNo != null and railwayTypeNo != ''">
        or RAILWAY_TYPE_NO = #{railwayTypeNo}
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        or RAILWAY_TYPE_NAME = #{railwayTypeName}
      </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="isChemical != null and isChemical != ''">
        or IS_CHEMICAL = #{isChemical}
      </if>
      <if test="limitWeight != null">
        or LIMIT_WEIGHT = #{limitWeight}
      </if>
      <if test="railwayModelNo != null and railwayModelNo != ''">
        or RAILWAY_MODEL_NO = #{railwayModelNo}
      </if>
      <if test="railwayModelName != null and railwayModelName != ''">
        or RAILWAY_MODEL_NAME = #{railwayModelName}
      </if>
      <if test="arrival != null and arrival != ''">
        or ARRIVAL = #{arrival}
      </if>
      <if test="station != null and station != ''">
        or STATION = #{station}
      </if>
      <if test="voucherIdentity != null and voucherIdentity != ''">
        or VOUCHER_IDENTITY = #{voucherIdentity}
      </if>
      <if test="voucherItem != null and voucherItem != ''">
        or VOUCHER_ITEM = #{voucherItem}
      </if>
      <if test="businessGroup != null and businessGroup != ''">
        or BUSINESS_GROUP = #{businessGroup}
      </if>
      <if test="tempConveyance != null and tempConveyance != ''">
        or TEMP_CONVEYANCE = #{tempConveyance}
      </if>
      <if test="conveyanceType != null and conveyanceType != ''">
        or CONVEYANCE_TYPE = #{conveyanceType}
      </if>
      <if test="resourceSystem != null and resourceSystem != ''">
        or RESOURCE_SYSTEM = #{resourceSystem}
      </if>
      <if test="groupPackageAmount != null">
        or GROUP_PACKAGE_AMOUNT = #{groupPackageAmount}
      </if>
      <if test="groupPackageUnit != null and groupPackageUnit != ''">
        or GROUP_PACKAGE_UNIT = #{groupPackageUnit}
      </if>
      <if test="packageAmount != null">
        or PACKAGE_AMOUNT = #{packageAmount}
      </if>
      <if test="packageUnit != null and packageUnit != ''">
        or PACKAGE_UNIT = #{packageUnit}
      </if>
      <if test="theoryAmount != null">
        or THEORY_AMOUNT = #{theoryAmount}
      </if>
      <if test="measureBatch != null and measureBatch != ''">
        or MEASURE_BATCH = #{measureBatch}
      </if>
      <if test="measureBatchCount != null">
        or MEASURE_BATCH_COUNT = #{measureBatchCount}
      </if>
      <if test="senderType != null and senderType != ''">
        or SENDER_TYPE = #{senderType}
      </if>
      <if test="senderRemark != null and senderRemark != ''">
        or SENDER_REMARK = #{senderRemark}
      </if>
      <if test="receiverType != null and receiverType != ''">
        or RECEIVER_TYPE = #{receiverType}
      </if>
      <if test="receiverRemark != null and receiverRemark != ''">
        or RECEIVER_REMARK = #{receiverRemark}
      </if>
      <if test="trustDepartmentName != null and trustDepartmentName != ''">
        or TRUST_DEPARTMENT_NAME = #{trustDepartmentName}
      </if>
      <if test="trustDepartment != null and trustDepartment != ''">
        or TRUST_DEPARTMENT = #{trustDepartment}
      </if>
      <if test="trustor != null and trustor != ''">
        or TRUSTOR = #{trustor}
      </if>
      <if test="trustDateTime != null">
        or TO_CHAR(TRUST_DATE_TIME,'yyyy-MM-dd') = '#{trustDateTime}'
      </if>
      <if test="trustAvailabilityTime != null">
        or TO_CHAR(TRUST_AVAILABILITY_TIME,'yyyy-MM-dd') = '#{trustAvailabilityTime}'
      </if>
      <if test="trustIp != null and trustIp != ''">
        or TRUST_IP = #{trustIp}
      </if>
      <if test="stationType != null and stationType != ''">
        or STATION_TYPE = #{stationType}
      </if>
      <if test="measureStation != null and measureStation != ''">
        or MEASURE_STATION = #{measureStation}
      </if>
      <if test="measureStationName != null and measureStationName != ''">
        or MEASURE_STATION_NAME = #{measureStationName}
      </if>
      <if test="amountUnit != null and amountUnit != ''">
        or AMOUNT_UNIT = #{amountUnit}
      </if>
      <if test="trustDay != null">
        or TRUST_DAY = #{trustDay}
      </if>
      <if test="conveyanceGroup != null and conveyanceGroup != ''">
        or CONVEYANCE_GROUP = #{conveyanceGroup}
      </if>
      <if test="uploadFlag != null and uploadFlag != ''">
        or UPLOAD_FLAG = #{uploadFlag}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale">
    insert into PRE_RAILWAY_SCALE (PREDICTION_NO, NOTICE_NO, RAILWAY_NO, 
      RAILWAY_CARRIAGE_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, 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, EFFECTIVE_START_TIME, 
      EFFECTIVE_END_TIME, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
      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, IS_CHEMICAL, LIMIT_WEIGHT, 
      RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, ARRIVAL, 
      STATION, VOUCHER_IDENTITY, VOUCHER_ITEM, 
      BUSINESS_GROUP, TEMP_CONVEYANCE, CONVEYANCE_TYPE, 
      RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, 
      PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT, 
      MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, 
      SENDER_REMARK, RECEIVER_TYPE, RECEIVER_REMARK, 
      TRUST_DEPARTMENT_NAME, TRUST_DEPARTMENT, TRUSTOR, 
      TRUST_DATE_TIME, TRUST_AVAILABILITY_TIME, 
      TRUST_IP, STATION_TYPE, MEASURE_STATION, 
      MEASURE_STATION_NAME, AMOUNT_UNIT, TRUST_DAY, 
      CONVEYANCE_GROUP, UPLOAD_FLAG)
    values (#{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, #{railwayNo,jdbcType=VARCHAR}, 
      #{railwayCarriageNo,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}, #{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}, #{effectiveStartTime,jdbcType=TIMESTAMP}, 
      #{effectiveEndTime,jdbcType=TIMESTAMP}, #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,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}, #{isChemical,jdbcType=VARCHAR}, #{limitWeight,jdbcType=DECIMAL}, 
      #{railwayModelNo,jdbcType=VARCHAR}, #{railwayModelName,jdbcType=VARCHAR}, #{arrival,jdbcType=VARCHAR}, 
      #{station,jdbcType=VARCHAR}, #{voucherIdentity,jdbcType=VARCHAR}, #{voucherItem,jdbcType=VARCHAR}, 
      #{businessGroup,jdbcType=VARCHAR}, #{tempConveyance,jdbcType=VARCHAR}, #{conveyanceType,jdbcType=VARCHAR}, 
      #{resourceSystem,jdbcType=VARCHAR}, #{groupPackageAmount,jdbcType=DECIMAL}, #{groupPackageUnit,jdbcType=VARCHAR}, 
      #{packageAmount,jdbcType=DECIMAL}, #{packageUnit,jdbcType=VARCHAR}, #{theoryAmount,jdbcType=DECIMAL}, 
      #{measureBatch,jdbcType=VARCHAR}, #{measureBatchCount,jdbcType=DECIMAL}, #{senderType,jdbcType=VARCHAR}, 
      #{senderRemark,jdbcType=VARCHAR}, #{receiverType,jdbcType=VARCHAR}, #{receiverRemark,jdbcType=VARCHAR}, 
      #{trustDepartmentName,jdbcType=VARCHAR}, #{trustDepartment,jdbcType=VARCHAR}, #{trustor,jdbcType=VARCHAR}, 
      #{trustDateTime,jdbcType=TIMESTAMP}, #{trustAvailabilityTime,jdbcType=TIMESTAMP}, 
      #{trustIp,jdbcType=VARCHAR}, #{stationType,jdbcType=VARCHAR}, #{measureStation,jdbcType=VARCHAR}, 
      #{measureStationName,jdbcType=VARCHAR}, #{amountUnit,jdbcType=VARCHAR}, #{trustDay,jdbcType=DECIMAL}, 
      #{conveyanceGroup,jdbcType=VARCHAR}, #{uploadFlag,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale">
    insert into PRE_RAILWAY_SCALE
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="predictionNo != null">
        PREDICTION_NO,
      </if>
      <if test="noticeNo != null">
        NOTICE_NO,
      </if>
      <if test="railwayNo != null">
        RAILWAY_NO,
      </if>
      <if test="railwayCarriageNo != null">
        RAILWAY_CARRIAGE_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="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="effectiveStartTime != null">
        EFFECTIVE_START_TIME,
      </if>
      <if test="effectiveEndTime != null">
        EFFECTIVE_END_TIME,
      </if>
      <if test="railwayTypeNo != null">
        RAILWAY_TYPE_NO,
      </if>
      <if test="railwayTypeName != null">
        RAILWAY_TYPE_NAME,
      </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="isChemical != null">
        IS_CHEMICAL,
      </if>
      <if test="limitWeight != null">
        LIMIT_WEIGHT,
      </if>
      <if test="railwayModelNo != null">
        RAILWAY_MODEL_NO,
      </if>
      <if test="railwayModelName != null">
        RAILWAY_MODEL_NAME,
      </if>
      <if test="arrival != null">
        ARRIVAL,
      </if>
      <if test="station != null">
        STATION,
      </if>
      <if test="voucherIdentity != null">
        VOUCHER_IDENTITY,
      </if>
      <if test="voucherItem != null">
        VOUCHER_ITEM,
      </if>
      <if test="businessGroup != null">
        BUSINESS_GROUP,
      </if>
      <if test="tempConveyance != null">
        TEMP_CONVEYANCE,
      </if>
      <if test="conveyanceType != null">
        CONVEYANCE_TYPE,
      </if>
      <if test="resourceSystem != null">
        RESOURCE_SYSTEM,
      </if>
      <if test="groupPackageAmount != null">
        GROUP_PACKAGE_AMOUNT,
      </if>
      <if test="groupPackageUnit != null">
        GROUP_PACKAGE_UNIT,
      </if>
      <if test="packageAmount != null">
        PACKAGE_AMOUNT,
      </if>
      <if test="packageUnit != null">
        PACKAGE_UNIT,
      </if>
      <if test="theoryAmount != null">
        THEORY_AMOUNT,
      </if>
      <if test="measureBatch != null">
        MEASURE_BATCH,
      </if>
      <if test="measureBatchCount != null">
        MEASURE_BATCH_COUNT,
      </if>
      <if test="senderType != null">
        SENDER_TYPE,
      </if>
      <if test="senderRemark != null">
        SENDER_REMARK,
      </if>
      <if test="receiverType != null">
        RECEIVER_TYPE,
      </if>
      <if test="receiverRemark != null">
        RECEIVER_REMARK,
      </if>
      <if test="trustDepartmentName != null">
        TRUST_DEPARTMENT_NAME,
      </if>
      <if test="trustDepartment != null">
        TRUST_DEPARTMENT,
      </if>
      <if test="trustor != null">
        TRUSTOR,
      </if>
      <if test="trustDateTime != null">
        TRUST_DATE_TIME,
      </if>
      <if test="trustAvailabilityTime != null">
        TRUST_AVAILABILITY_TIME,
      </if>
      <if test="trustIp != null">
        TRUST_IP,
      </if>
      <if test="stationType != null">
        STATION_TYPE,
      </if>
      <if test="measureStation != null">
        MEASURE_STATION,
      </if>
      <if test="measureStationName != null">
        MEASURE_STATION_NAME,
      </if>
      <if test="amountUnit != null">
        AMOUNT_UNIT,
      </if>
      <if test="trustDay != null">
        TRUST_DAY,
      </if>
      <if test="conveyanceGroup != null">
        CONVEYANCE_GROUP,
      </if>
      <if test="uploadFlag != null">
        UPLOAD_FLAG,
      </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="railwayNo != null">
        #{railwayNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayCarriageNo != null">
        #{railwayCarriageNo,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="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="effectiveStartTime != null">
        #{effectiveStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="effectiveEndTime != null">
        #{effectiveEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="railwayTypeNo != null">
        #{railwayTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeName != null">
        #{railwayTypeName,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="isChemical != null">
        #{isChemical,jdbcType=VARCHAR},
      </if>
      <if test="limitWeight != null">
        #{limitWeight,jdbcType=DECIMAL},
      </if>
      <if test="railwayModelNo != null">
        #{railwayModelNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayModelName != null">
        #{railwayModelName,jdbcType=VARCHAR},
      </if>
      <if test="arrival != null">
        #{arrival,jdbcType=VARCHAR},
      </if>
      <if test="station != null">
        #{station,jdbcType=VARCHAR},
      </if>
      <if test="voucherIdentity != null">
        #{voucherIdentity,jdbcType=VARCHAR},
      </if>
      <if test="voucherItem != null">
        #{voucherItem,jdbcType=VARCHAR},
      </if>
      <if test="businessGroup != null">
        #{businessGroup,jdbcType=VARCHAR},
      </if>
      <if test="tempConveyance != null">
        #{tempConveyance,jdbcType=VARCHAR},
      </if>
      <if test="conveyanceType != null">
        #{conveyanceType,jdbcType=VARCHAR},
      </if>
      <if test="resourceSystem != null">
        #{resourceSystem,jdbcType=VARCHAR},
      </if>
      <if test="groupPackageAmount != null">
        #{groupPackageAmount,jdbcType=DECIMAL},
      </if>
      <if test="groupPackageUnit != null">
        #{groupPackageUnit,jdbcType=VARCHAR},
      </if>
      <if test="packageAmount != null">
        #{packageAmount,jdbcType=DECIMAL},
      </if>
      <if test="packageUnit != null">
        #{packageUnit,jdbcType=VARCHAR},
      </if>
      <if test="theoryAmount != null">
        #{theoryAmount,jdbcType=DECIMAL},
      </if>
      <if test="measureBatch != null">
        #{measureBatch,jdbcType=VARCHAR},
      </if>
      <if test="measureBatchCount != null">
        #{measureBatchCount,jdbcType=DECIMAL},
      </if>
      <if test="senderType != null">
        #{senderType,jdbcType=VARCHAR},
      </if>
      <if test="senderRemark != null">
        #{senderRemark,jdbcType=VARCHAR},
      </if>
      <if test="receiverType != null">
        #{receiverType,jdbcType=VARCHAR},
      </if>
      <if test="receiverRemark != null">
        #{receiverRemark,jdbcType=VARCHAR},
      </if>
      <if test="trustDepartmentName != null">
        #{trustDepartmentName,jdbcType=VARCHAR},
      </if>
      <if test="trustDepartment != null">
        #{trustDepartment,jdbcType=VARCHAR},
      </if>
      <if test="trustor != null">
        #{trustor,jdbcType=VARCHAR},
      </if>
      <if test="trustDateTime != null">
        #{trustDateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trustAvailabilityTime != null">
        #{trustAvailabilityTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trustIp != null">
        #{trustIp,jdbcType=VARCHAR},
      </if>
      <if test="stationType != null">
        #{stationType,jdbcType=VARCHAR},
      </if>
      <if test="measureStation != null">
        #{measureStation,jdbcType=VARCHAR},
      </if>
      <if test="measureStationName != null">
        #{measureStationName,jdbcType=VARCHAR},
      </if>
      <if test="amountUnit != null">
        #{amountUnit,jdbcType=VARCHAR},
      </if>
      <if test="trustDay != null">
        #{trustDay,jdbcType=DECIMAL},
      </if>
      <if test="conveyanceGroup != null">
        #{conveyanceGroup,jdbcType=VARCHAR},
      </if>
      <if test="uploadFlag != null">
        #{uploadFlag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale">
    update PRE_RAILWAY_SCALE
    set NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
      RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
      RAILWAY_CARRIAGE_NO = #{railwayCarriageNo,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},
      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},
      EFFECTIVE_START_TIME = #{effectiveStartTime,jdbcType=TIMESTAMP},
      EFFECTIVE_END_TIME = #{effectiveEndTime,jdbcType=TIMESTAMP},
      RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
      RAILWAY_TYPE_NAME = #{railwayTypeName,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},
      IS_CHEMICAL = #{isChemical,jdbcType=VARCHAR},
      LIMIT_WEIGHT = #{limitWeight,jdbcType=DECIMAL},
      RAILWAY_MODEL_NO = #{railwayModelNo,jdbcType=VARCHAR},
      RAILWAY_MODEL_NAME = #{railwayModelName,jdbcType=VARCHAR},
      ARRIVAL = #{arrival,jdbcType=VARCHAR},
      STATION = #{station,jdbcType=VARCHAR},
      VOUCHER_IDENTITY = #{voucherIdentity,jdbcType=VARCHAR},
      VOUCHER_ITEM = #{voucherItem,jdbcType=VARCHAR},
      BUSINESS_GROUP = #{businessGroup,jdbcType=VARCHAR},
      TEMP_CONVEYANCE = #{tempConveyance,jdbcType=VARCHAR},
      CONVEYANCE_TYPE = #{conveyanceType,jdbcType=VARCHAR},
      RESOURCE_SYSTEM = #{resourceSystem,jdbcType=VARCHAR},
      GROUP_PACKAGE_AMOUNT = #{groupPackageAmount,jdbcType=DECIMAL},
      GROUP_PACKAGE_UNIT = #{groupPackageUnit,jdbcType=VARCHAR},
      PACKAGE_AMOUNT = #{packageAmount,jdbcType=DECIMAL},
      PACKAGE_UNIT = #{packageUnit,jdbcType=VARCHAR},
      THEORY_AMOUNT = #{theoryAmount,jdbcType=DECIMAL},
      MEASURE_BATCH = #{measureBatch,jdbcType=VARCHAR},
      MEASURE_BATCH_COUNT = #{measureBatchCount,jdbcType=DECIMAL},
      SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
      SENDER_REMARK = #{senderRemark,jdbcType=VARCHAR},
      RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
      RECEIVER_REMARK = #{receiverRemark,jdbcType=VARCHAR},
      TRUST_DEPARTMENT_NAME = #{trustDepartmentName,jdbcType=VARCHAR},
      TRUST_DEPARTMENT = #{trustDepartment,jdbcType=VARCHAR},
      TRUSTOR = #{trustor,jdbcType=VARCHAR},
      TRUST_DATE_TIME = #{trustDateTime,jdbcType=TIMESTAMP},
      TRUST_AVAILABILITY_TIME = #{trustAvailabilityTime,jdbcType=TIMESTAMP},
      TRUST_IP = #{trustIp,jdbcType=VARCHAR},
      STATION_TYPE = #{stationType,jdbcType=VARCHAR},
      MEASURE_STATION = #{measureStation,jdbcType=VARCHAR},
      MEASURE_STATION_NAME = #{measureStationName,jdbcType=VARCHAR},
      AMOUNT_UNIT = #{amountUnit,jdbcType=VARCHAR},
      TRUST_DAY = #{trustDay,jdbcType=DECIMAL},
      CONVEYANCE_GROUP = #{conveyanceGroup,jdbcType=VARCHAR},
      UPLOAD_FLAG = #{uploadFlag,jdbcType=VARCHAR}
    where PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale">
    update PRE_RAILWAY_SCALE
    <set>
      <if test="noticeNo != null">
        NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayNo != null">
        RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayCarriageNo != null">
        RAILWAY_CARRIAGE_NO = #{railwayCarriageNo,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="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="effectiveStartTime != null">
        EFFECTIVE_START_TIME = #{effectiveStartTime,jdbcType=TIMESTAMP},
      </if>
      <if test="effectiveEndTime != null">
        EFFECTIVE_END_TIME = #{effectiveEndTime,jdbcType=TIMESTAMP},
      </if>
      <if test="railwayTypeNo != null">
        RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeName != null">
        RAILWAY_TYPE_NAME = #{railwayTypeName,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="isChemical != null">
        IS_CHEMICAL = #{isChemical,jdbcType=VARCHAR},
      </if>
      <if test="limitWeight != null">
        LIMIT_WEIGHT = #{limitWeight,jdbcType=DECIMAL},
      </if>
      <if test="railwayModelNo != null">
        RAILWAY_MODEL_NO = #{railwayModelNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayModelName != null">
        RAILWAY_MODEL_NAME = #{railwayModelName,jdbcType=VARCHAR},
      </if>
      <if test="arrival != null">
        ARRIVAL = #{arrival,jdbcType=VARCHAR},
      </if>
      <if test="station != null">
        STATION = #{station,jdbcType=VARCHAR},
      </if>
      <if test="voucherIdentity != null">
        VOUCHER_IDENTITY = #{voucherIdentity,jdbcType=VARCHAR},
      </if>
      <if test="voucherItem != null">
        VOUCHER_ITEM = #{voucherItem,jdbcType=VARCHAR},
      </if>
      <if test="businessGroup != null">
        BUSINESS_GROUP = #{businessGroup,jdbcType=VARCHAR},
      </if>
      <if test="tempConveyance != null">
        TEMP_CONVEYANCE = #{tempConveyance,jdbcType=VARCHAR},
      </if>
      <if test="conveyanceType != null">
        CONVEYANCE_TYPE = #{conveyanceType,jdbcType=VARCHAR},
      </if>
      <if test="resourceSystem != null">
        RESOURCE_SYSTEM = #{resourceSystem,jdbcType=VARCHAR},
      </if>
      <if test="groupPackageAmount != null">
        GROUP_PACKAGE_AMOUNT = #{groupPackageAmount,jdbcType=DECIMAL},
      </if>
      <if test="groupPackageUnit != null">
        GROUP_PACKAGE_UNIT = #{groupPackageUnit,jdbcType=VARCHAR},
      </if>
      <if test="packageAmount != null">
        PACKAGE_AMOUNT = #{packageAmount,jdbcType=DECIMAL},
      </if>
      <if test="packageUnit != null">
        PACKAGE_UNIT = #{packageUnit,jdbcType=VARCHAR},
      </if>
      <if test="theoryAmount != null">
        THEORY_AMOUNT = #{theoryAmount,jdbcType=DECIMAL},
      </if>
      <if test="measureBatch != null">
        MEASURE_BATCH = #{measureBatch,jdbcType=VARCHAR},
      </if>
      <if test="measureBatchCount != null">
        MEASURE_BATCH_COUNT = #{measureBatchCount,jdbcType=DECIMAL},
      </if>
      <if test="senderType != null">
        SENDER_TYPE = #{senderType,jdbcType=VARCHAR},
      </if>
      <if test="senderRemark != null">
        SENDER_REMARK = #{senderRemark,jdbcType=VARCHAR},
      </if>
      <if test="receiverType != null">
        RECEIVER_TYPE = #{receiverType,jdbcType=VARCHAR},
      </if>
      <if test="receiverRemark != null">
        RECEIVER_REMARK = #{receiverRemark,jdbcType=VARCHAR},
      </if>
      <if test="trustDepartmentName != null">
        TRUST_DEPARTMENT_NAME = #{trustDepartmentName,jdbcType=VARCHAR},
      </if>
      <if test="trustDepartment != null">
        TRUST_DEPARTMENT = #{trustDepartment,jdbcType=VARCHAR},
      </if>
      <if test="trustor != null">
        TRUSTOR = #{trustor,jdbcType=VARCHAR},
      </if>
      <if test="trustDateTime != null">
        TRUST_DATE_TIME = #{trustDateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trustAvailabilityTime != null">
        TRUST_AVAILABILITY_TIME = #{trustAvailabilityTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trustIp != null">
        TRUST_IP = #{trustIp,jdbcType=VARCHAR},
      </if>
      <if test="stationType != null">
        STATION_TYPE = #{stationType,jdbcType=VARCHAR},
      </if>
      <if test="measureStation != null">
        MEASURE_STATION = #{measureStation,jdbcType=VARCHAR},
      </if>
      <if test="measureStationName != null">
        MEASURE_STATION_NAME = #{measureStationName,jdbcType=VARCHAR},
      </if>
      <if test="amountUnit != null">
        AMOUNT_UNIT = #{amountUnit,jdbcType=VARCHAR},
      </if>
      <if test="trustDay != null">
        TRUST_DAY = #{trustDay,jdbcType=DECIMAL},
      </if>
      <if test="conveyanceGroup != null">
        CONVEYANCE_GROUP = #{conveyanceGroup,jdbcType=VARCHAR},
      </if>
      <if test="uploadFlag != null">
        UPLOAD_FLAG = #{uploadFlag,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"/>
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLike"/>
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into PRE_RAILWAY_SCALE 
      (PREDICTION_NO, 
      NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_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, 
      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, EFFECTIVE_START_TIME, 
      EFFECTIVE_END_TIME, RAILWAY_TYPE_NO, 
      RAILWAY_TYPE_NAME, 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, IS_CHEMICAL, 
      LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
      RAILWAY_MODEL_NAME, ARRIVAL, STATION, 
      VOUCHER_IDENTITY, VOUCHER_ITEM, 
      BUSINESS_GROUP, TEMP_CONVEYANCE, 
      CONVEYANCE_TYPE, RESOURCE_SYSTEM, 
      GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, 
      PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT, 
      MEASURE_BATCH, MEASURE_BATCH_COUNT, 
      SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, 
      RECEIVER_REMARK, TRUST_DEPARTMENT_NAME, 
      TRUST_DEPARTMENT, TRUSTOR, TRUST_DATE_TIME, 
      TRUST_AVAILABILITY_TIME, TRUST_IP, 
      STATION_TYPE, MEASURE_STATION, 
      MEASURE_STATION_NAME, AMOUNT_UNIT, 
      TRUST_DAY, CONVEYANCE_GROUP, UPLOAD_FLAG
      )
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.predictionNo,jdbcType=VARCHAR}, 
      #{item.noticeNo,jdbcType=VARCHAR}, #{item.railwayNo,jdbcType=VARCHAR}, #{item.railwayCarriageNo,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.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.effectiveStartTime,jdbcType=TIMESTAMP}, 
      #{item.effectiveEndTime,jdbcType=TIMESTAMP}, #{item.railwayTypeNo,jdbcType=VARCHAR}, 
      #{item.railwayTypeName,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.isChemical,jdbcType=VARCHAR}, 
      #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR}, 
      #{item.railwayModelName,jdbcType=VARCHAR}, #{item.arrival,jdbcType=VARCHAR}, #{item.station,jdbcType=VARCHAR}, 
      #{item.voucherIdentity,jdbcType=VARCHAR}, #{item.voucherItem,jdbcType=VARCHAR}, 
      #{item.businessGroup,jdbcType=VARCHAR}, #{item.tempConveyance,jdbcType=VARCHAR}, 
      #{item.conveyanceType,jdbcType=VARCHAR}, #{item.resourceSystem,jdbcType=VARCHAR}, 
      #{item.groupPackageAmount,jdbcType=DECIMAL}, #{item.groupPackageUnit,jdbcType=VARCHAR}, 
      #{item.packageAmount,jdbcType=DECIMAL}, #{item.packageUnit,jdbcType=VARCHAR}, #{item.theoryAmount,jdbcType=DECIMAL}, 
      #{item.measureBatch,jdbcType=VARCHAR}, #{item.measureBatchCount,jdbcType=DECIMAL}, 
      #{item.senderType,jdbcType=VARCHAR}, #{item.senderRemark,jdbcType=VARCHAR}, #{item.receiverType,jdbcType=VARCHAR}, 
      #{item.receiverRemark,jdbcType=VARCHAR}, #{item.trustDepartmentName,jdbcType=VARCHAR}, 
      #{item.trustDepartment,jdbcType=VARCHAR}, #{item.trustor,jdbcType=VARCHAR}, #{item.trustDateTime,jdbcType=TIMESTAMP}, 
      #{item.trustAvailabilityTime,jdbcType=TIMESTAMP}, #{item.trustIp,jdbcType=VARCHAR}, 
      #{item.stationType,jdbcType=VARCHAR}, #{item.measureStation,jdbcType=VARCHAR}, 
      #{item.measureStationName,jdbcType=VARCHAR}, #{item.amountUnit,jdbcType=VARCHAR}, 
      #{item.trustDay,jdbcType=DECIMAL}, #{item.conveyanceGroup,jdbcType=VARCHAR}, #{item.uploadFlag,jdbcType=VARCHAR}
       from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update PRE_RAILWAY_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>
       ,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>
       ,RAILWAY_CARRIAGE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayCarriageNo,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>
       ,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>
       ,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>
       ,RAILWAY_TYPE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_TYPE_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayTypeName,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>
       ,IS_CHEMICAL=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.isChemical,jdbcType=VARCHAR}
       </foreach>
       ,LIMIT_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.limitWeight,jdbcType=DECIMAL}
       </foreach>
       ,RAILWAY_MODEL_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayModelNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_MODEL_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayModelName,jdbcType=VARCHAR}
       </foreach>
       ,ARRIVAL=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.arrival,jdbcType=VARCHAR}
       </foreach>
       ,STATION=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.station,jdbcType=VARCHAR}
       </foreach>
       ,VOUCHER_IDENTITY=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.voucherIdentity,jdbcType=VARCHAR}
       </foreach>
       ,VOUCHER_ITEM=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.voucherItem,jdbcType=VARCHAR}
       </foreach>
       ,BUSINESS_GROUP=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.businessGroup,jdbcType=VARCHAR}
       </foreach>
       ,TEMP_CONVEYANCE=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.tempConveyance,jdbcType=VARCHAR}
       </foreach>
       ,CONVEYANCE_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.conveyanceType,jdbcType=VARCHAR}
       </foreach>
       ,RESOURCE_SYSTEM=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.resourceSystem,jdbcType=VARCHAR}
       </foreach>
       ,GROUP_PACKAGE_AMOUNT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.groupPackageAmount,jdbcType=DECIMAL}
       </foreach>
       ,GROUP_PACKAGE_UNIT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.groupPackageUnit,jdbcType=VARCHAR}
       </foreach>
       ,PACKAGE_AMOUNT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.packageAmount,jdbcType=DECIMAL}
       </foreach>
       ,PACKAGE_UNIT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.packageUnit,jdbcType=VARCHAR}
       </foreach>
       ,THEORY_AMOUNT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.theoryAmount,jdbcType=DECIMAL}
       </foreach>
       ,MEASURE_BATCH=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.measureBatch,jdbcType=VARCHAR}
       </foreach>
       ,MEASURE_BATCH_COUNT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.measureBatchCount,jdbcType=DECIMAL}
       </foreach>
       ,SENDER_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
       </foreach>
       ,SENDER_REMARK=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.senderRemark,jdbcType=VARCHAR}
       </foreach>
       ,RECEIVER_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receiverType,jdbcType=VARCHAR}
       </foreach>
       ,RECEIVER_REMARK=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receiverRemark,jdbcType=VARCHAR}
       </foreach>
       ,TRUST_DEPARTMENT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustDepartmentName,jdbcType=VARCHAR}
       </foreach>
       ,TRUST_DEPARTMENT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustDepartment,jdbcType=VARCHAR}
       </foreach>
       ,TRUSTOR=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustor,jdbcType=VARCHAR}
       </foreach>
       ,TRUST_DATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustDateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,TRUST_AVAILABILITY_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustAvailabilityTime,jdbcType=TIMESTAMP}
       </foreach>
       ,TRUST_IP=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustIp,jdbcType=VARCHAR}
       </foreach>
       ,STATION_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.stationType,jdbcType=VARCHAR}
       </foreach>
       ,MEASURE_STATION=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.measureStation,jdbcType=VARCHAR}
       </foreach>
       ,MEASURE_STATION_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.measureStationName,jdbcType=VARCHAR}
       </foreach>
       ,AMOUNT_UNIT=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.amountUnit,jdbcType=VARCHAR}
       </foreach>
       ,TRUST_DAY=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.trustDay,jdbcType=DECIMAL}
       </foreach>
       ,CONVEYANCE_GROUP=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.conveyanceGroup,jdbcType=VARCHAR}
       </foreach>
       ,UPLOAD_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case PREDICTION_NO" close="end">
          when #{item.predictionNo,jdbcType=VARCHAR} then #{item.uploadFlag,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_RAILWAY_SCALE
    where PREDICTION_NO in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
    <!-- 友情提示！！！-->
    <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
    <select id="selectlist" parameterType="java.lang.String" resultMap="BaseResultMap">
        <include refid="select"/>
        where RAILWAY_NO=#{railwayNo,jdbcType=VARCHAR} and  value_flag in('1','4')
        order by create_time desc
    </select>
    <select id="selectView" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        SELECT
        <include refid="columns"/>
        FROM PRE_RAILWAY_SCALE_VIEW
        <include refid="where"/>
        order by CREATE_TIME desc
    </select>
    <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
   SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(PREDICTION_NO, LENGTH(PREDICTION_NO) - 3))),0) + 1,4,'0') PREDICTION_NO
   FROM PRE_RAILWAY_SCALE where instr(PREDICTION_NO,#{afl,jdbcType=VARCHAR})>0
  </select>

    <select id="selectBy" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <where>
            VALUE_FLAG in ('1','4') and ROUND(TO_NUMBER(CREATE_TIME - sysdate)) <![CDATA[ <= ]]> 7
            <if test="railwayNo != null and railwayNo != ''">
                and RAILWAY_NO = #{railwayNo}
            </if>
            <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
                and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
            </if>
        </where>
        order by CREATE_TIME
    </select>

    <select id="selectByPraAndTime" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <where>
            <if test="valueFlag != null and valueFlag != ''">
                and VALUE_FLAG = #{valueFlag}
            </if>
            <if test="valueFlag == null || valueFlag == ''">
                and VALUE_FLAG in ('1','4')
            </if>
            <if test="predictionNo != null and predictionNo != ''">
                and PREDICTION_NO = #{predictionNo}
            </if>
            <if test="noticeNo != null and noticeNo != ''">
                and NOTICE_NO = #{noticeNo}
            </if>
            <if test="railwayNo != null and railwayNo != ''">
                and RAILWAY_NO = #{railwayNo}
            </if>
            <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
                and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
            </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="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="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="railwayTypeNo != null and railwayTypeNo != ''">
                and RAILWAY_TYPE_NO = #{railwayTypeNo}
            </if>
            <if test="railwayTypeName != null and railwayTypeName != ''">
                and RAILWAY_TYPE_NAME = #{railwayTypeName}
            </if>
            <if test="memo != null and memo != ''">
                and MEMO = #{memo}
            </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="isChemical != null and isChemical != ''">
                and IS_CHEMICAL = #{isChemical}
            </if>
            <if test="limitWeight != null">
                and LIMIT_WEIGHT = #{limitWeight}
            </if>
            <if test="railwayModelNo != null and railwayModelNo != ''">
                and RAILWAY_MODEL_NO = #{railwayModelNo}
            </if>
            <if test="railwayModelName != null and railwayModelName != ''">
                and RAILWAY_MODEL_NAME = #{railwayModelName}
            </if>
            <if test="startTime != null">
                and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
            </if>
            <if test="endTime != null">
                and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
            </if>
        </where>
        order by CREATE_TIME desc
    </select>

    <select id="batchSelect" parameterType="java.util.List" resultMap="BaseResultMap">
        select * from PRE_RAILWAY_SCALE
        where PREDICTION_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </select>

    <update id="batchUpdateSelective" parameterType="java.util.List">
        update PRE_RAILWAY_SCALE
        set
        <trim prefix="PREDICTION_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionNo,jdbcType=VARCHAR}
            </foreach>
        </trim>
        <trim prefix=" ,NOTICE_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.noticeNo != null and item.noticeNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayNo != null and item.railwayNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_CARRIAGE_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayCarriageNo != null and item.railwayCarriageNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayCarriageNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",MATTER_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.matterNo != null and item.matterNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",MATTER_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.matterName != null and item.matterName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CONTRACT_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.contractNo != null and item.contractNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",BATCH_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.batchNo != null and item.batchNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=" ,CUSTOMER_SUPPLIER_NO = case PREDICTION_NO" suffix="end ">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.customerSupplierNo != null and item.customerSupplierNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CUSTOMER_SUPPLIER_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.customerSupplierName != null and item.customerSupplierName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SOURCE_AREA = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.sourceArea != null and item.sourceArea != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",FORWARDING_UNIT_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.forwardingUnitNo != null and item.forwardingUnitNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",FORWARDING_UNIT_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.forwardingUnitName != null and item.forwardingUnitName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RECEIVING_UINT_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.receivingUintNo != null and item.receivingUintNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RECEIVING_UINT_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.receivingUintName != null and item.receivingUintName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",MATERIAL_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.materialNo != null and item.materialNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",MATERIAL_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.materialName != null and item.materialName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SPEC_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.specNo != null and item.specNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SPEC_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.specName != null and item.specName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SHIPMENT_GROSS_WEIGHT = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.shipmentGrossWeight != null ">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentGrossWeight,jdbcType=DECIMAL}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SHIPMENT_NET_WEIGHT = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.shipmentNetWeight != null ">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentNetWeight,jdbcType=DECIMAL}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SHIPMENT_NUM = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.shipmentNum != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.shipmentNum,jdbcType=DECIMAL}
                </if>
            </foreach>
        </trim>
        <trim prefix=",LOAD_POINT_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.loadPointNo != null and item.loadPointNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",LOAD_POINT_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.loadPointName != null and item.loadPointName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SAMPLE_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.sampleNo != null and item.sampleNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sampleNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",SAMPLE_VOUCHER = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.sampleVoucher != null and item.sampleVoucher != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.sampleVoucher,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CARRIER_UNIT_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.carrierUnitNo != null and item.carrierUnitNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CARRIER_UNIT_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.carrierUnitName != null and item.carrierUnitName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",PREDICTION_TYPE = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.predictionType != null and item.predictionType != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",PREDICTION_COMBINATION = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                when #{item.predictionNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
            </foreach>
        </trim>
        <trim prefix=",METER_TYPE_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.meterTypeNo != null and item.meterTypeNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",METER_TYPE_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.meterTypeName != null and item.meterTypeName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",EFFECTIVE_START_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.effectiveStartTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveStartTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",EFFECTIVE_END_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.effectiveEndTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.effectiveEndTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_TYPE_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayTypeNo != null and item.railwayTypeNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_TYPE_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayTypeName != null and item.railwayTypeName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",MEMO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.memo != null and item.memo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",VALUE_FLAG = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.valueFlag != null and item.valueFlag != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",USED_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.usedTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.usedTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CREATE_MAN_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.createManNo != null and item.createManNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CREATE_MAN_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.createManName != null and item.createManName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",CREATE_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.createTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",UPDATE_MAN_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.updateManNo != null and item.updateManNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",UPDATE_MAN_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.updateManName != null and item.updateManName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",UPDATE_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.updateTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",DELETE_MAN_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.deleteManNo != null and item.deleteManNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",DELETE_MAN_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.deleteManName != null and item.deleteManName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",DELETE_TIME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.deleteTime != null">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
                </if>
            </foreach>
        </trim>
        <trim prefix=",P_VALUE_FLAG = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.pValueFlag != null and item.pValueFlag != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.pValueFlag,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",IS_CHEMICAL = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.isChemical != null and item.isChemical != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.isChemical,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",LIMIT_WEIGHT = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.limitWeight != null and item.limitWeight != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.limitWeight,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_MODEL_NO = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayModelNo != null and item.railwayModelNo != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayModelNo,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        <trim prefix=",RAILWAY_MODEL_NAME = case PREDICTION_NO" suffix="end">
            <foreach collection="list" item="item" index="index" separator=" ">
                <if test="item.railwayModelName != null and item.railwayModelName != ''">
                    when #{item.predictionNo,jdbcType=VARCHAR} then #{item.railwayModelName,jdbcType=VARCHAR}
                </if>
            </foreach>
        </trim>
        where PREDICTION_NO in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item.predictionNo,jdbcType=VARCHAR}
        </foreach>
    </update>

    <update id="batchUpdateByIdsForUsed" parameterType="java.util.List">
        update PRE_RAILWAY_SCALE
        set VALUE_FLAG = '2'
        where PREDICTION_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </update>

    <update id="batchUpdateByIdsForIn" parameterType="java.util.List">
        update PRE_RAILWAY_SCALE
        set VALUE_FLAG = '4'
        where PREDICTION_NO in
        <foreach collection="list" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </update>

    <select id="doQueryByCar" parameterType="java.util.HashMap" resultMap="BaseResultMap">
        <include refid="select"/>
        <where>
            (( VALUE_FLAG = '1' and TRUST_AVAILABILITY_TIME >= sysDate ))
            <if test="railwayNo != null">
                and RAILWAY_NO = #{railwayNo}
            </if>
            <if test="railwayTypeNo != null">
                and RAILWAY_TYPE_NO = #{railwayTypeNo}
            </if>
            <if test="railwayTypeName != null">
                and RAILWAY_TYPE_NAME = #{railwayTypeName}
            </if>
            <if test="memo != null">
                and memo = #{memo}
            </if>
            <if test="startTime != null and startTime!='' and endTime != null and endTime!=''">
                and create_time between to_date(#{startTime},'yyyy-MM-dd HH24:mi:ss') and to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
            </if>
        </where>
        order by trust_date_time desc
    </select>

    <!--用于查询最近一个车号的预报或者正使用与使用中的预报，并显示毛重皮重净重及时间-->
    <select id="doQueryJLByCar" parameterType="java.util.HashMap" resultMap="PreRailwayScaleDto">
        select t.railway_no, t.value_flag, t.memo,
        decode(t2.Weight_Type, '0', t2.meter_weight, t3.gross_weight) as gross_weight,
        decode(t2.Weight_Type, '0', t2.create_time, t3.gross_time) as gross_time,
        decode(t2.Weight_Type, '1', t2.meter_weight, t3.tare_weight) as tare_weight,
        decode(t2.Weight_Type, '1', t2.create_time, t3.tare_time) as tare_time, t3.net_time net_time,
        t3.net_weight net_weight, t.*
        from pre_railway_scale t
        left join meter_work_railway_act_first t2
        on t.prediction_no = t2.prediction_no and '1' = t2.value_flag
        left join meter_work_railway_actual t3
        on t.prediction_no = t3.prediction_no and '0' = t3.value_flag
        <where>
            t.value_flag in ('1','4')
            <if test="railwayNo != null">
                and t.RAILWAY_NO = #{railwayNo}
            </if>
            <if test="railwayTypeNo != null">
                and t.RAILWAY_TYPE_NO = #{railwayTypeNo}
            </if>
            <if test="railwayTypeName != null">
                and t.RAILWAY_TYPE_NAME = #{railwayTypeName}
            </if>
            <if test="memo != null">
                and t.memo = #{memo}
            </if>
            <if test="startTime != null and startTime!='' and endTime != null and endTime!=''">
                and t.create_time between to_date(#{startTime},'yyyy-MM-dd HH24:mi:ss') and to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
            </if>
        </where>
        order by t.CREATE_TIME desc
    </select>

    <select id="doQueryJLByCarUsed" parameterType="java.util.HashMap" resultMap="PreRailwayScaleDto">
        select t.railway_no, t.value_flag, t.memo,
        decode(t2.Weight_Type, '0', t2.meter_weight, t3.gross_weight) as gross_weight,
        decode(t2.Weight_Type, '0', t2.create_time, t3.gross_time) as gross_time,
        decode(t2.Weight_Type, '1', t2.meter_weight, t3.tare_weight) as tare_weight,
        decode(t2.Weight_Type, '1', t2.create_time, t3.tare_time) as tare_time, t3.net_time net_time,
        t3.net_weight net_weight, t.*
        from pre_railway_scale t
        left join meter_work_railway_act_first t2
        on t.prediction_no = t2.prediction_no and '1' = t2.value_flag
        left join meter_work_railway_actual t3
        on t.prediction_no = t3.prediction_no and '0' = t3.value_flag
        <where>
            t.value_flag  = '2' and t3.net_time > sysdate -1
            <if test="railwayNo != null">
                and t.RAILWAY_NO = #{railwayNo}
            </if>
            <if test="railwayTypeNo != null">
                and t.RAILWAY_TYPE_NO = #{railwayTypeNo}
            </if>
            <if test="railwayTypeName != null">
                and t.RAILWAY_TYPE_NAME = #{railwayTypeName}
            </if>
            <if test="memo != null">
                and t.memo = #{memo}
            </if>
        </where>
        order by t.CREATE_TIME desc
    </select>

    <resultMap id="PreRailwayScaleDto" type="com.steerinfo.pretrack.dto.PreRailwayScaleDto" extends="BaseResultMap">
        <result column="ENTR_ID" jdbcType="VARCHAR" property="entrId"/>
        <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
        <result column="NET_NUM" jdbcType="VARCHAR" property="netNum"/>
        <result column="NET_WGT" jdbcType="VARCHAR" property="netWgt"/>
        <result column="SEND_PLACE" jdbcType="VARCHAR" property="sendPlace"/>
        <result column="MAT_ORIGIN" jdbcType="VARCHAR" property="matOrigin"/>
        <result column="UNLOAD_PLACE" jdbcType="VARCHAR" property="unloadPlace"/>
        <result column="SHIPMENT_NET_WEIGHT" jdbcType="VARCHAR" property="shipmentNetWeight"/>
        <result column="SHIPMENT_NUM" jdbcType="VARCHAR" property="shipmentNum"/>
        <result column="SHIPMENT_GROSS_WEIGHT" jdbcType="VARCHAR" property="shipmentGrossWeight"/>
        <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName"/>
        <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea"/>
        <result column="gross_weight" jdbcType="DECIMAL" property="grossWeight"/>
        <result column="gross_time" jdbcType="TIMESTAMP" property="grossTime"/>
        <result column="tare_weight" jdbcType="DECIMAL" property="tareWeight"/>
        <result column="tare_time" jdbcType="TIMESTAMP" property="tareTime"/>
        <result column="net_weight" jdbcType="DECIMAL" property="netWeight"/>
        <result column="net_time" jdbcType="TIMESTAMP" property="netTime"/>
    </resultMap>
    <!--<select id="selectForInsertRailScale" parameterType="java.util.HashMap" resultMap="PreRailwayScaleDto">
    select t.NOTICE_NO NOTICE_NO,
           t2.car_no RAILWAY_NO,
           t.MATTER_NO MATTER_NO,
           t.MATTER_NAME MATTER_NAME,
           t.CONTRACT_NO CONTRACT_NO,
           t.BATCH_NO BATCH_NO,
           t.CUSTOMER_SUPPLIER_NO CUSTOMER_SUPPLIER_NO,
           t.CUSTOMER_SUPPLIER_NAME CUSTOMER_SUPPLIER_NAME,
           t.SOURCE_AREA SOURCE_AREA,
           t.FORWARDING_UNIT_NO FORWARDING_UNIT_NO,
           t.FORWARDING_UNIT_NAME FORWARDING_UNIT_NAME,
           t.RECEIVING_UINT_NO RECEIVING_UINT_NO,
           t.RECEIVING_UINT_NAME RECEIVING_UINT_NAME,
           t.MATERIAL_NO MATERIAL_NO,
           t.MATERIAL_NAME MATERIAL_NAME,
           t.SPEC_NO SPEC_NO,
           t.SPEC_NAME SPEC_NAME,
           t.LOAD_POINT_NO LOAD_POINT_NO,
           t.LOAD_POINT_NAME LOAD_POINT_NAME,
           t.CARRIER_UNIT_NO CARRIER_UNIT_NO,
           t.CARRIER_UNIT_NAME CARRIER_UNIT_NAME,
           t.METER_TYPE_NO METER_TYPE_NO,
           t.METER_TYPE_NAME METER_TYPE_NAME,
           t.CREATE_MAN_NO,
           t.CREATE_MAN_NAME,
           t2.entr_id ENTR_ID
      from  (select * from PRE_TRACK_NOTICE where ,
           (select a.* from JK_LIMS_TEST_ENTRUST a where a.read_flag = '0' and a.create_time > sysdate -2 and
          nvl2(translate(a.car_no, '\1234567890', '\'), 'characters', 'number') = 'number' and a.car_no is not null) t2
     where t.contract_no = t2.contract_no
       and t.BATCH_NO = t2.lots_no
    </select>-->

    <select id="selectForInsertRailScale" parameterType="java.util.HashMap" resultMap="PreRailwayScaleDto">
    select T2.MEMO MEMO, t2.car_no RAILWAY_NO, t2.entr_id ENTR_ID, T2.NET_NUM NET_NUM, T2.NET_WGT NET_WGT,
       T2.SEND_PLACE SEND_PLACE, T2.MAT_ORIGIN MAT_ORIGIN, T2.UNLOAD_PLACE UNLOAD_PLACE, T2.NET_NUM SHIPMENT_NUM,
       T2.NET_WGT SHIPMENT_NET_WEIGHT, T2.MAT_ORIGIN SOURCE_AREA, T2.UNLOAD_PLACE LOAD_POINT_NAME, t.NOTICE_NO NOTICE_NO,
       t.MATTER_NO MATTER_NO, t.MATTER_NAME MATTER_NAME, t.CONTRACT_NO CONTRACT_NO, t.BATCH_NO BATCH_NO,
       t.CUSTOMER_SUPPLIER_NO CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME CUSTOMER_SUPPLIER_NAME,
       t.FORWARDING_UNIT_NO FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME FORWARDING_UNIT_NAME,
       t.RECEIVING_UINT_NO RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME RECEIVING_UINT_NAME, t.MATERIAL_NO MATERIAL_NO,
       t.MATERIAL_NAME MATERIAL_NAME, t.SPEC_NO SPEC_NO, t.SPEC_NAME SPEC_NAME, t.LOAD_POINT_NO LOAD_POINT_NO,
       t.LOAD_POINT_NAME LOAD_POINT_NAME, t.CARRIER_UNIT_NO CARRIER_UNIT_NO, t.CARRIER_UNIT_NAME CARRIER_UNIT_NAME,
       t.METER_TYPE_NO METER_TYPE_NO, t.METER_TYPE_NAME METER_TYPE_NAME, t.CREATE_MAN_NO, t.CREATE_MAN_NAME
   from (SELECT *
            FROM (SELECT b.*, ROW_NUMBER() OVER(PARTITION BY b.Contract_No, b.batch_no ORDER BY b.Create_Time DESC) FLAG
                     FROM PRE_TRACK_NOTICE b) TMP
           WHERE TMP.FLAG = 1) t,
        (select a.*
            from JK_LIMS_TEST_ENTRUST a
           where a.read_flag = '0' and a.create_time > sysdate - 7 and length(nvl(a.entr_id,'')) >17 and
                 nvl2(translate(a.car_no, '\1234567890', '\'), 'characters', 'number') = 'number' and
                 a.car_no is not null) t2
  where t.contract_no = t2.contract_no and t.BATCH_NO = t2.lots_no
  </select>


    <!-- 程序优化说明：后续可以不考虑合同号的类型，只处理JK_LIMS_TEST_ENTRUST表中车号全为数字的车辆
      select t.car_no, t.transport_type_name, t.valid_flag, t.read_flag, t.create_time, t.update_no, t.update_man,
             t.update_time, t.*, t.rowid
        from JK_LIMS_TEST_ENTRUST t
       where t.create_time > sysdate - 2 and t.valid_flag = '1' and t.read_flag = '0' and
             nvl2(translate(t.car_no, '\1234567890', '\'), 'characters', 'number') = 'number' and t.car_no is not null
       order by t.create_time desc;
    -->
    <update id="updateMeterWorkRailwayReceived">
        update METER_WORK_RAILWAY_RECEIVED set value_flag='2' where ACTUAL_FIRST_NO=#{actualFirstNo}
    </update>
    <update id="updateMeterWorkRailwayReceiveds">
        update METER_WORK_RAILWAY_RECEIVED set value_flag='0', IS_AUTO_OPERATION = '1' where ACTUAL_FIRST_NO=#{actualFirstNo}
    </update>
    <update id="updateUnUseData"></update>

    <select id="selectBypredictionNo" parameterType="java.lang.String" resultMap="BaseResultMap">
        <include refid="select"/>
        <where>
            PREDICTION_NO = #{predictionNo}
        </where>
    </select>

  <select id="selectByScale" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where> 1 = 1
      <if test="railwayNo != null and railwayNo != ''">
        and railway_no = #{railwayNo}
      </if>

      <if test="predictionNo != null and predictionNo != ''">
        and (   PREDICTION_NO = #{predictionNo}
        or (value_flag = '1' and TRUST_AVAILABILITY_TIME &gt;= SYSDATE) )
      </if>
      <if test="predictionNo == null or predictionNo == ''">
        and value_flag = '1'
        and TRUST_AVAILABILITY_TIME &gt;= SYSDATE
      </if>
    </where>
    order By TRUST_DATE_TIME desc
  </select>

    <select id="selectByRailwayNo" parameterType="java.lang.String" resultMap="BaseResultMap">
      <include refid="select"/>
      <where>
        railway_no = #{railwayNo}
        and value_flag = '1'
      </where>
    </select>

    <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
      <include refid="select"/>
      <include refid="TSDGwhereLike"/>
      and matter_no in
      <foreach collection="list" item="id" open="(" close=")" separator=",">
        #{id}
      </foreach>
      and value_flag in ('0', '1')
      and TRUST_AVAILABILITY_TIME >= sysDate
      order by TRUST_DATE_TIME desc
    </select>

  <select id="likeDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLikeWeb" />
    and value_flag in ('0', '1')
    and TRUST_AVAILABILITY_TIME >= sysDate
    order by TRUST_DATE_TIME desc
  </select>

  <select id="likeByList" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where> 1 = 1
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO = #{railwayNo}
      </if>
      <if test="predictionNo != null and predictionNo != ''">
        and prediction_no = #{predictionNo}
      </if>
      <if test="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO = #{railwayTypeNo}
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME = #{railwayTypeName}
      </if>
      <if test="startTime != null and startTime!='' and endTime != null and endTime!=''">
        and TRUST_DATE_TIME between to_date(#{startTime},'yyyy-MM-dd HH24:mi:ss') and to_date(#{endTime},'yyyy-MM-dd HH24:mi:ss')
      </if>
    </where>
        and ( ( value_flag in ('0', '1') and TRUST_AVAILABILITY_TIME >= sysDate) or value_flag in ('2', '4'))
    order by TRUST_DATE_TIME desc
  </select>

  <select id="noPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
      <include refid="select"/>
      where 1 = 1
      <if test="railwayNo != '' and railwayNo != null">
        and railway_No =  #{railwayNo}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
         and value_Flag = #{valueFlag}
      </if>
      and value_flag in ('0', '1')
      and TRUST_AVAILABILITY_TIME >= sysDate
      order by TRUST_DATE_TIME desc
    </select>

  <select id="noPageDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    where 1 = 1
    <if test="railwayNo != '' and railwayNo != null">
      and railway_No =  #{railwayNo}
    </if>
    <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
      and FORWARDING_UNIT_NO = #{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 = #{receivingUintNo}
    </if>
    <if test="receivingUintName != null and receivingUintName != ''">
      and RECEIVING_UINT_NAME like '%${receivingUintName}%'
    </if>
    <if test="materialNo != null and materialNo != ''">
      and MATERIAL_NO = #{materialNo}
    </if>
    <if test="materialName != null and materialName != ''">
      and MATERIAL_NAME like '%${materialName}%'
    </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="predictionNo != null and predictionNo != ''">
      and prediction_no = #{predictionNo}
    </if>
    <if test="predictionNo == null or predictionNo == ''">
      and value_flag in  ('0', '1') and TRUST_AVAILABILITY_TIME &gt;= SYSDATE
    </if>
    order By TRUST_DATE_TIME desc
  </select>


  </mapper>

