select purchase_order_id, erp_id, fentry_id, po_no, document_status, material_id, material_code, material_name, order_amount, complete_amount, approve_date, erp_modify_date, plan_delivery_date, begin_date, end_date, order_status, complete_date, is_flag, unit_id, stock_unit_id, price_unit_id, aux_prop_id, specification_parameter, src_bill_no, purchase_org_id, tond_base, supplier_id, remark, create_by, create_time, update_by, update_time from mes_purchase_order insert into mes_purchase_order erp_id, fentry_id, po_no, document_status, material_id, material_code, material_name, purchase_order_classfication, order_amount, complete_amount, approve_date, erp_modify_date, plan_delivery_date, begin_date, end_date, order_status, complete_date, is_flag, remark, create_by, create_time, update_by, update_time, #{erpId}, #{fentryId}, #{poNo}, #{documentStatus}, #{materialId}, #{materialCode}, #{materialName}, #{purchaseOrderClassfication}, #{orderAmount}, #{completeAmount}, #{approveDate}, #{erpModifyDate}, #{planDeliveryDate}, #{beginDate}, #{endDate}, #{orderStatus}, #{completeDate}, #{isFlag}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, update mes_purchase_order erp_id = #{erpId}, fentry_id = #{fentryId}, po_no = #{poNo}, document_status = #{documentStatus}, material_id = #{materialId}, material_code = #{materialCode}, material_name = #{materialName}, order_amount = #{orderAmount}, complete_amount = #{completeAmount}, approve_date = #{approveDate}, erp_modify_date = #{erpModifyDate}, plan_delivery_date = #{planDeliveryDate}, begin_date = #{beginDate}, end_date = #{endDate}, order_status = #{orderStatus}, complete_date = #{completeDate}, is_flag = #{isFlag}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, where purchase_order_id = #{purchaseOrderId} delete from mes_purchase_order where purchase_order_id = #{purchaseOrderId} delete from mes_purchase_order where purchase_order_id in #{purchaseOrderId} insert into mes_order_bind( order_bind_id, safe_flag, sale_order_id, sale_order_code, product_id, product_code, product_name, purchase_order_id, po_no, material_id, material_code, material_name, bind_amount, remark, create_by, create_time, update_by, update_time) values ( #{item.orderBindId}, #{item.safeFlag}, #{item.saleOrderId}, #{item.saleOrderCode}, #{item.productId}, #{item.productCode}, #{item.productName}, #{item.purchaseOrderId}, #{item.poNo}, #{item.materialId}, #{item.materialCode}, #{item.materialName}, #{item.bindAmount}, #{item.remark}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}) delete from mes_order_bind where purchase_order_id = #{purchaseOrderId} delete from mes_order_bind where order_bind_id in #{orderBindId}