select asn_no, asn_type, asn_status, customer_id, customer_no, asn_reference1, asn_reference2, release_status, expected_arrive_time, pa_no, qc_no, notes, supplier_id, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, create_by, create_time, update_by, update_time, active_flag,edi_send_flag, h_edi_01, h_edi_02, h_edi_03, h_edi_04, h_edi_05, h_edi_06, h_edi_07, h_edi_08, h_edi_09, h_edi_10, h_edi_11, h_edi_12, h_edi_13, h_edi_14, h_edi_15 from wms_doc_asn_header dh insert into wms_doc_asn_header asn_no, asn_type, asn_status, customer_id, customer_no, asn_reference1, asn_reference2, release_status, expected_arrive_time, pa_no, qc_no, notes, supplier_id, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, create_by, create_time, update_by, update_time, active_flag, h_edi_01, h_edi_02, h_edi_03, h_edi_04, h_edi_05, h_edi_06, h_edi_07, h_edi_08, h_edi_09, h_edi_10, h_edi_11, h_edi_12, h_edi_13, h_edi_14, h_edi_15, #{asnNo}, #{asnType}, #{asnStatus}, #{customerId}, #{customerNo}, #{asnReference1}, #{asnReference2}, #{releaseStatus}, #{expectedArriveTime}, #{paNo}, #{qcNo}, #{notes}, #{supplierId}, #{userdefine1}, #{userdefine2}, #{userdefine3}, #{userdefine4}, #{userdefine5}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{activeFlag}, #{hEdi01}, #{hEdi02}, #{hEdi03}, #{hEdi04}, #{hEdi05}, #{hEdi06}, #{hEdi07}, #{hEdi08}, #{hEdi09}, #{hEdi10}, #{hEdi11}, #{hEdi12}, #{hEdi13}, #{hEdi14}, #{hEdi15}, update wms_doc_asn_header asn_type = #{asnType}, asn_status = #{asnStatus}, customer_id = #{customerId}, customer_no = #{customerNo}, asn_reference1 = #{asnReference1}, asn_reference2 = #{asnReference2}, release_status = #{releaseStatus}, expected_arrive_time = #{expectedArriveTime}, pa_no = #{paNo}, qc_no = #{qcNo}, notes = #{notes}, supplier_id = #{supplierId}, userdefine1 = #{userdefine1}, userdefine2 = #{userdefine2}, userdefine3 = #{userdefine3}, userdefine4 = #{userdefine4}, userdefine5 = #{userdefine5}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, active_flag = #{activeFlag}, h_edi_01 = #{hEdi01}, h_edi_02 = #{hEdi02}, h_edi_03 = #{hEdi03}, h_edi_04 = #{hEdi04}, h_edi_05 = #{hEdi05}, h_edi_06 = #{hEdi06}, h_edi_07 = #{hEdi07}, h_edi_08 = #{hEdi08}, h_edi_09 = #{hEdi09}, h_edi_10 = #{hEdi10}, h_edi_11 = #{hEdi11}, h_edi_12 = #{hEdi12}, h_edi_13 = #{hEdi13}, h_edi_14 = #{hEdi14}, h_edi_15 = #{hEdi15}, where asn_no = #{asnNo} delete from wms_doc_asn_header where asn_no = #{asnNo} delete from wms_doc_asn_header where asn_no in #{asnNo} delete from wms_doc_asn_details where asn_no in #{asnNo} delete from wms_doc_asn_details where asn_no = #{asnNo} insert into wms_doc_asn_details( asn_line_no, asn_no, sku, expected_qty, expected_qty_each, received_qty, received_qty_each, line_status, hold_rejectreason, notes, pack_id, location_zone, lotatt01, lotatt02, lotatt03, lotatt04, lotatt05, lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18, create_by, create_time, update_by, update_time, location_id, document_id, d_edi_01, d_edi_02, d_edi_03, d_edi_04, d_edi_05, d_edi_06, d_edi_07, d_edi_08, d_edi_09, d_edi_10, d_edi_11, d_edi_12, d_edi_13, d_edi_14, d_edi_15) values ( #{item.asnLineNo}, #{item.asnNo}, #{item.sku}, #{item.expectedQty}, #{item.expectedQtyEach}, #{item.receivedQty}, #{item.receivedQtyEach}, #{item.lineStatus}, #{item.holdRejectreason}, #{item.notes}, #{item.packId}, #{item.locationZone}, #{item.lotatt01}, #{item.lotatt02}, #{item.lotatt03}, #{item.lotatt04}, #{item.lotatt05}, #{item.lotatt06}, #{item.lotatt07}, #{item.lotatt08}, #{item.lotatt09}, #{item.lotatt10}, #{item.lotatt11}, #{item.lotatt12}, #{item.lotatt13}, #{item.lotatt14}, #{item.lotatt15}, #{item.lotatt16}, #{item.lotatt17}, #{item.lotatt18}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.locationId}, #{item.documentId}, #{item.dEdi01}, #{item.dEdi02}, #{item.dEdi03}, #{item.dEdi04}, #{item.dEdi05}, #{item.dEdi06}, #{item.dEdi07}, #{item.dEdi08}, #{item.dEdi09}, #{item.dEdi10}, #{item.dEdi11}, #{item.dEdi12}, #{item.dEdi13}, #{item.dEdi14}, #{item.dEdi15})