|
@@ -0,0 +1,290 @@
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
+<mapper namespace="com.steerinfo.meterwork.meterworkrailwayrecmain.mapper.MeterWorkRailwayRecMainMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain">
|
|
|
|
|
+ <id column="ACTUAL_NO" jdbcType="VARCHAR" property="actualNo" />
|
|
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
+ <result column="CARRIAGE_NUM" jdbcType="DECIMAL" property="carriageNum" />
|
|
|
|
|
+ <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
|
|
|
|
|
+ <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
|
|
|
|
|
+ <result column="VIDEO_NAME" jdbcType="VARCHAR" property="videoName" />
|
|
|
|
|
+ <result column="SOUND_NAME" jdbcType="VARCHAR" property="soundName" />
|
|
|
|
|
+ <result column="TRACK_WAY" jdbcType="VARCHAR" property="trackWay" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="columns">
|
|
|
|
|
+ ACTUAL_NO, CREATE_TIME, CARRIAGE_NUM, BASE_SPOT_NO, BASE_SPOT_NAME, VIDEO_NAME, SOUND_NAME,
|
|
|
|
|
+ TRACK_WAY
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
|
+ t.ACTUAL_NO, t.CREATE_TIME, t.CARRIAGE_NUM, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.VIDEO_NAME,
|
|
|
|
|
+ t.SOUND_NAME, t.TRACK_WAY
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select">
|
|
|
|
|
+ SELECT <include refid="columns"/> FROM METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
|
+ SELECT <include refid="columns_alias"/> FROM METER_WORK_RAILWAY_REC_MAIN t
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="where">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="actualNo != null and actualNo != ''">
|
|
|
|
|
+ and ACTUAL_NO = #{actualNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ and CARRIAGE_NUM = #{carriageNum}
|
|
|
|
|
+ </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="videoName != null and videoName != ''">
|
|
|
|
|
+ and VIDEO_NAME = #{videoName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null and soundName != ''">
|
|
|
|
|
+ and SOUND_NAME = #{soundName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null and trackWay != ''">
|
|
|
|
|
+ and TRACK_WAY = #{trackWay}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="actualNo != null and actualNo != ''">
|
|
|
|
|
+ and ACTUAL_NO LIKE '%${actualNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ and CARRIAGE_NUM = #{carriageNum}
|
|
|
|
|
+ </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="videoName != null and videoName != ''">
|
|
|
|
|
+ and VIDEO_NAME LIKE '%${videoName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null and soundName != ''">
|
|
|
|
|
+ and SOUND_NAME LIKE '%${soundName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null and trackWay != ''">
|
|
|
|
|
+ and TRACK_WAY LIKE '%${trackWay}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
|
|
+ delete from METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
|
+ delete from METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ where 1!=1
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ or CARRIAGE_NUM = #{carriageNum}
|
|
|
|
|
+ </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="videoName != null and videoName != ''">
|
|
|
|
|
+ or VIDEO_NAME = #{videoName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null and soundName != ''">
|
|
|
|
|
+ or SOUND_NAME = #{soundName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null and trackWay != ''">
|
|
|
|
|
+ or TRACK_WAY = #{trackWay}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain">
|
|
|
|
|
+ insert into METER_WORK_RAILWAY_REC_MAIN (ACTUAL_NO, CREATE_TIME, CARRIAGE_NUM,
|
|
|
|
|
+ BASE_SPOT_NO, BASE_SPOT_NAME, VIDEO_NAME,
|
|
|
|
|
+ SOUND_NAME, TRACK_WAY)
|
|
|
|
|
+ values (#{actualNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{carriageNum,jdbcType=DECIMAL},
|
|
|
|
|
+ #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{videoName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{soundName,jdbcType=VARCHAR}, #{trackWay,jdbcType=VARCHAR})
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain">
|
|
|
|
|
+ insert into METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="actualNo != null">
|
|
|
|
|
+ ACTUAL_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ CARRIAGE_NUM,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotNo != null">
|
|
|
|
|
+ BASE_SPOT_NO,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotName != null">
|
|
|
|
|
+ BASE_SPOT_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="videoName != null">
|
|
|
|
|
+ VIDEO_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null">
|
|
|
|
|
+ SOUND_NAME,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null">
|
|
|
|
|
+ TRACK_WAY,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="actualNo != null">
|
|
|
|
|
+ #{actualNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ #{carriageNum,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotNo != null">
|
|
|
|
|
+ #{baseSpotNo,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotName != null">
|
|
|
|
|
+ #{baseSpotName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="videoName != null">
|
|
|
|
|
+ #{videoName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null">
|
|
|
|
|
+ #{soundName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null">
|
|
|
|
|
+ #{trackWay,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain">
|
|
|
|
|
+ update METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ set CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ CARRIAGE_NUM = #{carriageNum,jdbcType=DECIMAL},
|
|
|
|
|
+ BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
|
|
|
|
|
+ BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
|
|
|
|
|
+ VIDEO_NAME = #{videoName,jdbcType=VARCHAR},
|
|
|
|
|
+ SOUND_NAME = #{soundName,jdbcType=VARCHAR},
|
|
|
|
|
+ TRACK_WAY = #{trackWay,jdbcType=VARCHAR}
|
|
|
|
|
+ where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain">
|
|
|
|
|
+ update METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carriageNum != null">
|
|
|
|
|
+ CARRIAGE_NUM = #{carriageNum,jdbcType=DECIMAL},
|
|
|
|
|
+ </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="videoName != null">
|
|
|
|
|
+ VIDEO_NAME = #{videoName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="soundName != null">
|
|
|
|
|
+ SOUND_NAME = #{soundName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="trackWay != null">
|
|
|
|
|
+ TRACK_WAY = #{trackWay,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ <include refid="where"/>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ <include refid="whereLike"/>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
|
+ insert into METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ (ACTUAL_NO,
|
|
|
|
|
+ CREATE_TIME, CARRIAGE_NUM, BASE_SPOT_NO,
|
|
|
|
|
+ BASE_SPOT_NAME, VIDEO_NAME, SOUND_NAME,
|
|
|
|
|
+ TRACK_WAY)
|
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
|
+ select
|
|
|
|
|
+ #{item.actualNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP}, #{item.carriageNum,jdbcType=DECIMAL}, #{item.baseSpotNo,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.baseSpotName,jdbcType=VARCHAR}, #{item.videoName,jdbcType=VARCHAR}, #{item.soundName,jdbcType=VARCHAR},
|
|
|
|
|
+ #{item.trackWay,jdbcType=VARCHAR} from dual
|
|
|
|
|
+ </foreach> )
|
|
|
|
|
+ </insert>
|
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
|
+ update METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ set
|
|
|
|
|
+ ACTUAL_NO=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CREATE_TIME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,CARRIAGE_NUM=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.carriageNum,jdbcType=DECIMAL}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,BASE_SPOT_NO=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,BASE_SPOT_NAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,VIDEO_NAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.videoName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,SOUND_NAME=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.soundName,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ ,TRACK_WAY=
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
|
|
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.trackWay,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ where ACTUAL_NO in
|
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
|
+ #{item.actualNo,jdbcType=VARCHAR}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
|
+ delete from METER_WORK_RAILWAY_REC_MAIN
|
|
|
|
|
+ where ACTUAL_NO in
|
|
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|