<?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.meterbasescalepoint.mapper.MeterBaseScalePointMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
    <id column="SCALE_POINT_NO" jdbcType="VARCHAR" property="scalePointNo" />
    <result column="SCALE_POINT_NAME" jdbcType="VARCHAR" property="scalePointName" />
    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
    <result column="WEIGH_INSTRUMENT_MODEL" jdbcType="VARCHAR" property="weighInstrumentModel" />
    <result column="WEIGH_INSTRUMENT_PARAM" jdbcType="VARCHAR" property="weighInstrumentParam" />
    <result column="MOXA_IP" jdbcType="VARCHAR" property="moxaIp" />
    <result column="MOXA_PORT" jdbcType="VARCHAR" property="moxaPort" />
    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
    <result column="LAST_TIME" jdbcType="TIMESTAMP" property="lastTime" />
    <result column="WEIGHT_TIME" jdbcType="TIMESTAMP" property="weightTime" />
    <result column="USER_NO" jdbcType="VARCHAR" property="userNo" />
    <result column="MONITOR_USER_NO" jdbcType="VARCHAR" property="monitorUserNo" />
    <result column="WEIGHT" jdbcType="DECIMAL" property="weight" />
    <result column="COLLECTION_CODE" jdbcType="VARCHAR" property="collectionCode" />
    <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="SPOT_TYPE_NO" jdbcType="VARCHAR" property="spotTypeNo" />
    <result column="SPOT_TYPE_NAME" jdbcType="VARCHAR" property="spotTypeName" />
    <result column="WEIGHT_ZERO" jdbcType="DECIMAL" property="weightZero" />
    <result column="MONITOR_USER_IP" jdbcType="VARCHAR" property="monitorUserIp" />
    <result column="IS_HELP" jdbcType="VARCHAR" property="isHelp" />
    <result column="IS_TAKE_OVER" jdbcType="VARCHAR" property="isTakeOver" />
    <result column="LED_WRITER" jdbcType="VARCHAR" property="ledWriter" />
    <result column="RFID_CAR" jdbcType="VARCHAR" property="rfidCar" />
    <result column="PHOTO_CAR" jdbcType="VARCHAR" property="photoCar" />
    <result column="WGT_ERR" jdbcType="VARCHAR" property="wgtErr" />
    <result column="USER_IP" jdbcType="VARCHAR" property="userIp" />
    <result column="AI_WEIGHT" jdbcType="VARCHAR" property="aiWeight" />
    <result column="CAR_ERR" jdbcType="VARCHAR" property="carErr" />
    <result column="POWER_STATE" jdbcType="VARCHAR" property="powerState" />
    <result column="DVR_STATE" jdbcType="VARCHAR" property="dvrState" />
    <result column="MOXA_STATE" jdbcType="VARCHAR" property="moxaState" />
    <result column="PLC_STATE" jdbcType="VARCHAR" property="plcState" />
    <result column="LEFT_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="leftInfraredRayState" />
    <result column="RIGHT_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="rightInfraredRayState" />
    <result column="AMPLIFIER_STATE" jdbcType="VARCHAR" property="amplifierState" />
    <result column="LAMP_STATE" jdbcType="VARCHAR" property="lampState" />
    <result column="ENTRUST_STATE" jdbcType="VARCHAR" property="entrustState" />
    <result column="VERSION" jdbcType="DECIMAL" property="version" />
    <result column="SCAN_CAR" jdbcType="VARCHAR" property="scanCar" />
    <result column="MSG_INFO" jdbcType="VARCHAR" property="msgInfo" />
    <result column="STOP_OVER_TIME" jdbcType="VARCHAR" property="stopOverTime" />
    <result column="VALID_IS_PRE" jdbcType="VARCHAR" property="validIsPre" />
    <result column="RED_GREEN_LIGHT_STATE" jdbcType="VARCHAR" property="redGreenLightState" />
    <result column="FRONT_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="frontInfraredRayState" />
    <result column="REAR_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="rearInfraredRayState" />
    <result column="RFID_STATE" jdbcType="VARCHAR" property="rfidState" />
  </resultMap>
  <sql id="columns">
    SCALE_POINT_NO, SCALE_POINT_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, WEIGH_INSTRUMENT_MODEL, 
    WEIGH_INSTRUMENT_PARAM, MOXA_IP, MOXA_PORT, VALID_FLAG, LAST_TIME, WEIGHT_TIME, USER_NO, 
    MONITOR_USER_NO, WEIGHT, COLLECTION_CODE, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
    SPOT_TYPE_NO, SPOT_TYPE_NAME, WEIGHT_ZERO, MONITOR_USER_IP, IS_HELP, IS_TAKE_OVER, 
    LED_WRITER, RFID_CAR, PHOTO_CAR, WGT_ERR, USER_IP, AI_WEIGHT, CAR_ERR, POWER_STATE, 
    DVR_STATE, MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, RIGHT_INFRARED_RAY_STATE, 
    AMPLIFIER_STATE, LAMP_STATE, ENTRUST_STATE, VERSION, SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
    VALID_IS_PRE, RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
    RFID_STATE
  </sql>
  <sql id="columns_alias">
    t.SCALE_POINT_NO, t.SCALE_POINT_NAME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.WEIGH_INSTRUMENT_MODEL, 
    t.WEIGH_INSTRUMENT_PARAM, t.MOXA_IP, t.MOXA_PORT, t.VALID_FLAG, t.LAST_TIME, t.WEIGHT_TIME, 
    t.USER_NO, t.MONITOR_USER_NO, t.WEIGHT, t.COLLECTION_CODE, 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.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.WEIGHT_ZERO, 
    t.MONITOR_USER_IP, t.IS_HELP, t.IS_TAKE_OVER, t.LED_WRITER, t.RFID_CAR, t.PHOTO_CAR, 
    t.WGT_ERR, t.USER_IP, t.AI_WEIGHT, t.CAR_ERR, t.POWER_STATE, t.DVR_STATE, t.MOXA_STATE, 
    t.PLC_STATE, t.LEFT_INFRARED_RAY_STATE, t.RIGHT_INFRARED_RAY_STATE, t.AMPLIFIER_STATE, 
    t.LAMP_STATE, t.ENTRUST_STATE, t.VERSION, t.SCAN_CAR, t.MSG_INFO, t.STOP_OVER_TIME, 
    t.VALID_IS_PRE, t.RED_GREEN_LIGHT_STATE, t.FRONT_INFRARED_RAY_STATE, t.REAR_INFRARED_RAY_STATE, 
    t.RFID_STATE
  </sql>
  <sql id="select">
    SELECT <include refid="columns" /> FROM METER_BASE_SCALE_POINT
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias" /> FROM METER_BASE_SCALE_POINT t
  </sql>
  <sql id="where">
    <where> 
      <if test="scalePointNo != null and scalePointNo != ''">
        and SCALE_POINT_NO = #{scalePointNo}
      </if>
      <if test="scalePointName != null and scalePointName != ''">
        and SCALE_POINT_NAME = #{scalePointName}
      </if>
      <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="weighInstrumentModel != null and weighInstrumentModel != ''">
        and WEIGH_INSTRUMENT_MODEL = #{weighInstrumentModel}
      </if>
      <if test="weighInstrumentParam != null and weighInstrumentParam != ''">
        and WEIGH_INSTRUMENT_PARAM = #{weighInstrumentParam}
      </if>
      <if test="moxaIp != null and moxaIp != ''">
        and MOXA_IP = #{moxaIp}
      </if>
      <if test="moxaPort != null and moxaPort != ''">
        and MOXA_PORT = #{moxaPort}
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG = #{validFlag}
      </if>
      <if test="lastTime != null">
        and TO_CHAR(LAST_TIME,'yyyy-MM-dd') = #{lastTime}
      </if>
      <if test="weightTime != null">
        and TO_CHAR(WEIGHT_TIME,'yyyy-MM-dd') = #{weightTime}
      </if>
      <if test="userNo != null and userNo != ''">
        and USER_NO = #{userNo}
      </if>
      <if test="monitorUserNo != null and monitorUserNo != ''">
        and MONITOR_USER_NO = #{monitorUserNo}
      </if>
      <if test="weight != null">
        and WEIGHT = #{weight}
      </if>
      <if test="collectionCode != null and collectionCode != ''">
        and COLLECTION_CODE = #{collectionCode}
      </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="spotTypeNo != null and spotTypeNo != ''">
        and SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        and SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="weightZero != null">
        and WEIGHT_ZERO = #{weightZero}
      </if>
      <if test="monitorUserIp != null and monitorUserIp != ''">
        and MONITOR_USER_IP = #{monitorUserIp}
      </if>
      <if test="isHelp != null and isHelp != ''">
        and IS_HELP = #{isHelp}
      </if>
      <if test="isTakeOver != null and isTakeOver != ''">
        and IS_TAKE_OVER = #{isTakeOver}
      </if>
      <if test="ledWriter != null and ledWriter != ''">
        and LED_WRITER = #{ledWriter}
      </if>
      <if test="rfidCar != null and rfidCar != ''">
        and RFID_CAR = #{rfidCar}
      </if>
      <if test="photoCar != null and photoCar != ''">
        and PHOTO_CAR = #{photoCar}
      </if>
      <if test="wgtErr != null and wgtErr != ''">
        and WGT_ERR = #{wgtErr}
      </if>
      <if test="userIp != null and userIp != ''">
        and USER_IP = #{userIp}
      </if>
      <if test="aiWeight != null and aiWeight != ''">
        and AI_WEIGHT = #{aiWeight}
      </if>
      <if test="carErr != null and carErr != ''">
        and CAR_ERR = #{carErr}
      </if>
      <if test="powerState != null and powerState != ''">
        and POWER_STATE = #{powerState}
      </if>
      <if test="dvrState != null and dvrState != ''">
        and DVR_STATE = #{dvrState}
      </if>
      <if test="moxaState != null and moxaState != ''">
        and MOXA_STATE = #{moxaState}
      </if>
      <if test="plcState != null and plcState != ''">
        and PLC_STATE = #{plcState}
      </if>
      <if test="leftInfraredRayState != null and leftInfraredRayState != ''">
        and LEFT_INFRARED_RAY_STATE = #{leftInfraredRayState}
      </if>
      <if test="rightInfraredRayState != null and rightInfraredRayState != ''">
        and RIGHT_INFRARED_RAY_STATE = #{rightInfraredRayState}
      </if>
      <if test="amplifierState != null and amplifierState != ''">
        and AMPLIFIER_STATE = #{amplifierState}
      </if>
      <if test="lampState != null and lampState != ''">
        and LAMP_STATE = #{lampState}
      </if>
      <if test="entrustState != null and entrustState != ''">
        and ENTRUST_STATE = #{entrustState}
      </if>
      <if test="version != null">
        and VERSION = #{version}
      </if>
      <if test="scanCar != null and scanCar != ''">
        and SCAN_CAR = #{scanCar}
      </if>
      <if test="msgInfo != null and msgInfo != ''">
        and MSG_INFO = #{msgInfo}
      </if>
      <if test="stopOverTime != null and stopOverTime != ''">
        and STOP_OVER_TIME = #{stopOverTime}
      </if>
      <if test="validIsPre != null and validIsPre != ''">
        and VALID_IS_PRE = #{validIsPre}
      </if>
      <if test="redGreenLightState != null and redGreenLightState != ''">
        and RED_GREEN_LIGHT_STATE = #{redGreenLightState}
      </if>
      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
        and FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState}
      </if>
      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
        and REAR_INFRARED_RAY_STATE = #{rearInfraredRayState}
      </if>
      <if test="rfidState != null and rfidState != ''">
        and RFID_STATE = #{rfidState}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="scalePointNo != null and scalePointNo != ''">
        and SCALE_POINT_NO LIKE '%${scalePointNo}%'
      </if>
      <if test="scalePointName != null and scalePointName != ''">
        and SCALE_POINT_NAME LIKE '%${scalePointName}%'
      </if>
      <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="weighInstrumentModel != null and weighInstrumentModel != ''">
        and WEIGH_INSTRUMENT_MODEL LIKE '%${weighInstrumentModel}%'
      </if>
      <if test="weighInstrumentParam != null and weighInstrumentParam != ''">
        and WEIGH_INSTRUMENT_PARAM LIKE '%${weighInstrumentParam}%'
      </if>
      <if test="moxaIp != null and moxaIp != ''">
        and MOXA_IP LIKE '%${moxaIp}%'
      </if>
      <if test="moxaPort != null and moxaPort != ''">
        and MOXA_PORT LIKE '%${moxaPort}%'
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG LIKE '%${validFlag}%'
      </if>
      <if test="lastTime != null">
        and TO_CHAR(LAST_TIME,'yyyy-MM-dd') = #{lastTime}
      </if>
      <if test="weightTime != null">
        and TO_CHAR(WEIGHT_TIME,'yyyy-MM-dd') = #{weightTime}
      </if>
      <if test="userNo != null and userNo != ''">
        and USER_NO LIKE '%${userNo}%'
      </if>
      <if test="monitorUserNo != null and monitorUserNo != ''">
        and MONITOR_USER_NO LIKE '%${monitorUserNo}%'
      </if>
      <if test="weight != null">
        and WEIGHT = #{weight}
      </if>
      <if test="collectionCode != null and collectionCode != ''">
        and COLLECTION_CODE LIKE '%${collectionCode}%'
      </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="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="weightZero != null">
        and WEIGHT_ZERO = #{weightZero}
      </if>
      <if test="monitorUserIp != null and monitorUserIp != ''">
        and MONITOR_USER_IP LIKE '%${monitorUserIp}%'
      </if>
      <if test="isHelp != null and isHelp != ''">
        and IS_HELP LIKE '%${isHelp}%'
      </if>
      <if test="isTakeOver != null and isTakeOver != ''">
        and IS_TAKE_OVER LIKE '%${isTakeOver}%'
      </if>
      <if test="ledWriter != null and ledWriter != ''">
        and LED_WRITER LIKE '%${ledWriter}%'
      </if>
      <if test="rfidCar != null and rfidCar != ''">
        and RFID_CAR LIKE '%${rfidCar}%'
      </if>
      <if test="photoCar != null and photoCar != ''">
        and PHOTO_CAR LIKE '%${photoCar}%'
      </if>
      <if test="wgtErr != null and wgtErr != ''">
        and WGT_ERR LIKE '%${wgtErr}%'
      </if>
      <if test="userIp != null and userIp != ''">
        and USER_IP LIKE '%${userIp}%'
      </if>
      <if test="aiWeight != null and aiWeight != ''">
        and AI_WEIGHT LIKE '%${aiWeight}%'
      </if>
      <if test="carErr != null and carErr != ''">
        and CAR_ERR LIKE '%${carErr}%'
      </if>
      <if test="powerState != null and powerState != ''">
        and POWER_STATE LIKE '%${powerState}%'
      </if>
      <if test="dvrState != null and dvrState != ''">
        and DVR_STATE LIKE '%${dvrState}%'
      </if>
      <if test="moxaState != null and moxaState != ''">
        and MOXA_STATE LIKE '%${moxaState}%'
      </if>
      <if test="plcState != null and plcState != ''">
        and PLC_STATE LIKE '%${plcState}%'
      </if>
      <if test="leftInfraredRayState != null and leftInfraredRayState != ''">
        and LEFT_INFRARED_RAY_STATE LIKE '%${leftInfraredRayState}%'
      </if>
      <if test="rightInfraredRayState != null and rightInfraredRayState != ''">
        and RIGHT_INFRARED_RAY_STATE LIKE '%${rightInfraredRayState}%'
      </if>
      <if test="amplifierState != null and amplifierState != ''">
        and AMPLIFIER_STATE LIKE '%${amplifierState}%'
      </if>
      <if test="lampState != null and lampState != ''">
        and LAMP_STATE LIKE '%${lampState}%'
      </if>
      <if test="entrustState != null and entrustState != ''">
        and ENTRUST_STATE LIKE '%${entrustState}%'
      </if>
      <if test="version != null">
        and VERSION = #{version}
      </if>
      <if test="scanCar != null and scanCar != ''">
        and SCAN_CAR LIKE '%${scanCar}%'
      </if>
      <if test="msgInfo != null and msgInfo != ''">
        and MSG_INFO LIKE '%${msgInfo}%'
      </if>
      <if test="stopOverTime != null and stopOverTime != ''">
        and STOP_OVER_TIME LIKE '%${stopOverTime}%'
      </if>
      <if test="validIsPre != null and validIsPre != ''">
        and VALID_IS_PRE LIKE '%${validIsPre}%'
      </if>
      <if test="redGreenLightState != null and redGreenLightState != ''">
        and RED_GREEN_LIGHT_STATE LIKE '%${redGreenLightState}%'
      </if>
      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
        and FRONT_INFRARED_RAY_STATE LIKE '%${frontInfraredRayState}%'
      </if>
      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
        and REAR_INFRARED_RAY_STATE LIKE '%${rearInfraredRayState}%'
      </if>
      <if test="rfidState != null and rfidState != ''">
        and RFID_STATE LIKE '%${rfidState}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_SCALE_POINT
    where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_SCALE_POINT
    where 1!=1 
      <if test="scalePointName != null and scalePointName != ''">
        or SCALE_POINT_NAME = #{scalePointName}
      </if>
      <if test="baseSpotNo != null and baseSpotNo != ''">
        or BASE_SPOT_NO = #{baseSpotNo}
      </if>
      <if test="baseSpotName != null and baseSpotName != ''">
        or BASE_SPOT_NAME = #{baseSpotName}
      </if>
      <if test="weighInstrumentModel != null and weighInstrumentModel != ''">
        or WEIGH_INSTRUMENT_MODEL = #{weighInstrumentModel}
      </if>
      <if test="weighInstrumentParam != null and weighInstrumentParam != ''">
        or WEIGH_INSTRUMENT_PARAM = #{weighInstrumentParam}
      </if>
      <if test="moxaIp != null and moxaIp != ''">
        or MOXA_IP = #{moxaIp}
      </if>
      <if test="moxaPort != null and moxaPort != ''">
        or MOXA_PORT = #{moxaPort}
      </if>
      <if test="validFlag != null and validFlag != ''">
        or VALID_FLAG = #{validFlag}
      </if>
      <if test="lastTime != null">
        or TO_CHAR(LAST_TIME,'yyyy-MM-dd') = '#{lastTime}'
      </if>
      <if test="weightTime != null">
        or TO_CHAR(WEIGHT_TIME,'yyyy-MM-dd') = '#{weightTime}'
      </if>
      <if test="userNo != null and userNo != ''">
        or USER_NO = #{userNo}
      </if>
      <if test="monitorUserNo != null and monitorUserNo != ''">
        or MONITOR_USER_NO = #{monitorUserNo}
      </if>
      <if test="weight != null">
        or WEIGHT = #{weight}
      </if>
      <if test="collectionCode != null and collectionCode != ''">
        or COLLECTION_CODE = #{collectionCode}
      </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="spotTypeNo != null and spotTypeNo != ''">
        or SPOT_TYPE_NO = #{spotTypeNo}
      </if>
      <if test="spotTypeName != null and spotTypeName != ''">
        or SPOT_TYPE_NAME = #{spotTypeName}
      </if>
      <if test="weightZero != null">
        or WEIGHT_ZERO = #{weightZero}
      </if>
      <if test="monitorUserIp != null and monitorUserIp != ''">
        or MONITOR_USER_IP = #{monitorUserIp}
      </if>
      <if test="isHelp != null and isHelp != ''">
        or IS_HELP = #{isHelp}
      </if>
      <if test="isTakeOver != null and isTakeOver != ''">
        or IS_TAKE_OVER = #{isTakeOver}
      </if>
      <if test="ledWriter != null and ledWriter != ''">
        or LED_WRITER = #{ledWriter}
      </if>
      <if test="rfidCar != null and rfidCar != ''">
        or RFID_CAR = #{rfidCar}
      </if>
      <if test="photoCar != null and photoCar != ''">
        or PHOTO_CAR = #{photoCar}
      </if>
      <if test="wgtErr != null and wgtErr != ''">
        or WGT_ERR = #{wgtErr}
      </if>
      <if test="userIp != null and userIp != ''">
        or USER_IP = #{userIp}
      </if>
      <if test="aiWeight != null and aiWeight != ''">
        or AI_WEIGHT = #{aiWeight}
      </if>
      <if test="carErr != null and carErr != ''">
        or CAR_ERR = #{carErr}
      </if>
      <if test="powerState != null and powerState != ''">
        or POWER_STATE = #{powerState}
      </if>
      <if test="dvrState != null and dvrState != ''">
        or DVR_STATE = #{dvrState}
      </if>
      <if test="moxaState != null and moxaState != ''">
        or MOXA_STATE = #{moxaState}
      </if>
      <if test="plcState != null and plcState != ''">
        or PLC_STATE = #{plcState}
      </if>
      <if test="leftInfraredRayState != null and leftInfraredRayState != ''">
        or LEFT_INFRARED_RAY_STATE = #{leftInfraredRayState}
      </if>
      <if test="rightInfraredRayState != null and rightInfraredRayState != ''">
        or RIGHT_INFRARED_RAY_STATE = #{rightInfraredRayState}
      </if>
      <if test="amplifierState != null and amplifierState != ''">
        or AMPLIFIER_STATE = #{amplifierState}
      </if>
      <if test="lampState != null and lampState != ''">
        or LAMP_STATE = #{lampState}
      </if>
      <if test="entrustState != null and entrustState != ''">
        or ENTRUST_STATE = #{entrustState}
      </if>
      <if test="version != null">
        or VERSION = #{version}
      </if>
      <if test="scanCar != null and scanCar != ''">
        or SCAN_CAR = #{scanCar}
      </if>
      <if test="msgInfo != null and msgInfo != ''">
        or MSG_INFO = #{msgInfo}
      </if>
      <if test="stopOverTime != null and stopOverTime != ''">
        or STOP_OVER_TIME = #{stopOverTime}
      </if>
      <if test="validIsPre != null and validIsPre != ''">
        or VALID_IS_PRE = #{validIsPre}
      </if>
      <if test="redGreenLightState != null and redGreenLightState != ''">
        or RED_GREEN_LIGHT_STATE = #{redGreenLightState}
      </if>
      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
        or FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState}
      </if>
      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
        or REAR_INFRARED_RAY_STATE = #{rearInfraredRayState}
      </if>
      <if test="rfidState != null and rfidState != ''">
        or RFID_STATE = #{rfidState}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
    insert into METER_BASE_SCALE_POINT (SCALE_POINT_NO, SCALE_POINT_NAME, BASE_SPOT_NO, 
      BASE_SPOT_NAME, WEIGH_INSTRUMENT_MODEL, WEIGH_INSTRUMENT_PARAM, 
      MOXA_IP, MOXA_PORT, VALID_FLAG, 
      LAST_TIME, WEIGHT_TIME, USER_NO, 
      MONITOR_USER_NO, WEIGHT, COLLECTION_CODE, 
      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      SPOT_TYPE_NO, SPOT_TYPE_NAME, WEIGHT_ZERO, 
      MONITOR_USER_IP, IS_HELP, IS_TAKE_OVER, 
      LED_WRITER, RFID_CAR, PHOTO_CAR, 
      WGT_ERR, USER_IP, AI_WEIGHT, 
      CAR_ERR, POWER_STATE, DVR_STATE, 
      MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, 
      RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, 
      LAMP_STATE, ENTRUST_STATE, VERSION, 
      SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
      VALID_IS_PRE, RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, 
      REAR_INFRARED_RAY_STATE, RFID_STATE)
    values (#{scalePointNo,jdbcType=VARCHAR}, #{scalePointName,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, 
      #{baseSpotName,jdbcType=VARCHAR}, #{weighInstrumentModel,jdbcType=VARCHAR}, #{weighInstrumentParam,jdbcType=VARCHAR}, 
      #{moxaIp,jdbcType=VARCHAR}, #{moxaPort,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, 
      #{lastTime,jdbcType=TIMESTAMP}, #{weightTime,jdbcType=TIMESTAMP}, #{userNo,jdbcType=VARCHAR}, 
      #{monitorUserNo,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{collectionCode,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}, 
      #{spotTypeNo,jdbcType=VARCHAR}, #{spotTypeName,jdbcType=VARCHAR}, #{weightZero,jdbcType=DECIMAL}, 
      #{monitorUserIp,jdbcType=VARCHAR}, #{isHelp,jdbcType=VARCHAR}, #{isTakeOver,jdbcType=VARCHAR}, 
      #{ledWriter,jdbcType=VARCHAR}, #{rfidCar,jdbcType=VARCHAR}, #{photoCar,jdbcType=VARCHAR}, 
      #{wgtErr,jdbcType=VARCHAR}, #{userIp,jdbcType=VARCHAR}, #{aiWeight,jdbcType=VARCHAR}, 
      #{carErr,jdbcType=VARCHAR}, #{powerState,jdbcType=VARCHAR}, #{dvrState,jdbcType=VARCHAR}, 
      #{moxaState,jdbcType=VARCHAR}, #{plcState,jdbcType=VARCHAR}, #{leftInfraredRayState,jdbcType=VARCHAR}, 
      #{rightInfraredRayState,jdbcType=VARCHAR}, #{amplifierState,jdbcType=VARCHAR}, 
      #{lampState,jdbcType=VARCHAR}, #{entrustState,jdbcType=VARCHAR}, #{version,jdbcType=DECIMAL}, 
      #{scanCar,jdbcType=VARCHAR}, #{msgInfo,jdbcType=VARCHAR}, #{stopOverTime,jdbcType=VARCHAR}, 
      #{validIsPre,jdbcType=VARCHAR}, #{redGreenLightState,jdbcType=VARCHAR}, #{frontInfraredRayState,jdbcType=VARCHAR}, 
      #{rearInfraredRayState,jdbcType=VARCHAR}, #{rfidState,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
    insert into METER_BASE_SCALE_POINT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="scalePointNo != null">
        SCALE_POINT_NO,
      </if>
      <if test="scalePointName != null">
        SCALE_POINT_NAME,
      </if>
      <if test="baseSpotNo != null">
        BASE_SPOT_NO,
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME,
      </if>
      <if test="weighInstrumentModel != null">
        WEIGH_INSTRUMENT_MODEL,
      </if>
      <if test="weighInstrumentParam != null">
        WEIGH_INSTRUMENT_PARAM,
      </if>
      <if test="moxaIp != null">
        MOXA_IP,
      </if>
      <if test="moxaPort != null">
        MOXA_PORT,
      </if>
      <if test="validFlag != null">
        VALID_FLAG,
      </if>
      <if test="lastTime != null">
        LAST_TIME,
      </if>
      <if test="weightTime != null">
        WEIGHT_TIME,
      </if>
      <if test="userNo != null">
        USER_NO,
      </if>
      <if test="monitorUserNo != null">
        MONITOR_USER_NO,
      </if>
      <if test="weight != null">
        WEIGHT,
      </if>
      <if test="collectionCode != null">
        COLLECTION_CODE,
      </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="spotTypeNo != null">
        SPOT_TYPE_NO,
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME,
      </if>
      <if test="weightZero != null">
        WEIGHT_ZERO,
      </if>
      <if test="monitorUserIp != null">
        MONITOR_USER_IP,
      </if>
      <if test="isHelp != null">
        IS_HELP,
      </if>
      <if test="isTakeOver != null">
        IS_TAKE_OVER,
      </if>
      <if test="ledWriter != null">
        LED_WRITER,
      </if>
      <if test="rfidCar != null">
        RFID_CAR,
      </if>
      <if test="photoCar != null">
        PHOTO_CAR,
      </if>
      <if test="wgtErr != null">
        WGT_ERR,
      </if>
      <if test="userIp != null">
        USER_IP,
      </if>
      <if test="aiWeight != null">
        AI_WEIGHT,
      </if>
      <if test="carErr != null">
        CAR_ERR,
      </if>
      <if test="powerState != null">
        POWER_STATE,
      </if>
      <if test="dvrState != null">
        DVR_STATE,
      </if>
      <if test="moxaState != null">
        MOXA_STATE,
      </if>
      <if test="plcState != null">
        PLC_STATE,
      </if>
      <if test="leftInfraredRayState != null">
        LEFT_INFRARED_RAY_STATE,
      </if>
      <if test="rightInfraredRayState != null">
        RIGHT_INFRARED_RAY_STATE,
      </if>
      <if test="amplifierState != null">
        AMPLIFIER_STATE,
      </if>
      <if test="lampState != null">
        LAMP_STATE,
      </if>
      <if test="entrustState != null">
        ENTRUST_STATE,
      </if>
      <if test="version != null">
        VERSION,
      </if>
      <if test="scanCar != null">
        SCAN_CAR,
      </if>
      <if test="msgInfo != null">
        MSG_INFO,
      </if>
      <if test="stopOverTime != null">
        STOP_OVER_TIME,
      </if>
      <if test="validIsPre != null">
        VALID_IS_PRE,
      </if>
      <if test="redGreenLightState != null">
        RED_GREEN_LIGHT_STATE,
      </if>
      <if test="frontInfraredRayState != null">
        FRONT_INFRARED_RAY_STATE,
      </if>
      <if test="rearInfraredRayState != null">
        REAR_INFRARED_RAY_STATE,
      </if>
      <if test="rfidState != null">
        RFID_STATE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="scalePointNo != null">
        #{scalePointNo,jdbcType=VARCHAR},
      </if>
      <if test="scalePointName != null">
        #{scalePointName,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo != null">
        #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="weighInstrumentModel != null">
        #{weighInstrumentModel,jdbcType=VARCHAR},
      </if>
      <if test="weighInstrumentParam != null">
        #{weighInstrumentParam,jdbcType=VARCHAR},
      </if>
      <if test="moxaIp != null">
        #{moxaIp,jdbcType=VARCHAR},
      </if>
      <if test="moxaPort != null">
        #{moxaPort,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="lastTime != null">
        #{lastTime,jdbcType=TIMESTAMP},
      </if>
      <if test="weightTime != null">
        #{weightTime,jdbcType=TIMESTAMP},
      </if>
      <if test="userNo != null">
        #{userNo,jdbcType=VARCHAR},
      </if>
      <if test="monitorUserNo != null">
        #{monitorUserNo,jdbcType=VARCHAR},
      </if>
      <if test="weight != null">
        #{weight,jdbcType=DECIMAL},
      </if>
      <if test="collectionCode != null">
        #{collectionCode,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="spotTypeNo != null">
        #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="weightZero != null">
        #{weightZero,jdbcType=DECIMAL},
      </if>
      <if test="monitorUserIp != null">
        #{monitorUserIp,jdbcType=VARCHAR},
      </if>
      <if test="isHelp != null">
        #{isHelp,jdbcType=VARCHAR},
      </if>
      <if test="isTakeOver != null">
        #{isTakeOver,jdbcType=VARCHAR},
      </if>
      <if test="ledWriter != null">
        #{ledWriter,jdbcType=VARCHAR},
      </if>
      <if test="rfidCar != null">
        #{rfidCar,jdbcType=VARCHAR},
      </if>
      <if test="photoCar != null">
        #{photoCar,jdbcType=VARCHAR},
      </if>
      <if test="wgtErr != null">
        #{wgtErr,jdbcType=VARCHAR},
      </if>
      <if test="userIp != null">
        #{userIp,jdbcType=VARCHAR},
      </if>
      <if test="aiWeight != null">
        #{aiWeight,jdbcType=VARCHAR},
      </if>
      <if test="carErr != null">
        #{carErr,jdbcType=VARCHAR},
      </if>
      <if test="powerState != null">
        #{powerState,jdbcType=VARCHAR},
      </if>
      <if test="dvrState != null">
        #{dvrState,jdbcType=VARCHAR},
      </if>
      <if test="moxaState != null">
        #{moxaState,jdbcType=VARCHAR},
      </if>
      <if test="plcState != null">
        #{plcState,jdbcType=VARCHAR},
      </if>
      <if test="leftInfraredRayState != null">
        #{leftInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rightInfraredRayState != null">
        #{rightInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="amplifierState != null">
        #{amplifierState,jdbcType=VARCHAR},
      </if>
      <if test="lampState != null">
        #{lampState,jdbcType=VARCHAR},
      </if>
      <if test="entrustState != null">
        #{entrustState,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        #{version,jdbcType=DECIMAL},
      </if>
      <if test="scanCar != null">
        #{scanCar,jdbcType=VARCHAR},
      </if>
      <if test="msgInfo != null">
        #{msgInfo,jdbcType=VARCHAR},
      </if>
      <if test="stopOverTime != null">
        #{stopOverTime,jdbcType=VARCHAR},
      </if>
      <if test="validIsPre != null">
        #{validIsPre,jdbcType=VARCHAR},
      </if>
      <if test="redGreenLightState != null">
        #{redGreenLightState,jdbcType=VARCHAR},
      </if>
      <if test="frontInfraredRayState != null">
        #{frontInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rearInfraredRayState != null">
        #{rearInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rfidState != null">
        #{rfidState,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
    update METER_BASE_SCALE_POINT
    set SCALE_POINT_NAME = #{scalePointName,jdbcType=VARCHAR},
      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      WEIGH_INSTRUMENT_MODEL = #{weighInstrumentModel,jdbcType=VARCHAR},
      WEIGH_INSTRUMENT_PARAM = #{weighInstrumentParam,jdbcType=VARCHAR},
      MOXA_IP = #{moxaIp,jdbcType=VARCHAR},
      MOXA_PORT = #{moxaPort,jdbcType=VARCHAR},
      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      LAST_TIME = #{lastTime,jdbcType=TIMESTAMP},
      WEIGHT_TIME = #{weightTime,jdbcType=TIMESTAMP},
      USER_NO = #{userNo,jdbcType=VARCHAR},
      MONITOR_USER_NO = #{monitorUserNo,jdbcType=VARCHAR},
      WEIGHT = #{weight,jdbcType=DECIMAL},
      COLLECTION_CODE = #{collectionCode,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},
      SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
      SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
      WEIGHT_ZERO = #{weightZero,jdbcType=DECIMAL},
      MONITOR_USER_IP = #{monitorUserIp,jdbcType=VARCHAR},
      IS_HELP = #{isHelp,jdbcType=VARCHAR},
      IS_TAKE_OVER = #{isTakeOver,jdbcType=VARCHAR},
      LED_WRITER = #{ledWriter,jdbcType=VARCHAR},
      RFID_CAR = #{rfidCar,jdbcType=VARCHAR},
      PHOTO_CAR = #{photoCar,jdbcType=VARCHAR},
      WGT_ERR = #{wgtErr,jdbcType=VARCHAR},
      USER_IP = #{userIp,jdbcType=VARCHAR},
      AI_WEIGHT = #{aiWeight,jdbcType=VARCHAR},
      CAR_ERR = #{carErr,jdbcType=VARCHAR},
      POWER_STATE = #{powerState,jdbcType=VARCHAR},
      DVR_STATE = #{dvrState,jdbcType=VARCHAR},
      MOXA_STATE = #{moxaState,jdbcType=VARCHAR},
      PLC_STATE = #{plcState,jdbcType=VARCHAR},
      LEFT_INFRARED_RAY_STATE = #{leftInfraredRayState,jdbcType=VARCHAR},
      RIGHT_INFRARED_RAY_STATE = #{rightInfraredRayState,jdbcType=VARCHAR},
      AMPLIFIER_STATE = #{amplifierState,jdbcType=VARCHAR},
      LAMP_STATE = #{lampState,jdbcType=VARCHAR},
      ENTRUST_STATE = #{entrustState,jdbcType=VARCHAR},
      VERSION = #{version,jdbcType=DECIMAL},
      SCAN_CAR = #{scanCar,jdbcType=VARCHAR},
      MSG_INFO = #{msgInfo,jdbcType=VARCHAR},
      STOP_OVER_TIME = #{stopOverTime,jdbcType=VARCHAR},
      VALID_IS_PRE = #{validIsPre,jdbcType=VARCHAR},
      RED_GREEN_LIGHT_STATE = #{redGreenLightState,jdbcType=VARCHAR},
      FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState,jdbcType=VARCHAR},
      REAR_INFRARED_RAY_STATE = #{rearInfraredRayState,jdbcType=VARCHAR},
      RFID_STATE = #{rfidState,jdbcType=VARCHAR}
    where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
    update METER_BASE_SCALE_POINT
    <set>
      <if test="scalePointName != null">
        SCALE_POINT_NAME = #{scalePointName,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotNo != null">
        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
      </if>
      <if test="baseSpotName != null">
        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
      </if>
      <if test="weighInstrumentModel != null">
        WEIGH_INSTRUMENT_MODEL = #{weighInstrumentModel,jdbcType=VARCHAR},
      </if>
      <if test="weighInstrumentParam != null">
        WEIGH_INSTRUMENT_PARAM = #{weighInstrumentParam,jdbcType=VARCHAR},
      </if>
      <if test="moxaIp != null">
        MOXA_IP = #{moxaIp,jdbcType=VARCHAR},
      </if>
      <if test="moxaPort != null">
        MOXA_PORT = #{moxaPort,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="lastTime != null">
        LAST_TIME = #{lastTime,jdbcType=TIMESTAMP},
      </if>
      <if test="weightTime != null">
        WEIGHT_TIME = #{weightTime,jdbcType=TIMESTAMP},
      </if>
      <if test="userNo != null">
        USER_NO = #{userNo,jdbcType=VARCHAR},
      </if>
      <if test="monitorUserNo != null">
        MONITOR_USER_NO = #{monitorUserNo,jdbcType=VARCHAR},
      </if>
      <if test="weight != null">
        WEIGHT = #{weight,jdbcType=DECIMAL},
      </if>
      <if test="collectionCode != null">
        COLLECTION_CODE = #{collectionCode,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="spotTypeNo != null">
        SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="spotTypeName != null">
        SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
      </if>
      <if test="weightZero != null">
        WEIGHT_ZERO = #{weightZero,jdbcType=DECIMAL},
      </if>
      <if test="monitorUserIp != null">
        MONITOR_USER_IP = #{monitorUserIp,jdbcType=VARCHAR},
      </if>
      <if test="isHelp != null">
        IS_HELP = #{isHelp,jdbcType=VARCHAR},
      </if>
      <if test="isTakeOver != null">
        IS_TAKE_OVER = #{isTakeOver,jdbcType=VARCHAR},
      </if>
      <if test="ledWriter != null">
        LED_WRITER = #{ledWriter,jdbcType=VARCHAR},
      </if>
      <if test="rfidCar != null">
        RFID_CAR = #{rfidCar,jdbcType=VARCHAR},
      </if>
      <if test="photoCar != null">
        PHOTO_CAR = #{photoCar,jdbcType=VARCHAR},
      </if>
      <if test="wgtErr != null">
        WGT_ERR = #{wgtErr,jdbcType=VARCHAR},
      </if>
      <if test="userIp != null">
        USER_IP = #{userIp,jdbcType=VARCHAR},
      </if>
      <if test="aiWeight != null">
        AI_WEIGHT = #{aiWeight,jdbcType=VARCHAR},
      </if>
      <if test="carErr != null">
        CAR_ERR = #{carErr,jdbcType=VARCHAR},
      </if>
      <if test="powerState != null">
        POWER_STATE = #{powerState,jdbcType=VARCHAR},
      </if>
      <if test="dvrState != null">
        DVR_STATE = #{dvrState,jdbcType=VARCHAR},
      </if>
      <if test="moxaState != null">
        MOXA_STATE = #{moxaState,jdbcType=VARCHAR},
      </if>
      <if test="plcState != null">
        PLC_STATE = #{plcState,jdbcType=VARCHAR},
      </if>
      <if test="leftInfraredRayState != null">
        LEFT_INFRARED_RAY_STATE = #{leftInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rightInfraredRayState != null">
        RIGHT_INFRARED_RAY_STATE = #{rightInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="amplifierState != null">
        AMPLIFIER_STATE = #{amplifierState,jdbcType=VARCHAR},
      </if>
      <if test="lampState != null">
        LAMP_STATE = #{lampState,jdbcType=VARCHAR},
      </if>
      <if test="entrustState != null">
        ENTRUST_STATE = #{entrustState,jdbcType=VARCHAR},
      </if>
      <if test="version != null">
        VERSION = #{version,jdbcType=DECIMAL},
      </if>
      <if test="scanCar != null">
        SCAN_CAR = #{scanCar,jdbcType=VARCHAR},
      </if>
      <if test="msgInfo != null">
        MSG_INFO = #{msgInfo,jdbcType=VARCHAR},
      </if>
      <if test="stopOverTime != null">
        STOP_OVER_TIME = #{stopOverTime,jdbcType=VARCHAR},
      </if>
      <if test="validIsPre != null">
        VALID_IS_PRE = #{validIsPre,jdbcType=VARCHAR},
      </if>
      <if test="redGreenLightState != null">
        RED_GREEN_LIGHT_STATE = #{redGreenLightState,jdbcType=VARCHAR},
      </if>
      <if test="frontInfraredRayState != null">
        FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rearInfraredRayState != null">
        REAR_INFRARED_RAY_STATE = #{rearInfraredRayState,jdbcType=VARCHAR},
      </if>
      <if test="rfidState != null">
        RFID_STATE = #{rfidState,jdbcType=VARCHAR},
      </if>
    </set>
    where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select" />
    where SCALE_POINT_NO = #{scalePointNo,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_SCALE_POINT 
      (SCALE_POINT_NO, 
      SCALE_POINT_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, 
      WEIGH_INSTRUMENT_MODEL, WEIGH_INSTRUMENT_PARAM, 
      MOXA_IP, MOXA_PORT, VALID_FLAG, 
      LAST_TIME, WEIGHT_TIME, USER_NO, 
      MONITOR_USER_NO, WEIGHT, COLLECTION_CODE, 
      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      SPOT_TYPE_NO, SPOT_TYPE_NAME, WEIGHT_ZERO, 
      MONITOR_USER_IP, IS_HELP, IS_TAKE_OVER, 
      LED_WRITER, RFID_CAR, PHOTO_CAR, 
      WGT_ERR, USER_IP, AI_WEIGHT, 
      CAR_ERR, POWER_STATE, DVR_STATE, 
      MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, 
      RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, 
      LAMP_STATE, ENTRUST_STATE, VERSION, 
      SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
      VALID_IS_PRE, RED_GREEN_LIGHT_STATE, 
      FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
      RFID_STATE)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.scalePointNo,jdbcType=VARCHAR}, 
      #{item.scalePointName,jdbcType=VARCHAR}, #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, 
      #{item.weighInstrumentModel,jdbcType=VARCHAR}, #{item.weighInstrumentParam,jdbcType=VARCHAR}, 
      #{item.moxaIp,jdbcType=VARCHAR}, #{item.moxaPort,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, 
      #{item.lastTime,jdbcType=TIMESTAMP}, #{item.weightTime,jdbcType=TIMESTAMP}, #{item.userNo,jdbcType=VARCHAR}, 
      #{item.monitorUserNo,jdbcType=VARCHAR}, #{item.weight,jdbcType=DECIMAL}, #{item.collectionCode,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.spotTypeNo,jdbcType=VARCHAR}, #{item.spotTypeName,jdbcType=VARCHAR}, #{item.weightZero,jdbcType=DECIMAL}, 
      #{item.monitorUserIp,jdbcType=VARCHAR}, #{item.isHelp,jdbcType=VARCHAR}, #{item.isTakeOver,jdbcType=VARCHAR}, 
      #{item.ledWriter,jdbcType=VARCHAR}, #{item.rfidCar,jdbcType=VARCHAR}, #{item.photoCar,jdbcType=VARCHAR}, 
      #{item.wgtErr,jdbcType=VARCHAR}, #{item.userIp,jdbcType=VARCHAR}, #{item.aiWeight,jdbcType=VARCHAR}, 
      #{item.carErr,jdbcType=VARCHAR}, #{item.powerState,jdbcType=VARCHAR}, #{item.dvrState,jdbcType=VARCHAR}, 
      #{item.moxaState,jdbcType=VARCHAR}, #{item.plcState,jdbcType=VARCHAR}, #{item.leftInfraredRayState,jdbcType=VARCHAR}, 
      #{item.rightInfraredRayState,jdbcType=VARCHAR}, #{item.amplifierState,jdbcType=VARCHAR}, 
      #{item.lampState,jdbcType=VARCHAR}, #{item.entrustState,jdbcType=VARCHAR}, #{item.version,jdbcType=DECIMAL}, 
      #{item.scanCar,jdbcType=VARCHAR}, #{item.msgInfo,jdbcType=VARCHAR}, #{item.stopOverTime,jdbcType=VARCHAR}, 
      #{item.validIsPre,jdbcType=VARCHAR}, #{item.redGreenLightState,jdbcType=VARCHAR}, 
      #{item.frontInfraredRayState,jdbcType=VARCHAR}, #{item.rearInfraredRayState,jdbcType=VARCHAR}, 
      #{item.rfidState,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_BASE_SCALE_POINT
     set
       SCALE_POINT_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scalePointNo,jdbcType=VARCHAR}
       </foreach>
       ,SCALE_POINT_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scalePointName,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
       </foreach>
       ,BASE_SPOT_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
       </foreach>
       ,WEIGH_INSTRUMENT_MODEL=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weighInstrumentModel,jdbcType=VARCHAR}
       </foreach>
       ,WEIGH_INSTRUMENT_PARAM=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weighInstrumentParam,jdbcType=VARCHAR}
       </foreach>
       ,MOXA_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaIp,jdbcType=VARCHAR}
       </foreach>
       ,MOXA_PORT=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaPort,jdbcType=VARCHAR}
       </foreach>
       ,VALID_FLAG=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
       </foreach>
       ,LAST_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.lastTime,jdbcType=TIMESTAMP}
       </foreach>
       ,WEIGHT_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weightTime,jdbcType=TIMESTAMP}
       </foreach>
       ,USER_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.userNo,jdbcType=VARCHAR}
       </foreach>
       ,MONITOR_USER_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.monitorUserNo,jdbcType=VARCHAR}
       </foreach>
       ,WEIGHT=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
       </foreach>
       ,COLLECTION_CODE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.collectionCode,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,DELETE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
       </foreach>
       ,SPOT_TYPE_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,SPOT_TYPE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
       </foreach>
       ,WEIGHT_ZERO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weightZero,jdbcType=DECIMAL}
       </foreach>
       ,MONITOR_USER_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.monitorUserIp,jdbcType=VARCHAR}
       </foreach>
       ,IS_HELP=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.isHelp,jdbcType=VARCHAR}
       </foreach>
       ,IS_TAKE_OVER=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.isTakeOver,jdbcType=VARCHAR}
       </foreach>
       ,LED_WRITER=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.ledWriter,jdbcType=VARCHAR}
       </foreach>
       ,RFID_CAR=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rfidCar,jdbcType=VARCHAR}
       </foreach>
       ,PHOTO_CAR=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.photoCar,jdbcType=VARCHAR}
       </foreach>
       ,WGT_ERR=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.wgtErr,jdbcType=VARCHAR}
       </foreach>
       ,USER_IP=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.userIp,jdbcType=VARCHAR}
       </foreach>
       ,AI_WEIGHT=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.aiWeight,jdbcType=VARCHAR}
       </foreach>
       ,CAR_ERR=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.carErr,jdbcType=VARCHAR}
       </foreach>
       ,POWER_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.powerState,jdbcType=VARCHAR}
       </foreach>
       ,DVR_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.dvrState,jdbcType=VARCHAR}
       </foreach>
       ,MOXA_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaState,jdbcType=VARCHAR}
       </foreach>
       ,PLC_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.plcState,jdbcType=VARCHAR}
       </foreach>
       ,LEFT_INFRARED_RAY_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.leftInfraredRayState,jdbcType=VARCHAR}
       </foreach>
       ,RIGHT_INFRARED_RAY_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rightInfraredRayState,jdbcType=VARCHAR}
       </foreach>
       ,AMPLIFIER_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.amplifierState,jdbcType=VARCHAR}
       </foreach>
       ,LAMP_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.lampState,jdbcType=VARCHAR}
       </foreach>
       ,ENTRUST_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.entrustState,jdbcType=VARCHAR}
       </foreach>
       ,VERSION=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.version,jdbcType=DECIMAL}
       </foreach>
       ,SCAN_CAR=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scanCar,jdbcType=VARCHAR}
       </foreach>
       ,MSG_INFO=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.msgInfo,jdbcType=VARCHAR}
       </foreach>
       ,STOP_OVER_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.stopOverTime,jdbcType=VARCHAR}
       </foreach>
       ,VALID_IS_PRE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.validIsPre,jdbcType=VARCHAR}
       </foreach>
       ,RED_GREEN_LIGHT_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.redGreenLightState,jdbcType=VARCHAR}
       </foreach>
       ,FRONT_INFRARED_RAY_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.frontInfraredRayState,jdbcType=VARCHAR}
       </foreach>
       ,REAR_INFRARED_RAY_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rearInfraredRayState,jdbcType=VARCHAR}
       </foreach>
       ,RFID_STATE=
       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rfidState,jdbcType=VARCHAR}
       </foreach>
     where SCALE_POINT_NO in 
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
    #{item.scalePointNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_SCALE_POINT
    where SCALE_POINT_NO in 
    <foreach close=")" collection="list" item="id" open="(" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(SCALE_POINT_NO, LENGTH(SCALE_POINT_NO) - 2))),0) + 1,3,'0') SCALE_POINT_NO
    FROM METER_BASE_SCALE_POINT where instr(SCALE_POINT_NO,#{baseSpotNo,jdbcType=VARCHAR})>0
  </select>

  <select id="selectForUpdate" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where>
      <if test="scalePointNo != null and scalePointNo != ''">
        and SCALE_POINT_NO != #{scalePointNo}
      </if>
      <if test="scalePointName != null and scalePointName != ''">
        and SCALE_POINT_NAME = #{scalePointName}
      </if>
    </where>
  </select>
</mapper>