<?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.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
    <id column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
    <result column="SPOT_TYPE_NO" jdbcType="VARCHAR" property="spotTypeNo" />
    <result column="SPOT_TYPE_NAME" jdbcType="VARCHAR" property="spotTypeName" />
    <result column="SPOT_STATE_NO" jdbcType="VARCHAR" property="spotStateNo" />
    <result column="SPOT_STATE_NAME" jdbcType="VARCHAR" property="spotStateName" />
    <result column="VIDEO_IP" jdbcType="VARCHAR" property="videoIp" />
    <result column="VIDEO_PORT" jdbcType="VARCHAR" property="videoPort" />
    <result column="VIDEO_USER_NAME" jdbcType="VARCHAR" property="videoUserName" />
    <result column="VIDEO_PASSWORD" jdbcType="VARCHAR" property="videoPassword" />
    <result column="LED_IP" jdbcType="VARCHAR" property="ledIp" />
    <result column="PRINTER_IP" jdbcType="VARCHAR" property="printerIp" />
    <result column="PRINTER_NAME" jdbcType="VARCHAR" property="printerName" />
    <result column="COUNT_NUM" jdbcType="DECIMAL" property="countNum" />
    <result column="USED_NUM" jdbcType="DECIMAL" property="usedNum" />
    <result column="CONTROL_IP" jdbcType="VARCHAR" property="controlIp" />
    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
    <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
    <result column="FLAT_COMPUTER_IP" jdbcType="VARCHAR" property="flatComputerIp" />
    <result column="MES_SPOT_ID" jdbcType="VARCHAR" property="mesSpotId" />
    <result column="SPOT_AREA_NO" jdbcType="VARCHAR" property="spotAreaNo" />
    <result column="SPOT_AREA_NAME" jdbcType="VARCHAR" property="spotAreaName" />
    <result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
  </resultMap>
  <sql id="columns">
    BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
    VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, LED_IP, PRINTER_IP, PRINTER_NAME, 
    COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
    FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, ALLOWED_TARE_WEIGHT
  </sql>
  <sql id="columns_alias">
    t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO, 
    t.SPOT_STATE_NAME, t.VIDEO_IP, t.VIDEO_PORT, t.VIDEO_USER_NAME, t.VIDEO_PASSWORD, 
    t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG, 
    t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
    t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP, 
    t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT
  </sql>
  <sql id="select">
    SELECT <include refid="columns" /> FROM METER_BASE_SPOT_INFO
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias" /> FROM METER_BASE_SPOT_INFO t
  </sql>
  <sql id="where">
    <where> 
      <if test="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO = #{baseSpotNo}
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        and SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        and SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="spotStateNo != null and spotStateNo != ''">
        and SPOT_STATE_NO = #{spotStateNo}
      </if>
      <if test="spotStateName != null and spotStateName != ''">
        and SPOT_STATE_NAME = #{spotStateName}
      </if>
      <if test="videoIp != null and videoIp != ''">
        and VIDEO_IP = #{videoIp}
      </if>
      <if test="videoPort != null and videoPort != ''">
        and VIDEO_PORT = #{videoPort}
      </if>
      <if test="videoUserName != null and videoUserName != ''">
        and VIDEO_USER_NAME = #{videoUserName}
      </if>
      <if test="videoPassword != null and videoPassword != ''">
        and VIDEO_PASSWORD = #{videoPassword}
      </if>
      <if test="ledIp != null and ledIp != ''">
        and LED_IP = #{ledIp}
      </if>
      <if test="printerIp != null and printerIp != ''">
        and PRINTER_IP = #{printerIp}
      </if>
      <if test="printerName != null and printerName != ''">
        and PRINTER_NAME = #{printerName}
      </if>
      <if test="countNum != null">
        and COUNT_NUM = #{countNum}
      </if>
      <if test="usedNum != null">
        and USED_NUM = #{usedNum}
      </if>
      <if test="controlIp != null and controlIp != ''">
        and CONTROL_IP = #{controlIp}
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG = #{validFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO = #{createManNo}
      </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="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO = #{updateManNo}
      </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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="flatComputerIp != null and flatComputerIp != ''">
        and FLAT_COMPUTER_IP = #{flatComputerIp}
      </if>
      <if test="mesSpotId != null and mesSpotId != ''">
        and MES_SPOT_ID = #{mesSpotId}
      </if>
      <if test="spotAreaNo != null and spotAreaNo != ''">
        and SPOT_AREA_NO = #{spotAreaNo}
      </if>
      <if test="spotAreaName != null and spotAreaName != ''">
        and SPOT_AREA_NAME = #{spotAreaName}
      </if>
      <if test="allowedTareWeight != null and allowedTareWeight != ''">
        and ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="baseSpotNo != null and baseSpotNo != ''">
        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        and SPOT_TYPE_NO LIKE '%${spotTypeNo}%'
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        and SPOT_TYPE_NAME LIKE '%${spotTypeName}%'
      </if>
      <if test="spotStateNo != null and spotStateNo != ''">
        and SPOT_STATE_NO LIKE '%${spotStateNo}%'
      </if>
      <if test="spotStateName != null and spotStateName != ''">
        and SPOT_STATE_NAME LIKE '%${spotStateName}%'
      </if>
      <if test="videoIp != null and videoIp != ''">
        and VIDEO_IP LIKE '%${videoIp}%'
      </if>
      <if test="videoPort != null and videoPort != ''">
        and VIDEO_PORT LIKE '%${videoPort}%'
      </if>
      <if test="videoUserName != null and videoUserName != ''">
        and VIDEO_USER_NAME LIKE '%${videoUserName}%'
      </if>
      <if test="videoPassword != null and videoPassword != ''">
        and VIDEO_PASSWORD LIKE '%${videoPassword}%'
      </if>
      <if test="ledIp != null and ledIp != ''">
        and LED_IP LIKE '%${ledIp}%'
      </if>
      <if test="printerIp != null and printerIp != ''">
        and PRINTER_IP LIKE '%${printerIp}%'
      </if>
      <if test="printerName != null and printerName != ''">
        and PRINTER_NAME LIKE '%${printerName}%'
      </if>
      <if test="countNum != null">
        and COUNT_NUM = #{countNum}
      </if>
      <if test="usedNum != null">
        and USED_NUM = #{usedNum}
      </if>
      <if test="controlIp != null and controlIp != ''">
        and CONTROL_IP LIKE '%${controlIp}%'
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG LIKE '%${validFlag}%'
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO LIKE '%${createManNo}%'
      </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="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
      </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="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="flatComputerIp != null and flatComputerIp != ''">
        and FLAT_COMPUTER_IP LIKE '%${flatComputerIp}%'
      </if>
      <if test="mesSpotId != null and mesSpotId != ''">
        and MES_SPOT_ID LIKE '%${mesSpotId}%'
      </if>
      <if test="spotAreaNo != null and spotAreaNo != ''">
        and SPOT_AREA_NO LIKE '%${spotAreaNo}%'
      </if>
      <if test="spotAreaName != null and spotAreaName != ''">
        and SPOT_AREA_NAME LIKE '%${spotAreaName}%'
      </if>
      <if test="allowedTareWeight != null and allowedTareWeight != ''">
        and ALLOWED_TARE_WEIGHT LIKE '%${allowedTareWeight}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_SPOT_INFO
    where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_SPOT_INFO
    where 1!=1 
      <if test="baseSpotName != null and baseSpotName != ''">
        or BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        or SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        or SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="spotStateNo != null and spotStateNo != ''">
        or SPOT_STATE_NO = #{spotStateNo}
      </if>
      <if test="spotStateName != null and spotStateName != ''">
        or SPOT_STATE_NAME = #{spotStateName}
      </if>
      <if test="videoIp != null and videoIp != ''">
        or VIDEO_IP = #{videoIp}
      </if>
      <if test="videoPort != null and videoPort != ''">
        or VIDEO_PORT = #{videoPort}
      </if>
      <if test="videoUserName != null and videoUserName != ''">
        or VIDEO_USER_NAME = #{videoUserName}
      </if>
      <if test="videoPassword != null and videoPassword != ''">
        or VIDEO_PASSWORD = #{videoPassword}
      </if>
      <if test="ledIp != null and ledIp != ''">
        or LED_IP = #{ledIp}
      </if>
      <if test="printerIp != null and printerIp != ''">
        or PRINTER_IP = #{printerIp}
      </if>
      <if test="printerName != null and printerName != ''">
        or PRINTER_NAME = #{printerName}
      </if>
      <if test="countNum != null">
        or COUNT_NUM = #{countNum}
      </if>
      <if test="usedNum != null">
        or USED_NUM = #{usedNum}
      </if>
      <if test="controlIp != null and controlIp != ''">
        or CONTROL_IP = #{controlIp}
      </if>
      <if test="validFlag != null and validFlag != ''">
        or VALID_FLAG = #{validFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        or CREATE_MAN_NO = #{createManNo}
      </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="updateManNo != null and updateManNo != ''">
        or UPDATE_MAN_NO = #{updateManNo}
      </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="deleteManNo != null and deleteManNo != ''">
        or DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        or DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
      </if>
      <if test="flatComputerIp != null and flatComputerIp != ''">
        or FLAT_COMPUTER_IP = #{flatComputerIp}
      </if>
      <if test="mesSpotId != null and mesSpotId != ''">
        or MES_SPOT_ID = #{mesSpotId}
      </if>
      <if test="spotAreaNo != null and spotAreaNo != ''">
        or SPOT_AREA_NO = #{spotAreaNo}
      </if>
      <if test="spotAreaName != null and spotAreaName != ''">
        or SPOT_AREA_NAME = #{spotAreaName}
      </if>
      <if test="allowedTareWeight != null and allowedTareWeight != ''">
        or ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
    insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, 
      SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
      VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, 
      VIDEO_PASSWORD, LED_IP, PRINTER_IP, 
      PRINTER_NAME, COUNT_NUM, USED_NUM, 
      CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
      UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
      DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP, 
      MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
      ALLOWED_TARE_WEIGHT)
    values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR}, 
      #{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR}, 
      #{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR}, 
      #{videoPassword,jdbcType=VARCHAR}, #{ledIp,jdbcType=VARCHAR}, #{printerIp,jdbcType=VARCHAR}, 
      #{printerName,jdbcType=VARCHAR}, #{countNum,jdbcType=DECIMAL}, #{usedNum,jdbcType=DECIMAL}, 
      #{controlIp,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, 
      #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR}, 
      #{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR}, 
      #{allowedTareWeight,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
    insert into METER_BASE_SPOT_INFO
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="baseSpotNo != null">
        BASE_SPOT_NO,
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME,
      </if>
      <if test="spotTypeNo != null">
        SPOT_TYPE_NO,
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME,
      </if>
      <if test="spotStateNo != null">
        SPOT_STATE_NO,
      </if>
      <if test="spotStateName != null">
        SPOT_STATE_NAME,
      </if>
      <if test="videoIp != null">
        VIDEO_IP,
      </if>
      <if test="videoPort != null">
        VIDEO_PORT,
      </if>
      <if test="videoUserName != null">
        VIDEO_USER_NAME,
      </if>
      <if test="videoPassword != null">
        VIDEO_PASSWORD,
      </if>
      <if test="ledIp != null">
        LED_IP,
      </if>
      <if test="printerIp != null">
        PRINTER_IP,
      </if>
      <if test="printerName != null">
        PRINTER_NAME,
      </if>
      <if test="countNum != null">
        COUNT_NUM,
      </if>
      <if test="usedNum != null">
        USED_NUM,
      </if>
      <if test="controlIp != null">
        CONTROL_IP,
      </if>
      <if test="validFlag != null">
        VALID_FLAG,
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO,
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO,
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO,
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME,
      </if>
      <if test="deleteTime != null">
        DELETE_TIME,
      </if>
      <if test="flatComputerIp != null">
        FLAT_COMPUTER_IP,
      </if>
      <if test="mesSpotId != null">
        MES_SPOT_ID,
      </if>
      <if test="spotAreaNo != null">
        SPOT_AREA_NO,
      </if>
      <if test="spotAreaName != null">
        SPOT_AREA_NAME,
      </if>
      <if test="allowedTareWeight != null">
        ALLOWED_TARE_WEIGHT,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="baseSpotNo != null">
        #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeNo != null">
        #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="spotStateNo != null">
        #{spotStateNo,jdbcType=VARCHAR},
      </if>
      <if test="spotStateName != null">
        #{spotStateName,jdbcType=VARCHAR},
      </if>
      <if test="videoIp != null">
        #{videoIp,jdbcType=VARCHAR},
      </if>
      <if test="videoPort != null">
        #{videoPort,jdbcType=VARCHAR},
      </if>
      <if test="videoUserName != null">
        #{videoUserName,jdbcType=VARCHAR},
      </if>
      <if test="videoPassword != null">
        #{videoPassword,jdbcType=VARCHAR},
      </if>
      <if test="ledIp != null">
        #{ledIp,jdbcType=VARCHAR},
      </if>
      <if test="printerIp != null">
        #{printerIp,jdbcType=VARCHAR},
      </if>
      <if test="printerName != null">
        #{printerName,jdbcType=VARCHAR},
      </if>
      <if test="countNum != null">
        #{countNum,jdbcType=DECIMAL},
      </if>
      <if test="usedNum != null">
        #{usedNum,jdbcType=DECIMAL},
      </if>
      <if test="controlIp != null">
        #{controlIp,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="flatComputerIp != null">
        #{flatComputerIp,jdbcType=VARCHAR},
      </if>
      <if test="mesSpotId != null">
        #{mesSpotId,jdbcType=VARCHAR},
      </if>
      <if test="spotAreaNo != null">
        #{spotAreaNo,jdbcType=VARCHAR},
      </if>
      <if test="spotAreaName != null">
        #{spotAreaName,jdbcType=VARCHAR},
      </if>
      <if test="allowedTareWeight != null">
        #{allowedTareWeight,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
    update METER_BASE_SPOT_INFO
    set BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
      SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
      SPOT_STATE_NO = #{spotStateNo,jdbcType=VARCHAR},
      SPOT_STATE_NAME = #{spotStateName,jdbcType=VARCHAR},
      VIDEO_IP = #{videoIp,jdbcType=VARCHAR},
      VIDEO_PORT = #{videoPort,jdbcType=VARCHAR},
      VIDEO_USER_NAME = #{videoUserName,jdbcType=VARCHAR},
      VIDEO_PASSWORD = #{videoPassword,jdbcType=VARCHAR},
      LED_IP = #{ledIp,jdbcType=VARCHAR},
      PRINTER_IP = #{printerIp,jdbcType=VARCHAR},
      PRINTER_NAME = #{printerName,jdbcType=VARCHAR},
      COUNT_NUM = #{countNum,jdbcType=DECIMAL},
      USED_NUM = #{usedNum,jdbcType=DECIMAL},
      CONTROL_IP = #{controlIp,jdbcType=VARCHAR},
      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      FLAT_COMPUTER_IP = #{flatComputerIp,jdbcType=VARCHAR},
      MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
      SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
      SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
      ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR}
    where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
    update METER_BASE_SPOT_INFO
    <set>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeNo != null">
        SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="spotStateNo != null">
        SPOT_STATE_NO = #{spotStateNo,jdbcType=VARCHAR},
      </if>
      <if test="spotStateName != null">
        SPOT_STATE_NAME = #{spotStateName,jdbcType=VARCHAR},
      </if>
      <if test="videoIp != null">
        VIDEO_IP = #{videoIp,jdbcType=VARCHAR},
      </if>
      <if test="videoPort != null">
        VIDEO_PORT = #{videoPort,jdbcType=VARCHAR},
      </if>
      <if test="videoUserName != null">
        VIDEO_USER_NAME = #{videoUserName,jdbcType=VARCHAR},
      </if>
      <if test="videoPassword != null">
        VIDEO_PASSWORD = #{videoPassword,jdbcType=VARCHAR},
      </if>
      <if test="ledIp != null">
        LED_IP = #{ledIp,jdbcType=VARCHAR},
      </if>
      <if test="printerIp != null">
        PRINTER_IP = #{printerIp,jdbcType=VARCHAR},
      </if>
      <if test="printerName != null">
        PRINTER_NAME = #{printerName,jdbcType=VARCHAR},
      </if>
      <if test="countNum != null">
        COUNT_NUM = #{countNum,jdbcType=DECIMAL},
      </if>
      <if test="usedNum != null">
        USED_NUM = #{usedNum,jdbcType=DECIMAL},
      </if>
      <if test="controlIp != null">
        CONTROL_IP = #{controlIp,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO = #{createManNo,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="updateManNo != null">
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="flatComputerIp != null">
        FLAT_COMPUTER_IP = #{flatComputerIp,jdbcType=VARCHAR},
      </if>
      <if test="mesSpotId != null">
        MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
      </if>
      <if test="spotAreaNo != null">
        SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
      </if>
      <if test="spotAreaName != null">
        SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
      </if>
      <if test="allowedTareWeight != null">
        ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
      </if>
    </set>
    where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select" />
    where BASE_SPOT_NO = #{baseSpotNo,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_BASE_SPOT_INFO 
      (BASE_SPOT_NO, 
      BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, 
      SPOT_STATE_NO, SPOT_STATE_NAME, VIDEO_IP, 
      VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, 
      LED_IP, PRINTER_IP, PRINTER_NAME, 
      COUNT_NUM, USED_NUM, CONTROL_IP, 
      VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
      UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, 
      DELETE_TIME, FLAT_COMPUTER_IP, 
      MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
      ALLOWED_TARE_WEIGHT)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.baseSpotNo,jdbcType=VARCHAR}, 
      #{item.baseSpotName,jdbcType=VARCHAR}, #{item.spotTypeNo,jdbcType=VARCHAR}, #{item.spotTypeName,jdbcType=VARCHAR}, 
      #{item.spotStateNo,jdbcType=VARCHAR}, #{item.spotStateName,jdbcType=VARCHAR}, #{item.videoIp,jdbcType=VARCHAR}, 
      #{item.videoPort,jdbcType=VARCHAR}, #{item.videoUserName,jdbcType=VARCHAR}, #{item.videoPassword,jdbcType=VARCHAR}, 
      #{item.ledIp,jdbcType=VARCHAR}, #{item.printerIp,jdbcType=VARCHAR}, #{item.printerName,jdbcType=VARCHAR}, 
      #{item.countNum,jdbcType=DECIMAL}, #{item.usedNum,jdbcType=DECIMAL}, #{item.controlIp,jdbcType=VARCHAR}, 
      #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, 
      #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR}, 
      #{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR}, 
      #{item.allowedTareWeight,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_BASE_SPOT_INFO
     set
       BASE_SPOT_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_TYPE_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_TYPE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_STATE_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateNo,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_STATE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateName,jdbcType=VARCHAR}
       </foreach>
       ,VIDEO_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoIp,jdbcType=VARCHAR}
       </foreach>
       ,VIDEO_PORT=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPort,jdbcType=VARCHAR}
       </foreach>
       ,VIDEO_USER_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoUserName,jdbcType=VARCHAR}
       </foreach>
       ,VIDEO_PASSWORD=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPassword,jdbcType=VARCHAR}
       </foreach>
       ,LED_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.ledIp,jdbcType=VARCHAR}
       </foreach>
       ,PRINTER_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerIp,jdbcType=VARCHAR}
       </foreach>
       ,PRINTER_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerName,jdbcType=VARCHAR}
       </foreach>
       ,COUNT_NUM=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.countNum,jdbcType=DECIMAL}
       </foreach>
       ,USED_NUM=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.usedNum,jdbcType=DECIMAL}
       </foreach>
       ,CONTROL_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.controlIp,jdbcType=VARCHAR}
       </foreach>
       ,VALID_FLAG=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,DELETE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
       </foreach>
       ,FLAT_COMPUTER_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.flatComputerIp,jdbcType=VARCHAR}
       </foreach>
       ,MES_SPOT_ID=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.mesSpotId,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_AREA_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaNo,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_AREA_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaName,jdbcType=VARCHAR}
       </foreach>
       ,ALLOWED_TARE_WEIGHT=
       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.allowedTareWeight,jdbcType=VARCHAR}
       </foreach>
     where BASE_SPOT_NO in 
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
    #{item.baseSpotNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_SPOT_INFO
    where BASE_SPOT_NO in 
    <foreach close=")" collection="list" item="id" open="(" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <sql id="whereOr">
    <where>
      <if test="baseSpotNo != null and baseSpotNo != ''">
        BASE_SPOT_NO != #{baseSpotNo}
      </if>
      and (1 != 1
      <if test="baseSpotName != null and baseSpotName != ''">
        or BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="spotTypeNo != null and spotTypeNo != ''">
        or SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        or SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="spotStateNo != null and spotStateNo != ''">
        or SPOT_STATE_NO = #{spotStateNo}
      </if>
      <if test="spotStateName != null and spotStateName != ''">
        or SPOT_STATE_NAME = #{spotStateName}
      </if>
      <if test="videoIp != null and videoIp != ''">
        or VIDEO_IP = #{videoIp}
      </if>
      <if test="videoPort != null and videoPort != ''">
        or VIDEO_PORT = #{videoPort}
      </if>
      <if test="videoUserName != null and videoUserName != ''">
        or VIDEO_USER_NAME = #{videoUserName}
      </if>
      <if test="videoPassword != null and videoPassword != ''">
        or VIDEO_PASSWORD = #{videoPassword}
      </if>
      <if test="ledIp != null and ledIp != ''">
        or LED_IP = #{ledIp}
      </if>
      <if test="printerIp != null and printerIp != ''">
        or PRINTER_IP = #{printerIp}
      </if>
      <if test="printerName != null and printerName != ''">
        or PRINTER_NAME = #{printerName}
      </if>
      <if test="countNum != null">
        or COUNT_NUM = #{countNum}
      </if>
      <if test="usedNum != null">
        or USED_NUM = #{usedNum}
      </if>
      <if test="controlIp != null and controlIp != ''">
        or CONTROL_IP = #{controlIp}
      </if>
      <if test="validFlag != null and validFlag != ''">
        or VALID_FLAG = #{validFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        or CREATE_MAN_NO = #{createManNo}
      </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="updateManNo != null and updateManNo != ''">
        or UPDATE_MAN_NO = #{updateManNo}
      </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="deleteManNo != null and deleteManNo != ''">
        or DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        or DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="flatComputerIp != null and flatComputerIp != ''">
        or FLAT_COMPUTER_IP = #{flatComputerIp}
      </if>
      )
    </where>
  </sql>

  <select id="selectOrParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereOr"/>
  </select>

  <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(BASE_SPOT_NO, LENGTH(BASE_SPOT_NO) - 4))),0) + 1,5,'0') BASE_SPOT_NO
    FROM METER_BASE_SPOT_INFO
  </select>

  <select id="selectall" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
  </select>

  <select id="DynamicAll" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    where 1 = 1
        and spot_type_no in ('001019004', '001019002')
        <if test="baseSpotNo != null and baseSpotNo != ''">
          and BASE_SPOT_NO = #{baseSpotNo}
        </if>
        <if test="baseSpotName != null and baseSpotName != ''">
          and BASE_SPOT_NAME = #{baseSpotName}
        </if>
        <if test="spotTypeNo != null and spotTypeNo != ''">
          and SPOT_TYPE_NO = #{spotTypeNo}
        </if>
        <if test="spotTypeName != null and spotTypeName != ''">
          and SPOT_TYPE_NAME = #{spotTypeName}
        </if>
        <if test="spotStateNo != null and spotStateNo != ''">
          and SPOT_STATE_NO = #{spotStateNo}
        </if>
        <if test="spotStateName != null and spotStateName != ''">
          and SPOT_STATE_NAME = #{spotStateName}
        </if>
  </select>

  <select id="selectcorrelation"  resultMap="BaseResultMap">
    SELECT p.* from (SELECT d.* ,(
    SELECT
    COUNT(1)
    FROM
    METER_BASE_CALIBRA_RELATION t
    WHERE
    t.BASE_SPOT_NO=d.BASE_SPOT_NO
    )seq
    FROM
    METER_BASE_SPOT_INFO d )p where p.seq <![CDATA[<]]> 1
  </select>

  <select id="calibcorrelation"  resultMap="BaseResultMap">
    SELECT <include refid="columns_alias"/> FROM METER_BASE_SPOT_INFO t
    where VALID_FLAG='1'
  </select>

  <select id="selectSpotByUserID"  parameterType="java.util.HashMap" resultMap="BaseResultMap">
    select * from METER_BASE_SPOT_INFO where BASE_SPOT_NO not in (select BASE_SPOT_NO from METER_BASE_USER_SPOT where USER_ID = '${userID}')
  </select>
  
</mapper>