<?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.ems.bfhyd.mapper.BfhydMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.ems.bfhyd.model.Bfhyd">
    <id column="BFHYD_ZJDH" jdbcType="VARCHAR" property="bfhydZjdh" />
    <result column="BFHYD_SYRQ" jdbcType="VARCHAR" property="bfhydSyrq" />
    <result column="BFHYD_HYRQ" jdbcType="VARCHAR" property="bfhydHyrq" />
    <result column="BFHYD_26" jdbcType="VARCHAR" property="bfhyd26" />
    <result column="BFHYD_27" jdbcType="VARCHAR" property="bfhyd27" />
    <result column="BFHYD_01" jdbcType="DECIMAL" property="bfhyd01" />
    <result column="BFHYD_02" jdbcType="DECIMAL" property="bfhyd02" />
    <result column="BFHYD_03" jdbcType="DECIMAL" property="bfhyd03" />
    <result column="BFHYD_04" jdbcType="DECIMAL" property="bfhyd04" />
    <result column="BFHYD_05" jdbcType="DECIMAL" property="bfhyd05" />
    <result column="BFHYD_06" jdbcType="DECIMAL" property="bfhyd06" />
    <result column="BFHYD_07" jdbcType="DECIMAL" property="bfhyd07" />
    <result column="BFHYD_08" jdbcType="DECIMAL" property="bfhyd08" />
    <result column="BFHYD_09" jdbcType="DECIMAL" property="bfhyd09" />
    <result column="BFHYD_10" jdbcType="DECIMAL" property="bfhyd10" />
    <result column="BFHYD_11" jdbcType="DECIMAL" property="bfhyd11" />
    <result column="BFHYD_12" jdbcType="DECIMAL" property="bfhyd12" />
    <result column="BFHYD_ZJR" jdbcType="VARCHAR" property="bfhydZjr"/>
    <result column="TS" jdbcType="TIMESTAMP" property="ts"/>
  </resultMap>
  <sql id="columns">
    BFHYD_ZJDH, BFHYD_SYRQ, BFHYD_HYRQ, BFHYD_26, BFHYD_27, BFHYD_01, BFHYD_02, BFHYD_03, 
    BFHYD_04, BFHYD_05, BFHYD_06, BFHYD_07, BFHYD_08, BFHYD_09, BFHYD_10, BFHYD_11, BFHYD_12,TS,BFHYD_ZJR
  </sql>
  <sql id="columns_alias">
    t.BFHYD_ZJDH, t.BFHYD_SYRQ, t.BFHYD_HYRQ, t.BFHYD_26, t.BFHYD_27, t.BFHYD_01, t.BFHYD_02, 
    t.BFHYD_03, t.BFHYD_04, t.BFHYD_05, t.BFHYD_06, t.BFHYD_07, t.BFHYD_08, t.BFHYD_09, 
    t.BFHYD_10, t.BFHYD_11, t.BFHYD_12
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM BFHYD
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM BFHYD t
  </sql>
  <sql id="where">
    <where> 
      <if test="bfhydZjdh != null and bfhydZjdh != ''">
        and BFHYD_ZJDH = #{bfhydZjdh}
      </if>
      <if test="bfhydSyrq != null">
        and TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = #{bfhydSyrq}
      </if>
      <if test="bfhydHyrq != null">
        and TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = #{bfhydHyrq}
      </if>
      <if test="bfhyd26 != null and bfhyd26 != ''">
        and BFHYD_26 = #{bfhyd26}
      </if>
      <if test="bfhyd27 != null and bfhyd27 != ''">
        and BFHYD_27 = #{bfhyd27}
      </if>
      <if test="bfhyd01 != null">
        and BFHYD_01 = #{bfhyd01}
      </if>
      <if test="bfhyd02 != null">
        and BFHYD_02 = #{bfhyd02}
      </if>
      <if test="bfhyd03 != null">
        and BFHYD_03 = #{bfhyd03}
      </if>
      <if test="bfhyd04 != null">
        and BFHYD_04 = #{bfhyd04}
      </if>
      <if test="bfhyd05 != null">
        and BFHYD_05 = #{bfhyd05}
      </if>
      <if test="bfhyd06 != null">
        and BFHYD_06 = #{bfhyd06}
      </if>
      <if test="bfhyd07 != null">
        and BFHYD_07 = #{bfhyd07}
      </if>
      <if test="bfhyd08 != null">
        and BFHYD_08 = #{bfhyd08}
      </if>
      <if test="bfhyd09 != null">
        and BFHYD_09 = #{bfhyd09}
      </if>
      <if test="bfhyd10 != null">
        and BFHYD_10 = #{bfhyd10}
      </if>
      <if test="bfhyd11 != null">
        and BFHYD_11 = #{bfhyd11}
      </if>
      <if test="bfhyd12 != null">
        and BFHYD_12 = #{bfhyd12}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="bfhydZjdh != null and bfhydZjdh != ''">
        and BFHYD_ZJDH LIKE '%${bfhydZjdh}%'
      </if>
      <if test="bfhydSyrq != null">
        and TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = #{bfhydSyrq}
      </if>
      <if test="bfhydHyrq != null">
        and TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = #{bfhydHyrq}
      </if>
      <if test="bfhyd26 != null and bfhyd26 != ''">
        and BFHYD_26 LIKE '%${bfhyd26}%'
      </if>
      <if test="bfhyd27 != null and bfhyd27 != ''">
        and BFHYD_27 LIKE '%${bfhyd27}%'
      </if>
      <if test="bfhyd01 != null">
        and BFHYD_01 = #{bfhyd01}
      </if>
      <if test="bfhyd02 != null">
        and BFHYD_02 = #{bfhyd02}
      </if>
      <if test="bfhyd03 != null">
        and BFHYD_03 = #{bfhyd03}
      </if>
      <if test="bfhyd04 != null">
        and BFHYD_04 = #{bfhyd04}
      </if>
      <if test="bfhyd05 != null">
        and BFHYD_05 = #{bfhyd05}
      </if>
      <if test="bfhyd06 != null">
        and BFHYD_06 = #{bfhyd06}
      </if>
      <if test="bfhyd07 != null">
        and BFHYD_07 = #{bfhyd07}
      </if>
      <if test="bfhyd08 != null">
        and BFHYD_08 = #{bfhyd08}
      </if>
      <if test="bfhyd09 != null">
        and BFHYD_09 = #{bfhyd09}
      </if>
      <if test="bfhyd10 != null">
        and BFHYD_10 = #{bfhyd10}
      </if>
      <if test="bfhyd11 != null">
        and BFHYD_11 = #{bfhyd11}
      </if>
      <if test="bfhyd12 != null">
        and BFHYD_12 = #{bfhyd12}
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from BFHYD
    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from BFHYD
    where 1!=1 
      <if test="bfhydSyrq != null">
        or TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = '#{bfhydSyrq}'
      </if>
      <if test="bfhydHyrq != null">
        or TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = '#{bfhydHyrq}'
      </if>
      <if test="bfhyd26 != null and bfhyd26 != ''">
        or BFHYD_26 = #{bfhyd26}
      </if>
      <if test="bfhyd27 != null and bfhyd27 != ''">
        or BFHYD_27 = #{bfhyd27}
      </if>
      <if test="bfhyd01 != null">
        or BFHYD_01 = #{bfhyd01}
      </if>
      <if test="bfhyd02 != null">
        or BFHYD_02 = #{bfhyd02}
      </if>
      <if test="bfhyd03 != null">
        or BFHYD_03 = #{bfhyd03}
      </if>
      <if test="bfhyd04 != null">
        or BFHYD_04 = #{bfhyd04}
      </if>
      <if test="bfhyd05 != null">
        or BFHYD_05 = #{bfhyd05}
      </if>
      <if test="bfhyd06 != null">
        or BFHYD_06 = #{bfhyd06}
      </if>
      <if test="bfhyd07 != null">
        or BFHYD_07 = #{bfhyd07}
      </if>
      <if test="bfhyd08 != null">
        or BFHYD_08 = #{bfhyd08}
      </if>
      <if test="bfhyd09 != null">
        or BFHYD_09 = #{bfhyd09}
      </if>
      <if test="bfhyd10 != null">
        or BFHYD_10 = #{bfhyd10}
      </if>
      <if test="bfhyd11 != null">
        or BFHYD_11 = #{bfhyd11}
      </if>
      <if test="bfhyd12 != null">
        or BFHYD_12 = #{bfhyd12}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
    insert into BFHYD (BFHYD_ZJDH, BFHYD_SYRQ, BFHYD_HYRQ, 
      BFHYD_26, BFHYD_27, BFHYD_01, 
      BFHYD_02, BFHYD_03, BFHYD_04, 
      BFHYD_05, BFHYD_06, BFHYD_07, 
      BFHYD_08, BFHYD_09, BFHYD_10, 
      BFHYD_11, BFHYD_12,TS,BFHYD_ZJR)
    values (#{bfhydZjdh,jdbcType=VARCHAR}, #{bfhydSyrq,jdbcType=TIMESTAMP}, #{bfhydHyrq,jdbcType=TIMESTAMP}, 
      #{bfhyd26,jdbcType=VARCHAR}, #{bfhyd27,jdbcType=VARCHAR}, #{bfhyd01,jdbcType=DECIMAL}, 
      #{bfhyd02,jdbcType=DECIMAL}, #{bfhyd03,jdbcType=DECIMAL}, #{bfhyd04,jdbcType=DECIMAL}, 
      #{bfhyd05,jdbcType=DECIMAL}, #{bfhyd06,jdbcType=DECIMAL}, #{bfhyd07,jdbcType=DECIMAL}, 
      #{bfhyd08,jdbcType=DECIMAL}, #{bfhyd09,jdbcType=DECIMAL}, #{bfhyd10,jdbcType=DECIMAL}, 
      #{bfhyd11,jdbcType=DECIMAL}, #{bfhyd12,jdbcType=DECIMAL},#{ts,jdbcType=TIMESTAMP},#{bfhydZjr,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
    insert into BFHYD
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="bfhydZjdh != null">
        BFHYD_ZJDH,
      </if>
      <if test="bfhydSyrq != null">
        BFHYD_SYRQ,
      </if>
      <if test="bfhydHyrq != null">
        BFHYD_HYRQ,
      </if>
      <if test="bfhyd26 != null">
        BFHYD_26,
      </if>
      <if test="bfhyd27 != null">
        BFHYD_27,
      </if>
      <if test="bfhyd01 != null">
        BFHYD_01,
      </if>
      <if test="bfhyd02 != null">
        BFHYD_02,
      </if>
      <if test="bfhyd03 != null">
        BFHYD_03,
      </if>
      <if test="bfhyd04 != null">
        BFHYD_04,
      </if>
      <if test="bfhyd05 != null">
        BFHYD_05,
      </if>
      <if test="bfhyd06 != null">
        BFHYD_06,
      </if>
      <if test="bfhyd07 != null">
        BFHYD_07,
      </if>
      <if test="bfhyd08 != null">
        BFHYD_08,
      </if>
      <if test="bfhyd09 != null">
        BFHYD_09,
      </if>
      <if test="bfhyd10 != null">
        BFHYD_10,
      </if>
      <if test="bfhyd11 != null">
        BFHYD_11,
      </if>
      <if test="bfhyd12 != null">
        BFHYD_12,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="bfhydZjdh != null">
        #{bfhydZjdh,jdbcType=VARCHAR},
      </if>
      <if test="bfhydSyrq != null">
        #{bfhydSyrq,jdbcType=TIMESTAMP},
      </if>
      <if test="bfhydHyrq != null">
        #{bfhydHyrq,jdbcType=TIMESTAMP},
      </if>
      <if test="bfhyd26 != null">
        #{bfhyd26,jdbcType=VARCHAR},
      </if>
      <if test="bfhyd27 != null">
        #{bfhyd27,jdbcType=VARCHAR},
      </if>
      <if test="bfhyd01 != null">
        #{bfhyd01,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd02 != null">
        #{bfhyd02,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd03 != null">
        #{bfhyd03,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd04 != null">
        #{bfhyd04,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd05 != null">
        #{bfhyd05,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd06 != null">
        #{bfhyd06,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd07 != null">
        #{bfhyd07,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd08 != null">
        #{bfhyd08,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd09 != null">
        #{bfhyd09,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd10 != null">
        #{bfhyd10,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd11 != null">
        #{bfhyd11,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd12 != null">
        #{bfhyd12,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
    update BFHYD
    set BFHYD_SYRQ = #{bfhydSyrq,jdbcType=TIMESTAMP},
      BFHYD_HYRQ = #{bfhydHyrq,jdbcType=TIMESTAMP},
      BFHYD_26 = #{bfhyd26,jdbcType=VARCHAR},
      BFHYD_27 = #{bfhyd27,jdbcType=VARCHAR},
      BFHYD_01 = #{bfhyd01,jdbcType=DECIMAL},
      BFHYD_02 = #{bfhyd02,jdbcType=DECIMAL},
      BFHYD_03 = #{bfhyd03,jdbcType=DECIMAL},
      BFHYD_04 = #{bfhyd04,jdbcType=DECIMAL},
      BFHYD_05 = #{bfhyd05,jdbcType=DECIMAL},
      BFHYD_06 = #{bfhyd06,jdbcType=DECIMAL},
      BFHYD_07 = #{bfhyd07,jdbcType=DECIMAL},
      BFHYD_08 = #{bfhyd08,jdbcType=DECIMAL},
      BFHYD_09 = #{bfhyd09,jdbcType=DECIMAL},
      BFHYD_10 = #{bfhyd10,jdbcType=DECIMAL},
      BFHYD_11 = #{bfhyd11,jdbcType=DECIMAL},
      BFHYD_12 = #{bfhyd12,jdbcType=DECIMAL},
      TS = #{ts,jdbcType=TIMESTAMP},
      BFHYD_ZJR = #{bfhydZjr,jdbcType=VARCHAR}
    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
    update BFHYD
    <set>
      <if test="bfhydSyrq != null">
        BFHYD_SYRQ = #{bfhydSyrq,jdbcType=TIMESTAMP},
      </if>
      <if test="bfhydHyrq != null">
        BFHYD_HYRQ = #{bfhydHyrq,jdbcType=TIMESTAMP},
      </if>
      <if test="bfhyd26 != null">
        BFHYD_26 = #{bfhyd26,jdbcType=VARCHAR},
      </if>
      <if test="bfhyd27 != null">
        BFHYD_27 = #{bfhyd27,jdbcType=VARCHAR},
      </if>
      <if test="bfhyd01 != null">
        BFHYD_01 = #{bfhyd01,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd02 != null">
        BFHYD_02 = #{bfhyd02,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd03 != null">
        BFHYD_03 = #{bfhyd03,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd04 != null">
        BFHYD_04 = #{bfhyd04,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd05 != null">
        BFHYD_05 = #{bfhyd05,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd06 != null">
        BFHYD_06 = #{bfhyd06,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd07 != null">
        BFHYD_07 = #{bfhyd07,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd08 != null">
        BFHYD_08 = #{bfhyd08,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd09 != null">
        BFHYD_09 = #{bfhyd09,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd10 != null">
        BFHYD_10 = #{bfhyd10,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd11 != null">
        BFHYD_11 = #{bfhyd11,jdbcType=DECIMAL},
      </if>
      <if test="bfhyd12 != null">
        BFHYD_12 = #{bfhyd12,jdbcType=DECIMAL},
      </if>
    </set>
    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where BFHYD_ZJDH = #{bfhydZjdh,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 BFHYD 
      (BFHYD_ZJDH, 
      BFHYD_SYRQ, BFHYD_HYRQ, BFHYD_26, 
      BFHYD_27, BFHYD_01, BFHYD_02, 
      BFHYD_03, BFHYD_04, BFHYD_05, 
      BFHYD_06, BFHYD_07, BFHYD_08, 
      BFHYD_09, BFHYD_10, BFHYD_11, 
      BFHYD_12)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.bfhydZjdh,jdbcType=VARCHAR}, 
      #{item.bfhydSyrq,jdbcType=TIMESTAMP}, #{item.bfhydHyrq,jdbcType=TIMESTAMP}, #{item.bfhyd26,jdbcType=VARCHAR}, 
      #{item.bfhyd27,jdbcType=VARCHAR}, #{item.bfhyd01,jdbcType=DECIMAL}, #{item.bfhyd02,jdbcType=DECIMAL}, 
      #{item.bfhyd03,jdbcType=DECIMAL}, #{item.bfhyd04,jdbcType=DECIMAL}, #{item.bfhyd05,jdbcType=DECIMAL}, 
      #{item.bfhyd06,jdbcType=DECIMAL}, #{item.bfhyd07,jdbcType=DECIMAL}, #{item.bfhyd08,jdbcType=DECIMAL}, 
      #{item.bfhyd09,jdbcType=DECIMAL}, #{item.bfhyd10,jdbcType=DECIMAL}, #{item.bfhyd11,jdbcType=DECIMAL}, 
      #{item.bfhyd12,jdbcType=DECIMAL} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update BFHYD
     set
       BFHYD_ZJDH=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydZjdh,jdbcType=VARCHAR}
       </foreach>
       ,BFHYD_SYRQ=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydSyrq,jdbcType=TIMESTAMP}
       </foreach>
       ,BFHYD_HYRQ=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydHyrq,jdbcType=TIMESTAMP}
       </foreach>
       ,BFHYD_26=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd26,jdbcType=VARCHAR}
       </foreach>
       ,BFHYD_27=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd27,jdbcType=VARCHAR}
       </foreach>
       ,BFHYD_01=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd01,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_02=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd02,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_03=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd03,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_04=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd04,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_05=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd05,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_06=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd06,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_07=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd07,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_08=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd08,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_09=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd09,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_10=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd10,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_11=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd11,jdbcType=DECIMAL}
       </foreach>
       ,BFHYD_12=
       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd12,jdbcType=DECIMAL}
       </foreach>
     where BFHYD_ZJDH in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.bfhydZjdh,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from BFHYD
    where BFHYD_ZJDH in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
   <select id="getAll" resultMap="BaseResultMap">
   SELECT TOP 150* from ( SELECT   BFHYD_ZJDH, BFHYD_SYRQ , BFHYD_HYRQ , BFHYD_26,
                    BFHYD_27 , BFHYD_01 , BFHYD_02 , BFHYD_03 ,
                    BFHYD_04 , BFHYD_05 , BFHYD_06, BFHYD_07,
                    BFHYD_08 , BFHYD_09, BFHYD_10 , BFHYD_11 , BFHYD_12 ,
                    TS
    FROM      dbo.BFHYD
    WHERE   (BFHYD_LRGS = 156) AND (BFHYD_QSRQ > '0') ) t order by t.BFHYD_HYRQ desc
   </select>
  <select id="getnewNo" parameterType="java.lang.String" resultMap="BaseResultMap">
    select *
  from BFHYD t
 where t.BFHYD_ZJDH not in
       (select t.BATCHNO
          from t_cm_0348 t
         where t.DATADATE BETWEEN to_date(#{startTime}, 'yyyy-mm-dd') and
               sysdate + 1)
   and t.TS BETWEEN to_date(#{startTime}, 'yyyy-mm-dd') and sysdate + 1
  </select>
</mapper>