INSERT INTO qc_method (site, method_no, method_name, create_date, create_by, method_remark, update_date, update_by, inspection_type_no) VALUES (#{site}, #{methodNo}, #{methodName}, GetDate(), #{createBy}, #{methodRemark}, getDate(), #{updateBy}, #{inspectionTypeNo}) UPDATE qc_method SET method_name = #{methodName}, method_remark = #{methodRemark}, update_date = getDate(), update_by = #{updateBy}, inspection_type_no = #{inspectionTypeNo} WHERE site = #{site} and method_no = #{methodNo} DELETE FROM qc_method WHERE site = #{site} and method_no = #{methodNo} INSERT INTO eam_properties_item (site, ItemNo, ItemDesc, DefaultValue, ValueType, ValueType_DB, ValueChooseFlag, CreatedDate, CreatedBy, MaxValue, MinValue, ItemRemark, ItemType, update_date, update_by, inspection_type_no, item_sampling_quantity) VALUES (#{site}, #{itemNo}, #{itemDesc}, #{defaultValue}, #{valueType}, #{valueTypeDb}, #{valueChooseFlag}, GetDate(), #{createdBy}, #{maxValue,jdbcType=DECIMAL}, #{minValue,jdbcType=DECIMAL}, #{itemRemark}, #{itemType}, getDate(), #{updateBy}, #{inspectionTypeNo}, #{itemSamplingQuantity}) INSERT INTO qc_method_item (ItemNo, method_no, site) VALUES (#{itemNo}, #{methodNo}, #{site}) UPDATE eam_properties_item SET ItemDesc = #{itemDesc}, DefaultValue = #{defaultValue}, ValueType = #{valueType}, ValueType_DB = #{valueTypeDb}, ValueChooseFlag = #{valueChooseFlag}, MaxValue = #{maxValue,jdbcType=DECIMAL}, MinValue = #{minValue,jdbcType=DECIMAL}, ItemRemark = #{itemRemark}, update_date = getDate(), update_by = #{updateBy}, inspection_type_no = #{inspectionTypeNo}, item_sampling_quantity = #{itemSamplingQuantity} WHERE site = #{site} and ItemNo = #{itemNo} and ItemType = #{itemType} UPDATE qc_method_item SET method_no = #{methodNo} WHERE site = #{site} and ItemNo = #{itemNo} DELETE FROM eam_properties_item WHERE site = #{site} and ItemNo = #{itemNo} and ItemType = #{itemType} DELETE FROM qc_method_item WHERE site = #{site} and ItemNo = #{itemNo} INSERT INTO qc_inspector (inspector_no, inspector_name, inspector_phone, inspector_type, inspector_active, create_time) VALUES (#{inspectorNo}, #{inspectorName}, #{inspectorPhone}, #{inspectorType}, #{inspectorActive}, getDate()) UPDATE qc_inspector SET inspector_name = #{inspectorName}, inspector_phone = #{inspectorPhone}, inspector_type = #{inspectorType}, inspector_active = #{inspectorActive} WHERE inspector_no = #{inspectorNo} DELETE FROM qc_inspector WHERE inspector_no = #{inspectorNo} INSERT INTO qc_sampling_inspection_plan (site, sampling_plan_no, sampling_plan_desc, sampling_qty_rank_no, sampling_level_no, sampling_qty_no, sampling_plan_active, create_date, create_by, update_date, update_by) VALUES (#{site}, #{samplingPlanNo}, #{samplingPlanDesc}, #{samplingQtyRankNo}, #{samplingLevelNo}, #{samplingQtyNo}, #{samplingPlanActive}, getDate(), #{createBy}, getDate(), #{updateBy}) UPDATE qc_sampling_inspection_plan SET sampling_qty_rank_no = #{samplingQtyRankNo}, sampling_level_no = #{samplingLevelNo}, sampling_qty_no = #{samplingQtyNo}, sampling_plan_active = #{samplingPlanActive}, update_date = getDate(), update_by = #{updateBy} WHERE sampling_plan_no = #{samplingPlanNo} AND site = #{site} DELETE FROM qc_sampling_inspection_plan WHERE sampling_plan_no = #{samplingPlanNo} AND site = #{site} INSERT INTO qc_template (site, template_id, template_name, template_version, template_remark, template_type, sampling_programme_no, inspection_type_no, create_time, create_by, sampling_level_no, inspection_cycle, AQL, AC, RE, default_sampling_quantity, default_sampling_proportion, update_date, update_by) VALUES (#{site}, #{templateId}, #{templateName},#{templateVersion}, #{templateRemark}, #{templateType}, #{samplingProgrammeNo}, #{inspectionTypeNo}, getDate(), #{createBy}, #{samplingLevelNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{aql}, #{ac}, #{re}, #{defaultSamplingQuantity}, #{defaultSamplingProportion}, getDate(), #{updateBy}) UPDATE qc_template SET template_name = #{templateName}, template_version = #{templateVersion}, template_remark = #{templateRemark}, template_type = #{templateType}, sampling_programme_no = #{samplingProgrammeNo}, inspection_cycle = #{inspectionCycle}, inspection_type_no = #{inspectionTypeNo}, sampling_level_no = #{samplingLevelNo}, AQL = #{aql}, AC = #{ac}, RE = #{re}, default_sampling_quantity = #{defaultSamplingQuantity}, default_sampling_proportion = #{defaultSamplingProportion}, update_date = getDate(), update_by = #{updateBy} WHERE template_id = #{templateId} AND site = #{site} INSERT INTO qc_template_detailed (template_id, ItemNo, default_value, max_value, min_value, site) VALUES (#{templateId}, #{itemNo}, #{defaultValue}, #{maxValue,jdbcType=DECIMAL}, #{minValue,jdbcType=DECIMAL}, #{site}) DELETE FROM qc_template_detailed WHERE template_id = #{templateId} and ItemNo = #{itemNo} and site = #{site} DELETE FROM qc_template WHERE template_id = #{templateId} AND site = #{site} DELETE FROM qc_template_detailed WHERE template_id = #{templateId} and site = #{site} INSERT INTO eam_properties_item (ItemNo, ItemDesc,DefaultValue,ValueType,ValueType_DB, CreatedDate,CreatedBy,MaxValue, MinValue, ItemRemark,ItemType) VALUES(#{itemNo},#{itemDesc}, #{defaultValue}, #{valueType}, #{valueTypeDb}, GetDate(), #{createdBy}, #{maxValue,jdbcType=DECIMAL}, #{minValue,jdbcType=DECIMAL}, #{itemRemark}, #{itemType}) UPDATE qc_template_detailed SET default_value = #{defaultValue}, max_value = #{maxValue,jdbcType=DECIMAL}, min_value = #{minValue,jdbcType=DECIMAL}, object_id = #{objectID} WHERE template_id = #{templateId} and ItemNo = #{itemNo} and site = #{site} INSERT INTO qc_sampling_inspection_qty (site, sampling_qty_no, sampling_qty, sampling_qty_remark, sampling_qty_active, sampling_qty_desc, create_date, create_by, update_date, update_by) VALUES(#{site}, #{samplingQtyNo}, #{samplingQty,jdbcType=DECIMAL}, #{samplingQtyRemark}, #{samplingQtyActive}, #{samplingQtyDesc}, getDate(), #{createBy}, getDate(), #{updateBy}) UPDATE qc_sampling_inspection_qty SET sampling_qty = #{samplingQty,jdbcType=DECIMAL}, sampling_qty_desc = #{samplingQtyDesc}, sampling_qty_remark = #{samplingQtyRemark}, sampling_qty_active = #{samplingQtyActive}, update_date = getDate(), update_by = #{updateBy} WHERE sampling_qty_no = #{samplingQtyNo} AND site = #{site} DELETE FROM qc_sampling_inspection_qty WHERE site = #{site} AND sampling_qty_no = #{samplingQtyNo} AND sampling_qty_desc = #{samplingQtyDesc} INSERT INTO qc_sampling_inspection_qty_rank (site, sampling_qty_rank_no, sampling_qty_rank_desc, min_qty, max_qty, sampling_qty_rank_Remark, sampling_qty_rank_active, create_date, create_by, update_date, update_by) VALUES(#{site}, #{samplingQtyRankNo}, #{samplingQtyRankDesc}, #{minQty,jdbcType=DECIMAL}, #{maxQty,jdbcType=DECIMAL}, #{samplingQtyRankRemark}, #{samplingQtyRankActive}, getDate(), #{createBy}, getDate(), #{updateBy}) UPDATE qc_sampling_inspection_qty_rank SET sampling_qty_rank_desc = #{samplingQtyRankDesc}, min_qty = #{minQty,jdbcType=DECIMAL}, max_qty = #{maxQty,jdbcType=DECIMAL}, sampling_qty_rank_Remark = #{samplingQtyRankRemark}, sampling_qty_rank_active = #{samplingQtyRankActive}, update_date = getDate(), update_by = #{updateBy} WHERE sampling_qty_rank_no = #{samplingQtyRankNo} AND site = #{site} DELETE FROM qc_sampling_inspection_qty_rank WHERE site = #{site} AND sampling_qty_rank_no = #{samplingQtyRankNo} AND sampling_qty_rank_desc = #{samplingQtyRankDesc} INSERT INTO qc_sampling_inspection_level (site, sampling_level_no, sampling_level_desc, sampling_level_remark, sampling_level_active, create_date, create_by, update_date, update_by) VALUES(#{site}, #{samplingLevelNo}, #{samplingLevelDesc}, #{samplingLevelRemark}, #{samplingLevelActive}, getDate(), #{createBy}, getDate(), #{updateBy}) UPDATE qc_sampling_inspection_level SET sampling_level_desc = #{samplingLevelDesc}, sampling_level_remark = #{samplingLevelRemark}, sampling_level_active = #{samplingLevelActive}, update_date = getDate(), update_by = #{updateBy} WHERE sampling_level_no = #{samplingLevelNo} AND site = #{site} DELETE FROM qc_sampling_inspection_level WHERE site = #{site} AND sampling_level_no = #{samplingLevelNo} AND sampling_level_desc = #{samplingLevelDesc} INSERT INTO qc_part_attribute (attribute_no, supplier_no, attribute_remark, create_time, create_by, attribute_type, site, exempt_inspection) VALUES(#{partNo}, #{supplierNo}, #{attributeRemark}, getDate(), #{createBy}, #{attributeType}, #{site}, #{exemptInspection}) UPDATE qc_part_attribute SET attribute_remark = #{attributeRemark}, exempt_inspection = #{exemptInspection}, update_date = getDate(), update_by = #{updateBy} WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} DELETE FROM qc_part_attribute WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} DELETE FROM qc_attribute_template WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} INSERT INTO qc_attribute_template (attribute_no, template_id, sampling_level_no, inspection_cycle, sampling_programme_no, AQL, AC, RE, attribute_type, operation, manufacturer_id, resource_id, site) VALUES(#{attributeNo}, #{templateId}, #{samplingLevelNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{samplingProgrammeNo}, #{aql,jdbcType=DECIMAL}, #{ac,jdbcType=DECIMAL}, #{re,jdbcType=DECIMAL}, #{attributeType}, #{operation}, #{manufacturerID}, #{resourceID}, #{site}) DELETE FROM qc_attribute_template site = #{site} and attribute_no = #{attributeNo} and template_id = #{templateId} and attribute_type = #{attributeType} and operation = #{operation} and resource_id = #{resourceID} and manufacturer_id = #{manufacturerID} UPDATE qc_attribute_template SET sampling_level_no = #{samplingLevelNo}, inspection_cycle = #{inspectionCycle,jdbcType=DECIMAL}, sampling_programme_no = #{samplingProgrammeNo}, AQL = #{aql,jdbcType=DECIMAL}, AC = #{ac,jdbcType=DECIMAL}, RE = #{re,jdbcType=DECIMAL} site = #{site} and attribute_no = #{attributeNo} AND template_id = #{templateId} AND attribute_type = #{attributeType} AND operation = #{operation} AND resource_id = #{resourceID} AND manufacturer_id = #{manufacturerID} UPDATE qc_part_attribute SET update_date = getDate(), update_by = #{updateBy} WHERE site = #{site} and attribute_no = #{attributeNo} and attribute_type = #{attributeType} INSERT INTO qc_part_attribute (attribute_no, attribute_remark, create_time, create_by, attribute_type, site) VALUES(#{familyID}, #{attributeRemark}, getDate(), #{createBy}, #{attributeType}, #{site}) DELETE FROM qc_part_attribute WHERE site = #{site} and attribute_no = #{familyID} and attribute_type = #{attributeType} DELETE FROM qc_attribute_template WHERE site = #{site} and attribute_no = #{familyID} and attribute_type = #{attributeType} INSERT INTO qc_sampling_inspection_programme (site, sampling_programme_no, sampling_programme_desc, sampling_programme_code, create_time, create_by, update_date, update_by) VALUES(#{site}, #{samplingProgrammeNo}, #{samplingProgrammeDesc}, #{samplingProgrammeCode}, getDate(), #{createBy}, getDate(), #{updateBy}) DELETE FROM qc_sampling_inspection_programme WHERE site = #{site} AND sampling_programme_no = #{samplingProgrammeNo} DELETE FROM qc_programme_plan WHERE sampling_programme_no = #{samplingProgrammeNo} INSERT INTO qc_programme_plan (site, sampling_programme_no, sampling_plan_no) VALUES(#{site}, #{samplingProgrammeNo}, #{samplingPlanNo}) UPDATE qc_sampling_inspection_programme SET update_date = getDate(), update_by = #{updateBy} WHERE site = #{site} AND sampling_programme_no = #{samplingProgrammeNo} DELETE FROM qc_programme_plan WHERE sampling_programme_no = #{samplingProgrammeNo} and sampling_plan_no = #{samplingPlanNo} and site = #{site} INSERT INTO qc_fai_record (inspection_no, site, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, ssr_id, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id) VALUES(#{inspectionNo}, #{site}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{ssrId}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}) 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) 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}) UPDATE qc_fai_record SET disposal_measures = #{disposalMeasures}, disposal_remark = #{disposalRemark}, inspection_result = #{inspectionResult}, inspector_no = #{inspectorNo}, state = #{state}, inspection_remark = #{inspectionRemark}, inspector_date = getDate(), sampling_qty = #{samplingQty,jdbcType=DECIMAL}, roll_qty = #{rollQty,jdbcType=DECIMAL}, unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL} WHERE site = #{site} AND inspection_no = #{inspectionNo} UPDATE qc_fai_detailed_record SET item_result = #{itemResult}, unqualified_quantity = #{unqualifiedQuantity,jdbcType=DECIMAL}, sampling_qty = #{samplingQty,jdbcType=DECIMAL}, text_value = #{textValue}, number_value = #{numberValue,jdbcType=DECIMAL} WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} UPDATE qc_fai_sub_detail_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} DELETE FROM qc_fai_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fai_detailed_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fai_sub_detail_record WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fai_record SET submit_flag = 'Y', state = '已完成' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fai_detailed_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fai_sub_detail_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fai_sub_detail_record WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} INSERT INTO qc_fai_sub_detail_record (inspection_no, item_no, sub_detail_value, sampling_location, site, sampling_location_b) VALUES (#{item.inspectionNo}, #{item.itemNo}, #{item.subDetailValue}, #{item.samplingLocation}, #{item.site}, #{item.samplingLocationB}) 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) 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}) INSERT INTO qc_ipqc_record_count (inspection_no, site, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id, new_data) VALUES(#{inspectionNo}, #{site}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}, 'Y') INSERT INTO qc_ipqc_record (inspection_no, site, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, ssr_id, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id) VALUES(#{inspectionNo}, #{site}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{ssrId}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}) DELETE FROM qc_ipqc_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_ipqc_record_count WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_ipqc_detailed_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_ipqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_ipqc_record SET disposal_measures = #{disposalMeasures}, disposal_remark = #{disposalRemark}, inspection_result = #{inspectionResult}, inspector_no = #{inspectorNo}, state = #{state}, inspection_remark = #{inspectionRemark}, inspector_date = getDate(), sampling_qty = #{samplingQty,jdbcType=DECIMAL}, roll_qty = #{rollQty,jdbcType=DECIMAL}, unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL} WHERE site = #{site} and inspection_no = #{inspectionNo} UPDATE qc_ipqc_detailed_record SET item_result = #{itemResult}, unqualified_quantity = #{unqualifiedQuantity,jdbcType=DECIMAL}, sampling_qty = #{samplingQty,jdbcType=DECIMAL}, text_value = #{textValue}, number_value = #{numberValue,jdbcType=DECIMAL} WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} UPDATE qc_ipqc_record SET submit_flag = 'Y', state = '已完成' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_ipqc_detailed_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_ipqc_sub_detail_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_ipqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} INSERT INTO qc_ipqc_sub_detail_record (inspection_no, item_no, sub_detail_value, sampling_location, site, sampling_location_b) VALUES (#{item.inspectionNo}, #{item.itemNo}, #{item.subDetailValue}, #{item.samplingLocation}, #{item.site}, #{item.samplingLocationB}) 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) 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}) UPDATE qc_iqc_record SET inspection_type_no = #{inspectionTypeNo}, sampling_qty = #{samplingQty}, inspection_cycle = #{inspectionCycle}, part_desc = #{partDesc}, detail_flag = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_iqc_record SET disposal_measures = #{disposalMeasures}, disposal_remark = #{disposalRemark}, inspection_result = #{inspectionResult}, inspector_no = #{inspectorNo}, state = #{state}, inspection_remark = #{inspectionRemark}, inspector_date = getDate(), unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL} WHERE site = #{site} and inspection_no = #{inspectionNo} UPDATE qc_iqc_detailed_record SET item_result = #{itemResult}, unqualified_quantity = #{unqualifiedQuantity,jdbcType=DECIMAL}, text_value = #{textValue}, number_value = #{numberValue,jdbcType=DECIMAL} WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} DELETE FROM qc_iqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} INSERT INTO qc_iqc_sub_detail_record (inspection_no, item_no, sub_detail_value, sampling_location, site, sampling_location_b) VALUES (#{item.inspectionNo}, #{item.itemNo}, #{item.subDetailValue}, #{item.samplingLocation}, #{item.site}, #{item.samplingLocationB}) UPDATE qc_iqc_record SET submit_flag = 'Y', state = '已完成' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_iqc_detailed_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_iqc_sub_detail_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_iqc_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_iqc_detailed_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_iqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and site = #{site} 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) 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}) INSERT INTO qc_fqc_record (inspection_no, site, state, task_date, inspection_type_no, inspection_cycle, order_no, operation_desc, resource_id, part_no, roll_qty, sampling_qty, ssr_id, seq_no, batch_roll_no, special_requirements, work_center_no, roll_no, um_id) VALUES(#{inspectionNo}, #{site}, #{state}, getDate(), #{inspectionTypeNo}, #{inspectionCycle,jdbcType=DECIMAL}, #{orderNo}, #{operationDesc}, #{resourceId}, #{partNo}, #{rollQty}, #{samplingQty,jdbcType=DECIMAL}, #{ssrId}, #{seqNo}, #{batchRollNo}, #{specialRequirements}, #{workCenterNo}, #{rollNo}, #{umId}) DELETE FROM qc_fqc_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fqc_detailed_record WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fqc_record SET disposal_measures = #{disposalMeasures}, disposal_remark = #{disposalRemark}, inspection_result = #{inspectionResult}, inspector_no = #{inspectorNo}, state = #{state}, inspection_remark = #{inspectionRemark}, inspector_date = getDate(), sampling_qty = #{samplingQty,jdbcType=DECIMAL}, roll_qty = #{rollQty,jdbcType=DECIMAL}, unqualified_qty = #{unqualifiedQty,jdbcType=DECIMAL} WHERE site = #{site} and inspection_no = #{inspectionNo} UPDATE qc_fqc_detailed_record SET item_result = #{itemResult}, unqualified_quantity = #{unqualifiedQuantity,jdbcType=DECIMAL}, sampling_qty = #{samplingQty,jdbcType=DECIMAL}, text_value = #{textValue}, number_value = #{numberValue,jdbcType=DECIMAL} WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} UPDATE qc_fqc_record SET submit_flag = 'Y', state = '已完成' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fqc_detailed_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} UPDATE qc_fqc_sub_detail_record SET is_submit = 'Y' WHERE inspection_no = #{inspectionNo} and site = #{site} DELETE FROM qc_fqc_sub_detail_record WHERE inspection_no = #{inspectionNo} and item_no = #{itemNo} and site = #{site} INSERT INTO qc_fqc_sub_detail_record (inspection_no, item_no, sub_detail_value, sampling_location, site, sampling_location_b) VALUES (#{item.inspectionNo}, #{item.itemNo}, #{item.subDetailValue}, #{item.samplingLocation}, #{item.site}, #{item.samplingLocationB}) INSERT INTO receiving_task (site, order_no, item_no, part_no, part_desc, spec, supplier_id, supplier_name, order_qty, created_date, status, citem_code, citem_class, sendto_address, order_type) VALUES (#{site}, #{orderNo}, #{itemNo}, #{partNo}, #{partDesc}, #{spec}, #{supplierId}, #{supplierName}, #{orderQty}, #{createdDate}, #{status}, #{citemCode}, #{citemClass}, #{sendtoAddress}, #{orderType}) DELETE FROM sys_oss WHERE id = #{id}