select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date from out_stockout_finish
insert into out_stockout_finish
stockout_guid,
stockout_id,
out_type,
create_date,
department_no,
customer_no,
create_man_id,
status,
stockout_source,
warehouse_id,
class_now_id,
exit_id,
car_number,
FID,
erp_stockout_id,
start_date,
finish_date,
#{stockoutGuid},
#{stockoutId},
#{outType},
#{createDate},
#{departmentNo},
#{customerNo},
#{createManId},
#{status},
#{stockoutSource},
#{warehouseId},
#{classNowId},
#{exitId},
#{carNumber},
#{FID},
#{erpStockoutId},
#{startDate},
#{finishDate},
update out_stockout_finish
stockout_id = #{stockoutId},
out_type = #{outType},
create_date = #{createDate},
department_no = #{departmentNo},
customer_no = #{customerNo},
create_man_id = #{createManId},
status = #{status},
stockout_source = #{stockoutSource},
warehouse_id = #{warehouseId},
class_now_id = #{classNowId},
exit_id = #{exitId},
car_number = #{carNumber},
FID = #{FID},
erp_stockout_id = #{erpStockoutId},
start_date = #{startDate},
finish_date = #{finishDate},
where stockout_guid = #{stockoutGuid}
delete from out_stockout_finish where stockout_guid = #{stockoutGuid}
delete from out_stockout_finish where stockout_guid in
#{stockoutGuid}