/*
名称: 仓库初始化数据返回
创建人:小威
创建日期:2020/03/19 14:32
作用:使仓库返回期初状态
条件:仓库只进行过期初操作
注意:该语句只能返回仓库期初时添加的商品库存


使用时替换仓库id(把语句里3个14提换成需要返回期初的仓库id即可)
 */
 delete b.*, i.*, batch.* from qianniao_warehouse_beginning_1 b left join qianniao_inventory_1 as i on b.warehouseId = i.warehouseId left join qianniao_inventory_batch_1_14 batch on b.materielId = batch.materielId where b.warehouseId = 14;
update qianniao_warehouse_1 set beginningStatus = 5 where id = 14;