<?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.meterworkcarrecover.mapper.MeterWorkCarRecoverMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover">
    <id column="RECOVER_NO" jdbcType="VARCHAR" property="recoverNo" />
    <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
    <result column="TRAILER_NO" jdbcType="VARCHAR" property="trailerNo" />
    <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
    <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
    <result column="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="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
    <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
    <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="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="METER_TIME" jdbcType="TIMESTAMP" property="meterTime" />
    <result column="REC_METER_WEIGHT" jdbcType="DECIMAL" property="recMeterWeight" />
    <result column="REC_METER_TIME" jdbcType="TIMESTAMP" property="recMeterTime" />
    <result column="REC_BASE_SPOT_NO" jdbcType="VARCHAR" property="recBaseSpotNo" />
    <result column="REC_BASE_SPOT_NAME" jdbcType="VARCHAR" property="recBaseSpotName" />
  </resultMap>
  <sql id="columns">
    RECOVER_NO, CAR_NO, TRAILER_NO, MATTER_NO, MATTER_NAME, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME,
    FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
    METER_TYPE_NO, METER_TYPE_NAME, METER_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
    BASE_SPOT_NO, BASE_SPOT_NAME, VALUE_FLAG, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
    METER_TIME, REC_METER_WEIGHT, REC_METER_TIME, REC_BASE_SPOT_NO, REC_BASE_SPOT_NAME
  </sql>
  <sql id="columns_alias">
    t.RECOVER_NO, t.CAR_NO, t.TRAILER_NO, t.MATTER_NO, t.MATTER_NAME, 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.METER_TYPE_NO, t.METER_TYPE_NAME, t.METER_WEIGHT, t.CREATE_MAN_NO,
    t.CREATE_MAN_NAME, t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.VALUE_FLAG,
    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.METER_TIME, t.REC_METER_WEIGHT,
    t.REC_METER_TIME, t.REC_BASE_SPOT_NO, t.REC_BASE_SPOT_NAME
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_WORK_CAR_RECOVER
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_WORK_CAR_RECOVER t
  </sql>
  <sql id="where">
    <where>
      <if test="recoverNo != null and recoverNo != ''">
        and RECOVER_NO = #{recoverNo}
      </if>
      <if test="carNo != null and carNo != ''">
        and CAR_NO = #{carNo}
      </if>
      <if test="trailerNo != null and trailerNo != ''">
        and TRAILER_NO = #{trailerNo}
      </if>
      <if test="matterNo != null and matterNo != ''">
        and MATTER_NO = #{matterNo}
      </if>
      <if test="matterName != null and matterName != ''">
        and MATTER_NAME = #{matterName}
      </if>
      <if test="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="meterTypeNo != null and meterTypeNo != ''">
        and METER_TYPE_NO = #{meterTypeNo}
      </if>
      <if test="meterTypeName != null and meterTypeName != ''">
        and METER_TYPE_NAME = #{meterTypeName}
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </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="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="meterTime != null">
        and TO_CHAR(METER_TIME,'yyyy-MM-dd') = #{meterTime}
      </if>
      <if test="recMeterWeight != null">
        and REC_METER_WEIGHT = #{recMeterWeight}
      </if>
      <if test="recMeterTime != null">
        and TO_CHAR(REC_METER_TIME,'yyyy-MM-dd') = #{recMeterTime}
      </if>
      <if test="recBaseSpotNo != null and recBaseSpotNo != ''">
        and REC_BASE_SPOT_NO = #{recBaseSpotNo}
      </if>
      <if test="recBaseSpotName != null and recBaseSpotName != ''">
        and REC_BASE_SPOT_NAME = #{recBaseSpotName}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where>
      <if test="recoverNo != null and recoverNo != ''">
        and RECOVER_NO LIKE '%${recoverNo}%'
      </if>
      <if test="carNo != null and carNo != ''">
        and CAR_NO LIKE '%${carNo}%'
      </if>
      <if test="trailerNo != null and trailerNo != ''">
        and TRAILER_NO LIKE '%${trailerNo}%'
      </if>
      <if test="matterNo != null and matterNo != ''">
        and MATTER_NO LIKE '%${matterNo}%'
      </if>
      <if test="matterName != null and matterName != ''">
        and MATTER_NAME LIKE '%${matterName}%'
      </if>
      <if test="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="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="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </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="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="meterTime != null">
        and TO_CHAR(METER_TIME,'yyyy-MM-dd') = #{meterTime}
      </if>
      <if test="recMeterWeight != null">
        and REC_METER_WEIGHT = #{recMeterWeight}
      </if>
      <if test="recMeterTime != null">
        and TO_CHAR(REC_METER_TIME,'yyyy-MM-dd') = #{recMeterTime}
      </if>
      <if test="recBaseSpotNo != null and recBaseSpotNo != ''">
        and REC_BASE_SPOT_NO LIKE '%${recBaseSpotNo}%'
      </if>
      <if test="recBaseSpotName != null and recBaseSpotName != ''">
        and REC_BASE_SPOT_NAME LIKE '%${recBaseSpotName}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_WORK_CAR_RECOVER
    where RECOVER_NO = #{recoverNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_WORK_CAR_RECOVER
    where 1!=1
    <if test="carNo != null and carNo != ''">
      or CAR_NO = #{carNo}
    </if>
    <if test="trailerNo != null and trailerNo != ''">
      or TRAILER_NO = #{trailerNo}
    </if>
    <if test="matterNo != null and matterNo != ''">
      or MATTER_NO = #{matterNo}
    </if>
    <if test="matterName != null and matterName != ''">
      or MATTER_NAME = #{matterName}
    </if>
    <if test="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="meterTypeNo != null and meterTypeNo != ''">
      or METER_TYPE_NO = #{meterTypeNo}
    </if>
    <if test="meterTypeName != null and meterTypeName != ''">
      or METER_TYPE_NAME = #{meterTypeName}
    </if>
    <if test="meterWeight != null">
      or METER_WEIGHT = #{meterWeight}
    </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="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="meterTime != null">
      or TO_CHAR(METER_TIME,'yyyy-MM-dd') = '#{meterTime}'
    </if>
    <if test="recMeterWeight != null">
      or REC_METER_WEIGHT = #{recMeterWeight}
    </if>
    <if test="recMeterTime != null">
      or TO_CHAR(REC_METER_TIME,'yyyy-MM-dd') = '#{recMeterTime}'
    </if>
    <if test="recBaseSpotNo != null and recBaseSpotNo != ''">
      or REC_BASE_SPOT_NO = #{recBaseSpotNo}
    </if>
    <if test="recBaseSpotName != null and recBaseSpotName != ''">
      or REC_BASE_SPOT_NAME = #{recBaseSpotName}
    </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover">
    insert into METER_WORK_CAR_RECOVER (RECOVER_NO, CAR_NO, TRAILER_NO,
                                        MATTER_NO, MATTER_NAME, CUSTOMER_SUPPLIER_NO,
                                        CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO,
                                        FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
                                        METER_TYPE_NO, METER_TYPE_NAME, METER_WEIGHT,
                                        CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
                                        BASE_SPOT_NO, BASE_SPOT_NAME, VALUE_FLAG,
                                        UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
                                        METER_TIME, REC_METER_WEIGHT, REC_METER_TIME,
                                        REC_BASE_SPOT_NO, REC_BASE_SPOT_NAME)
    values (#{recoverNo,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{trailerNo,jdbcType=VARCHAR},
            #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR},
            #{customerSupplierName,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR},
            #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, #{receivingUintName,jdbcType=VARCHAR},
            #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL},
            #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
            #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR},
            #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
            #{meterTime,jdbcType=TIMESTAMP}, #{recMeterWeight,jdbcType=DECIMAL}, #{recMeterTime,jdbcType=TIMESTAMP},
            #{recBaseSpotNo,jdbcType=VARCHAR}, #{recBaseSpotName,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover">
    insert into METER_WORK_CAR_RECOVER
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="recoverNo != null">
        RECOVER_NO,
      </if>
      <if test="carNo != null">
        CAR_NO,
      </if>
      <if test="trailerNo != null">
        TRAILER_NO,
      </if>
      <if test="matterNo != null">
        MATTER_NO,
      </if>
      <if test="matterName != null">
        MATTER_NAME,
      </if>
      <if test="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="meterTypeNo != null">
        METER_TYPE_NO,
      </if>
      <if test="meterTypeName != null">
        METER_TYPE_NAME,
      </if>
      <if test="meterWeight != null">
        METER_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="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="meterTime != null">
        METER_TIME,
      </if>
      <if test="recMeterWeight != null">
        REC_METER_WEIGHT,
      </if>
      <if test="recMeterTime != null">
        REC_METER_TIME,
      </if>
      <if test="recBaseSpotNo != null">
        REC_BASE_SPOT_NO,
      </if>
      <if test="recBaseSpotName != null">
        REC_BASE_SPOT_NAME,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="recoverNo != null">
        #{recoverNo,jdbcType=VARCHAR},
      </if>
      <if test="carNo != null">
        #{carNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerNo != null">
        #{trailerNo,jdbcType=VARCHAR},
      </if>
      <if test="matterNo != null">
        #{matterNo,jdbcType=VARCHAR},
      </if>
      <if test="matterName != null">
        #{matterName,jdbcType=VARCHAR},
      </if>
      <if test="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="meterTypeNo != null">
        #{meterTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeName != null">
        #{meterTypeName,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        #{meterWeight,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="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="meterTime != null">
        #{meterTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recMeterWeight != null">
        #{recMeterWeight,jdbcType=DECIMAL},
      </if>
      <if test="recMeterTime != null">
        #{recMeterTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recBaseSpotNo != null">
        #{recBaseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="recBaseSpotName != null">
        #{recBaseSpotName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover">
    update METER_WORK_CAR_RECOVER
    set CAR_NO = #{carNo,jdbcType=VARCHAR},
        TRAILER_NO = #{trailerNo,jdbcType=VARCHAR},
        MATTER_NO = #{matterNo,jdbcType=VARCHAR},
        MATTER_NAME = #{matterName,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},
        METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
        METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
        METER_WEIGHT = #{meterWeight,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},
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
        METER_TIME = #{meterTime,jdbcType=TIMESTAMP},
        REC_METER_WEIGHT = #{recMeterWeight,jdbcType=DECIMAL},
        REC_METER_TIME = #{recMeterTime,jdbcType=TIMESTAMP},
        REC_BASE_SPOT_NO = #{recBaseSpotNo,jdbcType=VARCHAR},
        REC_BASE_SPOT_NAME = #{recBaseSpotName,jdbcType=VARCHAR}
    where RECOVER_NO = #{recoverNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover">
    update METER_WORK_CAR_RECOVER
    <set>
      <if test="carNo != null">
        CAR_NO = #{carNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerNo != null">
        TRAILER_NO = #{trailerNo,jdbcType=VARCHAR},
      </if>
      <if test="matterNo != null">
        MATTER_NO = #{matterNo,jdbcType=VARCHAR},
      </if>
      <if test="matterName != null">
        MATTER_NAME = #{matterName,jdbcType=VARCHAR},
      </if>
      <if test="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="meterTypeNo != null">
        METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="meterTypeName != null">
        METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        METER_WEIGHT = #{meterWeight,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="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="meterTime != null">
        METER_TIME = #{meterTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recMeterWeight != null">
        REC_METER_WEIGHT = #{recMeterWeight,jdbcType=DECIMAL},
      </if>
      <if test="recMeterTime != null">
        REC_METER_TIME = #{recMeterTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recBaseSpotNo != null">
        REC_BASE_SPOT_NO = #{recBaseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="recBaseSpotName != null">
        REC_BASE_SPOT_NAME = #{recBaseSpotName,jdbcType=VARCHAR},
      </if>
    </set>
    where RECOVER_NO = #{recoverNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where RECOVER_NO = #{recoverNo,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_CAR_RECOVER
    (RECOVER_NO,
    CAR_NO, TRAILER_NO, MATTER_NO,
    MATTER_NAME, CUSTOMER_SUPPLIER_NO,
    CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO,
    FORWARDING_UNIT_NAME, RECEIVING_UINT_NO,
    RECEIVING_UINT_NAME, METER_TYPE_NO,
    METER_TYPE_NAME, METER_WEIGHT, CREATE_MAN_NO,
    CREATE_MAN_NAME, CREATE_TIME,
    BASE_SPOT_NO, BASE_SPOT_NAME, VALUE_FLAG,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
    METER_TIME, REC_METER_WEIGHT,
    REC_METER_TIME, REC_BASE_SPOT_NO,
    REC_BASE_SPOT_NAME)
    ( <foreach collection="list" item="item" separator="union all">
    select
    #{item.recoverNo,jdbcType=VARCHAR},
    #{item.carNo,jdbcType=VARCHAR}, #{item.trailerNo,jdbcType=VARCHAR}, #{item.matterNo,jdbcType=VARCHAR},
    #{item.matterName,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.meterTypeNo,jdbcType=VARCHAR},
    #{item.meterTypeName,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, #{item.createManNo,jdbcType=VARCHAR},
    #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
    #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR},
    #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
    #{item.meterTime,jdbcType=TIMESTAMP}, #{item.recMeterWeight,jdbcType=DECIMAL},
    #{item.recMeterTime,jdbcType=TIMESTAMP}, #{item.recBaseSpotNo,jdbcType=VARCHAR},
    #{item.recBaseSpotName,jdbcType=VARCHAR} from dual
  </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
    update METER_WORK_CAR_RECOVER
    set
    RECOVER_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.recoverNo,jdbcType=VARCHAR}
    </foreach>
    ,CAR_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
    </foreach>
    ,TRAILER_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.trailerNo,jdbcType=VARCHAR}
    </foreach>
    ,MATTER_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
    </foreach>
    ,MATTER_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
    </foreach>
    ,CUSTOMER_SUPPLIER_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
    </foreach>
    ,CUSTOMER_SUPPLIER_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
    </foreach>
    ,FORWARDING_UNIT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
    </foreach>
    ,FORWARDING_UNIT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
    </foreach>
    ,RECEIVING_UINT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
    </foreach>
    ,RECEIVING_UINT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
    </foreach>
    ,METER_TYPE_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
    </foreach>
    ,METER_TYPE_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
    </foreach>
    ,METER_WEIGHT=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
    </foreach>
    ,CREATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
    </foreach>
    ,BASE_SPOT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
    </foreach>
    ,BASE_SPOT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
    </foreach>
    ,VALUE_FLAG=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
    </foreach>
    ,METER_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.meterTime,jdbcType=TIMESTAMP}
    </foreach>
    ,REC_METER_WEIGHT=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.recMeterWeight,jdbcType=DECIMAL}
    </foreach>
    ,REC_METER_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.recMeterTime,jdbcType=TIMESTAMP}
    </foreach>
    ,REC_BASE_SPOT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.recBaseSpotNo,jdbcType=VARCHAR}
    </foreach>
    ,REC_BASE_SPOT_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case RECOVER_NO" close="end">
      when #{item.recoverNo,jdbcType=VARCHAR} then #{item.recBaseSpotName,jdbcType=VARCHAR}
    </foreach>
    where RECOVER_NO in
    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
      #{item.recoverNo,jdbcType=VARCHAR}
    </foreach>
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_WORK_CAR_RECOVER
    where RECOVER_NO in
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->

</mapper>