<?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.meterwork.meterworkhookactfirst.mapper.MeterWorkHookActFirstMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
    <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
    <result 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="RAILWAY_WORK_NO" jdbcType="VARCHAR" property="railwayWorkNo" />
    <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
    <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="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="BIND_CARD_NO" jdbcType="VARCHAR" property="bindCardNo" />
    <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
    <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
    <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
    <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
    <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
    <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
    <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
    <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
    <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
    <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
    <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
    <result column="WEIGHT_TYPE" jdbcType="VARCHAR" property="weightType" />
    <result column="METER_SORT_WEIGHT" jdbcType="DECIMAL" property="meterSortWeight" />
    <result column="METER_BALANCE_WEIGHT" jdbcType="DECIMAL" property="meterBalanceWeight" />
    <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="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
    <result column="METER_CLASS" jdbcType="VARCHAR" property="meterClass" />
    <result column="METER_GROUP" jdbcType="VARCHAR" property="meterGroup" />
    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
    <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="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
    <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
    <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
    <result column="CHECK_TIME" jdbcType="TIMESTAMP" property="checkTime" />
    <result column="METER_MODE" jdbcType="VARCHAR" property="meterMode" />
    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
    <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="RAILWAY_FACTORY_WEIGHT" jdbcType="DECIMAL" property="railwayFactoryWeight" />
    <result column="WATER_NUM" jdbcType="DECIMAL" property="waterNum" />
    <result column="ARRIVAL" jdbcType="VARCHAR" property="arrival" />
    <result column="STATION" jdbcType="VARCHAR" property="station" />
    <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
    <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
    <result column="NOTE" jdbcType="VARCHAR" property="note" />
    <result column="IS_PRE_SCALE" jdbcType="VARCHAR" property="isPreScale" />
    <result column="CANCEL_TYPE" jdbcType="VARCHAR" property="cancelType" />
    <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
    <result column="HC15" jdbcType="VARCHAR" property="hc15" />
  </resultMap>
  <sql id="columns">
    ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
    RAILWAY_SPEED, MATTER_NO, MATTER_NAME, CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
    CUSTOMER_SUPPLIER_NAME, 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, BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME, 
    SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, PREDICTION_COMBINATION, 
    METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT, 
    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, 
    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG, 
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, LIMIT_WEIGHT, 
    RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
    STATION, SOURCE_AREA, DATA_SOURCE, NOTE, IS_PRE_SCALE, CANCEL_TYPE, LC_NO, HC15
  </sql>
  <sql id="columns_alias">
    t.ACTUAL_FIRST_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, 
    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.MATTER_NO, t.MATTER_NAME, t.CONTRACT_NO, t.BATCH_NO, 
    t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, 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.BIND_CARD_NO, 
    t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.SAMPLE_NO, t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO, 
    t.CARRIER_UNIT_NAME, t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, t.METER_TYPE_NO, 
    t.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, t.METER_WEIGHT, 
    t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, 
    t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS, t.METER_GROUP, t.MEMO, 
    t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.CHECK_FLAG, t.CHECK_MAN_NO, 
    t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME, 
    t.IS_CHEMICAL, t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME, t.RAILWAY_FACTORY_WEIGHT, 
    t.WATER_NUM, t.ARRIVAL, t.STATION, t.SOURCE_AREA, t.DATA_SOURCE, t.NOTE, t.IS_PRE_SCALE, 
    t.CANCEL_TYPE, t.LC_NO, t.HC15
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_WORK_HOOK_ACT_FIRST
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_WORK_HOOK_ACT_FIRST t
  </sql>
  <sql id="where">
    <where> 
      <if test="actualFirstNo != null and actualFirstNo != ''">
        and ACTUAL_FIRST_NO = #{actualFirstNo}
      </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="railwayWorkNo != null and railwayWorkNo != ''">
        and RAILWAY_WORK_NO = #{railwayWorkNo}
      </if>
      <if test="railwaySpeed != null">
        and RAILWAY_SPEED = #{railwaySpeed}
      </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="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="bindCardNo != null and bindCardNo != ''">
        and BIND_CARD_NO = #{bindCardNo}
      </if>
      <if test="loadPointNo != null and loadPointNo != ''">
        and LOAD_POINT_NO = #{loadPointNo}
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        and LOAD_POINT_NAME = #{loadPointName}
      </if>
      <if test="sampleNo != null and sampleNo != ''">
        and SAMPLE_NO = #{sampleNo}
      </if>
      <if test="sampleVoucher != null and sampleVoucher != ''">
        and SAMPLE_VOUCHER = #{sampleVoucher}
      </if>
      <if test="carrierUnitNo != null and carrierUnitNo != ''">
        and CARRIER_UNIT_NO = #{carrierUnitNo}
      </if>
      <if test="carrierUnitName != null and carrierUnitName != ''">
        and CARRIER_UNIT_NAME = #{carrierUnitName}
      </if>
      <if test="predictionType != null and predictionType != ''">
        and PREDICTION_TYPE = #{predictionType}
      </if>
      <if test="predictionCombination != null and predictionCombination != ''">
        and PREDICTION_COMBINATION = #{predictionCombination}
      </if>
      <if test="meterTypeNo != null and meterTypeNo != ''">
        and METER_TYPE_NO = #{meterTypeNo}
      </if>
      <if test="meterTypeName != null and meterTypeName != ''">
        and METER_TYPE_NAME = #{meterTypeName}
      </if>
      <if test="meterProcessNo != null and meterProcessNo != ''">
        and METER_PROCESS_NO = #{meterProcessNo}
      </if>
      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
        and METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </if>
      <if test="weightType != null and weightType != ''">
        and WEIGHT_TYPE = #{weightType}
      </if>
      <if test="meterSortWeight != null">
        and METER_SORT_WEIGHT = #{meterSortWeight}
      </if>
      <if test="meterBalanceWeight != null">
        and METER_BALANCE_WEIGHT = #{meterBalanceWeight}
      </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="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO = #{baseSpotNo}
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="meterClass != null and meterClass != ''">
        and METER_CLASS = #{meterClass}
      </if>
      <if test="meterGroup != null and meterGroup != ''">
        and METER_GROUP = #{meterGroup}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO = #{memo}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </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="checkFlag != null and checkFlag != ''">
        and CHECK_FLAG = #{checkFlag}
      </if>
      <if test="checkManNo != null and checkManNo != ''">
        and CHECK_MAN_NO = #{checkManNo}
      </if>
      <if test="checkManName != null and checkManName != ''">
        and CHECK_MAN_NAME = #{checkManName}
      </if>
      <if test="checkTime != null">
        and TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = #{checkTime}
      </if>
      <if test="meterMode != null and meterMode != ''">
        and METER_MODE = #{meterMode}
      </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="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="railwayFactoryWeight != null">
        and RAILWAY_FACTORY_WEIGHT = #{railwayFactoryWeight}
      </if>
      <if test="waterNum != null">
        and WATER_NUM = #{waterNum}
      </if>
      <if test="arrival != null and arrival != ''">
        and ARRIVAL = #{arrival}
      </if>
      <if test="station != null and station != ''">
        and STATION = #{station}
      </if>
      <if test="sourceArea != null and sourceArea != ''">
        and SOURCE_AREA = #{sourceArea}
      </if>
      <if test="dataSource != null and dataSource != ''">
        and DATA_SOURCE = #{dataSource}
      </if>
      <if test="note != null and note != ''">
        and NOTE = #{note}
      </if>
      <if test="isPreScale != null and isPreScale != ''">
        and IS_PRE_SCALE = #{isPreScale}
      </if>
      <if test="cancelType != null and cancelType != ''">
        and CANCEL_TYPE = #{cancelType}
      </if>
      <if test="lcNo != null and lcNo != ''">
        and LC_NO = #{lcNo}
      </if>
      <if test="hc15 != null and hc15 != ''">
        and HC15 = #{hc15}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="actualFirstNo != null and actualFirstNo != ''">
        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
      </if>
      <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="railwayWorkNo != null and railwayWorkNo != ''">
        and RAILWAY_WORK_NO LIKE '%${railwayWorkNo}%'
      </if>
      <if test="railwaySpeed != null">
        and RAILWAY_SPEED = #{railwaySpeed}
      </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="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="bindCardNo != null and bindCardNo != ''">
        and BIND_CARD_NO LIKE '%${bindCardNo}%'
      </if>
      <if test="loadPointNo != null and loadPointNo != ''">
        and LOAD_POINT_NO LIKE '%${loadPointNo}%'
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        and LOAD_POINT_NAME LIKE '%${loadPointName}%'
      </if>
      <if test="sampleNo != null and sampleNo != ''">
        and SAMPLE_NO LIKE '%${sampleNo}%'
      </if>
      <if test="sampleVoucher != null and sampleVoucher != ''">
        and SAMPLE_VOUCHER LIKE '%${sampleVoucher}%'
      </if>
      <if test="carrierUnitNo != null and carrierUnitNo != ''">
        and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
      </if>
      <if test="carrierUnitName != null and carrierUnitName != ''">
        and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
      </if>
      <if test="predictionType != null and predictionType != ''">
        and PREDICTION_TYPE LIKE '%${predictionType}%'
      </if>
      <if test="predictionCombination != null and predictionCombination != ''">
        and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
      </if>
      <if test="meterTypeNo != null and meterTypeNo != ''">
        and METER_TYPE_NO LIKE '%${meterTypeNo}%'
      </if>
      <if test="meterTypeName != null and meterTypeName != ''">
        and METER_TYPE_NAME LIKE '%${meterTypeName}%'
      </if>
      <if test="meterProcessNo != null and meterProcessNo != ''">
        and METER_PROCESS_NO LIKE '%${meterProcessNo}%'
      </if>
      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
        and METER_PROCESS_EDITION_NO LIKE '%${meterProcessEditionNo}%'
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </if>
      <if test="weightType != null and weightType != ''">
        and WEIGHT_TYPE LIKE '%${weightType}%'
      </if>
      <if test="meterSortWeight != null">
        and METER_SORT_WEIGHT = #{meterSortWeight}
      </if>
      <if test="meterBalanceWeight != null">
        and METER_BALANCE_WEIGHT = #{meterBalanceWeight}
      </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="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
      </if>
      <if test="meterClass != null and meterClass != ''">
        and METER_CLASS LIKE '%${meterClass}%'
      </if>
      <if test="meterGroup != null and meterGroup != ''">
        and METER_GROUP LIKE '%${meterGroup}%'
      </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="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="checkFlag != null and checkFlag != ''">
        and CHECK_FLAG LIKE '%${checkFlag}%'
      </if>
      <if test="checkManNo != null and checkManNo != ''">
        and CHECK_MAN_NO LIKE '%${checkManNo}%'
      </if>
      <if test="checkManName != null and checkManName != ''">
        and CHECK_MAN_NAME LIKE '%${checkManName}%'
      </if>
      <if test="checkTime != null">
        and TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = #{checkTime}
      </if>
      <if test="meterMode != null and meterMode != ''">
        and METER_MODE LIKE '%${meterMode}%'
      </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="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="railwayFactoryWeight != null">
        and RAILWAY_FACTORY_WEIGHT = #{railwayFactoryWeight}
      </if>
      <if test="waterNum != null">
        and WATER_NUM = #{waterNum}
      </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="sourceArea != null and sourceArea != ''">
        and SOURCE_AREA LIKE '%${sourceArea}%'
      </if>
      <if test="dataSource != null and dataSource != ''">
        and DATA_SOURCE LIKE '%${dataSource}%'
      </if>
      <if test="note != null and note != ''">
        and NOTE LIKE '%${note}%'
      </if>
      <if test="isPreScale != null and isPreScale != ''">
        and IS_PRE_SCALE LIKE '%${isPreScale}%'
      </if>
      <if test="cancelType != null and cancelType != ''">
        and CANCEL_TYPE LIKE '%${cancelType}%'
      </if>
      <if test="lcNo != null and lcNo != ''">
        and LC_NO LIKE '%${lcNo}%'
      </if>
      <if test="hc15 != null and hc15 != ''">
        and HC15 LIKE '%${hc15}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_WORK_HOOK_ACT_FIRST
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_WORK_HOOK_ACT_FIRST
    where 1!=1 
      <if test="predictionNo != null and predictionNo != ''">
        or PREDICTION_NO = #{predictionNo}
      </if>
      <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="railwayWorkNo != null and railwayWorkNo != ''">
        or RAILWAY_WORK_NO = #{railwayWorkNo}
      </if>
      <if test="railwaySpeed != null">
        or RAILWAY_SPEED = #{railwaySpeed}
      </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="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="bindCardNo != null and bindCardNo != ''">
        or BIND_CARD_NO = #{bindCardNo}
      </if>
      <if test="loadPointNo != null and loadPointNo != ''">
        or LOAD_POINT_NO = #{loadPointNo}
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        or LOAD_POINT_NAME = #{loadPointName}
      </if>
      <if test="sampleNo != null and sampleNo != ''">
        or SAMPLE_NO = #{sampleNo}
      </if>
      <if test="sampleVoucher != null and sampleVoucher != ''">
        or SAMPLE_VOUCHER = #{sampleVoucher}
      </if>
      <if test="carrierUnitNo != null and carrierUnitNo != ''">
        or CARRIER_UNIT_NO = #{carrierUnitNo}
      </if>
      <if test="carrierUnitName != null and carrierUnitName != ''">
        or CARRIER_UNIT_NAME = #{carrierUnitName}
      </if>
      <if test="predictionType != null and predictionType != ''">
        or PREDICTION_TYPE = #{predictionType}
      </if>
      <if test="predictionCombination != null and predictionCombination != ''">
        or PREDICTION_COMBINATION = #{predictionCombination}
      </if>
      <if test="meterTypeNo != null and meterTypeNo != ''">
        or METER_TYPE_NO = #{meterTypeNo}
      </if>
      <if test="meterTypeName != null and meterTypeName != ''">
        or METER_TYPE_NAME = #{meterTypeName}
      </if>
      <if test="meterProcessNo != null and meterProcessNo != ''">
        or METER_PROCESS_NO = #{meterProcessNo}
      </if>
      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
        or METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
      </if>
      <if test="meterWeight != null">
        or METER_WEIGHT = #{meterWeight}
      </if>
      <if test="weightType != null and weightType != ''">
        or WEIGHT_TYPE = #{weightType}
      </if>
      <if test="meterSortWeight != null">
        or METER_SORT_WEIGHT = #{meterSortWeight}
      </if>
      <if test="meterBalanceWeight != null">
        or METER_BALANCE_WEIGHT = #{meterBalanceWeight}
      </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="baseSpotNo != null and baseSpotNo != ''">
        or BASE_SPOT_NO = #{baseSpotNo}
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        or BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="meterClass != null and meterClass != ''">
        or METER_CLASS = #{meterClass}
      </if>
      <if test="meterGroup != null and meterGroup != ''">
        or METER_GROUP = #{meterGroup}
      </if>
      <if test="memo != null and memo != ''">
        or MEMO = #{memo}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        or VALUE_FLAG = #{valueFlag}
      </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="checkFlag != null and checkFlag != ''">
        or CHECK_FLAG = #{checkFlag}
      </if>
      <if test="checkManNo != null and checkManNo != ''">
        or CHECK_MAN_NO = #{checkManNo}
      </if>
      <if test="checkManName != null and checkManName != ''">
        or CHECK_MAN_NAME = #{checkManName}
      </if>
      <if test="checkTime != null">
        or TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = '#{checkTime}'
      </if>
      <if test="meterMode != null and meterMode != ''">
        or METER_MODE = #{meterMode}
      </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="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="railwayFactoryWeight != null">
        or RAILWAY_FACTORY_WEIGHT = #{railwayFactoryWeight}
      </if>
      <if test="waterNum != null">
        or WATER_NUM = #{waterNum}
      </if>
      <if test="arrival != null and arrival != ''">
        or ARRIVAL = #{arrival}
      </if>
      <if test="station != null and station != ''">
        or STATION = #{station}
      </if>
      <if test="sourceArea != null and sourceArea != ''">
        or SOURCE_AREA = #{sourceArea}
      </if>
      <if test="dataSource != null and dataSource != ''">
        or DATA_SOURCE = #{dataSource}
      </if>
      <if test="note != null and note != ''">
        or NOTE = #{note}
      </if>
      <if test="isPreScale != null and isPreScale != ''">
        or IS_PRE_SCALE = #{isPreScale}
      </if>
      <if test="cancelType != null and cancelType != ''">
        or CANCEL_TYPE = #{cancelType}
      </if>
      <if test="lcNo != null and lcNo != ''">
        or LC_NO = #{lcNo}
      </if>
      <if test="hc15 != null and hc15 != ''">
        or HC15 = #{hc15}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
    insert into METER_WORK_HOOK_ACT_FIRST (ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, 
      RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
      RAILWAY_SPEED, MATTER_NO, MATTER_NAME, 
      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
      CUSTOMER_SUPPLIER_NAME, 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, BIND_CARD_NO, LOAD_POINT_NO, 
      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER, 
      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, 
      PREDICTION_COMBINATION, METER_TYPE_NO, METER_TYPE_NAME, 
      METER_PROCESS_NO, METER_PROCESS_EDITION_NO, 
      METER_WEIGHT, WEIGHT_TYPE, METER_SORT_WEIGHT, 
      METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, 
      CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, 
      METER_CLASS, METER_GROUP, MEMO, 
      VALUE_FLAG, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
      UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, 
      CHECK_MAN_NAME, CHECK_TIME, METER_MODE, 
      RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, 
      LIMIT_WEIGHT, RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, 
      RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
      STATION, SOURCE_AREA, DATA_SOURCE, 
      NOTE, IS_PRE_SCALE, CANCEL_TYPE, 
      LC_NO, HC15)
    values (#{actualFirstNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
      #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{railwayWorkNo,jdbcType=VARCHAR}, 
      #{railwaySpeed,jdbcType=DECIMAL}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR}, 
      #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR}, 
      #{customerSupplierName,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}, #{bindCardNo,jdbcType=VARCHAR}, #{loadPointNo,jdbcType=VARCHAR}, 
      #{loadPointName,jdbcType=VARCHAR}, #{sampleNo,jdbcType=VARCHAR}, #{sampleVoucher,jdbcType=VARCHAR}, 
      #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR}, #{predictionType,jdbcType=VARCHAR}, 
      #{predictionCombination,jdbcType=VARCHAR}, #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR}, 
      #{meterProcessNo,jdbcType=VARCHAR}, #{meterProcessEditionNo,jdbcType=VARCHAR}, 
      #{meterWeight,jdbcType=DECIMAL}, #{weightType,jdbcType=VARCHAR}, #{meterSortWeight,jdbcType=DECIMAL}, 
      #{meterBalanceWeight,jdbcType=DECIMAL}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, 
      #{meterClass,jdbcType=VARCHAR}, #{meterGroup,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, 
      #{valueFlag,jdbcType=VARCHAR}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{checkFlag,jdbcType=VARCHAR}, #{checkManNo,jdbcType=VARCHAR}, 
      #{checkManName,jdbcType=VARCHAR}, #{checkTime,jdbcType=TIMESTAMP}, #{meterMode,jdbcType=VARCHAR}, 
      #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, #{isChemical,jdbcType=VARCHAR}, 
      #{limitWeight,jdbcType=DECIMAL}, #{railwayModelNo,jdbcType=VARCHAR}, #{railwayModelName,jdbcType=VARCHAR}, 
      #{railwayFactoryWeight,jdbcType=DECIMAL}, #{waterNum,jdbcType=DECIMAL}, #{arrival,jdbcType=VARCHAR}, 
      #{station,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, 
      #{note,jdbcType=VARCHAR}, #{isPreScale,jdbcType=VARCHAR}, #{cancelType,jdbcType=VARCHAR}, 
      #{lcNo,jdbcType=VARCHAR}, #{hc15,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
    insert into METER_WORK_HOOK_ACT_FIRST
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="actualFirstNo != null">
        ACTUAL_FIRST_NO,
      </if>
      <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="railwayWorkNo != null">
        RAILWAY_WORK_NO,
      </if>
      <if test="railwaySpeed != null">
        RAILWAY_SPEED,
      </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="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="bindCardNo != null">
        BIND_CARD_NO,
      </if>
      <if test="loadPointNo != null">
        LOAD_POINT_NO,
      </if>
      <if test="loadPointName != null">
        LOAD_POINT_NAME,
      </if>
      <if test="sampleNo != null">
        SAMPLE_NO,
      </if>
      <if test="sampleVoucher != null">
        SAMPLE_VOUCHER,
      </if>
      <if test="carrierUnitNo != null">
        CARRIER_UNIT_NO,
      </if>
      <if test="carrierUnitName != null">
        CARRIER_UNIT_NAME,
      </if>
      <if test="predictionType != null">
        PREDICTION_TYPE,
      </if>
      <if test="predictionCombination != null">
        PREDICTION_COMBINATION,
      </if>
      <if test="meterTypeNo != null">
        METER_TYPE_NO,
      </if>
      <if test="meterTypeName != null">
        METER_TYPE_NAME,
      </if>
      <if test="meterProcessNo != null">
        METER_PROCESS_NO,
      </if>
      <if test="meterProcessEditionNo != null">
        METER_PROCESS_EDITION_NO,
      </if>
      <if test="meterWeight != null">
        METER_WEIGHT,
      </if>
      <if test="weightType != null">
        WEIGHT_TYPE,
      </if>
      <if test="meterSortWeight != null">
        METER_SORT_WEIGHT,
      </if>
      <if test="meterBalanceWeight != null">
        METER_BALANCE_WEIGHT,
      </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="baseSpotNo != null">
        BASE_SPOT_NO,
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME,
      </if>
      <if test="meterClass != null">
        METER_CLASS,
      </if>
      <if test="meterGroup != null">
        METER_GROUP,
      </if>
      <if test="memo != null">
        MEMO,
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG,
      </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="checkFlag != null">
        CHECK_FLAG,
      </if>
      <if test="checkManNo != null">
        CHECK_MAN_NO,
      </if>
      <if test="checkManName != null">
        CHECK_MAN_NAME,
      </if>
      <if test="checkTime != null">
        CHECK_TIME,
      </if>
      <if test="meterMode != null">
        METER_MODE,
      </if>
      <if test="railwayTypeNo != null">
        RAILWAY_TYPE_NO,
      </if>
      <if test="railwayTypeName != null">
        RAILWAY_TYPE_NAME,
      </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="railwayFactoryWeight != null">
        RAILWAY_FACTORY_WEIGHT,
      </if>
      <if test="waterNum != null">
        WATER_NUM,
      </if>
      <if test="arrival != null">
        ARRIVAL,
      </if>
      <if test="station != null">
        STATION,
      </if>
      <if test="sourceArea != null">
        SOURCE_AREA,
      </if>
      <if test="dataSource != null">
        DATA_SOURCE,
      </if>
      <if test="note != null">
        NOTE,
      </if>
      <if test="isPreScale != null">
        IS_PRE_SCALE,
      </if>
      <if test="cancelType != null">
        CANCEL_TYPE,
      </if>
      <if test="lcNo != null">
        LC_NO,
      </if>
      <if test="hc15 != null">
        HC15,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="actualFirstNo != null">
        #{actualFirstNo,jdbcType=VARCHAR},
      </if>
      <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="railwayWorkNo != null">
        #{railwayWorkNo,jdbcType=VARCHAR},
      </if>
      <if test="railwaySpeed != null">
        #{railwaySpeed,jdbcType=DECIMAL},
      </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="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="bindCardNo != null">
        #{bindCardNo,jdbcType=VARCHAR},
      </if>
      <if test="loadPointNo != null">
        #{loadPointNo,jdbcType=VARCHAR},
      </if>
      <if test="loadPointName != null">
        #{loadPointName,jdbcType=VARCHAR},
      </if>
      <if test="sampleNo != null">
        #{sampleNo,jdbcType=VARCHAR},
      </if>
      <if test="sampleVoucher != null">
        #{sampleVoucher,jdbcType=VARCHAR},
      </if>
      <if test="carrierUnitNo != null">
        #{carrierUnitNo,jdbcType=VARCHAR},
      </if>
      <if test="carrierUnitName != null">
        #{carrierUnitName,jdbcType=VARCHAR},
      </if>
      <if test="predictionType != null">
        #{predictionType,jdbcType=VARCHAR},
      </if>
      <if test="predictionCombination != null">
        #{predictionCombination,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeNo != null">
        #{meterTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeName != null">
        #{meterTypeName,jdbcType=VARCHAR},
      </if>
      <if test="meterProcessNo != null">
        #{meterProcessNo,jdbcType=VARCHAR},
      </if>
      <if test="meterProcessEditionNo != null">
        #{meterProcessEditionNo,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        #{meterWeight,jdbcType=DECIMAL},
      </if>
      <if test="weightType != null">
        #{weightType,jdbcType=VARCHAR},
      </if>
      <if test="meterSortWeight != null">
        #{meterSortWeight,jdbcType=DECIMAL},
      </if>
      <if test="meterBalanceWeight != null">
        #{meterBalanceWeight,jdbcType=DECIMAL},
      </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="baseSpotNo != null">
        #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="meterClass != null">
        #{meterClass,jdbcType=VARCHAR},
      </if>
      <if test="meterGroup != null">
        #{meterGroup,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        #{valueFlag,jdbcType=VARCHAR},
      </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="checkFlag != null">
        #{checkFlag,jdbcType=VARCHAR},
      </if>
      <if test="checkManNo != null">
        #{checkManNo,jdbcType=VARCHAR},
      </if>
      <if test="checkManName != null">
        #{checkManName,jdbcType=VARCHAR},
      </if>
      <if test="checkTime != null">
        #{checkTime,jdbcType=TIMESTAMP},
      </if>
      <if test="meterMode != null">
        #{meterMode,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeNo != null">
        #{railwayTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeName != null">
        #{railwayTypeName,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="railwayFactoryWeight != null">
        #{railwayFactoryWeight,jdbcType=DECIMAL},
      </if>
      <if test="waterNum != null">
        #{waterNum,jdbcType=DECIMAL},
      </if>
      <if test="arrival != null">
        #{arrival,jdbcType=VARCHAR},
      </if>
      <if test="station != null">
        #{station,jdbcType=VARCHAR},
      </if>
      <if test="sourceArea != null">
        #{sourceArea,jdbcType=VARCHAR},
      </if>
      <if test="dataSource != null">
        #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        #{note,jdbcType=VARCHAR},
      </if>
      <if test="isPreScale != null">
        #{isPreScale,jdbcType=VARCHAR},
      </if>
      <if test="cancelType != null">
        #{cancelType,jdbcType=VARCHAR},
      </if>
      <if test="lcNo != null">
        #{lcNo,jdbcType=VARCHAR},
      </if>
      <if test="hc15 != null">
        #{hc15,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
    update METER_WORK_HOOK_ACT_FIRST
    set PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR},
      NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
      RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
      RAILWAY_CARRIAGE_NO = #{railwayCarriageNo,jdbcType=VARCHAR},
      RAILWAY_WORK_NO = #{railwayWorkNo,jdbcType=VARCHAR},
      RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
      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},
      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},
      BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
      LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
      LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
      SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
      SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
      CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
      CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
      PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
      PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
      METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
      METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
      METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
      METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
      METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
      WEIGHT_TYPE = #{weightType,jdbcType=VARCHAR},
      METER_SORT_WEIGHT = #{meterSortWeight,jdbcType=DECIMAL},
      METER_BALANCE_WEIGHT = #{meterBalanceWeight,jdbcType=DECIMAL},
      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      METER_CLASS = #{meterClass,jdbcType=VARCHAR},
      METER_GROUP = #{meterGroup,jdbcType=VARCHAR},
      MEMO = #{memo,jdbcType=VARCHAR},
      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR},
      CHECK_MAN_NO = #{checkManNo,jdbcType=VARCHAR},
      CHECK_MAN_NAME = #{checkManName,jdbcType=VARCHAR},
      CHECK_TIME = #{checkTime,jdbcType=TIMESTAMP},
      METER_MODE = #{meterMode,jdbcType=VARCHAR},
      RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
      RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
      IS_CHEMICAL = #{isChemical,jdbcType=VARCHAR},
      LIMIT_WEIGHT = #{limitWeight,jdbcType=DECIMAL},
      RAILWAY_MODEL_NO = #{railwayModelNo,jdbcType=VARCHAR},
      RAILWAY_MODEL_NAME = #{railwayModelName,jdbcType=VARCHAR},
      RAILWAY_FACTORY_WEIGHT = #{railwayFactoryWeight,jdbcType=DECIMAL},
      WATER_NUM = #{waterNum,jdbcType=DECIMAL},
      ARRIVAL = #{arrival,jdbcType=VARCHAR},
      STATION = #{station,jdbcType=VARCHAR},
      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
      DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
      NOTE = #{note,jdbcType=VARCHAR},
      IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
      CANCEL_TYPE = #{cancelType,jdbcType=VARCHAR},
      LC_NO = #{lcNo,jdbcType=VARCHAR},
      HC15 = #{hc15,jdbcType=VARCHAR}
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
    update METER_WORK_HOOK_ACT_FIRST
    <set>
      <if test="predictionNo != null">
        PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR},
      </if>
      <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="railwayWorkNo != null">
        RAILWAY_WORK_NO = #{railwayWorkNo,jdbcType=VARCHAR},
      </if>
      <if test="railwaySpeed != null">
        RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
      </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="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="bindCardNo != null">
        BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
      </if>
      <if test="loadPointNo != null">
        LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
      </if>
      <if test="loadPointName != null">
        LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
      </if>
      <if test="sampleNo != null">
        SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
      </if>
      <if test="sampleVoucher != null">
        SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
      </if>
      <if test="carrierUnitNo != null">
        CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
      </if>
      <if test="carrierUnitName != null">
        CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
      </if>
      <if test="predictionType != null">
        PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
      </if>
      <if test="predictionCombination != null">
        PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeNo != null">
        METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeName != null">
        METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
      </if>
      <if test="meterProcessNo != null">
        METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
      </if>
      <if test="meterProcessEditionNo != null">
        METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
      </if>
      <if test="weightType != null">
        WEIGHT_TYPE = #{weightType,jdbcType=VARCHAR},
      </if>
      <if test="meterSortWeight != null">
        METER_SORT_WEIGHT = #{meterSortWeight,jdbcType=DECIMAL},
      </if>
      <if test="meterBalanceWeight != null">
        METER_BALANCE_WEIGHT = #{meterBalanceWeight,jdbcType=DECIMAL},
      </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="baseSpotNo != null">
        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="meterClass != null">
        METER_CLASS = #{meterClass,jdbcType=VARCHAR},
      </if>
      <if test="meterGroup != null">
        METER_GROUP = #{meterGroup,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        MEMO = #{memo,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      </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="checkFlag != null">
        CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR},
      </if>
      <if test="checkManNo != null">
        CHECK_MAN_NO = #{checkManNo,jdbcType=VARCHAR},
      </if>
      <if test="checkManName != null">
        CHECK_MAN_NAME = #{checkManName,jdbcType=VARCHAR},
      </if>
      <if test="checkTime != null">
        CHECK_TIME = #{checkTime,jdbcType=TIMESTAMP},
      </if>
      <if test="meterMode != null">
        METER_MODE = #{meterMode,jdbcType=VARCHAR},
      </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="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="railwayFactoryWeight != null">
        RAILWAY_FACTORY_WEIGHT = #{railwayFactoryWeight,jdbcType=DECIMAL},
      </if>
      <if test="waterNum != null">
        WATER_NUM = #{waterNum,jdbcType=DECIMAL},
      </if>
      <if test="arrival != null">
        ARRIVAL = #{arrival,jdbcType=VARCHAR},
      </if>
      <if test="station != null">
        STATION = #{station,jdbcType=VARCHAR},
      </if>
      <if test="sourceArea != null">
        SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
      </if>
      <if test="dataSource != null">
        DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        NOTE = #{note,jdbcType=VARCHAR},
      </if>
      <if test="isPreScale != null">
        IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
      </if>
      <if test="cancelType != null">
        CANCEL_TYPE = #{cancelType,jdbcType=VARCHAR},
      </if>
      <if test="lcNo != null">
        LC_NO = #{lcNo,jdbcType=VARCHAR},
      </if>
      <if test="hc15 != null">
        HC15 = #{hc15,jdbcType=VARCHAR},
      </if>
    </set>
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where ACTUAL_FIRST_NO = #{actualFirstNo,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 METER_WORK_HOOK_ACT_FIRST 
      (ACTUAL_FIRST_NO, 
      PREDICTION_NO, NOTICE_NO, RAILWAY_NO, 
      RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
      RAILWAY_SPEED, MATTER_NO, MATTER_NAME, 
      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
      CUSTOMER_SUPPLIER_NAME, 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, BIND_CARD_NO, LOAD_POINT_NO, 
      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER, 
      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, 
      PREDICTION_TYPE, PREDICTION_COMBINATION, 
      METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, 
      METER_PROCESS_EDITION_NO, METER_WEIGHT, 
      WEIGHT_TYPE, METER_SORT_WEIGHT, 
      METER_BALANCE_WEIGHT, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, 
      BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, 
      METER_GROUP, MEMO, VALUE_FLAG, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
      CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, 
      RAILWAY_TYPE_NAME, IS_CHEMICAL, 
      LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
      RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, 
      WATER_NUM, ARRIVAL, STATION, 
      SOURCE_AREA, DATA_SOURCE, NOTE, 
      IS_PRE_SCALE, CANCEL_TYPE, LC_NO, 
      HC15)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.actualFirstNo,jdbcType=VARCHAR}, 
      #{item.predictionNo,jdbcType=VARCHAR}, #{item.noticeNo,jdbcType=VARCHAR}, #{item.railwayNo,jdbcType=VARCHAR}, 
      #{item.railwayCarriageNo,jdbcType=VARCHAR}, #{item.railwayWorkNo,jdbcType=VARCHAR}, 
      #{item.railwaySpeed,jdbcType=DECIMAL}, #{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.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.bindCardNo,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR}, 
      #{item.loadPointName,jdbcType=VARCHAR}, #{item.sampleNo,jdbcType=VARCHAR}, #{item.sampleVoucher,jdbcType=VARCHAR}, 
      #{item.carrierUnitNo,jdbcType=VARCHAR}, #{item.carrierUnitName,jdbcType=VARCHAR}, 
      #{item.predictionType,jdbcType=VARCHAR}, #{item.predictionCombination,jdbcType=VARCHAR}, 
      #{item.meterTypeNo,jdbcType=VARCHAR}, #{item.meterTypeName,jdbcType=VARCHAR}, #{item.meterProcessNo,jdbcType=VARCHAR}, 
      #{item.meterProcessEditionNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, 
      #{item.weightType,jdbcType=VARCHAR}, #{item.meterSortWeight,jdbcType=DECIMAL}, 
      #{item.meterBalanceWeight,jdbcType=DECIMAL}, #{item.createManNo,jdbcType=VARCHAR}, 
      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.meterClass,jdbcType=VARCHAR}, 
      #{item.meterGroup,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, 
      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
      #{item.checkFlag,jdbcType=VARCHAR}, #{item.checkManNo,jdbcType=VARCHAR}, #{item.checkManName,jdbcType=VARCHAR}, 
      #{item.checkTime,jdbcType=TIMESTAMP}, #{item.meterMode,jdbcType=VARCHAR}, #{item.railwayTypeNo,jdbcType=VARCHAR}, 
      #{item.railwayTypeName,jdbcType=VARCHAR}, #{item.isChemical,jdbcType=VARCHAR}, 
      #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR}, 
      #{item.railwayModelName,jdbcType=VARCHAR}, #{item.railwayFactoryWeight,jdbcType=DECIMAL}, 
      #{item.waterNum,jdbcType=DECIMAL}, #{item.arrival,jdbcType=VARCHAR}, #{item.station,jdbcType=VARCHAR}, 
      #{item.sourceArea,jdbcType=VARCHAR}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
      #{item.isPreScale,jdbcType=VARCHAR}, #{item.cancelType,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, 
      #{item.hc15,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_WORK_HOOK_ACT_FIRST
     set
       ACTUAL_FIRST_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
       </foreach>
       ,PREDICTION_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionNo,jdbcType=VARCHAR}
       </foreach>
       ,NOTICE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_CARRIAGE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayCarriageNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_WORK_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayWorkNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_SPEED=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwaySpeed,jdbcType=DECIMAL}
       </foreach>
       ,MATTER_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
       </foreach>
       ,MATTER_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
       </foreach>
       ,CONTRACT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
       </foreach>
       ,BATCH_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
       </foreach>
       ,CUSTOMER_SUPPLIER_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
       </foreach>
       ,CUSTOMER_SUPPLIER_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
       </foreach>
       ,FORWARDING_UNIT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
       </foreach>
       ,FORWARDING_UNIT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
       </foreach>
       ,RECEIVING_UINT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
       </foreach>
       ,RECEIVING_UINT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
       </foreach>
       ,MATERIAL_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
       </foreach>
       ,MATERIAL_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
       </foreach>
       ,SPEC_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
       </foreach>
       ,SPEC_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
       </foreach>
       ,SHIPMENT_GROSS_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentGrossWeight,jdbcType=DECIMAL}
       </foreach>
       ,SHIPMENT_NET_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentNetWeight,jdbcType=DECIMAL}
       </foreach>
       ,SHIPMENT_NUM=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentNum,jdbcType=DECIMAL}
       </foreach>
       ,BIND_CARD_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.bindCardNo,jdbcType=VARCHAR}
       </foreach>
       ,LOAD_POINT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
       </foreach>
       ,LOAD_POINT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
       </foreach>
       ,SAMPLE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sampleNo,jdbcType=VARCHAR}
       </foreach>
       ,SAMPLE_VOUCHER=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sampleVoucher,jdbcType=VARCHAR}
       </foreach>
       ,CARRIER_UNIT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
       </foreach>
       ,CARRIER_UNIT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
       </foreach>
       ,PREDICTION_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
       </foreach>
       ,PREDICTION_COMBINATION=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
       </foreach>
       ,METER_TYPE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,METER_TYPE_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
       </foreach>
       ,METER_PROCESS_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterProcessNo,jdbcType=VARCHAR}
       </foreach>
       ,METER_PROCESS_EDITION_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterProcessEditionNo,jdbcType=VARCHAR}
       </foreach>
       ,METER_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.weightType,jdbcType=VARCHAR}
       </foreach>
       ,METER_SORT_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterSortWeight,jdbcType=DECIMAL}
       </foreach>
       ,METER_BALANCE_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterBalanceWeight,jdbcType=DECIMAL}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,BASE_SPOT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
       </foreach>
       ,METER_CLASS=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterClass,jdbcType=VARCHAR}
       </foreach>
       ,METER_GROUP=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterGroup,jdbcType=VARCHAR}
       </foreach>
       ,MEMO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
       </foreach>
       ,VALUE_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,CHECK_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkFlag,jdbcType=VARCHAR}
       </foreach>
       ,CHECK_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkManNo,jdbcType=VARCHAR}
       </foreach>
       ,CHECK_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkManName,jdbcType=VARCHAR}
       </foreach>
       ,CHECK_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkTime,jdbcType=TIMESTAMP}
       </foreach>
       ,METER_MODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterMode,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_TYPE_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_TYPE_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
       </foreach>
       ,IS_CHEMICAL=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.isChemical,jdbcType=VARCHAR}
       </foreach>
       ,LIMIT_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.limitWeight,jdbcType=DECIMAL}
       </foreach>
       ,RAILWAY_MODEL_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayModelNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_MODEL_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayModelName,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_FACTORY_WEIGHT=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayFactoryWeight,jdbcType=DECIMAL}
       </foreach>
       ,WATER_NUM=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.waterNum,jdbcType=DECIMAL}
       </foreach>
       ,ARRIVAL=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.arrival,jdbcType=VARCHAR}
       </foreach>
       ,STATION=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.station,jdbcType=VARCHAR}
       </foreach>
       ,SOURCE_AREA=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
       </foreach>
       ,DATA_SOURCE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.dataSource,jdbcType=VARCHAR}
       </foreach>
       ,NOTE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
       </foreach>
       ,IS_PRE_SCALE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.isPreScale,jdbcType=VARCHAR}
       </foreach>
       ,CANCEL_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.cancelType,jdbcType=VARCHAR}
       </foreach>
       ,LC_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.lcNo,jdbcType=VARCHAR}
       </foreach>
       ,HC15=
       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.hc15,jdbcType=VARCHAR}
       </foreach>
     where ACTUAL_FIRST_NO in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.actualFirstNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_WORK_HOOK_ACT_FIRST
    where ACTUAL_FIRST_NO in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_FIRST_NO, LENGTH(ACTUAL_FIRST_NO) - 3))),0) + 1,4,'0') ACTUAL_FIRST_NO
    FROM METER_WORK_HOOK_ACT_FIRST where instr(ACTUAL_FIRST_NO,#{afl,jdbcType=VARCHAR})>0
  </select>

  <select id="selectAndRemove" parameterType="java.lang.String" resultMap="BaseResultMap">
    select  ACTUAL_FIRST_NO,  RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO,
    RAILWAY_SPEED, RAILWAY_MODEL_NO,RAILWAY_MODEL_NAME, BIND_CARD_NO,  METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT,
    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME,
    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME,
    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME,METER_TYPE_NO,METER_TYPE_NAME
    from METER_WORK_HOOK_ACT_FIRST
    where ACTUAL_FIRST_NO= #{actualFirstNo,jdbcType=VARCHAR}
  </select>
  <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="where"/>
    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME &lt;= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
    </if>
    order by create_time desc
  </select>

  <select id="selectAndMatch" parameterType="java.lang.String" resultMap="BaseResultMap">
    select t.ACTUAL_FIRST_NO, t1.PREDICTION_NO, t1.NOTICE_NO, t.RAILWAY_NO, t1.RAILWAY_CARRIAGE_NO,
    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.RAILWAY_MODEL_NO,t.RAILWAY_MODEL_NAME, t1.MATTER_NO, t1.MATTER_NAME,
    t1.CONTRACT_NO, t1.BATCH_NO, t1.CUSTOMER_SUPPLIER_NO, t1.CUSTOMER_SUPPLIER_NAME, t1.FORWARDING_UNIT_NO,
    t1.FORWARDING_UNIT_NAME, t1.RECEIVING_UINT_NO, t1.RECEIVING_UINT_NAME, t1.MATERIAL_NO,
    t1.MATERIAL_NAME, t1.SPEC_NO, t1.SPEC_NAME, t1.SHIPMENT_GROSS_WEIGHT, t1.SHIPMENT_NET_WEIGHT,
    t1.SHIPMENT_NUM, t.BIND_CARD_NO, t1.LOAD_POINT_NO, t1.LOAD_POINT_NAME, t1.SAMPLE_NO,
    t1.SAMPLE_VOUCHER, t1.CARRIER_UNIT_NO, t1.CARRIER_UNIT_NAME, t1.PREDICTION_TYPE, t1.PREDICTION_COMBINATION,
    t1.METER_TYPE_NO, t1.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO,
    t.METER_WEIGHT, t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO,
    t.CREATE_MAN_NAME, t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS,
    t.METER_GROUP, t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME,
    t.CHECK_FLAG, t.CHECK_MAN_NO, t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO,
    t.RAILWAY_TYPE_NAME, T1.ARRIVAL, T1.STATION, T1.MEMO
    from METER_WORK_HOOK_ACT_FIRST t,PRE_HOOK_SCALE t1
    where t.ACTUAL_FIRST_NO= #{actualFirstNo,jdbcType=VARCHAR} and t1.PREDICTION_NO= #{predictionNo,jdbcType=VARCHAR}
  </select>

  <!-- 查询：根据传入时间和车号，查询给定时间段去重车号 -->
  <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
    SELECT distinct RAILWAY_NO
    from METER_WORK_HOOK_ACT_FIRST
    where VALUE_FLAG != '0' and RAILWAY_NO like '%${railwayNo}'
    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
    </if>
  </select>

  <select id="selectBy" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where>
      ROUND(TO_NUMBER(sysdate - CREATE_TIME)) <![CDATA[ <= ]]> 30
      <if test="predictionNo != null and predictionNo != ''">
        and PREDICTION_NO = #{predictionNo}
      </if>
      <if test="weightType != null and weightType != ''">
        and WEIGHT_TYPE = #{weightType}
      </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="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </if>
      <if test="valueFlag == null or valueFlag == ''">
        and VALUE_FLAG in('0','2')
      </if>
      <if test="matterNo != null and matterNo != ''">
        and MATTER_NO = #{matterNo}
      </if>
      <if test="matterName != null and matterName != ''">
        and MATTER_NAME = #{matterName}
      </if>
    </where>
    order by CREATE_TIME desc
  </select>
</mapper>