<?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.tcm035.mapper.TCm035Mapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tcm035.model.TCm035">
    <id column="BILLSNO" jdbcType="VARCHAR" property="billsno" />
    <result column="RECORDID" jdbcType="VARCHAR" property="recordid" />
    <result column="APPLYER" jdbcType="VARCHAR" property="applyer" />
    <result column="APPROVER" jdbcType="VARCHAR" property="approver" />
    <result column="BILLSTATUS" jdbcType="VARCHAR" property="billstatus" />
    <result column="CHARGEMAN" jdbcType="VARCHAR" property="chargeman" />
    <result column="CREATTIME" jdbcType="VARCHAR" property="creattime" />
    <result column="EQUIPMENTNAME" jdbcType="VARCHAR" property="equipmentname" />
    <result column="EXAMINEENDTIME" jdbcType="VARCHAR" property="examineendtime" />
    <result column="EXAMINESTARTTIME" jdbcType="VARCHAR" property="examinestarttime" />
    <result column="FILENAME" jdbcType="VARCHAR" property="filename" />
    <result column="NOTE" jdbcType="VARCHAR" property="note" />
    <result column="OPERATESTATUS" jdbcType="VARCHAR" property="operatestatus" />
    <result column="OPINION" jdbcType="VARCHAR" property="opinion" />
    <result column="REASONCONTENT" jdbcType="VARCHAR" property="reasoncontent" />
    <result column="RESTARTTIME" jdbcType="VARCHAR" property="restarttime" />
    <result column="SIGNTIME" jdbcType="VARCHAR" property="signtime" />
    <result column="STOPTIME" jdbcType="VARCHAR" property="stoptime" />
    <result column="TFYMEDIUMSYSTEM" jdbcType="VARCHAR" property="tfymediumsystem" />
    <result column="WORKLINKMAN" jdbcType="VARCHAR" property="worklinkman" />
    <result column="SCOPINION" jdbcType="VARCHAR" property="scopinion" />
    <result column="SCAPPROVER" jdbcType="VARCHAR" property="scapprover" />
    <result column="SCSIGNTIME" jdbcType="VARCHAR" property="scsigntime" />
    <result column="PROCESSSTANCEID" jdbcType="VARCHAR" property="processstanceid" />
  </resultMap>

  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYER, APPROVER, BILLSTATUS, CHARGEMAN, CREATTIME, EQUIPMENTNAME,
    EXAMINEENDTIME, EXAMINESTARTTIME, FILENAME, NOTE, OPERATESTATUS, OPINION, REASONCONTENT,
    RESTARTTIME, SIGNTIME, STOPTIME, TFYMEDIUMSYSTEM, WORKLINKMAN, PROCESSSTANCEID
    from T_CM_035
    <where>
      <if test="applyer != null and applyer != ''">
        and APPLYER like '%${applyer, jdbcType=VARCHAR}%'
      </if>
      <if test="worklinkman != null and worklinkman != ''">
        and WORKLINKMAN like '%${worklinkman, jdbcType=VARCHAR}%'
      </if>
      <if test="equipmentname != null and equipmentname != ''">
        and EQUIPMENTNAME like '%${equipmentname, jdbcType=VARCHAR}%'
      </if>
      <if test="filename != null and filename != ''">
        and FILENAME like '%${filename, jdbcType=VARCHAR}%'
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS = #{billstatus, jdbcType=VARCHAR}
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS = #{operatestatus, jdbcType=VARCHAR}
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME &gt;= #{creattime, jdbcType=VARCHAR}
      </if>
      <if test="creattimee != null and creattimee != ''">
        and CREATTIME &lt;= #{creattimee, jdbcType=VARCHAR}
      </if>
      <if test="restarttime != null and restarttime != ''">
        and RESTARTTIME &gt;= #{restarttime, jdbcType=VARCHAR}
      </if>
      <if test="restarttimee != null and restarttimee != ''">
        and RESTARTTIME &lt;= #{restarttimee, jdbcType=VARCHAR}
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME &gt;= #{signtime, jdbcType=VARCHAR}
      </if>
      <if test="signtimee != null and signtimee != ''">
        and SIGNTIME &lt;= #{signtimee, jdbcType=VARCHAR}
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME &gt;= #{stoptime, jdbcType=VARCHAR}
      </if>
      <if test="stoptimee != null and stoptimee != ''">
        and STOPTIME &lt;= #{stoptimee, jdbcType=VARCHAR}
      </if>
    </where>
  </select>

  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYER, APPROVER, BILLSTATUS, CHARGEMAN, CREATTIME, EQUIPMENTNAME,
    EXAMINEENDTIME, EXAMINESTARTTIME, FILENAME, NOTE, OPERATESTATUS, OPINION, REASONCONTENT,
    RESTARTTIME, SIGNTIME, STOPTIME, TFYMEDIUMSYSTEM, WORKLINKMAN, PROCESSSTANCEID
    from T_CM_035
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </select>

  <insert id="insert" parameterType="com.steerinfo.ems.tcm035.model.TCm035">
    insert into T_CM_035 (BILLSNO, APPLYER, BILLSTATUS, CHARGEMAN, CREATTIME, EQUIPMENTNAME, EXAMINEENDTIME,EXAMINESTARTTIME, 
    REASONCONTENT, FILENAME, OPERATESTATUS, RESTARTTIME, STOPTIME, TFYMEDIUMSYSTEM, WORKLINKMAN,APPROVER,OPINION,NOTE,SIGNTIME
    )
    values (#{billsno,jdbcType=VARCHAR}, #{applyer,jdbcType=VARCHAR}, #{billstatus,jdbcType=VARCHAR}, #{chargeman,jdbcType=VARCHAR},
      #{creattime,jdbcType=VARCHAR}, #{equipmentname,jdbcType=VARCHAR}, #{examineendtime,jdbcType=VARCHAR}, #{examinestarttime,jdbcType=VARCHAR},
      #{reasoncontent, jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{operatestatus,jdbcType=VARCHAR}, #{restarttime,jdbcType=VARCHAR}, #{stoptime,jdbcType=VARCHAR},
      #{tfymediumsystem,jdbcType=VARCHAR}, #{worklinkman,jdbcType=VARCHAR}, #{approver,jdbcType=VARCHAR}, #{opinion,jdbcType=VARCHAR},
      #{note,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR}
      )
  </insert>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from T_CM_035
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </delete>

  <delete id="batchDelete" parameterType="java.util.List">
    delete from T_CM_035
    where BILLSNO in
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>

  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tcm035.model.TCm035">
    update T_CM_035
    <set>
      <if test="applyer != null">
        APPLYER = #{applyer,jdbcType=VARCHAR},
      </if>
      <if test="chargeman != null">
        CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
      </if>
      <if test="equipmentname != null">
        EQUIPMENTNAME = #{equipmentname,jdbcType=VARCHAR},
      </if>
      <if test="reasoncontent != null">
        REASONCONTENT = #{reasoncontent,jdbcType=VARCHAR},
      </if>
      <if test="filename != null">
        FILENAME = #{filename,jdbcType=VARCHAR},
      </if>
      <if test="tfymediumsystem != null">
        TFYMEDIUMSYSTEM = #{tfymediumsystem,jdbcType=VARCHAR},
      </if>
      <if test="worklinkman != null">
        WORKLINKMAN = #{worklinkman,jdbcType=VARCHAR},
      </if>
      <if test="examineendtime != null">
        EXAMINEENDTIME = #{examineendtime,jdbcType=VARCHAR},
      </if>
      <if test="examinestarttime != null">
        EXAMINESTARTTIME = #{examinestarttime,jdbcType=VARCHAR},
      </if>
      <if test="creattime != null">
        CREATTIME = #{creattime,jdbcType=VARCHAR},
      </if>
      <if test="restarttime != null">
        RESTARTTIME = #{restarttime,jdbcType=VARCHAR},
      </if>
      <if test="stoptime != null">
        STOPTIME = #{stoptime,jdbcType=VARCHAR},
      </if>
      <if test="approver != null">
        APPROVER = #{approver,jdbcType=VARCHAR},
      </if>
      <if test="opinion != null">
        OPINION = #{opinion,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        NOTE = #{note,jdbcType=VARCHAR},
      </if>
      <if test="signtime != null">
        SIGNTIME = #{signtime,jdbcType=VARCHAR},
      </if>
      <if test="operatestatus != null">
        OPERATESTATUS = #{operatestatus,jdbcType=VARCHAR},
      </if>
      <if test="billstatus != null">
        BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
      </if>
    </set>
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </update>
  <select id="getMaxId" resultType="java.lang.String">
    SELECT MAX(SUBSTR(BILLSNO, LENGTH(BILLSNO) - 3)) FROM T_CM_035
  </select>
  <!--
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from T_CM_035
    where 1!=1 
      <if test="recordid != null">
        and RECORDID = #{recordid}
      </if>
      <if test="applyer != null and applyer != ''">
        and APPLYER = #{applyer}
      </if>
      <if test="approver != null and approver != ''">
        and APPROVER = #{approver}
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS = #{billstatus}
      </if>
      <if test="chargeman != null and chargeman != ''">
        and CHARGEMAN = #{chargeman}
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME = #{creattime}
      </if>
      <if test="equipmentname != null and equipmentname != ''">
        and EQUIPMENTNAME = #{equipmentname}
      </if>
      <if test="examineendtime != null and examineendtime != ''">
        and EXAMINEENDTIME = #{examineendtime}
      </if>
      <if test="examinestarttime != null and examinestarttime != ''">
        and EXAMINESTARTTIME = #{examinestarttime}
      </if>
      <if test="filename != null and filename != ''">
        and FILENAME = #{filename}
      </if>
      <if test="note != null and note != ''">
        and NOTE = #{note}
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS = #{operatestatus}
      </if>
      <if test="opinion != null and opinion != ''">
        and OPINION = #{opinion}
      </if>
      <if test="reasoncontent != null and reasoncontent != ''">
        and REASONCONTENT = #{reasoncontent}
      </if>
      <if test="restarttime != null and restarttime != ''">
        and RESTARTTIME = #{restarttime}
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME = #{signtime}
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME = #{stoptime}
      </if>
      <if test="tfymediumsystem != null and tfymediumsystem != ''">
        and TFYMEDIUMSYSTEM = #{tfymediumsystem}
      </if>
      <if test="worklinkman != null and worklinkman != ''">
        and WORKLINKMAN = #{worklinkman}
      </if>
      <if test="scopinion != null and scopinion != ''">
        and SCOPINION = #{scopinion}
      </if>
      <if test="scapprover != null and scapprover != ''">
        and SCAPPROVER = #{scapprover}
      </if>
      <if test="scsigntime != null and scsigntime != ''">
        and SCSIGNTIME = #{scsigntime}
      </if>
      <if test="processstanceid != null and processstanceid != ''">
        and PROCESSSTANCEID = #{processstanceid}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.ems.tcm035.model.TCm035">
    insert into T_CM_035 (BILLSNO, RECORDID, APPLYER, 
      APPROVER, BILLSTATUS, CHARGEMAN, 
      CREATTIME, EQUIPMENTNAME, EXAMINEENDTIME, 
      EXAMINESTARTTIME, FILENAME, NOTE, 
      OPERATESTATUS, OPINION, REASONCONTENT, 
      RESTARTTIME, SIGNTIME, STOPTIME, 
      TFYMEDIUMSYSTEM, WORKLINKMAN, SCOPINION, 
      SCAPPROVER, SCSIGNTIME, PROCESSSTANCEID
      )
    values (#{billsno,jdbcType=VARCHAR}, #{recordid,jdbcType=VARCHAR}, #{applyer,jdbcType=VARCHAR},
      #{approver,jdbcType=VARCHAR}, #{billstatus,jdbcType=VARCHAR}, #{chargeman,jdbcType=VARCHAR}, 
      #{creattime,jdbcType=VARCHAR}, #{equipmentname,jdbcType=VARCHAR}, #{examineendtime,jdbcType=VARCHAR}, 
      #{examinestarttime,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, 
      #{operatestatus,jdbcType=VARCHAR}, #{opinion,jdbcType=VARCHAR}, #{reasoncontent,jdbcType=VARCHAR}, 
      #{restarttime,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR}, #{stoptime,jdbcType=VARCHAR}, 
      #{tfymediumsystem,jdbcType=VARCHAR}, #{worklinkman,jdbcType=VARCHAR}, #{scopinion,jdbcType=VARCHAR}, 
      #{scapprover,jdbcType=VARCHAR}, #{scsigntime,jdbcType=VARCHAR}, #{processstanceid,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.ems.tcm035.model.TCm035">
    insert into T_CM_035
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="billsno != null">
        BILLSNO,
      </if>
      <if test="recordid != null">
        RECORDID,
      </if>
      <if test="applyer != null">
        APPLYER,
      </if>
      <if test="approver != null">
        APPROVER,
      </if>
      <if test="billstatus != null">
        BILLSTATUS,
      </if>
      <if test="chargeman != null">
        CHARGEMAN,
      </if>
      <if test="creattime != null">
        CREATTIME,
      </if>
      <if test="equipmentname != null">
        EQUIPMENTNAME,
      </if>
      <if test="examineendtime != null">
        EXAMINEENDTIME,
      </if>
      <if test="examinestarttime != null">
        EXAMINESTARTTIME,
      </if>
      <if test="filename != null">
        FILENAME,
      </if>
      <if test="note != null">
        NOTE,
      </if>
      <if test="operatestatus != null">
        OPERATESTATUS,
      </if>
      <if test="opinion != null">
        OPINION,
      </if>
      <if test="reasoncontent != null">
        REASONCONTENT,
      </if>
      <if test="restarttime != null">
        RESTARTTIME,
      </if>
      <if test="signtime != null">
        SIGNTIME,
      </if>
      <if test="stoptime != null">
        STOPTIME,
      </if>
      <if test="tfymediumsystem != null">
        TFYMEDIUMSYSTEM,
      </if>
      <if test="worklinkman != null">
        WORKLINKMAN,
      </if>
      <if test="scopinion != null">
        SCOPINION,
      </if>
      <if test="scapprover != null">
        SCAPPROVER,
      </if>
      <if test="scsigntime != null">
        SCSIGNTIME,
      </if>
      <if test="processstanceid != null">
        PROCESSSTANCEID,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="billsno != null">
        #{billsno,jdbcType=VARCHAR},
      </if>
      <if test="recordid != null">
        #{recordid,jdbcType=VARCHAR},
      </if>
      <if test="applyer != null">
        #{applyer,jdbcType=VARCHAR},
      </if>
      <if test="approver != null">
        #{approver,jdbcType=VARCHAR},
      </if>
      <if test="billstatus != null">
        #{billstatus,jdbcType=VARCHAR},
      </if>
      <if test="chargeman != null">
        #{chargeman,jdbcType=VARCHAR},
      </if>
      <if test="creattime != null">
        #{creattime,jdbcType=VARCHAR},
      </if>
      <if test="equipmentname != null">
        #{equipmentname,jdbcType=VARCHAR},
      </if>
      <if test="examineendtime != null">
        #{examineendtime,jdbcType=VARCHAR},
      </if>
      <if test="examinestarttime != null">
        #{examinestarttime,jdbcType=VARCHAR},
      </if>
      <if test="filename != null">
        #{filename,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        #{note,jdbcType=VARCHAR},
      </if>
      <if test="operatestatus != null">
        #{operatestatus,jdbcType=VARCHAR},
      </if>
      <if test="opinion != null">
        #{opinion,jdbcType=VARCHAR},
      </if>
      <if test="reasoncontent != null">
        #{reasoncontent,jdbcType=VARCHAR},
      </if>
      <if test="restarttime != null">
        #{restarttime,jdbcType=VARCHAR},
      </if>
      <if test="signtime != null">
        #{signtime,jdbcType=VARCHAR},
      </if>
      <if test="stoptime != null">
        #{stoptime,jdbcType=VARCHAR},
      </if>
      <if test="tfymediumsystem != null">
        #{tfymediumsystem,jdbcType=VARCHAR},
      </if>
      <if test="worklinkman != null">
        #{worklinkman,jdbcType=VARCHAR},
      </if>
      <if test="scopinion != null">
        #{scopinion,jdbcType=VARCHAR},
      </if>
      <if test="scapprover != null">
        #{scapprover,jdbcType=VARCHAR},
      </if>
      <if test="scsigntime != null">
        #{scsigntime,jdbcType=VARCHAR},
      </if>
      <if test="processstanceid != null">
        #{processstanceid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tcm035.model.TCm035">
    update T_CM_035
    set RECORDID = #{recordid,jdbcType=VARCHAR},
      APPLYER = #{applyer,jdbcType=VARCHAR},
      APPROVER = #{approver,jdbcType=VARCHAR},
      BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
      CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
      CREATTIME = #{creattime,jdbcType=VARCHAR},
      EQUIPMENTNAME = #{equipmentname,jdbcType=VARCHAR},
      EXAMINEENDTIME = #{examineendtime,jdbcType=VARCHAR},
      EXAMINESTARTTIME = #{examinestarttime,jdbcType=VARCHAR},
      FILENAME = #{filename,jdbcType=VARCHAR},
      NOTE = #{note,jdbcType=VARCHAR},
      OPERATESTATUS = #{operatestatus,jdbcType=VARCHAR},
      OPINION = #{opinion,jdbcType=VARCHAR},
      REASONCONTENT = #{reasoncontent,jdbcType=VARCHAR},
      RESTARTTIME = #{restarttime,jdbcType=VARCHAR},
      SIGNTIME = #{signtime,jdbcType=VARCHAR},
      STOPTIME = #{stoptime,jdbcType=VARCHAR},
      TFYMEDIUMSYSTEM = #{tfymediumsystem,jdbcType=VARCHAR},
      WORKLINKMAN = #{worklinkman,jdbcType=VARCHAR},
      SCOPINION = #{scopinion,jdbcType=VARCHAR},
      SCAPPROVER = #{scapprover,jdbcType=VARCHAR},
      SCSIGNTIME = #{scsigntime,jdbcType=VARCHAR},
      PROCESSSTANCEID = #{processstanceid,jdbcType=VARCHAR}
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </update>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYER, APPROVER, BILLSTATUS, CHARGEMAN, CREATTIME, EQUIPMENTNAME, 
    EXAMINEENDTIME, EXAMINESTARTTIME, FILENAME, NOTE, OPERATESTATUS, OPINION, REASONCONTENT, 
    RESTARTTIME, SIGNTIME, STOPTIME, TFYMEDIUMSYSTEM, WORKLINKMAN, SCOPINION, SCAPPROVER, 
    SCSIGNTIME, PROCESSSTANCEID
    from T_CM_035
    <where> 
      <if test="recordid != null">
        and RECORDID = #{recordid}
      </if>
      <if test="applyer != null and applyer != ''">
        and APPLYER LIKE '%${applyer}%'
      </if>
      <if test="approver != null and approver != ''">
        and APPROVER LIKE '%${approver}%'
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS LIKE '%${billstatus}%'
      </if>
      <if test="chargeman != null and chargeman != ''">
        and CHARGEMAN LIKE '%${chargeman}%'
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME LIKE '%${creattime}%'
      </if>
      <if test="equipmentname != null and equipmentname != ''">
        and EQUIPMENTNAME LIKE '%${equipmentname}%'
      </if>
      <if test="examineendtime != null and examineendtime != ''">
        and EXAMINEENDTIME LIKE '%${examineendtime}%'
      </if>
      <if test="examinestarttime != null and examinestarttime != ''">
        and EXAMINESTARTTIME LIKE '%${examinestarttime}%'
      </if>
      <if test="filename != null and filename != ''">
        and FILENAME LIKE '%${filename}%'
      </if>
      <if test="note != null and note != ''">
        and NOTE LIKE '%${note}%'
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS LIKE '%${operatestatus}%'
      </if>
      <if test="opinion != null and opinion != ''">
        and OPINION LIKE '%${opinion}%'
      </if>
      <if test="reasoncontent != null and reasoncontent != ''">
        and REASONCONTENT LIKE '%${reasoncontent}%'
      </if>
      <if test="restarttime != null and restarttime != ''">
        and RESTARTTIME LIKE '%${restarttime}%'
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME LIKE '%${signtime}%'
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME LIKE '%${stoptime}%'
      </if>
      <if test="tfymediumsystem != null and tfymediumsystem != ''">
        and TFYMEDIUMSYSTEM LIKE '%${tfymediumsystem}%'
      </if>
      <if test="worklinkman != null and worklinkman != ''">
        and WORKLINKMAN LIKE '%${worklinkman}%'
      </if>
      <if test="scopinion != null and scopinion != ''">
        and SCOPINION LIKE '%${scopinion}%'
      </if>
      <if test="scapprover != null and scapprover != ''">
        and SCAPPROVER LIKE '%${scapprover}%'
      </if>
      <if test="scsigntime != null and scsigntime != ''">
        and SCSIGNTIME LIKE '%${scsigntime}%'
      </if>
      <if test="processstanceid != null and processstanceid != ''">
        and PROCESSSTANCEID LIKE '%${processstanceid}%'
      </if>
    </where>
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into T_CM_035 
      (BILLSNO, 
      RECORDID, APPLYER, APPROVER, 
      BILLSTATUS, CHARGEMAN, CREATTIME, 
      EQUIPMENTNAME, EXAMINEENDTIME, 
      EXAMINESTARTTIME, FILENAME, NOTE, 
      OPERATESTATUS, OPINION, REASONCONTENT, 
      RESTARTTIME, SIGNTIME, STOPTIME, 
      TFYMEDIUMSYSTEM, WORKLINKMAN, 
      SCOPINION, SCAPPROVER, SCSIGNTIME, 
      PROCESSSTANCEID)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.billsno,jdbcType=VARCHAR}, 
      #{item.recordid,jdbcType=VARCHAR}, #{item.applyer,jdbcType=VARCHAR}, #{item.approver,jdbcType=VARCHAR},
      #{item.billstatus,jdbcType=VARCHAR}, #{item.chargeman,jdbcType=VARCHAR}, #{item.creattime,jdbcType=VARCHAR}, 
      #{item.equipmentname,jdbcType=VARCHAR}, #{item.examineendtime,jdbcType=VARCHAR}, 
      #{item.examinestarttime,jdbcType=VARCHAR}, #{item.filename,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
      #{item.operatestatus,jdbcType=VARCHAR}, #{item.opinion,jdbcType=VARCHAR}, #{item.reasoncontent,jdbcType=VARCHAR}, 
      #{item.restarttime,jdbcType=VARCHAR}, #{item.signtime,jdbcType=VARCHAR}, #{item.stoptime,jdbcType=VARCHAR}, 
      #{item.tfymediumsystem,jdbcType=VARCHAR}, #{item.worklinkman,jdbcType=VARCHAR}, 
      #{item.scopinion,jdbcType=VARCHAR}, #{item.scapprover,jdbcType=VARCHAR}, #{item.scsigntime,jdbcType=VARCHAR}, 
      #{item.processstanceid,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update T_CM_035
     set
       BILLSNO=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.billsno,jdbcType=VARCHAR}
       </foreach>
       ,RECORDID=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.recordid,jdbcType=VARCHAR}
       </foreach>
       ,APPLYER=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.applyer,jdbcType=VARCHAR}
       </foreach>
       ,APPROVER=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.approver,jdbcType=VARCHAR}
       </foreach>
       ,BILLSTATUS=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.billstatus,jdbcType=VARCHAR}
       </foreach>
       ,CHARGEMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.chargeman,jdbcType=VARCHAR}
       </foreach>
       ,CREATTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.creattime,jdbcType=VARCHAR}
       </foreach>
       ,EQUIPMENTNAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.equipmentname,jdbcType=VARCHAR}
       </foreach>
       ,EXAMINEENDTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.examineendtime,jdbcType=VARCHAR}
       </foreach>
       ,EXAMINESTARTTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.examinestarttime,jdbcType=VARCHAR}
       </foreach>
       ,FILENAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.filename,jdbcType=VARCHAR}
       </foreach>
       ,NOTE=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
       </foreach>
       ,OPERATESTATUS=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.operatestatus,jdbcType=VARCHAR}
       </foreach>
       ,OPINION=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.opinion,jdbcType=VARCHAR}
       </foreach>
       ,REASONCONTENT=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.reasoncontent,jdbcType=VARCHAR}
       </foreach>
       ,RESTARTTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.restarttime,jdbcType=VARCHAR}
       </foreach>
       ,SIGNTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.signtime,jdbcType=VARCHAR}
       </foreach>
       ,STOPTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.stoptime,jdbcType=VARCHAR}
       </foreach>
       ,TFYMEDIUMSYSTEM=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.tfymediumsystem,jdbcType=VARCHAR}
       </foreach>
       ,WORKLINKMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.worklinkman,jdbcType=VARCHAR}
       </foreach>
       ,SCOPINION=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.scopinion,jdbcType=VARCHAR}
       </foreach>
       ,SCAPPROVER=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.scapprover,jdbcType=VARCHAR}
       </foreach>
       ,SCSIGNTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.scsigntime,jdbcType=VARCHAR}
       </foreach>
       ,PROCESSSTANCEID=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.processstanceid,jdbcType=VARCHAR}
       </foreach>
     where BILLSNO in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.billsno,jdbcType=VARCHAR}
     </foreach> 
  </update>
  -->
</mapper>