|
@@ -2,41 +2,39 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.steerinfo.dil.mapper.TmstruckUnloadResultMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
|
|
|
- <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
|
|
|
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
|
|
|
- <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime"/>
|
|
|
- <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime"/>
|
|
|
- <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration"/>
|
|
|
- <result column="UNLOAD_STATUS" jdbcType="DECIMAL" property="unloadStatus"/>
|
|
|
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
|
|
|
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
|
|
|
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
|
|
|
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
|
|
|
- <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
|
|
|
- <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
|
|
|
- <result column="RESULT_UNLOAD_PLACE_ID" jdbcType="DECIMAL" property="resultUnloadPlaceId"/>
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber" />
|
|
|
+ <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
|
|
|
+ <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime" />
|
|
|
+ <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime" />
|
|
|
+ <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration" />
|
|
|
+ <result column="UNLOAD_STATUS" jdbcType="VARCHAR" property="unloadStatus" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
+ <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
|
|
|
+ <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
|
|
|
+ <result column="RESULT_UNLOAD_PLACE_ID" jdbcType="DECIMAL" property="resultUnloadPlaceId" />
|
|
|
+ <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID, RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
|
|
|
- UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID
|
|
|
+ UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID, SEGMENT_SQE
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.RESULT_ID, t.RESULT_NUMBER, t.RESULT_TOTAL_ID, t.RESULT_START_TIME, t.RESULT_END_TIME,
|
|
|
- t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
- t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID
|
|
|
+ t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
+ t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID,
|
|
|
+ t.SEGMENT_SQE
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT
|
|
|
- <include refid="columns"/>
|
|
|
- FROM TMSTRUCK_UNLOAD_RESULT
|
|
|
+ SELECT <include refid="columns"/> FROM TMSTRUCK_UNLOAD_RESULT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT
|
|
|
- <include refid="columns_alias"/>
|
|
|
- FROM TMSTRUCK_UNLOAD_RESULT t
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TMSTRUCK_UNLOAD_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
@@ -58,7 +56,7 @@
|
|
|
<if test="resultDuration != null">
|
|
|
and RESULT_DURATION = #{resultDuration}
|
|
|
</if>
|
|
|
- <if test="unloadStatus != null">
|
|
|
+ <if test="unloadStatus != null and unloadStatus != ''">
|
|
|
and UNLOAD_STATUS = #{unloadStatus}
|
|
|
</if>
|
|
|
<if test="insertUsername != null and insertUsername != ''">
|
|
@@ -85,6 +83,9 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ and SEGMENT_SQE = #{segmentSqe}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -107,8 +108,8 @@
|
|
|
<if test="resultDuration != null">
|
|
|
and RESULT_DURATION = #{resultDuration}
|
|
|
</if>
|
|
|
- <if test="unloadStatus != null">
|
|
|
- and UNLOAD_STATUS = #{unloadStatus}
|
|
|
+ <if test="unloadStatus != null and unloadStatus != ''">
|
|
|
+ and UNLOAD_STATUS LIKE '%${unloadStatus}%'
|
|
|
</if>
|
|
|
<if test="insertUsername != null and insertUsername != ''">
|
|
|
and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
@@ -134,11 +135,13 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ and SEGMENT_SQE = #{segmentSqe}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
- delete
|
|
|
- from TMSTRUCK_UNLOAD_RESULT
|
|
|
+ delete from TMSTRUCK_UNLOAD_RESULT
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
@@ -159,7 +162,7 @@
|
|
|
<if test="resultDuration != null">
|
|
|
or RESULT_DURATION = #{resultDuration}
|
|
|
</if>
|
|
|
- <if test="unloadStatus != null">
|
|
|
+ <if test="unloadStatus != null and unloadStatus != ''">
|
|
|
or UNLOAD_STATUS = #{unloadStatus}
|
|
|
</if>
|
|
|
<if test="insertUsername != null and insertUsername != ''">
|
|
@@ -186,21 +189,23 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
or RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ or SEGMENT_SQE = #{segmentSqe}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
insert into TMSTRUCK_UNLOAD_RESULT (RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID,
|
|
|
RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
|
|
|
UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID)
|
|
|
+ DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
|
|
|
+ SEGMENT_SQE)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{resultTotalId,jdbcType=DECIMAL},
|
|
|
- #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP},
|
|
|
- #{resultDuration,jdbcType=DECIMAL},
|
|
|
- #{unloadStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
|
|
|
- #{resultUnloadPlaceId,jdbcType=DECIMAL})
|
|
|
+ #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP}, #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ #{unloadStatus,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
+ #{segmentSqe,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
insert into TMSTRUCK_UNLOAD_RESULT
|
|
@@ -250,6 +255,9 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
RESULT_UNLOAD_PLACE_ID,
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ SEGMENT_SQE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -271,7 +279,7 @@
|
|
|
#{resultDuration,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="unloadStatus != null">
|
|
|
- #{unloadStatus,jdbcType=DECIMAL},
|
|
|
+ #{unloadStatus,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="insertUsername != null">
|
|
|
#{insertUsername,jdbcType=VARCHAR},
|
|
@@ -297,24 +305,28 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
#{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ #{segmentSqe,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
|
update TMSTRUCK_UNLOAD_RESULT
|
|
|
- set RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
|
|
|
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
- RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
|
|
|
- RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
|
|
|
- RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
|
|
|
- UNLOAD_STATUS = #{unloadStatus,jdbcType=DECIMAL},
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
|
|
|
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
|
|
|
- RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL}
|
|
|
+ set RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
|
|
|
+ RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
+ RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ UNLOAD_STATUS = #{unloadStatus,jdbcType=VARCHAR},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
|
|
|
+ DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
+ SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
|
|
@@ -336,7 +348,7 @@
|
|
|
RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="unloadStatus != null">
|
|
|
- UNLOAD_STATUS = #{unloadStatus,jdbcType=DECIMAL},
|
|
|
+ UNLOAD_STATUS = #{unloadStatus,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="insertUsername != null">
|
|
|
INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
@@ -362,6 +374,9 @@
|
|
|
<if test="resultUnloadPlaceId != null">
|
|
|
RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="segmentSqe != null">
|
|
|
+ SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -386,19 +401,19 @@
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETE_NAME,
|
|
|
- DELETE_TIME, RESULT_UNLOAD_PLACE_ID
|
|
|
- )
|
|
|
+ DELETE_TIME, RESULT_UNLOAD_PLACE_ID,
|
|
|
+ SEGMENT_SQE)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
|
#{item.resultNumber,jdbcType=VARCHAR}, #{item.resultTotalId,jdbcType=DECIMAL},
|
|
|
#{item.resultStartTime,jdbcType=TIMESTAMP}, #{item.resultEndTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.resultDuration,jdbcType=DECIMAL}, #{item.unloadStatus,jdbcType=DECIMAL},
|
|
|
+ #{item.resultDuration,jdbcType=DECIMAL}, #{item.unloadStatus,jdbcType=VARCHAR},
|
|
|
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
|
|
|
- #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL}
|
|
|
- from dual
|
|
|
+ #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL},
|
|
|
+ #{item.segmentSqe,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -430,7 +445,7 @@
|
|
|
</foreach>
|
|
|
,UNLOAD_STATUS=
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadStatus,jdbcType=DECIMAL}
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadStatus,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
@@ -464,6 +479,10 @@
|
|
|
<foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultUnloadPlaceId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,SEGMENT_SQE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -478,7 +497,6 @@
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
<!-- 排序 -->
|
|
|
<sql id="orderBy">
|
|
|
<if test="orderField != null and orderField != ''">
|