SCM 传单据是 提示平台库存被占用

背景简介

客户多开了出库单,而出库单不用了,也没有及时抽单,所以导致下传时,提示WMS平台库存被占用

涉及系统

SCM    英克WMS(2.0
--清理占用库存
--先在6508中 按仓库 货主ID,货品SKU,批号,批次找出 占用的库存,然后查询出来相关的ID,,去删除tpl_st_io_doc_tmp 表的数据
SELECT A.ownergoodsid,A.goodsid,A.goodsstatusid,A.lotid,A.batchid, A.*,A.rowid FROM tpl_st_qty_lst_v A WHERE 1=1
AND warehid='301'
AND goodsownerid='583'
AND goodsownid ='SF19425001000900'
and lotno='220110'
and batchno='2204Y7GH00EV'
;

select t.*,t.rowid  from tpl_st_io_doc_tmp t where 1=1
and t.warehid=301
and t.goodsownerid='586'
and t.ownergoodsid=523447
and t.goodsid=264908
and t.goodsstatusid=1
and t.lotid=777281
and t.batchid=902172
and t.inoutflag=1;




--可以将这一列加到视图联查表中。的到orderid    6402的物流出库订单ID
(select t.orderid from tpl_st_io_doc_tmp t where 1=1 
and t.warehid=a.warehid 
and t.goodsownerid=a.goodsownerid
and t.ownergoodsid=a.ownergoodsid 
and t.goodsid=a.goodsid
and t.goodsstatusid=a.goodsstatusid 
and t.lotid=a.lotid 
and t.batchid=a.batchid 
and t.inoutflag=1) orderid,
文档更新时间: 2023-09-01 14:51   作者:周骏