|
@@ -0,0 +1,439 @@
|
|
|
+<?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.TmstruckQualityResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId" />
|
|
|
+ <result column="RESULT_ISSAMPLING" jdbcType="VARCHAR" property="resultIssampling" />
|
|
|
+ <result column="RESULT_DEDUCTION" jdbcType="DECIMAL" property="resultDeduction" />
|
|
|
+ <result column="RESULT_DEDUCTION_DESCRIPTION" jdbcType="VARCHAR" property="resultDeductionDescription" />
|
|
|
+ <result column="RESULT_SAMPLING_POINT_ID" jdbcType="DECIMAL" property="resultSamplingPointId" />
|
|
|
+ <result column="RESULT_CONCLUSION" jdbcType="DECIMAL" property="resultConclusion" />
|
|
|
+ <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="RESULT_SAMPLING_TIME" jdbcType="TIMESTAMP" property="resultSamplingTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ RESULT_ID, TOTAL_RESULT_ID, RESULT_ISSAMPLING, RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION,
|
|
|
+ RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, RESULT_SAMPLING_TIME
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_ID, t.TOTAL_RESULT_ID, t.RESULT_ISSAMPLING, t.RESULT_DEDUCTION, t.RESULT_DEDUCTION_DESCRIPTION,
|
|
|
+ t.RESULT_SAMPLING_POINT_ID, t.RESULT_CONCLUSION, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
+ t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.RESULT_SAMPLING_TIME
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM TMSTRUCK_QUALITY_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TMSTRUCK_QUALITY_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ and TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null and resultIssampling != ''">
|
|
|
+ and RESULT_ISSAMPLING = #{resultIssampling}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ and RESULT_DEDUCTION = #{resultDeduction}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
|
|
|
+ and RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription}
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ and RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ and RESULT_CONCLUSION = #{resultConclusion}
|
|
|
+ </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="resultSamplingTime != null">
|
|
|
+ and TO_CHAR(RESULT_SAMPLING_TIME,'yyyy-MM-dd') = #{resultSamplingTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ and TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null and resultIssampling != ''">
|
|
|
+ and RESULT_ISSAMPLING LIKE '%${resultIssampling}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ and RESULT_DEDUCTION = #{resultDeduction}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
|
|
|
+ and RESULT_DEDUCTION_DESCRIPTION LIKE '%${resultDeductionDescription}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ and RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ and RESULT_CONCLUSION = #{resultConclusion}
|
|
|
+ </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="resultSamplingTime != null">
|
|
|
+ and TO_CHAR(RESULT_SAMPLING_TIME,'yyyy-MM-dd') = #{resultSamplingTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from TMSTRUCK_QUALITY_RESULT
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TMSTRUCK_QUALITY_RESULT
|
|
|
+ where 1!=1
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ or TOTAL_RESULT_ID = #{totalResultId}
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null and resultIssampling != ''">
|
|
|
+ or RESULT_ISSAMPLING = #{resultIssampling}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ or RESULT_DEDUCTION = #{resultDeduction}
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
|
|
|
+ or RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription}
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ or RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ or RESULT_CONCLUSION = #{resultConclusion}
|
|
|
+ </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="resultSamplingTime != null">
|
|
|
+ or TO_CHAR(RESULT_SAMPLING_TIME,'yyyy-MM-dd') = '#{resultSamplingTime}'
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
+ insert into TMSTRUCK_QUALITY_RESULT (RESULT_ID, TOTAL_RESULT_ID, RESULT_ISSAMPLING,
|
|
|
+ RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION,
|
|
|
+ RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, RESULT_SAMPLING_TIME
|
|
|
+ )
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL}, #{resultIssampling,jdbcType=VARCHAR},
|
|
|
+ #{resultDeduction,jdbcType=DECIMAL}, #{resultDeductionDescription,jdbcType=VARCHAR},
|
|
|
+ #{resultSamplingPointId,jdbcType=DECIMAL}, #{resultConclusion,jdbcType=DECIMAL},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{resultSamplingTime,jdbcType=TIMESTAMP}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
+ insert into TMSTRUCK_QUALITY_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ TOTAL_RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null">
|
|
|
+ RESULT_ISSAMPLING,
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ RESULT_DEDUCTION,
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null">
|
|
|
+ RESULT_DEDUCTION_DESCRIPTION,
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ RESULT_SAMPLING_POINT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ RESULT_CONCLUSION,
|
|
|
+ </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="resultSamplingTime != null">
|
|
|
+ RESULT_SAMPLING_TIME,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null">
|
|
|
+ #{resultIssampling,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ #{resultDeduction,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null">
|
|
|
+ #{resultDeductionDescription,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ #{resultSamplingPointId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ #{resultConclusion,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="resultSamplingTime != null">
|
|
|
+ #{resultSamplingTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
+ update TMSTRUCK_QUALITY_RESULT
|
|
|
+ set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ RESULT_ISSAMPLING = #{resultIssampling,jdbcType=VARCHAR},
|
|
|
+ RESULT_DEDUCTION = #{resultDeduction,jdbcType=DECIMAL},
|
|
|
+ RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription,jdbcType=VARCHAR},
|
|
|
+ RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId,jdbcType=DECIMAL},
|
|
|
+ RESULT_CONCLUSION = #{resultConclusion,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},
|
|
|
+ RESULT_SAMPLING_TIME = #{resultSamplingTime,jdbcType=TIMESTAMP}
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
+ update TMSTRUCK_QUALITY_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="totalResultId != null">
|
|
|
+ TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultIssampling != null">
|
|
|
+ RESULT_ISSAMPLING = #{resultIssampling,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeduction != null">
|
|
|
+ RESULT_DEDUCTION = #{resultDeduction,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultDeductionDescription != null">
|
|
|
+ RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultSamplingPointId != null">
|
|
|
+ RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultConclusion != null">
|
|
|
+ RESULT_CONCLUSION = #{resultConclusion,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="resultSamplingTime != null">
|
|
|
+ RESULT_SAMPLING_TIME = #{resultSamplingTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where RESULT_ID = #{resultId,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_QUALITY_RESULT
|
|
|
+ (RESULT_ID,
|
|
|
+ TOTAL_RESULT_ID, RESULT_ISSAMPLING,
|
|
|
+ RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION,
|
|
|
+ RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION,
|
|
|
+ INSERT_USERNAME, INSERT_TIME,
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK, RESULT_SAMPLING_TIME
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.totalResultId,jdbcType=DECIMAL}, #{item.resultIssampling,jdbcType=VARCHAR},
|
|
|
+ #{item.resultDeduction,jdbcType=DECIMAL}, #{item.resultDeductionDescription,jdbcType=VARCHAR},
|
|
|
+ #{item.resultSamplingPointId,jdbcType=DECIMAL}, #{item.resultConclusion,jdbcType=DECIMAL},
|
|
|
+ #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.resultSamplingTime,jdbcType=TIMESTAMP}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TMSTRUCK_QUALITY_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ISSAMPLING=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIssampling,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DEDUCTION=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeduction,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DEDUCTION_DESCRIPTION=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeductionDescription,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_SAMPLING_POINT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSamplingPointId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_CONCLUSION=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultConclusion,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_SAMPLING_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSamplingTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TMSTRUCK_QUALITY_RESULT
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+
|
|
|
+ <update id="updateQuality">
|
|
|
+ update
|
|
|
+ (SELECT * FROM TMSTRUCK_QUALITY_RESULT TQR
|
|
|
+ WHERE TQR.TOTAL_RESULT_ID=
|
|
|
+ (
|
|
|
+ SELECT TWR.RESULT_TOTAL_ID FROM TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
+ WHERE TWR.RESULT_POUND_NO=#{WzInputId})) tt
|
|
|
+ set
|
|
|
+ tt.RESULT_DEDUCTION=#{deductNumber},
|
|
|
+ tt.RESULT_DEDUCTION_DESCRIPTION=#{deductSeason},
|
|
|
+ tt.RESULT_SAMPLING_TIME=#{sampleDate}
|
|
|
+ tt.RESULT_SAMPLING_POINT_ID=#{SamplePlaceName}
|
|
|
+ </update>
|
|
|
+</mapper>
|