|
@@ -0,0 +1,410 @@
|
|
|
|
+<?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.TmstruckAbnormalResultMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckAbnormalResult">
|
|
|
|
+ <id column="ABNORMAL_ID" jdbcType="DECIMAL" property="abnormalId" />
|
|
|
|
+ <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
|
|
|
|
+ <result column="ABNORMAL_TYPE" jdbcType="DECIMAL" property="abnormalType" />
|
|
|
|
+ <result column="ABNORMAL_TIME" jdbcType="TIMESTAMP" property="abnormalTime" />
|
|
|
|
+ <result column="ABNORMAL_ADDRESS" jdbcType="VARCHAR" property="abnormalAddress" />
|
|
|
|
+ <result column="ABNORMAL_DURATION" jdbcType="DECIMAL" property="abnormalDuration" />
|
|
|
|
+ <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="ABNORMAL_CONDITION" jdbcType="VARCHAR" property="abnormalCondition" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="columns">
|
|
|
|
+ ABNORMAL_ID, RESULT_TOTAL_ID, ABNORMAL_TYPE, ABNORMAL_TIME, ABNORMAL_ADDRESS, ABNORMAL_DURATION,
|
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
+ ABNORMAL_CONDITION
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
+ t.ABNORMAL_ID, t.RESULT_TOTAL_ID, t.ABNORMAL_TYPE, t.ABNORMAL_TIME, t.ABNORMAL_ADDRESS,
|
|
|
|
+ t.ABNORMAL_DURATION, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
|
+ t.INSERT_UPDATE_REMARK, t.ABNORMAL_CONDITION
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select">
|
|
|
|
+ SELECT <include refid="columns" /> FROM TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
+ SELECT <include refid="columns_alias" /> FROM TMSTRUCK_ABNORMAL_RESULT t
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="where">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="abnormalId != null">
|
|
|
|
+ and ABNORMAL_ID = #{abnormalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ and ABNORMAL_TYPE = #{abnormalType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ and TO_CHAR(ABNORMAL_TIME,'yyyy-MM-dd') = #{abnormalTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null and abnormalAddress != ''">
|
|
|
|
+ and ABNORMAL_ADDRESS = #{abnormalAddress}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ and ABNORMAL_DURATION = #{abnormalDuration}
|
|
|
|
+ </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>
|
|
|
|
+ <if test="abnormalCondition != null and abnormalCondition != ''">
|
|
|
|
+ and ABNORMAL_CONDITION = #{abnormalCondition}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="abnormalId != null">
|
|
|
|
+ and ABNORMAL_ID = #{abnormalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ and RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ and ABNORMAL_TYPE = #{abnormalType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ and TO_CHAR(ABNORMAL_TIME,'yyyy-MM-dd') = #{abnormalTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null and abnormalAddress != ''">
|
|
|
|
+ and ABNORMAL_ADDRESS LIKE '%${abnormalAddress}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ and ABNORMAL_DURATION = #{abnormalDuration}
|
|
|
|
+ </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>
|
|
|
|
+ <if test="abnormalCondition != null and abnormalCondition != ''">
|
|
|
|
+ and ABNORMAL_CONDITION LIKE '%${abnormalCondition}%'
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
|
+ delete from TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ where ABNORMAL_ID = #{abnormalId,jdbcType=DECIMAL}
|
|
|
|
+ </delete>
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
+ delete from TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ where 1!=1
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ or RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ or ABNORMAL_TYPE = #{abnormalType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ or TO_CHAR(ABNORMAL_TIME,'yyyy-MM-dd') = '#{abnormalTime}'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null and abnormalAddress != ''">
|
|
|
|
+ or ABNORMAL_ADDRESS = #{abnormalAddress}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ or ABNORMAL_DURATION = #{abnormalDuration}
|
|
|
|
+ </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>
|
|
|
|
+ <if test="abnormalCondition != null and abnormalCondition != ''">
|
|
|
|
+ or ABNORMAL_CONDITION = #{abnormalCondition}
|
|
|
|
+ </if>
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckAbnormalResult">
|
|
|
|
+ insert into TMSTRUCK_ABNORMAL_RESULT (ABNORMAL_ID, RESULT_TOTAL_ID, ABNORMAL_TYPE,
|
|
|
|
+ ABNORMAL_TIME, ABNORMAL_ADDRESS, ABNORMAL_DURATION,
|
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, ABNORMAL_CONDITION
|
|
|
|
+ )
|
|
|
|
+ values (#{abnormalId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{abnormalType,jdbcType=DECIMAL},
|
|
|
|
+ #{abnormalTime,jdbcType=TIMESTAMP}, #{abnormalAddress,jdbcType=VARCHAR}, #{abnormalDuration,jdbcType=DECIMAL},
|
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{abnormalCondition,jdbcType=VARCHAR}
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckAbnormalResult">
|
|
|
|
+ insert into TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="abnormalId != null">
|
|
|
|
+ ABNORMAL_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ RESULT_TOTAL_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ ABNORMAL_TYPE,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ ABNORMAL_TIME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null">
|
|
|
|
+ ABNORMAL_ADDRESS,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ ABNORMAL_DURATION,
|
|
|
|
+ </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>
|
|
|
|
+ <if test="abnormalCondition != null">
|
|
|
|
+ ABNORMAL_CONDITION,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="abnormalId != null">
|
|
|
|
+ #{abnormalId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ #{abnormalType,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ #{abnormalTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null">
|
|
|
|
+ #{abnormalAddress,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ #{abnormalDuration,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>
|
|
|
|
+ <if test="abnormalCondition != null">
|
|
|
|
+ #{abnormalCondition,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckAbnormalResult">
|
|
|
|
+ update TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
+ ABNORMAL_TYPE = #{abnormalType,jdbcType=DECIMAL},
|
|
|
|
+ ABNORMAL_TIME = #{abnormalTime,jdbcType=TIMESTAMP},
|
|
|
|
+ ABNORMAL_ADDRESS = #{abnormalAddress,jdbcType=VARCHAR},
|
|
|
|
+ ABNORMAL_DURATION = #{abnormalDuration,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},
|
|
|
|
+ ABNORMAL_CONDITION = #{abnormalCondition,jdbcType=VARCHAR}
|
|
|
|
+ where ABNORMAL_ID = #{abnormalId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckAbnormalResult">
|
|
|
|
+ update TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ <set>
|
|
|
|
+ <if test="resultTotalId != null">
|
|
|
|
+ RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalType != null">
|
|
|
|
+ ABNORMAL_TYPE = #{abnormalType,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalTime != null">
|
|
|
|
+ ABNORMAL_TIME = #{abnormalTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalAddress != null">
|
|
|
|
+ ABNORMAL_ADDRESS = #{abnormalAddress,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="abnormalDuration != null">
|
|
|
|
+ ABNORMAL_DURATION = #{abnormalDuration,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>
|
|
|
|
+ <if test="abnormalCondition != null">
|
|
|
|
+ ABNORMAL_CONDITION = #{abnormalCondition,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where ABNORMAL_ID = #{abnormalId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select" />
|
|
|
|
+ where ABNORMAL_ID = #{abnormalId,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>
|
|
|
|
+ <select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getTotalIdByTripId" resultType="java.math.BigDecimal">
|
|
|
|
+ select RESULT_TOTAL_ID "totalId"
|
|
|
|
+ from TMSTRUCK_TOTAL_RESULT t_total
|
|
|
|
+ left join OMSTRUCK_ORDER o_order
|
|
|
|
+ on t_total.ORDER_ID=o_order.ORDER_ID
|
|
|
|
+ where o_order.TRIP_ID = #{tripId} and o_order.ORDER_STATUS = 1
|
|
|
|
+ </select>
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
+ insert into TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ (ABNORMAL_ID,
|
|
|
|
+ RESULT_TOTAL_ID, ABNORMAL_TYPE,
|
|
|
|
+ ABNORMAL_TIME, ABNORMAL_ADDRESS,
|
|
|
|
+ ABNORMAL_DURATION, INSERT_USERNAME,
|
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
+ ABNORMAL_CONDITION)
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.abnormalId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.resultTotalId,jdbcType=DECIMAL}, #{item.abnormalType,jdbcType=DECIMAL},
|
|
|
|
+ #{item.abnormalTime,jdbcType=TIMESTAMP}, #{item.abnormalAddress,jdbcType=VARCHAR},
|
|
|
|
+ #{item.abnormalDuration,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
+ #{item.abnormalCondition,jdbcType=VARCHAR} from dual
|
|
|
|
+ </foreach> )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
+ update TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ set
|
|
|
|
+ ABNORMAL_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,RESULT_TOTAL_ID=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ABNORMAL_TYPE=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalType,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ABNORMAL_TIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ABNORMAL_ADDRESS=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalAddress,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ABNORMAL_DURATION=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalDuration,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_USERNAME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_TIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATE_TIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ABNORMAL_CONDITION=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ABNORMAL_ID" separator=" ">
|
|
|
|
+ when #{item.abnormalId,jdbcType=DECIMAL} then #{item.abnormalCondition,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ where ABNORMAL_ID in
|
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
+ #{item.abnormalId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
+ delete from TMSTRUCK_ABNORMAL_RESULT
|
|
|
|
+ where ABNORMAL_ID in
|
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</mapper>
|