<?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.trmcalpointvalue.mapper.TRmCalpointValueMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.ems.trmcalpointvalue.model.TRmCalpointValue">
    <id column="CLOCK" jdbcType="VARCHAR" property="clock" />
    <id column="TIMEGRANID" jdbcType="VARCHAR" property="timegranid" />
    <id column="ITEMID" jdbcType="VARCHAR" property="itemid" />
    <result column="ITEMNAME" jdbcType="VARCHAR" property="itemname" />
    <result column="CORRECTVALUE" jdbcType="DECIMAL" property="correctvalue" />
    <result column="APPORTVALUE" jdbcType="DECIMAL" property="apportvalue" />
    <result column="SUMVALUE" jdbcType="DECIMAL" property="sumvalue" />
    <result column="STDVALUE" jdbcType="DECIMAL" property="stdvalue" />
    <result column="MINTVALUE" jdbcType="DECIMAL" property="mintvalue" />
    <result column="MENDVALUE" jdbcType="DECIMAL" property="mendvalue" />
    <result column="MAVGVALUE" jdbcType="DECIMAL" property="mavgvalue" />
    <result column="REC_TIME" jdbcType="VARCHAR" property="recTime" />
    <result column="TEAMSORT" jdbcType="VARCHAR" property="teamsort" />
    <result column="MODIFYFLAG" jdbcType="DECIMAL" property="modifyflag" />
    <result column="ISLOCK" jdbcType="VARCHAR" property="islock" />
    <result column="LOCKID" jdbcType="VARCHAR" property="lockid" />
    <result column="ACTUALVALUE" jdbcType="DECIMAL" property="actualvalue" />
    <result column="SUMSTDVALUE" jdbcType="DECIMAL" property="sumstdvalue" />
    <result column="UPMAN" jdbcType="VARCHAR" property="upman" />
    <result column="UPDATE_REASON" jdbcType="VARCHAR" property="updateReason" />
    <result column="BZ" jdbcType="VARCHAR" property="bz" />
    <result column="CRMAN" jdbcType="VARCHAR" property="crman" />
    <result column="UPTIME" jdbcType="VARCHAR" property="uptime" />
  </resultMap>
  <sql id="columns">
    CLOCK, TIMEGRANID, ITEMID, ITEMNAME, CORRECTVALUE, APPORTVALUE, SUMVALUE, STDVALUE, 
    MINTVALUE, MENDVALUE, MAVGVALUE, REC_TIME, TEAMSORT, MODIFYFLAG, ISLOCK, LOCKID, 
    ACTUALVALUE, SUMSTDVALUE, UPMAN, UPDATE_REASON, BZ, CRMAN, UPTIME
  </sql>
  <sql id="columns_alias">
    t.CLOCK, t.TIMEGRANID, t.ITEMID, t.ITEMNAME, t.CORRECTVALUE, t.APPORTVALUE, t.SUMVALUE, 
    t.STDVALUE, t.MINTVALUE, t.MENDVALUE, t.MAVGVALUE, t.REC_TIME, t.TEAMSORT, t.MODIFYFLAG, 
    t.ISLOCK, t.LOCKID, t.ACTUALVALUE, t.SUMSTDVALUE, t.UPMAN, t.UPDATE_REASON, t.BZ, 
    t.CRMAN, t.UPTIME
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM T_RM_CALPOINT_VALUE
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM T_RM_CALPOINT_VALUE t
  </sql>
  <sql id="where">
    <where> 
      <if test="timegranid != null and timegranid != ''">
        and TIMEGRANID = #{timegranid}
      </if>
      <if test="itemid != null and itemid != ''">
        and ITEMID = #{itemid}
      </if>
      <if test="itemname != null and itemname != ''">
        and ITEMNAME = #{itemname}
      </if>
      <if test="correctvalue != null">
        and CORRECTVALUE = #{correctvalue}
      </if>
      <if test="apportvalue != null">
        and APPORTVALUE = #{apportvalue}
      </if>
      <if test="sumvalue != null">
        and SUMVALUE = #{sumvalue}
      </if>
      <if test="stdvalue != null">
        and STDVALUE = #{stdvalue}
      </if>
      <if test="mintvalue != null">
        and MINTVALUE = #{mintvalue}
      </if>
      <if test="mendvalue != null">
        and MENDVALUE = #{mendvalue}
      </if>
      <if test="mavgvalue != null">
        and MAVGVALUE = #{mavgvalue}
      </if>
      <if test="recTime != null and recTime != ''">
        and REC_TIME = #{recTime}
      </if>
      <if test="teamsort != null and teamsort != ''">
        and TEAMSORT = #{teamsort}
      </if>
      <if test="modifyflag != null">
        and MODIFYFLAG = #{modifyflag}
      </if>
      <if test="islock != null and islock != ''">
        and ISLOCK = #{islock}
      </if>
      <if test="lockid != null and lockid != ''">
        and LOCKID = #{lockid}
      </if>
      <if test="actualvalue != null">
        and ACTUALVALUE = #{actualvalue}
      </if>
      <if test="sumstdvalue != null">
        and SUMSTDVALUE = #{sumstdvalue}
      </if>
      <if test="upman != null and upman != ''">
        and UPMAN = #{upman}
      </if>
      <if test="updateReason != null and updateReason != ''">
        and UPDATE_REASON = #{updateReason}
      </if>
      <if test="bz != null and bz != ''">
        and BZ = #{bz}
      </if>
      <if test="crman != null and crman != ''">
        and CRMAN = #{crman}
      </if>
      <if test="uptime != null and uptime != ''">
        and UPTIME = #{uptime}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="timegranid != null and timegranid != ''">
        and TIMEGRANID LIKE '%${timegranid}%'
      </if>
      <if test="itemid != null and itemid != ''">
        and ITEMID LIKE '%${itemid}%'
      </if>
      <if test="itemname != null and itemname != ''">
        and ITEMNAME LIKE '%${itemname}%'
      </if>
      <if test="correctvalue != null">
        and CORRECTVALUE = #{correctvalue}
      </if>
      <if test="apportvalue != null">
        and APPORTVALUE = #{apportvalue}
      </if>
      <if test="sumvalue != null">
        and SUMVALUE = #{sumvalue}
      </if>
      <if test="stdvalue != null">
        and STDVALUE = #{stdvalue}
      </if>
      <if test="mintvalue != null">
        and MINTVALUE = #{mintvalue}
      </if>
      <if test="mendvalue != null">
        and MENDVALUE = #{mendvalue}
      </if>
      <if test="mavgvalue != null">
        and MAVGVALUE = #{mavgvalue}
      </if>
      <if test="recTime != null and recTime != ''">
        and REC_TIME LIKE '%${recTime}%'
      </if>
      <if test="teamsort != null and teamsort != ''">
        and TEAMSORT LIKE '%${teamsort}%'
      </if>
      <if test="modifyflag != null">
        and MODIFYFLAG = #{modifyflag}
      </if>
      <if test="islock != null and islock != ''">
        and ISLOCK LIKE '%${islock}%'
      </if>
      <if test="lockid != null and lockid != ''">
        and LOCKID LIKE '%${lockid}%'
      </if>
      <if test="actualvalue != null">
        and ACTUALVALUE = #{actualvalue}
      </if>
      <if test="sumstdvalue != null">
        and SUMSTDVALUE = #{sumstdvalue}
      </if>
      <if test="upman != null and upman != ''">
        and UPMAN LIKE '%${upman}%'
      </if>
      <if test="updateReason != null and updateReason != ''">
        and UPDATE_REASON LIKE '%${updateReason}%'
      </if>
      <if test="bz != null and bz != ''">
        and BZ LIKE '%${bz}%'
      </if>
      <if test="crman != null and crman != ''">
        and CRMAN LIKE '%${crman}%'
      </if>
      <if test="uptime != null and uptime != ''">
        and UPTIME LIKE '%${uptime}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="map">
    delete from T_RM_CALPOINT_VALUE
    where CLOCK = #{clock,jdbcType=VARCHAR}
      and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
      and ITEMID = #{itemid,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from T_RM_CALPOINT_VALUE
    where 1!=1 
      <if test="timegranid != null and timegranid != ''">
        or TIMEGRANID = #{timegranid}
      </if>
      <if test="itemid != null and itemid != ''">
        or ITEMID = #{itemid}
      </if>
      <if test="itemname != null and itemname != ''">
        or ITEMNAME = #{itemname}
      </if>
      <if test="correctvalue != null">
        or CORRECTVALUE = #{correctvalue}
      </if>
      <if test="apportvalue != null">
        or APPORTVALUE = #{apportvalue}
      </if>
      <if test="sumvalue != null">
        or SUMVALUE = #{sumvalue}
      </if>
      <if test="stdvalue != null">
        or STDVALUE = #{stdvalue}
      </if>
      <if test="mintvalue != null">
        or MINTVALUE = #{mintvalue}
      </if>
      <if test="mendvalue != null">
        or MENDVALUE = #{mendvalue}
      </if>
      <if test="mavgvalue != null">
        or MAVGVALUE = #{mavgvalue}
      </if>
      <if test="recTime != null and recTime != ''">
        or REC_TIME = #{recTime}
      </if>
      <if test="teamsort != null and teamsort != ''">
        or TEAMSORT = #{teamsort}
      </if>
      <if test="modifyflag != null">
        or MODIFYFLAG = #{modifyflag}
      </if>
      <if test="islock != null and islock != ''">
        or ISLOCK = #{islock}
      </if>
      <if test="lockid != null and lockid != ''">
        or LOCKID = #{lockid}
      </if>
      <if test="actualvalue != null">
        or ACTUALVALUE = #{actualvalue}
      </if>
      <if test="sumstdvalue != null">
        or SUMSTDVALUE = #{sumstdvalue}
      </if>
      <if test="upman != null and upman != ''">
        or UPMAN = #{upman}
      </if>
      <if test="updateReason != null and updateReason != ''">
        or UPDATE_REASON = #{updateReason}
      </if>
      <if test="bz != null and bz != ''">
        or BZ = #{bz}
      </if>
      <if test="crman != null and crman != ''">
        or CRMAN = #{crman}
      </if>
      <if test="uptime != null and uptime != ''">
        or UPTIME = #{uptime}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.ems.trmcalpointvalue.model.TRmCalpointValue">
    insert into T_RM_CALPOINT_VALUE (CLOCK, TIMEGRANID, ITEMID, 
      ITEMNAME, CORRECTVALUE, APPORTVALUE, 
      SUMVALUE, STDVALUE, MINTVALUE, 
      MENDVALUE, MAVGVALUE, REC_TIME, 
      TEAMSORT, MODIFYFLAG, ISLOCK, 
      LOCKID, ACTUALVALUE, SUMSTDVALUE, 
      UPMAN, UPDATE_REASON, BZ, 
      CRMAN, UPTIME)
    values (#{clock,jdbcType=VARCHAR}, #{timegranid,jdbcType=VARCHAR}, #{itemid,jdbcType=VARCHAR}, 
      #{itemname,jdbcType=VARCHAR}, #{correctvalue,jdbcType=DECIMAL}, #{apportvalue,jdbcType=DECIMAL}, 
      #{sumvalue,jdbcType=DECIMAL}, #{stdvalue,jdbcType=DECIMAL}, #{mintvalue,jdbcType=DECIMAL}, 
      #{mendvalue,jdbcType=DECIMAL}, #{mavgvalue,jdbcType=DECIMAL}, #{recTime,jdbcType=VARCHAR}, 
      #{teamsort,jdbcType=VARCHAR}, #{modifyflag,jdbcType=DECIMAL}, #{islock,jdbcType=VARCHAR}, 
      #{lockid,jdbcType=VARCHAR}, #{actualvalue,jdbcType=DECIMAL}, #{sumstdvalue,jdbcType=DECIMAL}, 
      #{upman,jdbcType=VARCHAR}, #{updateReason,jdbcType=VARCHAR}, #{bz,jdbcType=VARCHAR}, 
      #{crman,jdbcType=VARCHAR}, #{uptime,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.ems.trmcalpointvalue.model.TRmCalpointValue">
    insert into T_RM_CALPOINT_VALUE
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="clock != null">
        CLOCK,
      </if>
      <if test="timegranid != null">
        TIMEGRANID,
      </if>
      <if test="itemid != null">
        ITEMID,
      </if>
      <if test="itemname != null">
        ITEMNAME,
      </if>
      <if test="correctvalue != null">
        CORRECTVALUE,
      </if>
      <if test="apportvalue != null">
        APPORTVALUE,
      </if>
      <if test="sumvalue != null">
        SUMVALUE,
      </if>
      <if test="stdvalue != null">
        STDVALUE,
      </if>
      <if test="mintvalue != null">
        MINTVALUE,
      </if>
      <if test="mendvalue != null">
        MENDVALUE,
      </if>
      <if test="mavgvalue != null">
        MAVGVALUE,
      </if>
      <if test="recTime != null">
        REC_TIME,
      </if>
      <if test="teamsort != null">
        TEAMSORT,
      </if>
      <if test="modifyflag != null">
        MODIFYFLAG,
      </if>
      <if test="islock != null">
        ISLOCK,
      </if>
      <if test="lockid != null">
        LOCKID,
      </if>
      <if test="actualvalue != null">
        ACTUALVALUE,
      </if>
      <if test="sumstdvalue != null">
        SUMSTDVALUE,
      </if>
      <if test="upman != null">
        UPMAN,
      </if>
      <if test="updateReason != null">
        UPDATE_REASON,
      </if>
      <if test="bz != null">
        BZ,
      </if>
      <if test="crman != null">
        CRMAN,
      </if>
      <if test="uptime != null">
        UPTIME,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="clock != null">
        #{clock,jdbcType=VARCHAR},
      </if>
      <if test="timegranid != null">
        #{timegranid,jdbcType=VARCHAR},
      </if>
      <if test="itemid != null">
        #{itemid,jdbcType=VARCHAR},
      </if>
      <if test="itemname != null">
        #{itemname,jdbcType=VARCHAR},
      </if>
      <if test="correctvalue != null">
        #{correctvalue,jdbcType=DECIMAL},
      </if>
      <if test="apportvalue != null">
        #{apportvalue,jdbcType=DECIMAL},
      </if>
      <if test="sumvalue != null">
        #{sumvalue,jdbcType=DECIMAL},
      </if>
      <if test="stdvalue != null">
        #{stdvalue,jdbcType=DECIMAL},
      </if>
      <if test="mintvalue != null">
        #{mintvalue,jdbcType=DECIMAL},
      </if>
      <if test="mendvalue != null">
        #{mendvalue,jdbcType=DECIMAL},
      </if>
      <if test="mavgvalue != null">
        #{mavgvalue,jdbcType=DECIMAL},
      </if>
      <if test="recTime != null">
        #{recTime,jdbcType=VARCHAR},
      </if>
      <if test="teamsort != null">
        #{teamsort,jdbcType=VARCHAR},
      </if>
      <if test="modifyflag != null">
        #{modifyflag,jdbcType=DECIMAL},
      </if>
      <if test="islock != null">
        #{islock,jdbcType=VARCHAR},
      </if>
      <if test="lockid != null">
        #{lockid,jdbcType=VARCHAR},
      </if>
      <if test="actualvalue != null">
        #{actualvalue,jdbcType=DECIMAL},
      </if>
      <if test="sumstdvalue != null">
        #{sumstdvalue,jdbcType=DECIMAL},
      </if>
      <if test="upman != null">
        #{upman,jdbcType=VARCHAR},
      </if>
      <if test="updateReason != null">
        #{updateReason,jdbcType=VARCHAR},
      </if>
      <if test="bz != null">
        #{bz,jdbcType=VARCHAR},
      </if>
      <if test="crman != null">
        #{crman,jdbcType=VARCHAR},
      </if>
      <if test="uptime != null">
        #{uptime,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.trmcalpointvalue.model.TRmCalpointValue">
    update T_RM_CALPOINT_VALUE
    set ITEMNAME = #{itemname,jdbcType=VARCHAR},
      CORRECTVALUE = #{correctvalue,jdbcType=DECIMAL},
      APPORTVALUE = #{apportvalue,jdbcType=DECIMAL},
      SUMVALUE = #{sumvalue,jdbcType=DECIMAL},
      STDVALUE = #{stdvalue,jdbcType=DECIMAL},
      MINTVALUE = #{mintvalue,jdbcType=DECIMAL},
      MENDVALUE = #{mendvalue,jdbcType=DECIMAL},
      MAVGVALUE = #{mavgvalue,jdbcType=DECIMAL},
      REC_TIME = #{recTime,jdbcType=VARCHAR},
      TEAMSORT = #{teamsort,jdbcType=VARCHAR},
      MODIFYFLAG = #{modifyflag,jdbcType=DECIMAL},
      ISLOCK = #{islock,jdbcType=VARCHAR},
      LOCKID = #{lockid,jdbcType=VARCHAR},
      ACTUALVALUE = #{actualvalue,jdbcType=DECIMAL},
      SUMSTDVALUE = #{sumstdvalue,jdbcType=DECIMAL},
      UPMAN = #{upman,jdbcType=VARCHAR},
      UPDATE_REASON = #{updateReason,jdbcType=VARCHAR},
      BZ = #{bz,jdbcType=VARCHAR},
      CRMAN = #{crman,jdbcType=VARCHAR},
      UPTIME = #{uptime,jdbcType=VARCHAR}
    where CLOCK = #{clock,jdbcType=VARCHAR}
      and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
      and ITEMID = #{itemid,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.trmcalpointvalue.model.TRmCalpointValue">
    update T_RM_CALPOINT_VALUE
    <set>
      <if test="itemname != null">
        ITEMNAME = #{itemname,jdbcType=VARCHAR},
      </if>
      <if test="correctvalue != null">
        CORRECTVALUE = #{correctvalue,jdbcType=DECIMAL},
      </if>
      <if test="apportvalue != null">
        APPORTVALUE = #{apportvalue,jdbcType=DECIMAL},
      </if>
      <if test="sumvalue != null">
        SUMVALUE = #{sumvalue,jdbcType=DECIMAL},
      </if>
      <if test="stdvalue != null">
        STDVALUE = #{stdvalue,jdbcType=DECIMAL},
      </if>
      <if test="mintvalue != null">
        MINTVALUE = #{mintvalue,jdbcType=DECIMAL},
      </if>
      <if test="mendvalue != null">
        MENDVALUE = #{mendvalue,jdbcType=DECIMAL},
      </if>
      <if test="mavgvalue != null">
        MAVGVALUE = #{mavgvalue,jdbcType=DECIMAL},
      </if>
      <if test="recTime != null">
        REC_TIME = #{recTime,jdbcType=VARCHAR},
      </if>
      <if test="teamsort != null">
        TEAMSORT = #{teamsort,jdbcType=VARCHAR},
      </if>
      <if test="modifyflag != null">
        MODIFYFLAG = #{modifyflag,jdbcType=DECIMAL},
      </if>
      <if test="islock != null">
        ISLOCK = #{islock,jdbcType=VARCHAR},
      </if>
      <if test="lockid != null">
        LOCKID = #{lockid,jdbcType=VARCHAR},
      </if>
      <if test="actualvalue != null">
        ACTUALVALUE = #{actualvalue,jdbcType=DECIMAL},
      </if>
      <if test="sumstdvalue != null">
        SUMSTDVALUE = #{sumstdvalue,jdbcType=DECIMAL},
      </if>
      <if test="upman != null">
        UPMAN = #{upman,jdbcType=VARCHAR},
      </if>
      <if test="updateReason != null">
        UPDATE_REASON = #{updateReason,jdbcType=VARCHAR},
      </if>
      <if test="bz != null">
        BZ = #{bz,jdbcType=VARCHAR},
      </if>
      <if test="crman != null">
        CRMAN = #{crman,jdbcType=VARCHAR},
      </if>
      <if test="uptime != null">
        UPTIME = #{uptime,jdbcType=VARCHAR},
      </if>
    </set>
    where CLOCK = #{clock,jdbcType=VARCHAR}
      and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
      and ITEMID = #{itemid,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
    <include refid="select"/>
    where CLOCK = #{clock,jdbcType=VARCHAR}
      and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
      and ITEMID = #{itemid,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 T_RM_CALPOINT_VALUE 
      (CLOCK, 
      TIMEGRANID, ITEMID, ITEMNAME, 
      CORRECTVALUE, APPORTVALUE, SUMVALUE, 
      STDVALUE, MINTVALUE, MENDVALUE, 
      MAVGVALUE, REC_TIME, TEAMSORT, 
      MODIFYFLAG, ISLOCK, LOCKID, 
      ACTUALVALUE, SUMSTDVALUE, UPMAN, 
      UPDATE_REASON, BZ, CRMAN, 
      UPTIME)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.clock,jdbcType=VARCHAR}, 
      #{item.timegranid,jdbcType=VARCHAR}, #{item.itemid,jdbcType=VARCHAR}, #{item.itemname,jdbcType=VARCHAR}, 
      #{item.correctvalue,jdbcType=DECIMAL}, #{item.apportvalue,jdbcType=DECIMAL}, #{item.sumvalue,jdbcType=DECIMAL}, 
      #{item.stdvalue,jdbcType=DECIMAL}, #{item.mintvalue,jdbcType=DECIMAL}, #{item.mendvalue,jdbcType=DECIMAL}, 
      #{item.mavgvalue,jdbcType=DECIMAL}, #{item.recTime,jdbcType=VARCHAR}, #{item.teamsort,jdbcType=VARCHAR}, 
      #{item.modifyflag,jdbcType=DECIMAL}, #{item.islock,jdbcType=VARCHAR}, #{item.lockid,jdbcType=VARCHAR}, 
      #{item.actualvalue,jdbcType=DECIMAL}, #{item.sumstdvalue,jdbcType=DECIMAL}, #{item.upman,jdbcType=VARCHAR}, 
      #{item.updateReason,jdbcType=VARCHAR}, #{item.bz,jdbcType=VARCHAR}, #{item.crman,jdbcType=VARCHAR}, 
      #{item.uptime,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update T_RM_CALPOINT_VALUE
     set
       CLOCK=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.clock,jdbcType=VARCHAR}
       </foreach>
       ,TIMEGRANID=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.timegranid,jdbcType=VARCHAR}
       </foreach>
       ,ITEMID=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.itemid,jdbcType=VARCHAR}
       </foreach>
       ,ITEMNAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.itemname,jdbcType=VARCHAR}
       </foreach>
       ,CORRECTVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.correctvalue,jdbcType=DECIMAL}
       </foreach>
       ,APPORTVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.apportvalue,jdbcType=DECIMAL}
       </foreach>
       ,SUMVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.sumvalue,jdbcType=DECIMAL}
       </foreach>
       ,STDVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.stdvalue,jdbcType=DECIMAL}
       </foreach>
       ,MINTVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.mintvalue,jdbcType=DECIMAL}
       </foreach>
       ,MENDVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.mendvalue,jdbcType=DECIMAL}
       </foreach>
       ,MAVGVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.mavgvalue,jdbcType=DECIMAL}
       </foreach>
       ,REC_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.recTime,jdbcType=VARCHAR}
       </foreach>
       ,TEAMSORT=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.teamsort,jdbcType=VARCHAR}
       </foreach>
       ,MODIFYFLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.modifyflag,jdbcType=DECIMAL}
       </foreach>
       ,ISLOCK=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.islock,jdbcType=VARCHAR}
       </foreach>
       ,LOCKID=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.lockid,jdbcType=VARCHAR}
       </foreach>
       ,ACTUALVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.actualvalue,jdbcType=DECIMAL}
       </foreach>
       ,SUMSTDVALUE=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.sumstdvalue,jdbcType=DECIMAL}
       </foreach>
       ,UPMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.upman,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_REASON=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.updateReason,jdbcType=VARCHAR}
       </foreach>
       ,BZ=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.bz,jdbcType=VARCHAR}
       </foreach>
       ,CRMAN=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.crman,jdbcType=VARCHAR}
       </foreach>
       ,UPTIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
          when #{item.clock,jdbcType=VARCHAR} then #{item.uptime,jdbcType=VARCHAR}
       </foreach>
     where CLOCK in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.clock,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from T_RM_CALPOINT_VALUE
    where CLOCK in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <!--计算累计值(用于计算月、年数据等)-->
  <select id="getSumvalue" parameterType="java.util.HashMap" resultType="double">
      SELECT NVL(SUM(APPORTVALUE),0) FROM T_RM_CALPOINT_VALUE
      <where>
          <if test="itemid !=null and itemid != '' ">
              AND  ITEMID=#{itemid}
          </if>
          <if test="clock !=null and clock !='' ">
              AND CLOCK LIKE '${clock}%'
          </if>
          <if test="timegranid !=null and timegranid !='' ">
              AND  TIMEGRANID=#{timegranid}
          </if>
      </where>
    </select>
</mapper>