|
@@ -15,25 +15,28 @@
|
|
|
<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" />
|
|
|
+ <result column="QUALITYBOOK_URL" jdbcType="VARCHAR" property="qualitybookUrl" />
|
|
|
+ <result column="ELEMENT_VALUE" jdbcType="VARCHAR" property="elementValue" />
|
|
|
</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
|
|
|
+ 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, QUALITYBOOK_URL, ELEMENT_VALUE
|
|
|
</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
|
|
|
+ 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,
|
|
|
+ t.QUALITYBOOK_URL, t.ELEMENT_VALUE
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM TMSTRUCK_QUALITY_RESULT
|
|
|
+ SELECT <include refid="columns" /> FROM TMSTRUCK_QUALITY_RESULT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM TMSTRUCK_QUALITY_RESULT t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM TMSTRUCK_QUALITY_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="resultId != null">
|
|
|
and RESULT_ID = #{resultId}
|
|
|
</if>
|
|
@@ -73,10 +76,16 @@
|
|
|
<if test="resultSamplingTime != null">
|
|
|
and TO_CHAR(RESULT_SAMPLING_TIME,'yyyy-MM-dd') = #{resultSamplingTime}
|
|
|
</if>
|
|
|
+ <if test="qualitybookUrl != null and qualitybookUrl != ''">
|
|
|
+ and QUALITYBOOK_URL = #{qualitybookUrl}
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null and elementValue != ''">
|
|
|
+ and ELEMENT_VALUE = #{elementValue}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="resultId != null">
|
|
|
and RESULT_ID = #{resultId}
|
|
|
</if>
|
|
@@ -116,6 +125,12 @@
|
|
|
<if test="resultSamplingTime != null">
|
|
|
and TO_CHAR(RESULT_SAMPLING_TIME,'yyyy-MM-dd') = #{resultSamplingTime}
|
|
|
</if>
|
|
|
+ <if test="qualitybookUrl != null and qualitybookUrl != ''">
|
|
|
+ and QUALITYBOOK_URL LIKE '%${qualitybookUrl}%'
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null and elementValue != ''">
|
|
|
+ and ELEMENT_VALUE LIKE '%${elementValue}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -124,57 +139,63 @@
|
|
|
</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>
|
|
|
+ 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>
|
|
|
+ <if test="qualitybookUrl != null and qualitybookUrl != ''">
|
|
|
+ or QUALITYBOOK_URL = #{qualitybookUrl}
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null and elementValue != ''">
|
|
|
+ or ELEMENT_VALUE = #{elementValue}
|
|
|
+ </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 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,
|
|
|
+ QUALITYBOOK_URL, ELEMENT_VALUE)
|
|
|
+ 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},
|
|
|
+ #{qualitybookUrl,jdbcType=VARCHAR}, #{elementValue,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
|
insert into TMSTRUCK_QUALITY_RESULT
|
|
@@ -218,6 +239,12 @@
|
|
|
<if test="resultSamplingTime != null">
|
|
|
RESULT_SAMPLING_TIME,
|
|
|
</if>
|
|
|
+ <if test="qualitybookUrl != null">
|
|
|
+ QUALITYBOOK_URL,
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null">
|
|
|
+ ELEMENT_VALUE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -259,22 +286,30 @@
|
|
|
<if test="resultSamplingTime != null">
|
|
|
#{resultSamplingTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="qualitybookUrl != null">
|
|
|
+ #{qualitybookUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null">
|
|
|
+ #{elementValue,jdbcType=VARCHAR},
|
|
|
+ </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}
|
|
|
+ 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},
|
|
|
+ QUALITYBOOK_URL = #{qualitybookUrl,jdbcType=VARCHAR},
|
|
|
+ ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
|
|
@@ -316,109 +351,121 @@
|
|
|
<if test="resultSamplingTime != null">
|
|
|
RESULT_SAMPLING_TIME = #{resultSamplingTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="qualitybookUrl != null">
|
|
|
+ QUALITYBOOK_URL = #{qualitybookUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="elementValue != null">
|
|
|
+ ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <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"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="whereLike"/>
|
|
|
+ <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 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,
|
|
|
+ QUALITYBOOK_URL, ELEMENT_VALUE)
|
|
|
+ ( <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},
|
|
|
+ #{item.qualitybookUrl,jdbcType=VARCHAR}, #{item.elementValue,jdbcType=VARCHAR} 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 TMSTRUCK_QUALITY_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,TOTAL_RESULT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ISSAMPLING=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIssampling,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DEDUCTION=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeduction,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DEDUCTION_DESCRIPTION=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeductionDescription,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_SAMPLING_POINT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSamplingPointId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_CONCLUSION=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultConclusion,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_SAMPLING_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSamplingTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,QUALITYBOOK_URL=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.qualitybookUrl,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ELEMENT_VALUE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.elementValue,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{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=",">
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
@@ -441,6 +488,7 @@
|
|
|
<select id="selectSamplePlaceId" resultType="java.math.BigDecimal">
|
|
|
select rw.WAREHOUSE_ID from RMS_WAREHOUSE rw
|
|
|
where rw.WAREHOUSE_NAME =#{samplePlaceName}
|
|
|
+ FETCH NEXT 1 ROWS ONLY
|
|
|
</select>
|
|
|
<select id="Count" resultType="java.math.BigDecimal">
|
|
|
select max(tqr.RESULT_ID)+1 from TMSTRUCK_QUALITY_RESULT tqr
|