select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, spare9, send_status, send_time, msg from out_stockout_detail_back
insert into out_stockout_detail_back
stockout_detail_id,
stockout_guid,
stockout_id,
lot_no,
product_guid,
product_id,
quantity,
quantity_x,
quantity_j,
assign_num,
assign_num_x,
assign_num_j,
allot_quantity,
allot_quantity_x,
allot_quantity_j,
price,
remark,
warehouse_id,
out_id,
bukechai_quantity,
kechai_quantity,
entryid,
flat_quantity,
fid,
erp_stockout_id,
unit,
spec,
product_name,
spare1,
spare2,
spare3,
spare4,
spare5,
spare6,
spare7,
spare8,
spare9,
send_status,
send_time,
msg,
#{stockoutDetailId},
#{stockoutGuid},
#{stockoutId},
#{lotNo},
#{productGuid},
#{productId},
#{quantity},
#{quantityX},
#{quantityJ},
#{assignNum},
#{assignNumX},
#{assignNumJ},
#{allotQuantity},
#{allotQuantityX},
#{allotQuantityJ},
#{price},
#{remark},
#{warehouseId},
#{outId},
#{bukechaiQuantity},
#{kechaiQuantity},
#{entryid},
#{flatQuantity},
#{fid},
#{erpStockoutId},
#{unit},
#{spec},
#{productName},
#{spare1},
#{spare2},
#{spare3},
#{spare4},
#{spare5},
#{spare6},
#{spare7},
#{spare8},
#{spare9},
#{sendStatus},
#{sendTime},
#{msg},
update out_stockout_detail_back
stockout_guid = #{stockoutGuid},
lot_no = #{lotNo},
product_guid = #{productGuid},
product_id = #{productId},
quantity = #{quantity},
quantity_x = #{quantityX},
quantity_j = #{quantityJ},
assign_num = #{assignNum},
assign_num_x = #{assignNumX},
assign_num_j = #{assignNumJ},
allot_quantity = #{allotQuantity},
allot_quantity_x = #{allotQuantityX},
allot_quantity_j = #{allotQuantityJ},
price = #{price},
remark = #{remark},
warehouse_id = #{warehouseId},
out_id = #{outId},
bukechai_quantity = #{bukechaiQuantity},
kechai_quantity = #{kechaiQuantity},
entryid = #{entryid},
flat_quantity = #{flatQuantity},
fid = #{fid},
erp_stockout_id = #{erpStockoutId},
unit = #{unit},
spec = #{spec},
product_name = #{productName},
spare1 = #{spare1},
spare2 = #{spare2},
spare3 = #{spare3},
spare4 = #{spare4},
spare5 = #{spare5},
spare6 = #{spare6},
spare7 = #{spare7},
spare8 = #{spare8},
spare9 = #{spare9},
send_status = #{sendStatus},
send_time = #{sendTime},
msg = #{msg},
where stockout_id = #{stockoutId}
delete from out_stockout_detail_back where stockout_detail_id = #{stockoutDetailId}
delete from out_stockout_detail_back where stockout_detail_id in
#{stockoutDetailId}