|
@@ -0,0 +1,345 @@
|
|
|
+<?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.dil.mapper.TmstruckTotalResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckTotalResult">
|
|
|
+ <id column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
|
|
|
+ <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
|
|
|
+ <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration" />
|
|
|
+ <result column="STANDARD_DATA_ID" jdbcType="DECIMAL" property="standardDataId" />
|
|
|
+ <result column="RESULT_OUTLIER" jdbcType="DECIMAL" property="resultOutlier" />
|
|
|
+ <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" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ RESULT_TOTAL_ID, ORDER_ID, RESULT_DURATION, STANDARD_DATA_ID, RESULT_OUTLIER, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_TOTAL_ID, t.ORDER_ID, t.RESULT_DURATION, t.STANDARD_DATA_ID, t.RESULT_OUTLIER,
|
|
|
+ t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns" /> FROM TMSTRUCK_TOTAL_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias" /> FROM TMSTRUCK_TOTAL_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultTotalId != null">
|
|
|
+ and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ and ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ and RESULT_DURATION = #{resultDuration}
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ and STANDARD_DATA_ID = #{standardDataId}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ and RESULT_OUTLIER = #{resultOutlier}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultTotalId != null">
|
|
|
+ and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ and ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ and RESULT_DURATION = #{resultDuration}
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ and STANDARD_DATA_ID = #{standardDataId}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ and RESULT_OUTLIER = #{resultOutlier}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from TMSTRUCK_TOTAL_RESULT
|
|
|
+ where RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TMSTRUCK_TOTAL_RESULT
|
|
|
+ where 1!=1
|
|
|
+ <if test="orderId != null">
|
|
|
+ or ORDER_ID = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ or RESULT_DURATION = #{resultDuration}
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ or STANDARD_DATA_ID = #{standardDataId}
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ or RESULT_OUTLIER = #{resultOutlier}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
|
|
|
+ insert into TMSTRUCK_TOTAL_RESULT (RESULT_TOTAL_ID, ORDER_ID, RESULT_DURATION,
|
|
|
+ STANDARD_DATA_ID, RESULT_OUTLIER, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK)
|
|
|
+ values (#{resultTotalId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL}, #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ #{standardDataId,jdbcType=DECIMAL}, #{resultOutlier,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
|
|
|
+ insert into TMSTRUCK_TOTAL_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultTotalId != null">
|
|
|
+ RESULT_TOTAL_ID,
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ ORDER_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ RESULT_DURATION,
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ STANDARD_DATA_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ RESULT_OUTLIER,
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultTotalId != null">
|
|
|
+ #{resultTotalId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null">
|
|
|
+ #{orderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ #{standardDataId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ #{resultOutlier,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
|
|
|
+ update TMSTRUCK_TOTAL_RESULT
|
|
|
+ set ORDER_ID = #{orderId,jdbcType=DECIMAL},
|
|
|
+ RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ STANDARD_DATA_ID = #{standardDataId,jdbcType=DECIMAL},
|
|
|
+ RESULT_OUTLIER = #{resultOutlier,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}
|
|
|
+ where RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
|
|
|
+ update TMSTRUCK_TOTAL_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="orderId != null">
|
|
|
+ ORDER_ID = #{orderId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDuration != null">
|
|
|
+ RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="standardDataId != null">
|
|
|
+ STANDARD_DATA_ID = #{standardDataId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultOutlier != null">
|
|
|
+ RESULT_OUTLIER = #{resultOutlier,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ where RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </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 TMSTRUCK_TOTAL_RESULT
|
|
|
+ (RESULT_TOTAL_ID,
|
|
|
+ ORDER_ID, RESULT_DURATION, STANDARD_DATA_ID,
|
|
|
+ RESULT_OUTLIER, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultTotalId,jdbcType=DECIMAL},
|
|
|
+ #{item.orderId,jdbcType=DECIMAL}, #{item.resultDuration,jdbcType=DECIMAL}, #{item.standardDataId,jdbcType=DECIMAL},
|
|
|
+ #{item.resultOutlier,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TMSTRUCK_TOTAL_RESULT
|
|
|
+ set
|
|
|
+ RESULT_TOTAL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,ORDER_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DURATION=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultDuration,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,STANDARD_DATA_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.standardDataId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_OUTLIER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultOutlier,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
|
|
|
+ when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_TOTAL_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.resultTotalId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TMSTRUCK_TOTAL_RESULT
|
|
|
+ where RESULT_TOTAL_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|