<?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.meterbaserailwayaiweight.mapper.MeterBaseRailwayAiweightMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
    <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
    <result column="RAILWAY_TYPE" jdbcType="VARCHAR" property="railwayType" />
    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
    <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="START_TIME" jdbcType="TIMESTAMP" property="startTime" />
    <result column="END_TIME" jdbcType="TIMESTAMP" property="endTime" />
    <result column="TERM_VALIDITY" jdbcType="DECIMAL" property="termValidity" />
    <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
  </resultMap>
  <sql id="columns">
    ACTUAL_FIRST_NO, RAILWAY_NO, METER_WEIGHT, RAILWAY_TYPE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
    VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
    UPDATE_TIME, START_TIME, END_TIME, TERM_VALIDITY, RAILWAY_SPEED
  </sql>
  <sql id="columns_alias">
    t.ACTUAL_FIRST_NO, t.RAILWAY_NO, t.METER_WEIGHT, t.RAILWAY_TYPE, t.RAILWAY_TYPE_NO, 
    t.RAILWAY_TYPE_NAME, t.VALUE_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.START_TIME, t.END_TIME, t.TERM_VALIDITY, 
    t.RAILWAY_SPEED
  </sql>
  <sql id="select">
    SELECT <include refid="columns" /> FROM METER_BASE_RAILWAY_AIWEIGHT
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias" /> FROM METER_BASE_RAILWAY_AIWEIGHT t
  </sql>
  <sql id="where">
    <where> 
      <if test="actualFirstNo != null and actualFirstNo != ''">
        and ACTUAL_FIRST_NO = #{actualFirstNo}
      </if>
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO = #{railwayNo}
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </if>
      <if test="railwayType != null and railwayType != ''">
        and RAILWAY_TYPE = #{railwayType}
      </if>
      <if test="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO = #{railwayTypeNo}
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME = #{railwayTypeName}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG = #{valueFlag}
      </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="startTime != null">
        and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
      </if>
      <if test="endTime != null">
        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
      </if>
      <if test="termValidity != null">
        and TERM_VALIDITY = #{termValidity}
      </if>
      <if test="railwaySpeed != null">
        and RAILWAY_SPEED = #{railwaySpeed}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="actualFirstNo != null and actualFirstNo != ''">
        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
      </if>
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO LIKE '%${railwayNo}%'
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </if>
      <if test="railwayType != null and railwayType != ''">
        and RAILWAY_TYPE LIKE '%${railwayType}%'
      </if>
      <if test="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG LIKE '%${valueFlag}%'
      </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="startTime != null">
        and TO_CHAR(START_TIME,'yyyy-MM-dd') = #{startTime}
      </if>
      <if test="endTime != null">
        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
      </if>
      <if test="termValidity != null">
        and TERM_VALIDITY = #{termValidity}
      </if>
      <if test="railwaySpeed != null">
        and RAILWAY_SPEED = #{railwaySpeed}
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_RAILWAY_AIWEIGHT
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_RAILWAY_AIWEIGHT
    where 1!=1 
      <if test="railwayNo != null and railwayNo != ''">
        or RAILWAY_NO = #{railwayNo}
      </if>
      <if test="meterWeight != null">
        or METER_WEIGHT = #{meterWeight}
      </if>
      <if test="railwayType != null and railwayType != ''">
        or RAILWAY_TYPE = #{railwayType}
      </if>
      <if test="railwayTypeNo != null and railwayTypeNo != ''">
        or RAILWAY_TYPE_NO = #{railwayTypeNo}
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        or RAILWAY_TYPE_NAME = #{railwayTypeName}
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        or VALUE_FLAG = #{valueFlag}
      </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="startTime != null">
        or TO_CHAR(START_TIME,'yyyy-MM-dd') = '#{startTime}'
      </if>
      <if test="endTime != null">
        or TO_CHAR(END_TIME,'yyyy-MM-dd') = '#{endTime}'
      </if>
      <if test="termValidity != null">
        or TERM_VALIDITY = #{termValidity}
      </if>
      <if test="railwaySpeed != null">
        or RAILWAY_SPEED = #{railwaySpeed}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
    insert into METER_BASE_RAILWAY_AIWEIGHT (ACTUAL_FIRST_NO, RAILWAY_NO, METER_WEIGHT, 
      RAILWAY_TYPE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
      VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
      UPDATE_TIME, START_TIME, END_TIME, 
      TERM_VALIDITY, RAILWAY_SPEED)
    values (#{actualFirstNo,jdbcType=VARCHAR}, #{railwayNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, 
      #{railwayType,jdbcType=VARCHAR}, #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, 
      #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
      #{termValidity,jdbcType=DECIMAL}, #{railwaySpeed,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
    insert into METER_BASE_RAILWAY_AIWEIGHT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="actualFirstNo != null">
        ACTUAL_FIRST_NO,
      </if>
      <if test="railwayNo != null">
        RAILWAY_NO,
      </if>
      <if test="meterWeight != null">
        METER_WEIGHT,
      </if>
      <if test="railwayType != null">
        RAILWAY_TYPE,
      </if>
      <if test="railwayTypeNo != null">
        RAILWAY_TYPE_NO,
      </if>
      <if test="railwayTypeName != null">
        RAILWAY_TYPE_NAME,
      </if>
      <if test="valueFlag != null">
        VALUE_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="startTime != null">
        START_TIME,
      </if>
      <if test="endTime != null">
        END_TIME,
      </if>
      <if test="termValidity != null">
        TERM_VALIDITY,
      </if>
      <if test="railwaySpeed != null">
        RAILWAY_SPEED,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="actualFirstNo != null">
        #{actualFirstNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayNo != null">
        #{railwayNo,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        #{meterWeight,jdbcType=DECIMAL},
      </if>
      <if test="railwayType != null">
        #{railwayType,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeNo != null">
        #{railwayTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeName != null">
        #{railwayTypeName,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        #{valueFlag,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="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="termValidity != null">
        #{termValidity,jdbcType=DECIMAL},
      </if>
      <if test="railwaySpeed != null">
        #{railwaySpeed,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
    update METER_BASE_RAILWAY_AIWEIGHT
    set RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
      METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
      RAILWAY_TYPE = #{railwayType,jdbcType=VARCHAR},
      RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
      RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
      VALUE_FLAG = #{valueFlag,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},
      START_TIME = #{startTime,jdbcType=TIMESTAMP},
      END_TIME = #{endTime,jdbcType=TIMESTAMP},
      TERM_VALIDITY = #{termValidity,jdbcType=DECIMAL},
      RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL}
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight">
    update METER_BASE_RAILWAY_AIWEIGHT
    <set>
      <if test="railwayNo != null">
        RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
      </if>
      <if test="meterWeight != null">
        METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
      </if>
      <if test="railwayType != null">
        RAILWAY_TYPE = #{railwayType,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeNo != null">
        RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
      </if>
      <if test="railwayTypeName != null">
        RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
      </if>
      <if test="valueFlag != null">
        VALUE_FLAG = #{valueFlag,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="startTime != null">
        START_TIME = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        END_TIME = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="termValidity != null">
        TERM_VALIDITY = #{termValidity,jdbcType=DECIMAL},
      </if>
      <if test="railwaySpeed != null">
        RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
      </if>
    </set>
    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select" />
    where ACTUAL_FIRST_NO = #{actualFirstNo,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_RAILWAY_AIWEIGHT 
      (ACTUAL_FIRST_NO, 
      RAILWAY_NO, METER_WEIGHT, RAILWAY_TYPE, 
      RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
      VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
      UPDATE_TIME, START_TIME, END_TIME, 
      TERM_VALIDITY, RAILWAY_SPEED)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.actualFirstNo,jdbcType=VARCHAR}, 
      #{item.railwayNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, #{item.railwayType,jdbcType=VARCHAR}, 
      #{item.railwayTypeNo,jdbcType=VARCHAR}, #{item.railwayTypeName,jdbcType=VARCHAR}, 
      #{item.valueFlag,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.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP}, 
      #{item.termValidity,jdbcType=DECIMAL}, #{item.railwaySpeed,jdbcType=DECIMAL} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_BASE_RAILWAY_AIWEIGHT
     set
       ACTUAL_FIRST_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
       </foreach>
       ,METER_WEIGHT=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
       </foreach>
       ,RAILWAY_TYPE=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayType,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_TYPE_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
       </foreach>
       ,RAILWAY_TYPE_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
       </foreach>
       ,VALUE_FLAG=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,START_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.startTime,jdbcType=TIMESTAMP}
       </foreach>
       ,END_TIME=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
       </foreach>
       ,TERM_VALIDITY=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.termValidity,jdbcType=DECIMAL}
       </foreach>
       ,RAILWAY_SPEED=
       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwaySpeed,jdbcType=DECIMAL}
       </foreach>
     where ACTUAL_FIRST_NO in 
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
    #{item.actualFirstNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_RAILWAY_AIWEIGHT
    where ACTUAL_FIRST_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(actual_first_no, LENGTH(actual_first_no) - 3))),0) + 1,4,'0') actual_first_no
    FROM meter_base_railway_aiweight where instr(actual_first_no,#{actualFirstNo, jdbcType=VARCHAR})>0
  </select>

  <select id="noPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select" />
    <where>
      <if test="actualFirstNo != null and actualFirstNo != ''">
        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
      </if>
      <if test="railwayNo != null and railwayNo != ''">
        and RAILWAY_NO LIKE '%${railwayNo}%'
      </if>
      <if test="meterWeight != null">
        and METER_WEIGHT = #{meterWeight}
      </if>
      <if test="railwayType != null and railwayType != ''">
        and RAILWAY_TYPE LIKE '%${railwayType}%'
      </if>
      <if test="railwayTypeNo != null and railwayTypeNo != ''">
        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
      </if>
      <if test="railwayTypeName != null and railwayTypeName != ''">
        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
      </if>
      <if test="valueFlag != null and valueFlag != ''">
        and VALUE_FLAG LIKE '%${valueFlag}%'
      </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="termValidity != null">
        and TERM_VALIDITY = #{termValidity}
      </if>
      <if test="railwaySpeed != null">
        and RAILWAY_SPEED = #{railwaySpeed}
      </if>
      <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
        and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
      </if>
    </where>
    order by CREATE_TIME desc
</select>
</mapper>