<?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.baseinfo.meterbasetermtarecount.mapper.MeterBaseTermTareCountMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasetermtarecount.model.MeterBaseTermTareCount">
    <id column="COUNT_NO" jdbcType="VARCHAR" property="countNo" />
    <result column="COUNT_TYPE_NO" jdbcType="VARCHAR" property="countTypeNo" />
    <result column="COUNT_TYPE_NAME" jdbcType="VARCHAR" property="countTypeName" />
    <result column="COUNT_EDITION" jdbcType="DECIMAL" property="countEdition" />
    <result column="RATE_VALUE" jdbcType="DECIMAL" property="rateValue" />
    <result column="FIXED_WEIGHT_VALUE" jdbcType="DECIMAL" property="fixedWeightValue" />
    <result column="CONTRAST_TYPE_NO" jdbcType="VARCHAR" property="contrastTypeNo" />
    <result column="CONTRAST_TYPE_NAME" jdbcType="VARCHAR" property="contrastTypeName" />
    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
    <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
    <result column="TYPE_NO" jdbcType="VARCHAR" property="typeNo" />
    <result column="TYPE_NAME" jdbcType="VARCHAR" property="typeName" />
  </resultMap>
  <sql id="columns">
    COUNT_NO, COUNT_TYPE_NO, COUNT_TYPE_NAME, COUNT_EDITION, RATE_VALUE, FIXED_WEIGHT_VALUE,
    CONTRAST_TYPE_NO, CONTRAST_TYPE_NAME, MEMO, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
    CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME,
    DELETE_TIME, TYPE_NO, TYPE_NAME
  </sql>
  <sql id="columns_alias">
    t.COUNT_NO, t.COUNT_TYPE_NO, t.COUNT_TYPE_NAME, t.COUNT_EDITION, t.RATE_VALUE, t.FIXED_WEIGHT_VALUE,
    t.CONTRAST_TYPE_NO, t.CONTRAST_TYPE_NAME, t.MEMO, t.VALUE_FLAG, t.CREATE_MAN_NO,
    t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME,
    t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.TYPE_NO, t.TYPE_NAME
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_BASE_TERM_TARE_COUNT
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_BASE_TERM_TARE_COUNT t
  </sql>
  <sql id="where">
    <where>
      <if test="countNo != null and countNo != ''">
        and COUNT_NO = #{countNo}
      </if>
      <if test="countTypeNo != null and countTypeNo != ''">
        and COUNT_TYPE_NO = #{countTypeNo}
      </if>
      <if test="countTypeName != null and countTypeName != ''">
        and COUNT_TYPE_NAME = #{countTypeName}
      </if>
      <if test="countEdition != null">
        and COUNT_EDITION = #{countEdition}
      </if>
      <if test="rateValue != null">
        and RATE_VALUE = #{rateValue}
      </if>
      <if test="fixedWeightValue != null">
        and FIXED_WEIGHT_VALUE = #{fixedWeightValue}
      </if>
      <if test="contrastTypeNo != null and contrastTypeNo != ''">
        and CONTRAST_TYPE_NO = #{contrastTypeNo}
      </if>
      <if test="contrastTypeName != null and contrastTypeName != ''">
        and CONTRAST_TYPE_NAME = #{contrastTypeName}
      </if>
      <if test="memo != null and memo != ''">
        and MEMO = #{memo}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO = #{createManNo}
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO = #{updateManNo}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="typeNo != null and typeNo != ''">
        and TYPE_NO = #{typeNo}
      </if>
      <if test="typeName != null and typeName != ''">
        and TYPE_NAME = #{typeName}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where>
      <if test="countNo != null and countNo != ''">
        and COUNT_NO LIKE '%${countNo}%'
      </if>
      <if test="countTypeNo != null and countTypeNo != ''">
        and COUNT_TYPE_NO LIKE '%${countTypeNo}%'
      </if>
      <if test="countTypeName != null and countTypeName != ''">
        and COUNT_TYPE_NAME LIKE '%${countTypeName}%'
      </if>
      <if test="countEdition != null">
        and COUNT_EDITION = #{countEdition}
      </if>
      <if test="rateValue != null">
        and RATE_VALUE = #{rateValue}
      </if>
      <if test="fixedWeightValue != null">
        and FIXED_WEIGHT_VALUE = #{fixedWeightValue}
      </if>
      <if test="contrastTypeNo != null and contrastTypeNo != ''">
        and CONTRAST_TYPE_NO LIKE '%${contrastTypeNo}%'
      </if>
      <if test="contrastTypeName != null and contrastTypeName != ''">
        and CONTRAST_TYPE_NAME LIKE '%${contrastTypeName}%'
      </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="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO LIKE '%${createManNo}%'
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME LIKE '%${createManName}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="typeNo != null and typeNo != ''">
        and TYPE_NO LIKE '%${typeNo}%'
      </if>
      <if test="typeName != null and typeName != ''">
        and TYPE_NAME LIKE '%${typeName}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_TERM_TARE_COUNT
    where COUNT_NO = #{countNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_TERM_TARE_COUNT
    where 1!=1
    <if test="countTypeNo != null and countTypeNo != ''">
      or COUNT_TYPE_NO = #{countTypeNo}
    </if>
    <if test="countTypeName != null and countTypeName != ''">
      or COUNT_TYPE_NAME = #{countTypeName}
    </if>
    <if test="countEdition != null">
      or COUNT_EDITION = #{countEdition}
    </if>
    <if test="rateValue != null">
      or RATE_VALUE = #{rateValue}
    </if>
    <if test="fixedWeightValue != null">
      or FIXED_WEIGHT_VALUE = #{fixedWeightValue}
    </if>
    <if test="contrastTypeNo != null and contrastTypeNo != ''">
      or CONTRAST_TYPE_NO = #{contrastTypeNo}
    </if>
    <if test="contrastTypeName != null and contrastTypeName != ''">
      or CONTRAST_TYPE_NAME = #{contrastTypeName}
    </if>
    <if test="memo != null and memo != ''">
      or MEMO = #{memo}
    </if>
    <if test="valueFlag != null and valueFlag != ''">
      or VALUE_FLAG = #{valueFlag}
    </if>
    <if test="createManNo != null and createManNo != ''">
      or CREATE_MAN_NO = #{createManNo}
    </if>
    <if test="createManName != null and createManName != ''">
      or CREATE_MAN_NAME = #{createManName}
    </if>
    <if test="createTime != null">
      or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
    </if>
    <if test="updateManNo != null and updateManNo != ''">
      or UPDATE_MAN_NO = #{updateManNo}
    </if>
    <if test="updateManName != null and updateManName != ''">
      or UPDATE_MAN_NAME = #{updateManName}
    </if>
    <if test="updateTime != null">
      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
    </if>
    <if test="deleteManNo != null and deleteManNo != ''">
      or DELETE_MAN_NO = #{deleteManNo}
    </if>
    <if test="deleteManName != null and deleteManName != ''">
      or DELETE_MAN_NAME = #{deleteManName}
    </if>
    <if test="deleteTime != null">
      or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
    </if>
    <if test="typeNo != null and typeNo != ''">
      or TYPE_NO = #{typeNo}
    </if>
    <if test="typeName != null and typeName != ''">
      or TYPE_NAME = #{typeName}
    </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasetermtarecount.model.MeterBaseTermTareCount">
    insert into METER_BASE_TERM_TARE_COUNT (COUNT_NO, COUNT_TYPE_NO, COUNT_TYPE_NAME,
                                            COUNT_EDITION, RATE_VALUE, FIXED_WEIGHT_VALUE,
                                            CONTRAST_TYPE_NO, CONTRAST_TYPE_NAME, MEMO,
                                            VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
                                            CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
                                            UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME,
                                            DELETE_TIME, TYPE_NO, TYPE_NAME
    )
    values (#{countNo,jdbcType=VARCHAR}, #{countTypeNo,jdbcType=VARCHAR}, #{countTypeName,jdbcType=VARCHAR},
            #{countEdition,jdbcType=DECIMAL}, #{rateValue,jdbcType=DECIMAL}, #{fixedWeightValue,jdbcType=DECIMAL},
            #{contrastTypeNo,jdbcType=VARCHAR}, #{contrastTypeName,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR},
            #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
            #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR},
            #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR},
            #{deleteTime,jdbcType=TIMESTAMP}, #{typeNo,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR}
           )
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasetermtarecount.model.MeterBaseTermTareCount">
    insert into METER_BASE_TERM_TARE_COUNT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="countNo != null">
        COUNT_NO,
      </if>
      <if test="countTypeNo != null">
        COUNT_TYPE_NO,
      </if>
      <if test="countTypeName != null">
        COUNT_TYPE_NAME,
      </if>
      <if test="countEdition != null">
        COUNT_EDITION,
      </if>
      <if test="rateValue != null">
        RATE_VALUE,
      </if>
      <if test="fixedWeightValue != null">
        FIXED_WEIGHT_VALUE,
      </if>
      <if test="contrastTypeNo != null">
        CONTRAST_TYPE_NO,
      </if>
      <if test="contrastTypeName != null">
        CONTRAST_TYPE_NAME,
      </if>
      <if test="memo != null">
        MEMO,
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG,
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO,
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO,
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO,
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME,
      </if>
      <if test="deleteTime != null">
        DELETE_TIME,
      </if>
      <if test="typeNo != null">
        TYPE_NO,
      </if>
      <if test="typeName != null">
        TYPE_NAME,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="countNo != null">
        #{countNo,jdbcType=VARCHAR},
      </if>
      <if test="countTypeNo != null">
        #{countTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="countTypeName != null">
        #{countTypeName,jdbcType=VARCHAR},
      </if>
      <if test="countEdition != null">
        #{countEdition,jdbcType=DECIMAL},
      </if>
      <if test="rateValue != null">
        #{rateValue,jdbcType=DECIMAL},
      </if>
      <if test="fixedWeightValue != null">
        #{fixedWeightValue,jdbcType=DECIMAL},
      </if>
      <if test="contrastTypeNo != null">
        #{contrastTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="contrastTypeName != null">
        #{contrastTypeName,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="typeNo != null">
        #{typeNo,jdbcType=VARCHAR},
      </if>
      <if test="typeName != null">
        #{typeName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasetermtarecount.model.MeterBaseTermTareCount">
    update METER_BASE_TERM_TARE_COUNT
    set COUNT_TYPE_NO = #{countTypeNo,jdbcType=VARCHAR},
        COUNT_TYPE_NAME = #{countTypeName,jdbcType=VARCHAR},
        COUNT_EDITION = #{countEdition,jdbcType=DECIMAL},
        RATE_VALUE = #{rateValue,jdbcType=DECIMAL},
        FIXED_WEIGHT_VALUE = #{fixedWeightValue,jdbcType=DECIMAL},
        CONTRAST_TYPE_NO = #{contrastTypeNo,jdbcType=VARCHAR},
        CONTRAST_TYPE_NAME = #{contrastTypeName,jdbcType=VARCHAR},
        MEMO = #{memo,jdbcType=VARCHAR},
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
        TYPE_NO = #{typeNo,jdbcType=VARCHAR},
        TYPE_NAME = #{typeName,jdbcType=VARCHAR}
    where COUNT_NO = #{countNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasetermtarecount.model.MeterBaseTermTareCount">
    update METER_BASE_TERM_TARE_COUNT
    <set>
      <if test="countTypeNo != null">
        COUNT_TYPE_NO = #{countTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="countTypeName != null">
        COUNT_TYPE_NAME = #{countTypeName,jdbcType=VARCHAR},
      </if>
      <if test="countEdition != null">
        COUNT_EDITION = #{countEdition,jdbcType=DECIMAL},
      </if>
      <if test="rateValue != null">
        RATE_VALUE = #{rateValue,jdbcType=DECIMAL},
      </if>
      <if test="fixedWeightValue != null">
        FIXED_WEIGHT_VALUE = #{fixedWeightValue,jdbcType=DECIMAL},
      </if>
      <if test="contrastTypeNo != null">
        CONTRAST_TYPE_NO = #{contrastTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="contrastTypeName != null">
        CONTRAST_TYPE_NAME = #{contrastTypeName,jdbcType=VARCHAR},
      </if>
      <if test="memo != null">
        MEMO = #{memo,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="typeNo != null">
        TYPE_NO = #{typeNo,jdbcType=VARCHAR},
      </if>
      <if test="typeName != null">
        TYPE_NAME = #{typeName,jdbcType=VARCHAR},
      </if>
    </set>
    where COUNT_NO = #{countNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where COUNT_NO = #{countNo,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_BASE_TERM_TARE_COUNT
    (COUNT_NO,
    COUNT_TYPE_NO, COUNT_TYPE_NAME, COUNT_EDITION,
    RATE_VALUE, FIXED_WEIGHT_VALUE,
    CONTRAST_TYPE_NO, CONTRAST_TYPE_NAME,
    MEMO, VALUE_FLAG, CREATE_MAN_NO,
    CREATE_MAN_NAME, CREATE_TIME,
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
    DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME,
    TYPE_NO, TYPE_NAME)
    ( <foreach collection="list" item="item" separator="union all">
    select
    #{item.countNo,jdbcType=VARCHAR},
    #{item.countTypeNo,jdbcType=VARCHAR}, #{item.countTypeName,jdbcType=VARCHAR}, #{item.countEdition,jdbcType=DECIMAL},
    #{item.rateValue,jdbcType=DECIMAL}, #{item.fixedWeightValue,jdbcType=DECIMAL},
    #{item.contrastTypeNo,jdbcType=VARCHAR}, #{item.contrastTypeName,jdbcType=VARCHAR},
    #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR},
    #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
    #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
    #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
    #{item.typeNo,jdbcType=VARCHAR}, #{item.typeName,jdbcType=VARCHAR} from dual
  </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
    update METER_BASE_TERM_TARE_COUNT
    set
    COUNT_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.countNo,jdbcType=VARCHAR}
    </foreach>
    ,COUNT_TYPE_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.countTypeNo,jdbcType=VARCHAR}
    </foreach>
    ,COUNT_TYPE_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.countTypeName,jdbcType=VARCHAR}
    </foreach>
    ,COUNT_EDITION=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.countEdition,jdbcType=DECIMAL}
    </foreach>
    ,RATE_VALUE=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.rateValue,jdbcType=DECIMAL}
    </foreach>
    ,FIXED_WEIGHT_VALUE=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.fixedWeightValue,jdbcType=DECIMAL}
    </foreach>
    ,CONTRAST_TYPE_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.contrastTypeNo,jdbcType=VARCHAR}
    </foreach>
    ,CONTRAST_TYPE_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.contrastTypeName,jdbcType=VARCHAR}
    </foreach>
    ,MEMO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
    </foreach>
    ,VALUE_FLAG=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
    </foreach>
    ,CREATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
    </foreach>
    ,UPDATE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
    </foreach>
    ,UPDATE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
    </foreach>
    ,DELETE_MAN_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
    </foreach>
    ,DELETE_MAN_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
    </foreach>
    ,DELETE_TIME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
    </foreach>
    ,TYPE_NO=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.typeNo,jdbcType=VARCHAR}
    </foreach>
    ,TYPE_NAME=
    <foreach collection="list" item="item" index="index" separator=" " open="case COUNT_NO" close="end">
      when #{item.countNo,jdbcType=VARCHAR} then #{item.typeName,jdbcType=VARCHAR}
    </foreach>
    where COUNT_NO in
    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
      #{item.countNo,jdbcType=VARCHAR}
    </foreach>
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_TERM_TARE_COUNT
    where COUNT_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(COUNT_NO, LENGTH(COUNT_NO) -3))),0) + 1,4,'0') COUNT_NO
    FROM METER_BASE_TERM_TARE_COUNT
  </select>
</mapper>