select order_no, customer_id, order_status, order_type, so_reference1, so_reference2, so_reference3, priority, consignee_id, consignee_name, cus_country, cus_province, cus_city, cus_district, cus_address, cus_contact, cus_postcode, cus_email, carrier_id, shipment_time, carrier_name, delivery_no, edi_send_flag, remark, warehouse_id, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, userdefine6, create_time, create_by, update_time, update_by, 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_order_header insert into wms_doc_order_header order_no, customer_id, order_status, order_type, so_reference1, so_reference2, so_reference3, priority, consignee_id, consignee_name, cus_country, cus_province, cus_city, cus_district, cus_address, cus_contact, cus_postcode, cus_email, carrier_id, shipment_time, carrier_name, delivery_no, edi_send_flag, remark, warehouse_id, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, userdefine6, create_time, create_by, update_time, update_by, 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, #{orderNo}, #{customerId}, #{orderStatus}, #{orderType}, #{soReference1}, #{soReference2}, #{soReference3}, #{priority}, #{consigneeId}, #{consigneeName}, #{cusCountry}, #{cusProvince}, #{cusCity}, #{cusDistrict}, #{cusAddress}, #{cusContact}, #{cusPostcode}, #{cusEmail}, #{carrierId}, #{shipmentTime}, #{carrierName}, #{deliveryNo}, #{ediSendFlag}, #{remark}, #{warehouseId}, #{userdefine1}, #{userdefine2}, #{userdefine3}, #{userdefine4}, #{userdefine5}, #{userdefine6}, #{createTime}, #{createBy}, #{updateTime}, #{updateBy}, #{hEdi01}, #{hEdi02}, #{hEdi03}, #{hEdi04}, #{hEdi05}, #{hEdi06}, #{hEdi07}, #{hEdi08}, #{hEdi09}, #{hEdi10}, #{hEdi11}, #{hEdi12}, #{hEdi13}, #{hEdi14}, #{hEdi15}, update wms_doc_order_header customer_id = #{customerId}, order_status = #{orderStatus}, order_type = #{orderType}, so_reference1 = #{soReference1}, so_reference2 = #{soReference2}, so_reference3 = #{soReference3}, priority = #{priority}, consignee_id = #{consigneeId}, consignee_name = #{consigneeName}, cus_country = #{cusCountry}, cus_province = #{cusProvince}, cus_city = #{cusCity}, cus_district = #{cusDistrict}, cus_address = #{cusAddress}, cus_contact = #{cusContact}, cus_postcode = #{cusPostcode}, cus_email = #{cusEmail}, carrier_id = #{carrierId}, shipment_time = #{shipmentTime}, carrier_name = #{carrierName}, delivery_no = #{deliveryNo}, edi_send_flag = #{ediSendFlag}, remark = #{remark}, warehouse_id = #{warehouseId}, userdefine1 = #{userdefine1}, userdefine2 = #{userdefine2}, userdefine3 = #{userdefine3}, userdefine4 = #{userdefine4}, userdefine5 = #{userdefine5}, userdefine6 = #{userdefine6}, create_time = #{createTime}, create_by = #{createBy}, update_time = #{updateTime}, update_by = #{updateBy}, 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 order_no = #{orderNo} delete from wms_doc_order_header where order_no = #{orderNo} delete from wms_doc_order_header where order_no in #{orderNo} delete from wms_doc_order_details where order_no in #{orderNo} delete from wms_doc_order_details where order_no = #{orderNo} insert into wms_doc_order_details( order_no, order_line_no, customer_id, sku, line_status, qty_ordered, qty_ordered_each, qty_soft_allocated, qty_softallocated_each, qty_allocated, qty_allocated_each, qty_picked, qty_picked_each, qty_packed, qty_packed_each, qty_shipped, qty_shipped_each, uom, lotatt01, lotatt02, lotatt03, lotatt04, lotatt05, lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18, pack_id, pick_zone, location, lotnum, remark, create_time, create_by, update_time, update_by, net_weight, gross_weight, cubic, 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, d_edi_16, d_edi_17, d_edi_18, d_edi_19, d_edi_20, trace_id, soft_allocation_rule, allocation_rule, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5) values ( #{item.orderNo}, #{item.orderLineNo}, #{item.customerId}, #{item.sku}, #{item.lineStatus}, #{item.qtyOrdered}, #{item.qtyOrderedEach}, #{item.qtySoftAllocated}, #{item.qtySoftallocatedEach}, #{item.qtyAllocated}, #{item.qtyAllocatedEach}, #{item.qtyPicked}, #{item.qtyPickedEach}, #{item.qtyPacked}, #{item.qtyPackedEach}, #{item.qtyShipped}, #{item.qtyShippedEach}, #{item.uom}, #{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.packId}, #{item.pickZone}, #{item.location}, #{item.lotnum}, #{item.remark}, #{item.createTime}, #{item.createBy}, #{item.updateTime}, #{item.updateBy}, #{item.netWeight}, #{item.grossWeight}, #{item.cubic}, #{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}, #{item.dEdi16}, #{item.dEdi17}, #{item.dEdi18}, #{item.dEdi19}, #{item.dEdi20}, #{item.traceId}, #{item.softAllocationRule}, #{item.allocationRule}, #{item.userdefine1}, #{item.userdefine2}, #{item.userdefine3}, #{item.userdefine4}, #{item.userdefine5})