WarehouseBeginningBack.sql 624 B

12345678910111213
  1. /*
  2. 名称: 仓库初始化数据返回
  3. 创建人:小威
  4. 创建日期:2020/03/19 14:32
  5. 作用:使仓库返回期初状态
  6. 条件:仓库只进行过期初操作
  7. 注意:该语句只能返回仓库期初时添加的商品库存
  8. 使用时替换仓库id(把语句里3个14提换成需要返回期初的仓库id即可)
  9. */
  10. 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;
  11. update qianniao_warehouse_1 set beginningStatus = 5 where id = 14;