@ -1559,8 +1559,8 @@
<!-- 新增FAI明细记录信息 -->
<insert id= "saveFAIDetailedRecord" parameterType= "QcFAIRecordData" >
INSERT INTO qc_fai_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no)
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo})
INSERT INTO qc_fai_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no,order_id )
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo},#{orderId,jdbcType=INTEGER} )
</insert>
<!-- 查询FAI主记录信息 -->
@ -1721,6 +1721,8 @@
LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
</select>
<!-- 修改FAI主记录信息 -->
@ -1892,8 +1894,8 @@
<!-- 新增IPQC明细记录信息 -->
<insert id= "saveIPQCDetailedRecord" parameterType= "QcFAIRecordData" >
INSERT INTO qc_ipqc_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no)
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo})
INSERT INTO qc_ipqc_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no,order_id )
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo},#{orderId,jdbcType=INTEGER} )
</insert>
<!-- 新增IPQC主记录信息 -->
@ -2055,6 +2057,8 @@
LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
</select>
<!-- 删除IPQC检验记录 -->
@ -2262,8 +2266,8 @@
<!-- 新增IQC明细记录信息 -->
<insert id= "saveIQCDetailedRecord" parameterType= "QcFAIRecordData" >
INSERT INTO qc_iqc_detailed_record (inspection_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no)
VALUES(#{inspectionNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty}, #{buNo})
INSERT INTO qc_iqc_detailed_record (inspection_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no,order_id )
VALUES(#{inspectionNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty}, #{buNo},#{orderId,jdbcType=INTEGER} )
</insert>
<!-- 修改IQC检验记录 -->
@ -2438,6 +2442,7 @@
LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
</select>
<!-- 查询IQC的子明细 -->
@ -2756,8 +2761,8 @@
<!-- 新增FQC明细记录信息 -->
<insert id= "saveFQCDetailedRecord" parameterType= "QcFAIRecordData" >
INSERT INTO qc_fqc_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no)
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo})
INSERT INTO qc_fqc_detailed_record (inspection_no, order_no, template_id, sampling_level_no, sampling_level_desc, sampling_programme_no, sampling_programme_desc, AQL, AC, RE, item_no, item_desc, object_id, object_desc, default_value, min_value, max_value, value_type_db, value_type, site, sampling_qty, bu_no,order_id )
VALUES(#{inspectionNo}, #{orderNo}, #{templateId}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{itemNo}, #{itemDesc}, #{objectId}, #{objectDesc}, #{defaultValue}, #{minValue,jdbcType=DECIMAL}, #{maxValue,jdbcType=DECIMAL}, #{valueTypeDb}, #{valueType}, #{site}, #{samplingQty,jdbcType=DECIMAL}, #{buNo},#{orderId,jdbcType=INTEGER} )
</insert>
<!-- 新增FQC主记录信息 -->
@ -2804,6 +2809,7 @@
LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
</select>
<!-- 删除FQC检验记录 -->
@ -3150,6 +3156,8 @@
FROM qc_fai_detailed_record
</if>
WHERE site = #{site} and inspection_no = #{inspectionNo} and item_no = #{itemNo} and bu_no = #{buNo}
order by order_id
</select>
<!-- 查询检验方法列表 -->
@ -3553,6 +3561,7 @@
from qc_iqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '105' and b.collection_flag = 'Y'
order by a.order_id
</select>
<select id= "getFAIDetail" parameterType= "QcFAIRecordData" resultType= "EquipmentDataAcquisitionData" >
@ -3568,6 +3577,8 @@
from qc_fai_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '106' and b.collection_flag = 'Y'
order by order_id
</select>
<select id= "getIPQCDetail" parameterType= "QcFAIRecordData" resultType= "EquipmentDataAcquisitionData" >
@ -3583,6 +3594,7 @@
from qc_ipqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '101' and b.collection_flag = 'Y'
order by a.order_id
</select>
<select id= "getFQCDetail" parameterType= "QcFAIRecordData" resultType= "EquipmentDataAcquisitionData" >
@ -3598,6 +3610,7 @@
from qc_fqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '107' and b.collection_flag = 'Y'
order by a.order_id
</select>
<select id= "querySubDetails" parameterType= "QcFAIRecordData" resultType= "SubDetailValues" >
@ -3628,6 +3641,7 @@
left join qc_fai_detailed_record as b on a.site = b.site and a.bu_no = b.bu_no and a.inspection_no = b.inspection_no and a.item_no = b.item_no
</if>
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and a.item_no = #{itemNo}
order by b.order_id
</select>
<insert id= "saveFileList" >
@ -3758,6 +3772,7 @@
from qc_iqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '105' and b.collection_flag = 'Y'
order by a.order_id
</select>
<select id= "getFAIInspectionDetail" parameterType= "EamObjectInData" resultType= "EamObjectInData" >
@ -3772,6 +3787,7 @@
from qc_fai_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '106' and b.collection_flag = 'Y'
order by order_id a
</select>
<select id= "getFQCInspectionDetail" parameterType= "EamObjectInData" resultType= "EamObjectInData" >
@ -3786,6 +3802,7 @@
from qc_fqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '107' and b.collection_flag = 'Y'
order by a.order_id
</select>
<select id= "getIPQCInspectionDetail" parameterType= "EamObjectInData" resultType= "EamObjectInData" >
@ -3800,7 +3817,8 @@
from qc_ipqc_detailed_record as a
left join eam_properties_item as b on a.site = b.site and a.bu_no = b.bu_no and a.item_no = b.ItemNo
where a.site = #{site} and a.bu_no = #{buNo} and a.inspection_no = #{inspectionNo} and b.ItemType = 'D' and b.inspection_type_no = '101' and b.collection_flag = 'Y'
</select>
order by a.order_id
</select>
<delete id= "deleteEquipmentDataAcquisition" parameterType= "QcFAIRecordData" >
delete from Equipment_data_acquisition
@ -3861,6 +3879,7 @@
from qc_fai_detailed_record
</if>
where site = #{site} and bu_no = #{buNo} and inspection_no = #{inspectionNo}
order by order_id
</select>
<update id= "updateEquipmentDataDetailInspectionNo" parameterType= "SubDetailValues" > getUpItemdata