|
|
|
@ -2219,6 +2219,46 @@ |
|
|
|
WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateIPQCDetailedRecordBatch" parameterType="java.util.List"> |
|
|
|
UPDATE qc_ipqc_detailed_record with (rowlock) |
|
|
|
SET |
|
|
|
item_result = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.itemResult} |
|
|
|
</foreach> |
|
|
|
ELSE item_result |
|
|
|
END, |
|
|
|
unqualified_quantity = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.unqualifiedQuantity,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE unqualified_quantity |
|
|
|
END, |
|
|
|
sampling_qty = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.samplingQty,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE sampling_qty |
|
|
|
END, |
|
|
|
text_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.textValue} |
|
|
|
</foreach> |
|
|
|
ELSE text_value |
|
|
|
END, |
|
|
|
number_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.numberValue,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE number_value |
|
|
|
END |
|
|
|
WHERE item_no IN |
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")"> |
|
|
|
#{item.itemNo} |
|
|
|
</foreach> |
|
|
|
AND site = #{list[0].site} and bu_no = #{list[0].buNo} and inspection_no = #{list[0].inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 修改IPQC主记录标识为已提交 --> |
|
|
|
<update id="updateIPQCMasterSubmitFlag" parameterType="QcFAIRecordData"> |
|
|
|
UPDATE qc_ipqc_record |
|
|
|
@ -2607,7 +2647,7 @@ |
|
|
|
|
|
|
|
<!-- 修改IQC明细记录信息 --> |
|
|
|
<update id="updateIQCDetailedRecord" parameterType="QcFAIRecordData"> |
|
|
|
UPDATE qc_iqc_detailed_record |
|
|
|
UPDATE qc_iqc_detailed_record with (rowlock) |
|
|
|
SET item_result = #{itemResult}, |
|
|
|
unqualified_quantity = #{unqualifiedQuantity,jdbcType=DECIMAL}, |
|
|
|
sampling_qty = #{samplingQty,jdbcType=DECIMAL}, |
|
|
|
@ -2616,6 +2656,46 @@ |
|
|
|
WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateIQCDetailedRecordBatch" parameterType="java.util.List"> |
|
|
|
UPDATE qc_iqc_detailed_record with (rowlock) |
|
|
|
SET |
|
|
|
item_result = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.itemResult} |
|
|
|
</foreach> |
|
|
|
ELSE item_result |
|
|
|
END, |
|
|
|
unqualified_quantity = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.unqualifiedQuantity,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE unqualified_quantity |
|
|
|
END, |
|
|
|
sampling_qty = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.samplingQty,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE sampling_qty |
|
|
|
END, |
|
|
|
text_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.textValue} |
|
|
|
</foreach> |
|
|
|
ELSE text_value |
|
|
|
END, |
|
|
|
number_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.numberValue,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE number_value |
|
|
|
END |
|
|
|
WHERE item_no IN |
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")"> |
|
|
|
#{item.itemNo} |
|
|
|
</foreach> |
|
|
|
AND site = #{list[0].site} and bu_no = #{list[0].buNo} and inspection_no = #{list[0].inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 查询该记录明细是否已存在 --> |
|
|
|
<select id="checkIQCDetail" parameterType="QcFAIRecordData" resultType="QcFAIRecordData"> |
|
|
|
SELECT inspection_no, |
|
|
|
@ -4144,6 +4224,46 @@ |
|
|
|
WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} and bu_no = #{buNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateFQASDetailedRecordBatch" parameterType="java.util.List"> |
|
|
|
UPDATE qc_stock_detailed_record with (rowlock) |
|
|
|
SET |
|
|
|
item_result = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.itemResult} |
|
|
|
</foreach> |
|
|
|
ELSE item_result |
|
|
|
END, |
|
|
|
unqualified_quantity = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.unqualifiedQuantity,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE unqualified_quantity |
|
|
|
END, |
|
|
|
sampling_qty = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.samplingQty,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE sampling_qty |
|
|
|
END, |
|
|
|
text_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.textValue} |
|
|
|
</foreach> |
|
|
|
ELSE text_value |
|
|
|
END, |
|
|
|
number_value = CASE |
|
|
|
<foreach item="item" index="index" collection="list" open="" close="" separator=" "> |
|
|
|
WHEN item_no = #{item.itemNo} THEN #{item.numberValue,jdbcType=DECIMAL} |
|
|
|
</foreach> |
|
|
|
ELSE number_value |
|
|
|
END |
|
|
|
WHERE item_no IN |
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")"> |
|
|
|
#{item.itemNo} |
|
|
|
</foreach> |
|
|
|
AND site = #{list[0].site} and bu_no = #{list[0].buNo} and inspection_no = #{list[0].inspectionNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!-- 修改FQAS主记录标识为已提交 --> |
|
|
|
<update id="updateFQASMasterSubmitFlag" parameterType="QcFAIRecordData"> |
|
|
|
UPDATE qc_stock_record |
|
|
|
|