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, remark, create_by, create_time, update_by, update_time ,unit_id, stock_unit_id,price_unit_id,aux_prop_id,src_bill_no,tond_base,purchase_org_id,supplier_id from mes_purchase_order insert into mes_purchase_order 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, remark, create_by, create_time, update_by, update_time, unit_id, stock_unit_id, price_unit_id, aux_prop_id, src_bill_no, tond_base, purchase_org_id, supplier_id, #{erpId}, #{fentryId}, #{poNo}, #{documentStatus}, #{materialId}, #{materialCode}, #{materialName}, #{orderAmount}, #{completeAmount}, #{approveDate}, #{erpModifyDate}, #{planDeliveryDate}, #{beginDate}, #{endDate}, #{orderStatus}, #{completeDate}, #{isFlag}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{unitId}, #{stockUnitId}, #{priceUnitId}, #{auxPropId}, #{srcBillNo}, #{tondBase}, #{purchaseOrgId}, #{supplierId}, 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}, unit_id=#{unitId}, stock_unit_id=#{stockUnitId}, price_unit_id=#{priceUnitId}, aux_prop_id=#{auxPropId}, src_bill_no=#{srcBillNo}, tond_base=#{tondBase}, purchase_org_id=#{purchaseOrgId}, supplier_id=#{supplierId}, 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}