<?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.tcm0365.mapper.TCm0365Mapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.ems.tcm0365.model.TCm0365">
    <id column="BILLSNO" jdbcType="VARCHAR" property="billsno" />
    <result column="RECORDID" jdbcType="VARCHAR" property="recordid" />
    <result column="APPLYMAN" jdbcType="VARCHAR" property="applyman" />
    <result column="ATTENTION" jdbcType="VARCHAR" property="attention" />
    <result column="BILLSTATUS" jdbcType="VARCHAR" property="billstatus" />
    <result column="CHANGEELECTRICROOM" jdbcType="VARCHAR" property="changeelectricroom" />
    <result column="CHARGEMAN" jdbcType="VARCHAR" property="chargeman" />
    <result column="CHARGETEL" jdbcType="VARCHAR" property="chargetel" />
    <result column="CONTENT" jdbcType="VARCHAR" property="content" />
    <result column="WORKCONTENT" jdbcType="VARCHAR" property="workcontent" />
    <result column="CONTENTCHANGE" jdbcType="VARCHAR" property="contentchange" />
    <result column="CREATTIME" jdbcType="VARCHAR" property="creattime" />
    <result column="EXECUTIVECHARGEMAN" jdbcType="VARCHAR" property="executivechargeman" />
    <result column="EXECUTIVESITUATION" jdbcType="VARCHAR" property="executivesituation" />
    <result column="EXECUTIVETIME" jdbcType="VARCHAR" property="executivetime" />
    <result column="LINEEQUIP" jdbcType="VARCHAR" property="lineequip" />
    <result column="MANNAME" jdbcType="VARCHAR" property="manname" />
    <result column="MEDIUMSYSTEM" jdbcType="VARCHAR" property="mediumsystem" />
    <result column="NOTE" jdbcType="VARCHAR" property="note" />
    <result column="NOTICETIME" jdbcType="VARCHAR" property="noticetime" />
    <result column="OPERATESTATUS" jdbcType="VARCHAR" property="operatestatus" />
    <result column="RUNWAY" jdbcType="VARCHAR" property="runway" />
    <result column="SIGNMAN" jdbcType="VARCHAR" property="signman" />
    <result column="SIGNTIME" jdbcType="VARCHAR" property="signtime" />
    <result column="STARTTIME" jdbcType="VARCHAR" property="starttime" />
    <result column="STOPTIME" jdbcType="VARCHAR" property="stoptime" />
    <result column="TASKSTATUS" jdbcType="VARCHAR" property="taskstatus" />
    <result column="TDSTARTTIME" jdbcType="VARCHAR" property="tdstarttime" />
    <result column="TDSTOPTIME" jdbcType="VARCHAR" property="tdstoptime" />
  </resultMap>

  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYMAN, ATTENTION, BILLSTATUS, CHANGEELECTRICROOM, CHARGEMAN,
    CHARGETEL, CONTENT, WORKCONTENT, CONTENTCHANGE, CREATTIME, EXECUTIVECHARGEMAN, EXECUTIVESITUATION,
    EXECUTIVETIME, LINEEQUIP, MANNAME, MEDIUMSYSTEM, NOTE, NOTICETIME, OPERATESTATUS,
    RUNWAY, SIGNMAN, SIGNTIME, STARTTIME, STOPTIME, TASKSTATUS, TDSTARTTIME, TDSTOPTIME
    from T_CM_0365
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </select>

  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYMAN, ATTENTION, BILLSTATUS, CHANGEELECTRICROOM, CHARGEMAN,
    CHARGETEL, CONTENT, WORKCONTENT, CONTENTCHANGE, CREATTIME, EXECUTIVECHARGEMAN, EXECUTIVESITUATION,
    EXECUTIVETIME, LINEEQUIP, MANNAME, MEDIUMSYSTEM, NOTE, NOTICETIME, OPERATESTATUS,
    RUNWAY, SIGNMAN, SIGNTIME, STARTTIME, STOPTIME, TASKSTATUS, TDSTARTTIME, TDSTOPTIME
    from T_CM_0365
    <where>
      <if test="applyman != null and applyman != ''">
        and APPLYMAN like '%${applyman}%'
      </if>
      <if test="manname != null and manname != ''">
        and MANNAME like '%${manname}%'
      </if>
      <if test="lineequip != null and lineequip != ''">
        and LINEEQUIP like '%${lineequip}%'
      </if>
      <if test="changeelectricroom != null and changeelectricroom != ''">
        and CHANGEELECTRICROOM like '%${changeelectricroom}%'
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS = #{operatestatus}
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS = #{billstatus}
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME &gt;= #{creattime}
      </if>
      <if test="creattimee != null and creattimee != ''">
        and CREATTIME &lt;= #{creattimee}
      </if>
      <if test="executivetime != null and executivetime != ''">
        and EXECUTIVETIME &gt;= #{executivetime}
      </if>
      <if test="executivetimee != null and executivetimee != ''">
        and EXECUTIVETIME &lt;= #{executivetimee}
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME &gt;= #{signtime}
      </if>
      <if test="signtimee != null and signtimee != ''">
        and SIGNTIME &lt;= #{signtimee}
      </if>
      <if test="starttime != null and starttime != ''">
        and STARTTIME &gt;= #{starttime}
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME &lt;= #{stoptime}
      </if>
      <if test="tdstarttime != null and tdstarttime != ''">
        and TDSTARTTIME &gt;= #{tdstarttime}
      </if>
      <if test="tdstoptime != null and tdstoptime != ''">
        and TDSTOPTIME &lt;= #{tdstoptime}
      </if>
    </where>
  </select>

  <insert id="insert" parameterType="com.steerinfo.ems.tcm0365.model.TCm0365">
    insert into T_CM_0365 (BILLSNO, RECORDID, APPLYMAN,
      ATTENTION, BILLSTATUS, CHANGEELECTRICROOM,
      CHARGEMAN, CHARGETEL, CONTENT, WORKCONTENT,
      CONTENTCHANGE, CREATTIME, EXECUTIVECHARGEMAN,
      EXECUTIVESITUATION, EXECUTIVETIME, LINEEQUIP,
      MANNAME, MEDIUMSYSTEM, NOTE,
      NOTICETIME, OPERATESTATUS, RUNWAY,
      SIGNMAN, SIGNTIME, STARTTIME,
      STOPTIME, TASKSTATUS, TDSTARTTIME,
      TDSTOPTIME)
    values (#{billsno,jdbcType=VARCHAR}, #{recordid,jdbcType=VARCHAR}, #{applyman,jdbcType=VARCHAR},
      #{attention,jdbcType=VARCHAR}, #{billstatus,jdbcType=VARCHAR}, #{changeelectricroom,jdbcType=VARCHAR},
      #{chargeman,jdbcType=VARCHAR}, #{chargetel,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{workcontent, jdbcType=VARCHAR},
      #{contentchange,jdbcType=VARCHAR}, #{creattime,jdbcType=VARCHAR}, #{executivechargeman,jdbcType=VARCHAR},
      #{executivesituation,jdbcType=VARCHAR}, #{executivetime,jdbcType=VARCHAR}, #{lineequip,jdbcType=VARCHAR},
      #{manname,jdbcType=VARCHAR}, #{mediumsystem,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR},
      #{noticetime,jdbcType=VARCHAR}, #{operatestatus,jdbcType=VARCHAR}, #{runway,jdbcType=VARCHAR},
      #{signman,jdbcType=VARCHAR}, #{signtime,jdbcType=VARCHAR}, #{starttime,jdbcType=VARCHAR},
      #{stoptime,jdbcType=VARCHAR}, #{taskstatus,jdbcType=VARCHAR}, #{tdstarttime,jdbcType=VARCHAR},
      #{tdstoptime,jdbcType=VARCHAR})
  </insert>

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

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

  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.tcm0365.model.TCm0365">
    update T_CM_0365
    <set>
      <if test="applyman != null">
        APPLYMAN = #{applyman,jdbcType=VARCHAR},
      </if>
      <if test="attention != null">
        ATTENTION = #{attention,jdbcType=VARCHAR},
      </if>
      <if test="billstatus != null">
        BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
      </if>
      <if test="changeelectricroom != null">
        CHANGEELECTRICROOM = #{changeelectricroom,jdbcType=VARCHAR},
      </if>
      <if test="chargeman != null">
        CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
      </if>
      <if test="chargetel != null">
        CHARGETEL = #{chargetel,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        CONTENT = #{content,jdbcType=VARCHAR},
      </if>
      <if test="workcontent != null">
        WORKCONTENT = #{workcontent,jdbcType=VARCHAR},
      </if>
      <if test="contentchange != null">
        CONTENTCHANGE = #{contentchange,jdbcType=VARCHAR},
      </if>
      <if test="creattime != null">
        CREATTIME = #{creattime,jdbcType=VARCHAR},
      </if>
      <if test="lineequip != null">
        LINEEQUIP = #{lineequip,jdbcType=VARCHAR},
      </if>
      <if test="manname != null">
        MANNAME = #{manname,jdbcType=VARCHAR},
      </if>
      <if test="operatestatus != null">
        OPERATESTATUS = #{operatestatus,jdbcType=VARCHAR},
      </if>
      <if test="runway != null">
        RUNWAY = #{runway,jdbcType=VARCHAR},
      </if>
      <if test="starttime != null">
        STARTTIME = #{starttime,jdbcType=VARCHAR},
      </if>
      <if test="stoptime != null">
        STOPTIME = #{stoptime,jdbcType=VARCHAR},
      </if>
      <if test="taskstatus != null">
        TASKSTATUS = #{taskstatus,jdbcType=VARCHAR},
      </if>
      <if test="tdstarttime != null">
        TDSTARTTIME = #{tdstarttime,jdbcType=VARCHAR},
      </if>
      <if test="tdstoptime != null">
        TDSTOPTIME = #{tdstoptime,jdbcType=VARCHAR},
      </if>
      <if test="signman != null">
        SIGNMAN = #{signman,jdbcType=VARCHAR},
      </if>
      <if test="signtime != null">
        SIGNTIME = #{signtime,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        NOTE = #{note,jdbcType=VARCHAR},
      </if>
      <if test="executivechargeman != null">
        EXECUTIVECHARGEMAN = #{executivechargeman,jdbcType=VARCHAR},
      </if>
      <if test="executivesituation != null">
        EXECUTIVESITUATION = #{executivesituation,jdbcType=VARCHAR},
      </if>
      <if test="executivetime != null">
        EXECUTIVETIME = #{executivetime,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_0365
  </select>
  <!--
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from T_CM_0365
    where 1!=1 
      <if test="recordid != null">
        and RECORDID = #{recordid}
      </if>
      <if test="applyman != null and applyman != ''">
        and APPLYMAN = #{applyman}
      </if>
      <if test="attention != null and attention != ''">
        and ATTENTION = #{attention}
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS = #{billstatus}
      </if>
      <if test="changeelectricroom != null and changeelectricroom != ''">
        and CHANGEELECTRICROOM = #{changeelectricroom}
      </if>
      <if test="chargeman != null and chargeman != ''">
        and CHARGEMAN = #{chargeman}
      </if>
      <if test="chargetel != null and chargetel != ''">
        and CHARGETEL = #{chargetel}
      </if>
      <if test="content != null and content != ''">
        and CONTENT = #{content}
      </if>
      <if test="contentchange != null and contentchange != ''">
        and CONTENTCHANGE = #{contentchange}
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME = #{creattime}
      </if>
      <if test="executivechargeman != null and executivechargeman != ''">
        and EXECUTIVECHARGEMAN = #{executivechargeman}
      </if>
      <if test="executivesituation != null and executivesituation != ''">
        and EXECUTIVESITUATION = #{executivesituation}
      </if>
      <if test="executivetime != null and executivetime != ''">
        and EXECUTIVETIME = #{executivetime}
      </if>
      <if test="lineequip != null and lineequip != ''">
        and LINEEQUIP = #{lineequip}
      </if>
      <if test="manname != null and manname != ''">
        and MANNAME = #{manname}
      </if>
      <if test="mediumsystem != null and mediumsystem != ''">
        and MEDIUMSYSTEM = #{mediumsystem}
      </if>
      <if test="note != null and note != ''">
        and NOTE = #{note}
      </if>
      <if test="noticetime != null and noticetime != ''">
        and NOTICETIME = #{noticetime}
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS = #{operatestatus}
      </if>
      <if test="runway != null and runway != ''">
        and RUNWAY = #{runway}
      </if>
      <if test="signman != null and signman != ''">
        and SIGNMAN = #{signman}
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME = #{signtime}
      </if>
      <if test="starttime != null and starttime != ''">
        and STARTTIME = #{starttime}
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME = #{stoptime}
      </if>
      <if test="taskstatus != null and taskstatus != ''">
        and TASKSTATUS = #{taskstatus}
      </if>
      <if test="tdstarttime != null and tdstarttime != ''">
        and TDSTARTTIME = #{tdstarttime}
      </if>
      <if test="tdstoptime != null and tdstoptime != ''">
        and TDSTOPTIME = #{tdstoptime}
      </if>
  </delete>
  <insert id="insertSelective" parameterType="com.steerinfo.ems.tcm0365.model.TCm0365">
    insert into T_CM_0365
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="billsno != null">
        BILLSNO,
      </if>
      <if test="recordid != null">
        RECORDID,
      </if>
      <if test="applyman != null">
        APPLYMAN,
      </if>
      <if test="attention != null">
        ATTENTION,
      </if>
      <if test="billstatus != null">
        BILLSTATUS,
      </if>
      <if test="changeelectricroom != null">
        CHANGEELECTRICROOM,
      </if>
      <if test="chargeman != null">
        CHARGEMAN,
      </if>
      <if test="chargetel != null">
        CHARGETEL,
      </if>
      <if test="content != null">
        CONTENT,
      </if>
      <if test="contentchange != null">
        CONTENTCHANGE,
      </if>
      <if test="creattime != null">
        CREATTIME,
      </if>
      <if test="executivechargeman != null">
        EXECUTIVECHARGEMAN,
      </if>
      <if test="executivesituation != null">
        EXECUTIVESITUATION,
      </if>
      <if test="executivetime != null">
        EXECUTIVETIME,
      </if>
      <if test="lineequip != null">
        LINEEQUIP,
      </if>
      <if test="manname != null">
        MANNAME,
      </if>
      <if test="mediumsystem != null">
        MEDIUMSYSTEM,
      </if>
      <if test="note != null">
        NOTE,
      </if>
      <if test="noticetime != null">
        NOTICETIME,
      </if>
      <if test="operatestatus != null">
        OPERATESTATUS,
      </if>
      <if test="runway != null">
        RUNWAY,
      </if>
      <if test="signman != null">
        SIGNMAN,
      </if>
      <if test="signtime != null">
        SIGNTIME,
      </if>
      <if test="starttime != null">
        STARTTIME,
      </if>
      <if test="stoptime != null">
        STOPTIME,
      </if>
      <if test="taskstatus != null">
        TASKSTATUS,
      </if>
      <if test="tdstarttime != null">
        TDSTARTTIME,
      </if>
      <if test="tdstoptime != null">
        TDSTOPTIME,
      </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="applyman != null">
        #{applyman,jdbcType=VARCHAR},
      </if>
      <if test="attention != null">
        #{attention,jdbcType=VARCHAR},
      </if>
      <if test="billstatus != null">
        #{billstatus,jdbcType=VARCHAR},
      </if>
      <if test="changeelectricroom != null">
        #{changeelectricroom,jdbcType=VARCHAR},
      </if>
      <if test="chargeman != null">
        #{chargeman,jdbcType=VARCHAR},
      </if>
      <if test="chargetel != null">
        #{chargetel,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="contentchange != null">
        #{contentchange,jdbcType=VARCHAR},
      </if>
      <if test="creattime != null">
        #{creattime,jdbcType=VARCHAR},
      </if>
      <if test="executivechargeman != null">
        #{executivechargeman,jdbcType=VARCHAR},
      </if>
      <if test="executivesituation != null">
        #{executivesituation,jdbcType=VARCHAR},
      </if>
      <if test="executivetime != null">
        #{executivetime,jdbcType=VARCHAR},
      </if>
      <if test="lineequip != null">
        #{lineequip,jdbcType=VARCHAR},
      </if>
      <if test="manname != null">
        #{manname,jdbcType=VARCHAR},
      </if>
      <if test="mediumsystem != null">
        #{mediumsystem,jdbcType=VARCHAR},
      </if>
      <if test="note != null">
        #{note,jdbcType=VARCHAR},
      </if>
      <if test="noticetime != null">
        #{noticetime,jdbcType=VARCHAR},
      </if>
      <if test="operatestatus != null">
        #{operatestatus,jdbcType=VARCHAR},
      </if>
      <if test="runway != null">
        #{runway,jdbcType=VARCHAR},
      </if>
      <if test="signman != null">
        #{signman,jdbcType=VARCHAR},
      </if>
      <if test="signtime != null">
        #{signtime,jdbcType=VARCHAR},
      </if>
      <if test="starttime != null">
        #{starttime,jdbcType=VARCHAR},
      </if>
      <if test="stoptime != null">
        #{stoptime,jdbcType=VARCHAR},
      </if>
      <if test="taskstatus != null">
        #{taskstatus,jdbcType=VARCHAR},
      </if>
      <if test="tdstarttime != null">
        #{tdstarttime,jdbcType=VARCHAR},
      </if>
      <if test="tdstoptime != null">
        #{tdstoptime,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.tcm0365.model.TCm0365">
    update T_CM_0365
    set RECORDID = #{recordid,jdbcType=VARCHAR},
      APPLYMAN = #{applyman,jdbcType=VARCHAR},
      ATTENTION = #{attention,jdbcType=VARCHAR},
      BILLSTATUS = #{billstatus,jdbcType=VARCHAR},
      CHANGEELECTRICROOM = #{changeelectricroom,jdbcType=VARCHAR},
      CHARGEMAN = #{chargeman,jdbcType=VARCHAR},
      CHARGETEL = #{chargetel,jdbcType=VARCHAR},
      CONTENT = #{content,jdbcType=VARCHAR},
      CONTENTCHANGE = #{contentchange,jdbcType=VARCHAR},
      CREATTIME = #{creattime,jdbcType=VARCHAR},
      EXECUTIVECHARGEMAN = #{executivechargeman,jdbcType=VARCHAR},
      EXECUTIVESITUATION = #{executivesituation,jdbcType=VARCHAR},
      EXECUTIVETIME = #{executivetime,jdbcType=VARCHAR},
      LINEEQUIP = #{lineequip,jdbcType=VARCHAR},
      MANNAME = #{manname,jdbcType=VARCHAR},
      MEDIUMSYSTEM = #{mediumsystem,jdbcType=VARCHAR},
      NOTE = #{note,jdbcType=VARCHAR},
      NOTICETIME = #{noticetime,jdbcType=VARCHAR},
      OPERATESTATUS = #{operatestatus,jdbcType=VARCHAR},
      RUNWAY = #{runway,jdbcType=VARCHAR},
      SIGNMAN = #{signman,jdbcType=VARCHAR},
      SIGNTIME = #{signtime,jdbcType=VARCHAR},
      STARTTIME = #{starttime,jdbcType=VARCHAR},
      STOPTIME = #{stoptime,jdbcType=VARCHAR},
      TASKSTATUS = #{taskstatus,jdbcType=VARCHAR},
      TDSTARTTIME = #{tdstarttime,jdbcType=VARCHAR},
      TDSTOPTIME = #{tdstoptime,jdbcType=VARCHAR}
    where BILLSNO = #{billsno,jdbcType=VARCHAR}
  </update>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    select BILLSNO, RECORDID, APPLYMAN, ATTENTION, BILLSTATUS, CHANGEELECTRICROOM, CHARGEMAN, 
    CHARGETEL, CONTENT, CONTENTCHANGE, CREATTIME, EXECUTIVECHARGEMAN, EXECUTIVESITUATION, 
    EXECUTIVETIME, LINEEQUIP, MANNAME, MEDIUMSYSTEM, NOTE, NOTICETIME, OPERATESTATUS, 
    RUNWAY, SIGNMAN, SIGNTIME, STARTTIME, STOPTIME, TASKSTATUS, TDSTARTTIME, TDSTOPTIME
    from T_CM_0365
    <where> 
      <if test="recordid != null">
        and RECORDID = #{recordid}
      </if>
      <if test="applyman != null and applyman != ''">
        and APPLYMAN LIKE '%${applyman}%'
      </if>
      <if test="attention != null and attention != ''">
        and ATTENTION LIKE '%${attention}%'
      </if>
      <if test="billstatus != null and billstatus != ''">
        and BILLSTATUS LIKE '%${billstatus}%'
      </if>
      <if test="changeelectricroom != null and changeelectricroom != ''">
        and CHANGEELECTRICROOM LIKE '%${changeelectricroom}%'
      </if>
      <if test="chargeman != null and chargeman != ''">
        and CHARGEMAN LIKE '%${chargeman}%'
      </if>
      <if test="chargetel != null and chargetel != ''">
        and CHARGETEL LIKE '%${chargetel}%'
      </if>
      <if test="content != null and content != ''">
        and CONTENT LIKE '%${content}%'
      </if>
      <if test="contentchange != null and contentchange != ''">
        and CONTENTCHANGE LIKE '%${contentchange}%'
      </if>
      <if test="creattime != null and creattime != ''">
        and CREATTIME LIKE '%${creattime}%'
      </if>
      <if test="executivechargeman != null and executivechargeman != ''">
        and EXECUTIVECHARGEMAN LIKE '%${executivechargeman}%'
      </if>
      <if test="executivesituation != null and executivesituation != ''">
        and EXECUTIVESITUATION LIKE '%${executivesituation}%'
      </if>
      <if test="executivetime != null and executivetime != ''">
        and EXECUTIVETIME LIKE '%${executivetime}%'
      </if>
      <if test="lineequip != null and lineequip != ''">
        and LINEEQUIP LIKE '%${lineequip}%'
      </if>
      <if test="manname != null and manname != ''">
        and MANNAME LIKE '%${manname}%'
      </if>
      <if test="mediumsystem != null and mediumsystem != ''">
        and MEDIUMSYSTEM LIKE '%${mediumsystem}%'
      </if>
      <if test="note != null and note != ''">
        and NOTE LIKE '%${note}%'
      </if>
      <if test="noticetime != null and noticetime != ''">
        and NOTICETIME LIKE '%${noticetime}%'
      </if>
      <if test="operatestatus != null and operatestatus != ''">
        and OPERATESTATUS LIKE '%${operatestatus}%'
      </if>
      <if test="runway != null and runway != ''">
        and RUNWAY LIKE '%${runway}%'
      </if>
      <if test="signman != null and signman != ''">
        and SIGNMAN LIKE '%${signman}%'
      </if>
      <if test="signtime != null and signtime != ''">
        and SIGNTIME LIKE '%${signtime}%'
      </if>
      <if test="starttime != null and starttime != ''">
        and STARTTIME LIKE '%${starttime}%'
      </if>
      <if test="stoptime != null and stoptime != ''">
        and STOPTIME LIKE '%${stoptime}%'
      </if>
      <if test="taskstatus != null and taskstatus != ''">
        and TASKSTATUS LIKE '%${taskstatus}%'
      </if>
      <if test="tdstarttime != null and tdstarttime != ''">
        and TDSTARTTIME LIKE '%${tdstarttime}%'
      </if>
      <if test="tdstoptime != null and tdstoptime != ''">
        and TDSTOPTIME LIKE '%${tdstoptime}%'
      </if>
    </where>
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into T_CM_0365 
      (BILLSNO, 
      RECORDID, APPLYMAN, ATTENTION, 
      BILLSTATUS, CHANGEELECTRICROOM, 
      CHARGEMAN, CHARGETEL, CONTENT, 
      CONTENTCHANGE, CREATTIME, EXECUTIVECHARGEMAN, 
      EXECUTIVESITUATION, EXECUTIVETIME, 
      LINEEQUIP, MANNAME, MEDIUMSYSTEM, 
      NOTE, NOTICETIME, OPERATESTATUS, 
      RUNWAY, SIGNMAN, SIGNTIME, 
      STARTTIME, STOPTIME, TASKSTATUS, 
      TDSTARTTIME, TDSTOPTIME)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.billsno,jdbcType=VARCHAR}, 
      #{item.recordid,jdbcType=VARCHAR}, #{item.applyman,jdbcType=VARCHAR}, #{item.attention,jdbcType=VARCHAR},
      #{item.billstatus,jdbcType=VARCHAR}, #{item.changeelectricroom,jdbcType=VARCHAR}, 
      #{item.chargeman,jdbcType=VARCHAR}, #{item.chargetel,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR}, 
      #{item.contentchange,jdbcType=VARCHAR}, #{item.creattime,jdbcType=VARCHAR}, #{item.executivechargeman,jdbcType=VARCHAR}, 
      #{item.executivesituation,jdbcType=VARCHAR}, #{item.executivetime,jdbcType=VARCHAR}, 
      #{item.lineequip,jdbcType=VARCHAR}, #{item.manname,jdbcType=VARCHAR}, #{item.mediumsystem,jdbcType=VARCHAR}, 
      #{item.note,jdbcType=VARCHAR}, #{item.noticetime,jdbcType=VARCHAR}, #{item.operatestatus,jdbcType=VARCHAR}, 
      #{item.runway,jdbcType=VARCHAR}, #{item.signman,jdbcType=VARCHAR}, #{item.signtime,jdbcType=VARCHAR}, 
      #{item.starttime,jdbcType=VARCHAR}, #{item.stoptime,jdbcType=VARCHAR}, #{item.taskstatus,jdbcType=VARCHAR}, 
      #{item.tdstarttime,jdbcType=VARCHAR}, #{item.tdstoptime,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update T_CM_0365
     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>
       ,APPLYMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.applyman,jdbcType=VARCHAR}
       </foreach>
       ,ATTENTION=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.attention,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>
       ,CHANGEELECTRICROOM=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.changeelectricroom,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>
       ,CHARGETEL=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.chargetel,jdbcType=VARCHAR}
       </foreach>
       ,CONTENT=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.content,jdbcType=VARCHAR}
       </foreach>
       ,CONTENTCHANGE=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.contentchange,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>
       ,EXECUTIVECHARGEMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.executivechargeman,jdbcType=VARCHAR}
       </foreach>
       ,EXECUTIVESITUATION=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.executivesituation,jdbcType=VARCHAR}
       </foreach>
       ,EXECUTIVETIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.executivetime,jdbcType=VARCHAR}
       </foreach>
       ,LINEEQUIP=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.lineequip,jdbcType=VARCHAR}
       </foreach>
       ,MANNAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.manname,jdbcType=VARCHAR}
       </foreach>
       ,MEDIUMSYSTEM=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.mediumsystem,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>
       ,NOTICETIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.noticetime,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>
       ,RUNWAY=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.runway,jdbcType=VARCHAR}
       </foreach>
       ,SIGNMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.signman,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>
       ,STARTTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.starttime,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>
       ,TASKSTATUS=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.taskstatus,jdbcType=VARCHAR}
       </foreach>
       ,TDSTARTTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.tdstarttime,jdbcType=VARCHAR}
       </foreach>
       ,TDSTOPTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case BILLSNO" close="end">
          when #{item.billsno,jdbcType=VARCHAR} then #{item.tdstoptime,jdbcType=VARCHAR}
       </foreach>
     where BILLSNO in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.billsno,jdbcType=VARCHAR}
     </foreach> 
  </update>
  -->
</mapper>