<?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.meterwork.meterworkcomparespot.mapper.MeterWorkCompareSpotMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
    <id column="COMPARE_SPOT_ID" jdbcType="VARCHAR" property="compareSpotId" />
    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="CREATE_MAN_PHONE" jdbcType="VARCHAR" property="createManPhone" />
    <result column="UPDATE_MAN_PHONE" jdbcType="VARCHAR" property="updateManPhone" />
    <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
    <result column="WEIGHT_NUM1" jdbcType="DECIMAL" property="weightNum1" />
    <result column="WEIGHT_DATE1" jdbcType="TIMESTAMP" property="weightDate1" />
    <result column="WEIGHT_NUM2" jdbcType="DECIMAL" property="weightNum2" />
    <result column="WEIGHT_DATE2" jdbcType="TIMESTAMP" property="weightDate2" />
    <result column="WEIGHT_NUM3" jdbcType="DECIMAL" property="weightNum3" />
    <result column="WEIGHT_DATE3" jdbcType="TIMESTAMP" property="weightDate3" />
    <result column="WEIGHT_NUM4" jdbcType="DECIMAL" property="weightNum4" />
    <result column="WEIGHT_DATE4" jdbcType="TIMESTAMP" property="weightDate4" />
    <result column="WEIGHT_NUM5" jdbcType="DECIMAL" property="weightNum5" />
    <result column="WEIGHT_DATE5" jdbcType="TIMESTAMP" property="weightDate5" />
    <result column="BASE_SPOT_NO1" jdbcType="VARCHAR" property="baseSpotNo1" />
    <result column="BASE_SPOT_NAME1" jdbcType="VARCHAR" property="baseSpotName1" />
    <result column="BASE_SPOT_NO2" jdbcType="VARCHAR" property="baseSpotNo2" />
    <result column="BASE_SPOT_NAME2" jdbcType="VARCHAR" property="baseSpotName2" />
    <result column="BASE_SPOT_NO3" jdbcType="VARCHAR" property="baseSpotNo3" />
    <result column="BASE_SPOT_NAME3" jdbcType="VARCHAR" property="baseSpotName3" />
    <result column="BASE_SPOT_NO4" jdbcType="VARCHAR" property="baseSpotNo4" />
    <result column="BASE_SPOT_NAME4" jdbcType="VARCHAR" property="baseSpotName4" />
    <result column="BASE_SPOT_NO5" jdbcType="VARCHAR" property="baseSpotNo5" />
    <result column="BASE_SPOT_NAME5" jdbcType="VARCHAR" property="baseSpotName5" />
    <result column="COMPARE_TYPE" jdbcType="VARCHAR" property="compareType" />
  </resultMap>
  <sql id="columns">
    COMPARE_SPOT_ID, VALUE_FLAG, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NAME, UPDATE_TIME, 
    CREATE_MAN_PHONE, UPDATE_MAN_PHONE, CAR_NO, WEIGHT_NUM1, WEIGHT_DATE1, WEIGHT_NUM2, 
    WEIGHT_DATE2, WEIGHT_NUM3, WEIGHT_DATE3, WEIGHT_NUM4, WEIGHT_DATE4, WEIGHT_NUM5, 
    WEIGHT_DATE5, BASE_SPOT_NO1, BASE_SPOT_NAME1, BASE_SPOT_NO2, BASE_SPOT_NAME2, BASE_SPOT_NO3, 
    BASE_SPOT_NAME3, BASE_SPOT_NO4, BASE_SPOT_NAME4, BASE_SPOT_NO5, BASE_SPOT_NAME5, 
    COMPARE_TYPE
  </sql>
  <sql id="columns_alias">
    t.COMPARE_SPOT_ID, t.VALUE_FLAG, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NAME, 
    t.UPDATE_TIME, t.CREATE_MAN_PHONE, t.UPDATE_MAN_PHONE, t.CAR_NO, t.WEIGHT_NUM1, t.WEIGHT_DATE1, 
    t.WEIGHT_NUM2, t.WEIGHT_DATE2, t.WEIGHT_NUM3, t.WEIGHT_DATE3, t.WEIGHT_NUM4, t.WEIGHT_DATE4, 
    t.WEIGHT_NUM5, t.WEIGHT_DATE5, t.BASE_SPOT_NO1, t.BASE_SPOT_NAME1, t.BASE_SPOT_NO2, 
    t.BASE_SPOT_NAME2, t.BASE_SPOT_NO3, t.BASE_SPOT_NAME3, t.BASE_SPOT_NO4, t.BASE_SPOT_NAME4, 
    t.BASE_SPOT_NO5, t.BASE_SPOT_NAME5, t.COMPARE_TYPE
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_WORK_COMPARE_SPOT
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_WORK_COMPARE_SPOT t
  </sql>
  <sql id="where">
    <where> 
      <if test="compareSpotId != null and compareSpotId != ''">
        and COMPARE_SPOT_ID = #{compareSpotId}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="createManPhone != null and createManPhone != ''">
        and CREATE_MAN_PHONE = #{createManPhone}
      </if>
      <if test="updateManPhone != null and updateManPhone != ''">
        and UPDATE_MAN_PHONE = #{updateManPhone}
      </if>
      <if test="carNo != null and carNo != ''">
        and CAR_NO = #{carNo}
      </if>
      <if test="weightNum1 != null">
        and WEIGHT_NUM1 = #{weightNum1}
      </if>
      <if test="weightDate1 != null">
        and TO_CHAR(WEIGHT_DATE1,'yyyy-MM-dd') = #{weightDate1}
      </if>
      <if test="weightNum2 != null">
        and WEIGHT_NUM2 = #{weightNum2}
      </if>
      <if test="weightDate2 != null">
        and TO_CHAR(WEIGHT_DATE2,'yyyy-MM-dd') = #{weightDate2}
      </if>
      <if test="weightNum3 != null">
        and WEIGHT_NUM3 = #{weightNum3}
      </if>
      <if test="weightDate3 != null">
        and TO_CHAR(WEIGHT_DATE3,'yyyy-MM-dd') = #{weightDate3}
      </if>
      <if test="weightNum4 != null">
        and WEIGHT_NUM4 = #{weightNum4}
      </if>
      <if test="weightDate4 != null">
        and TO_CHAR(WEIGHT_DATE4,'yyyy-MM-dd') = #{weightDate4}
      </if>
      <if test="weightNum5 != null">
        and WEIGHT_NUM5 = #{weightNum5}
      </if>
      <if test="weightDate5 != null">
        and TO_CHAR(WEIGHT_DATE5,'yyyy-MM-dd') = #{weightDate5}
      </if>
      <if test="baseSpotNo1 != null and baseSpotNo1 != ''">
        and BASE_SPOT_NO1 = #{baseSpotNo1}
      </if>
      <if test="baseSpotName1 != null and baseSpotName1 != ''">
        and BASE_SPOT_NAME1 = #{baseSpotName1}
      </if>
      <if test="baseSpotNo2 != null and baseSpotNo2 != ''">
        and BASE_SPOT_NO2 = #{baseSpotNo2}
      </if>
      <if test="baseSpotName2 != null and baseSpotName2 != ''">
        and BASE_SPOT_NAME2 = #{baseSpotName2}
      </if>
      <if test="baseSpotNo3 != null and baseSpotNo3 != ''">
        and BASE_SPOT_NO3 = #{baseSpotNo3}
      </if>
      <if test="baseSpotName3 != null and baseSpotName3 != ''">
        and BASE_SPOT_NAME3 = #{baseSpotName3}
      </if>
      <if test="baseSpotNo4 != null and baseSpotNo4 != ''">
        and BASE_SPOT_NO4 = #{baseSpotNo4}
      </if>
      <if test="baseSpotName4 != null and baseSpotName4 != ''">
        and BASE_SPOT_NAME4 = #{baseSpotName4}
      </if>
      <if test="baseSpotNo5 != null and baseSpotNo5 != ''">
        and BASE_SPOT_NO5 = #{baseSpotNo5}
      </if>
      <if test="baseSpotName5 != null and baseSpotName5 != ''">
        and BASE_SPOT_NAME5 = #{baseSpotName5}
      </if>
      <if test="compareType != null and compareType != ''">
        and COMPARE_TYPE = #{compareType}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="compareSpotId != null and compareSpotId != ''">
        and COMPARE_SPOT_ID LIKE '%${compareSpotId}%'
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG LIKE '%${valueFlag}%'
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME LIKE '%${createManName}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="createManPhone != null and createManPhone != ''">
        and CREATE_MAN_PHONE LIKE '%${createManPhone}%'
      </if>
      <if test="updateManPhone != null and updateManPhone != ''">
        and UPDATE_MAN_PHONE LIKE '%${updateManPhone}%'
      </if>
      <if test="carNo != null and carNo != ''">
        and CAR_NO LIKE '%${carNo}%'
      </if>
      <if test="weightNum1 != null">
        and WEIGHT_NUM1 = #{weightNum1}
      </if>
      <if test="weightDate1 != null">
        and TO_CHAR(WEIGHT_DATE1,'yyyy-MM-dd') = #{weightDate1}
      </if>
      <if test="weightNum2 != null">
        and WEIGHT_NUM2 = #{weightNum2}
      </if>
      <if test="weightDate2 != null">
        and TO_CHAR(WEIGHT_DATE2,'yyyy-MM-dd') = #{weightDate2}
      </if>
      <if test="weightNum3 != null">
        and WEIGHT_NUM3 = #{weightNum3}
      </if>
      <if test="weightDate3 != null">
        and TO_CHAR(WEIGHT_DATE3,'yyyy-MM-dd') = #{weightDate3}
      </if>
      <if test="weightNum4 != null">
        and WEIGHT_NUM4 = #{weightNum4}
      </if>
      <if test="weightDate4 != null">
        and TO_CHAR(WEIGHT_DATE4,'yyyy-MM-dd') = #{weightDate4}
      </if>
      <if test="weightNum5 != null">
        and WEIGHT_NUM5 = #{weightNum5}
      </if>
      <if test="weightDate5 != null">
        and TO_CHAR(WEIGHT_DATE5,'yyyy-MM-dd') = #{weightDate5}
      </if>
      <if test="baseSpotNo1 != null and baseSpotNo1 != ''">
        and BASE_SPOT_NO1 LIKE '%${baseSpotNo1}%'
      </if>
      <if test="baseSpotName1 != null and baseSpotName1 != ''">
        and BASE_SPOT_NAME1 LIKE '%${baseSpotName1}%'
      </if>
      <if test="baseSpotNo2 != null and baseSpotNo2 != ''">
        and BASE_SPOT_NO2 LIKE '%${baseSpotNo2}%'
      </if>
      <if test="baseSpotName2 != null and baseSpotName2 != ''">
        and BASE_SPOT_NAME2 LIKE '%${baseSpotName2}%'
      </if>
      <if test="baseSpotNo3 != null and baseSpotNo3 != ''">
        and BASE_SPOT_NO3 LIKE '%${baseSpotNo3}%'
      </if>
      <if test="baseSpotName3 != null and baseSpotName3 != ''">
        and BASE_SPOT_NAME3 LIKE '%${baseSpotName3}%'
      </if>
      <if test="baseSpotNo4 != null and baseSpotNo4 != ''">
        and BASE_SPOT_NO4 LIKE '%${baseSpotNo4}%'
      </if>
      <if test="baseSpotName4 != null and baseSpotName4 != ''">
        and BASE_SPOT_NAME4 LIKE '%${baseSpotName4}%'
      </if>
      <if test="baseSpotNo5 != null and baseSpotNo5 != ''">
        and BASE_SPOT_NO5 LIKE '%${baseSpotNo5}%'
      </if>
      <if test="baseSpotName5 != null and baseSpotName5 != ''">
        and BASE_SPOT_NAME5 LIKE '%${baseSpotName5}%'
      </if>
      <if test="compareType != null and compareType != ''">
        and COMPARE_TYPE LIKE '%${compareType}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_WORK_COMPARE_SPOT
    where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_WORK_COMPARE_SPOT
    where 1!=1 
      <if test="valueFlag != null and valueFlag != ''">
        or VALUE_FLAG = #{valueFlag}
      </if>
      <if test="createManName != null and createManName != ''">
        or CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
      </if>
      <if test="updateManName != null and updateManName != ''">
        or UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
      </if>
      <if test="createManPhone != null and createManPhone != ''">
        or CREATE_MAN_PHONE = #{createManPhone}
      </if>
      <if test="updateManPhone != null and updateManPhone != ''">
        or UPDATE_MAN_PHONE = #{updateManPhone}
      </if>
      <if test="carNo != null and carNo != ''">
        or CAR_NO = #{carNo}
      </if>
      <if test="weightNum1 != null">
        or WEIGHT_NUM1 = #{weightNum1}
      </if>
      <if test="weightDate1 != null">
        or TO_CHAR(WEIGHT_DATE1,'yyyy-MM-dd') = '#{weightDate1}'
      </if>
      <if test="weightNum2 != null">
        or WEIGHT_NUM2 = #{weightNum2}
      </if>
      <if test="weightDate2 != null">
        or TO_CHAR(WEIGHT_DATE2,'yyyy-MM-dd') = '#{weightDate2}'
      </if>
      <if test="weightNum3 != null">
        or WEIGHT_NUM3 = #{weightNum3}
      </if>
      <if test="weightDate3 != null">
        or TO_CHAR(WEIGHT_DATE3,'yyyy-MM-dd') = '#{weightDate3}'
      </if>
      <if test="weightNum4 != null">
        or WEIGHT_NUM4 = #{weightNum4}
      </if>
      <if test="weightDate4 != null">
        or TO_CHAR(WEIGHT_DATE4,'yyyy-MM-dd') = '#{weightDate4}'
      </if>
      <if test="weightNum5 != null">
        or WEIGHT_NUM5 = #{weightNum5}
      </if>
      <if test="weightDate5 != null">
        or TO_CHAR(WEIGHT_DATE5,'yyyy-MM-dd') = '#{weightDate5}'
      </if>
      <if test="baseSpotNo1 != null and baseSpotNo1 != ''">
        or BASE_SPOT_NO1 = #{baseSpotNo1}
      </if>
      <if test="baseSpotName1 != null and baseSpotName1 != ''">
        or BASE_SPOT_NAME1 = #{baseSpotName1}
      </if>
      <if test="baseSpotNo2 != null and baseSpotNo2 != ''">
        or BASE_SPOT_NO2 = #{baseSpotNo2}
      </if>
      <if test="baseSpotName2 != null and baseSpotName2 != ''">
        or BASE_SPOT_NAME2 = #{baseSpotName2}
      </if>
      <if test="baseSpotNo3 != null and baseSpotNo3 != ''">
        or BASE_SPOT_NO3 = #{baseSpotNo3}
      </if>
      <if test="baseSpotName3 != null and baseSpotName3 != ''">
        or BASE_SPOT_NAME3 = #{baseSpotName3}
      </if>
      <if test="baseSpotNo4 != null and baseSpotNo4 != ''">
        or BASE_SPOT_NO4 = #{baseSpotNo4}
      </if>
      <if test="baseSpotName4 != null and baseSpotName4 != ''">
        or BASE_SPOT_NAME4 = #{baseSpotName4}
      </if>
      <if test="baseSpotNo5 != null and baseSpotNo5 != ''">
        or BASE_SPOT_NO5 = #{baseSpotNo5}
      </if>
      <if test="baseSpotName5 != null and baseSpotName5 != ''">
        or BASE_SPOT_NAME5 = #{baseSpotName5}
      </if>
      <if test="compareType != null and compareType != ''">
        or COMPARE_TYPE = #{compareType}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
    insert into METER_WORK_COMPARE_SPOT (COMPARE_SPOT_ID, VALUE_FLAG, CREATE_MAN_NAME, 
      CREATE_TIME, UPDATE_MAN_NAME, UPDATE_TIME, 
      CREATE_MAN_PHONE, UPDATE_MAN_PHONE, CAR_NO, 
      WEIGHT_NUM1, WEIGHT_DATE1, WEIGHT_NUM2, 
      WEIGHT_DATE2, WEIGHT_NUM3, WEIGHT_DATE3, 
      WEIGHT_NUM4, WEIGHT_DATE4, WEIGHT_NUM5, 
      WEIGHT_DATE5, BASE_SPOT_NO1, BASE_SPOT_NAME1, 
      BASE_SPOT_NO2, BASE_SPOT_NAME2, BASE_SPOT_NO3, 
      BASE_SPOT_NAME3, BASE_SPOT_NO4, BASE_SPOT_NAME4, 
      BASE_SPOT_NO5, BASE_SPOT_NAME5, COMPARE_TYPE
      )
    values (#{compareSpotId,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{createManPhone,jdbcType=VARCHAR}, #{updateManPhone,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, 
      #{weightNum1,jdbcType=DECIMAL}, #{weightDate1,jdbcType=TIMESTAMP}, #{weightNum2,jdbcType=DECIMAL}, 
      #{weightDate2,jdbcType=TIMESTAMP}, #{weightNum3,jdbcType=DECIMAL}, #{weightDate3,jdbcType=TIMESTAMP}, 
      #{weightNum4,jdbcType=DECIMAL}, #{weightDate4,jdbcType=TIMESTAMP}, #{weightNum5,jdbcType=DECIMAL}, 
      #{weightDate5,jdbcType=TIMESTAMP}, #{baseSpotNo1,jdbcType=VARCHAR}, #{baseSpotName1,jdbcType=VARCHAR}, 
      #{baseSpotNo2,jdbcType=VARCHAR}, #{baseSpotName2,jdbcType=VARCHAR}, #{baseSpotNo3,jdbcType=VARCHAR}, 
      #{baseSpotName3,jdbcType=VARCHAR}, #{baseSpotNo4,jdbcType=VARCHAR}, #{baseSpotName4,jdbcType=VARCHAR}, 
      #{baseSpotNo5,jdbcType=VARCHAR}, #{baseSpotName5,jdbcType=VARCHAR}, #{compareType,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
    insert into METER_WORK_COMPARE_SPOT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="compareSpotId != null">
        COMPARE_SPOT_ID,
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG,
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="createManPhone != null">
        CREATE_MAN_PHONE,
      </if>
      <if test="updateManPhone != null">
        UPDATE_MAN_PHONE,
      </if>
      <if test="carNo != null">
        CAR_NO,
      </if>
      <if test="weightNum1 != null">
        WEIGHT_NUM1,
      </if>
      <if test="weightDate1 != null">
        WEIGHT_DATE1,
      </if>
      <if test="weightNum2 != null">
        WEIGHT_NUM2,
      </if>
      <if test="weightDate2 != null">
        WEIGHT_DATE2,
      </if>
      <if test="weightNum3 != null">
        WEIGHT_NUM3,
      </if>
      <if test="weightDate3 != null">
        WEIGHT_DATE3,
      </if>
      <if test="weightNum4 != null">
        WEIGHT_NUM4,
      </if>
      <if test="weightDate4 != null">
        WEIGHT_DATE4,
      </if>
      <if test="weightNum5 != null">
        WEIGHT_NUM5,
      </if>
      <if test="weightDate5 != null">
        WEIGHT_DATE5,
      </if>
      <if test="baseSpotNo1 != null">
        BASE_SPOT_NO1,
      </if>
      <if test="baseSpotName1 != null">
        BASE_SPOT_NAME1,
      </if>
      <if test="baseSpotNo2 != null">
        BASE_SPOT_NO2,
      </if>
      <if test="baseSpotName2 != null">
        BASE_SPOT_NAME2,
      </if>
      <if test="baseSpotNo3 != null">
        BASE_SPOT_NO3,
      </if>
      <if test="baseSpotName3 != null">
        BASE_SPOT_NAME3,
      </if>
      <if test="baseSpotNo4 != null">
        BASE_SPOT_NO4,
      </if>
      <if test="baseSpotName4 != null">
        BASE_SPOT_NAME4,
      </if>
      <if test="baseSpotNo5 != null">
        BASE_SPOT_NO5,
      </if>
      <if test="baseSpotName5 != null">
        BASE_SPOT_NAME5,
      </if>
      <if test="compareType != null">
        COMPARE_TYPE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="compareSpotId != null">
        #{compareSpotId,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManName != null">
        #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createManPhone != null">
        #{createManPhone,jdbcType=VARCHAR},
      </if>
      <if test="updateManPhone != null">
        #{updateManPhone,jdbcType=VARCHAR},
      </if>
      <if test="carNo != null">
        #{carNo,jdbcType=VARCHAR},
      </if>
      <if test="weightNum1 != null">
        #{weightNum1,jdbcType=DECIMAL},
      </if>
      <if test="weightDate1 != null">
        #{weightDate1,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum2 != null">
        #{weightNum2,jdbcType=DECIMAL},
      </if>
      <if test="weightDate2 != null">
        #{weightDate2,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum3 != null">
        #{weightNum3,jdbcType=DECIMAL},
      </if>
      <if test="weightDate3 != null">
        #{weightDate3,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum4 != null">
        #{weightNum4,jdbcType=DECIMAL},
      </if>
      <if test="weightDate4 != null">
        #{weightDate4,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum5 != null">
        #{weightNum5,jdbcType=DECIMAL},
      </if>
      <if test="weightDate5 != null">
        #{weightDate5,jdbcType=TIMESTAMP},
      </if>
      <if test="baseSpotNo1 != null">
        #{baseSpotNo1,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName1 != null">
        #{baseSpotName1,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo2 != null">
        #{baseSpotNo2,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName2 != null">
        #{baseSpotName2,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo3 != null">
        #{baseSpotNo3,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName3 != null">
        #{baseSpotName3,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo4 != null">
        #{baseSpotNo4,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName4 != null">
        #{baseSpotName4,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo5 != null">
        #{baseSpotNo5,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName5 != null">
        #{baseSpotName5,jdbcType=VARCHAR},
      </if>
      <if test="compareType != null">
        #{compareType,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
    update METER_WORK_COMPARE_SPOT
    set VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      CREATE_MAN_PHONE = #{createManPhone,jdbcType=VARCHAR},
      UPDATE_MAN_PHONE = #{updateManPhone,jdbcType=VARCHAR},
      CAR_NO = #{carNo,jdbcType=VARCHAR},
      WEIGHT_NUM1 = #{weightNum1,jdbcType=DECIMAL},
      WEIGHT_DATE1 = #{weightDate1,jdbcType=TIMESTAMP},
      WEIGHT_NUM2 = #{weightNum2,jdbcType=DECIMAL},
      WEIGHT_DATE2 = #{weightDate2,jdbcType=TIMESTAMP},
      WEIGHT_NUM3 = #{weightNum3,jdbcType=DECIMAL},
      WEIGHT_DATE3 = #{weightDate3,jdbcType=TIMESTAMP},
      WEIGHT_NUM4 = #{weightNum4,jdbcType=DECIMAL},
      WEIGHT_DATE4 = #{weightDate4,jdbcType=TIMESTAMP},
      WEIGHT_NUM5 = #{weightNum5,jdbcType=DECIMAL},
      WEIGHT_DATE5 = #{weightDate5,jdbcType=TIMESTAMP},
      BASE_SPOT_NO1 = #{baseSpotNo1,jdbcType=VARCHAR},
      BASE_SPOT_NAME1 = #{baseSpotName1,jdbcType=VARCHAR},
      BASE_SPOT_NO2 = #{baseSpotNo2,jdbcType=VARCHAR},
      BASE_SPOT_NAME2 = #{baseSpotName2,jdbcType=VARCHAR},
      BASE_SPOT_NO3 = #{baseSpotNo3,jdbcType=VARCHAR},
      BASE_SPOT_NAME3 = #{baseSpotName3,jdbcType=VARCHAR},
      BASE_SPOT_NO4 = #{baseSpotNo4,jdbcType=VARCHAR},
      BASE_SPOT_NAME4 = #{baseSpotName4,jdbcType=VARCHAR},
      BASE_SPOT_NO5 = #{baseSpotNo5,jdbcType=VARCHAR},
      BASE_SPOT_NAME5 = #{baseSpotName5,jdbcType=VARCHAR},
      COMPARE_TYPE = #{compareType,jdbcType=VARCHAR}
    where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot">
    update METER_WORK_COMPARE_SPOT
    <set>
      <if test="valueFlag != null">
        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createManPhone != null">
        CREATE_MAN_PHONE = #{createManPhone,jdbcType=VARCHAR},
      </if>
      <if test="updateManPhone != null">
        UPDATE_MAN_PHONE = #{updateManPhone,jdbcType=VARCHAR},
      </if>
      <if test="carNo != null">
        CAR_NO = #{carNo,jdbcType=VARCHAR},
      </if>
      <if test="weightNum1 != null">
        WEIGHT_NUM1 = #{weightNum1,jdbcType=DECIMAL},
      </if>
      <if test="weightDate1 != null">
        WEIGHT_DATE1 = #{weightDate1,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum2 != null">
        WEIGHT_NUM2 = #{weightNum2,jdbcType=DECIMAL},
      </if>
      <if test="weightDate2 != null">
        WEIGHT_DATE2 = #{weightDate2,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum3 != null">
        WEIGHT_NUM3 = #{weightNum3,jdbcType=DECIMAL},
      </if>
      <if test="weightDate3 != null">
        WEIGHT_DATE3 = #{weightDate3,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum4 != null">
        WEIGHT_NUM4 = #{weightNum4,jdbcType=DECIMAL},
      </if>
      <if test="weightDate4 != null">
        WEIGHT_DATE4 = #{weightDate4,jdbcType=TIMESTAMP},
      </if>
      <if test="weightNum5 != null">
        WEIGHT_NUM5 = #{weightNum5,jdbcType=DECIMAL},
      </if>
      <if test="weightDate5 != null">
        WEIGHT_DATE5 = #{weightDate5,jdbcType=TIMESTAMP},
      </if>
      <if test="baseSpotNo1 != null">
        BASE_SPOT_NO1 = #{baseSpotNo1,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName1 != null">
        BASE_SPOT_NAME1 = #{baseSpotName1,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo2 != null">
        BASE_SPOT_NO2 = #{baseSpotNo2,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName2 != null">
        BASE_SPOT_NAME2 = #{baseSpotName2,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo3 != null">
        BASE_SPOT_NO3 = #{baseSpotNo3,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName3 != null">
        BASE_SPOT_NAME3 = #{baseSpotName3,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo4 != null">
        BASE_SPOT_NO4 = #{baseSpotNo4,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName4 != null">
        BASE_SPOT_NAME4 = #{baseSpotName4,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo5 != null">
        BASE_SPOT_NO5 = #{baseSpotNo5,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName5 != null">
        BASE_SPOT_NAME5 = #{baseSpotName5,jdbcType=VARCHAR},
      </if>
      <if test="compareType != null">
        COMPARE_TYPE = #{compareType,jdbcType=VARCHAR},
      </if>
    </set>
    where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where COMPARE_SPOT_ID = #{compareSpotId,jdbcType=VARCHAR}
  </select>
  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="where"/>
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLike"/>
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into METER_WORK_COMPARE_SPOT 
      (COMPARE_SPOT_ID, 
      VALUE_FLAG, CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NAME, UPDATE_TIME, 
      CREATE_MAN_PHONE, UPDATE_MAN_PHONE, 
      CAR_NO, WEIGHT_NUM1, WEIGHT_DATE1, 
      WEIGHT_NUM2, WEIGHT_DATE2, WEIGHT_NUM3, 
      WEIGHT_DATE3, WEIGHT_NUM4, WEIGHT_DATE4, 
      WEIGHT_NUM5, WEIGHT_DATE5, BASE_SPOT_NO1, 
      BASE_SPOT_NAME1, BASE_SPOT_NO2, BASE_SPOT_NAME2, 
      BASE_SPOT_NO3, BASE_SPOT_NAME3, BASE_SPOT_NO4, 
      BASE_SPOT_NAME4, BASE_SPOT_NO5, BASE_SPOT_NAME5, 
      COMPARE_TYPE)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.compareSpotId,jdbcType=VARCHAR}, 
      #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
      #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
      #{item.createManPhone,jdbcType=VARCHAR}, #{item.updateManPhone,jdbcType=VARCHAR}, 
      #{item.carNo,jdbcType=VARCHAR}, #{item.weightNum1,jdbcType=DECIMAL}, #{item.weightDate1,jdbcType=TIMESTAMP}, 
      #{item.weightNum2,jdbcType=DECIMAL}, #{item.weightDate2,jdbcType=TIMESTAMP}, #{item.weightNum3,jdbcType=DECIMAL}, 
      #{item.weightDate3,jdbcType=TIMESTAMP}, #{item.weightNum4,jdbcType=DECIMAL}, #{item.weightDate4,jdbcType=TIMESTAMP}, 
      #{item.weightNum5,jdbcType=DECIMAL}, #{item.weightDate5,jdbcType=TIMESTAMP}, #{item.baseSpotNo1,jdbcType=VARCHAR}, 
      #{item.baseSpotName1,jdbcType=VARCHAR}, #{item.baseSpotNo2,jdbcType=VARCHAR}, #{item.baseSpotName2,jdbcType=VARCHAR}, 
      #{item.baseSpotNo3,jdbcType=VARCHAR}, #{item.baseSpotName3,jdbcType=VARCHAR}, #{item.baseSpotNo4,jdbcType=VARCHAR}, 
      #{item.baseSpotName4,jdbcType=VARCHAR}, #{item.baseSpotNo5,jdbcType=VARCHAR}, #{item.baseSpotName5,jdbcType=VARCHAR}, 
      #{item.compareType,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_WORK_COMPARE_SPOT
     set
       COMPARE_SPOT_ID=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.compareSpotId,jdbcType=VARCHAR}
       </foreach>
       ,VALUE_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,CREATE_MAN_PHONE=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.createManPhone,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_PHONE=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.updateManPhone,jdbcType=VARCHAR}
       </foreach>
       ,CAR_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
       </foreach>
       ,WEIGHT_NUM1=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum1,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_DATE1=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate1,jdbcType=TIMESTAMP}
       </foreach>
       ,WEIGHT_NUM2=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum2,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_DATE2=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate2,jdbcType=TIMESTAMP}
       </foreach>
       ,WEIGHT_NUM3=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum3,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_DATE3=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate3,jdbcType=TIMESTAMP}
       </foreach>
       ,WEIGHT_NUM4=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum4,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_DATE4=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate4,jdbcType=TIMESTAMP}
       </foreach>
       ,WEIGHT_NUM5=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightNum5,jdbcType=DECIMAL}
       </foreach>
       ,WEIGHT_DATE5=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.weightDate5,jdbcType=TIMESTAMP}
       </foreach>
       ,BASE_SPOT_NO1=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo1,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME1=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName1,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NO2=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo2,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME2=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName2,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NO3=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo3,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME3=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName3,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NO4=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo4,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME4=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName4,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NO5=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotNo5,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME5=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.baseSpotName5,jdbcType=VARCHAR}
       </foreach>
       ,COMPARE_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case COMPARE_SPOT_ID" close="end">
          when #{item.compareSpotId,jdbcType=VARCHAR} then #{item.compareType,jdbcType=VARCHAR}
       </foreach>
     where COMPARE_SPOT_ID in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.compareSpotId,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_WORK_COMPARE_SPOT
    where COMPARE_SPOT_ID in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  
</mapper>