仓库-出库条件调整,遇到不同批次时检查仓库是否有库存,无库存则允许下一个批次出库
This commit is contained in:
@@ -832,11 +832,14 @@ namespace ZR.Service.mes.wms
|
||||
// 按顺序检查是否出完
|
||||
if (plan.Patchcode != shortPackageCode)
|
||||
{
|
||||
|
||||
// 此批次是否还有库存
|
||||
bool hasAny = Context.Queryable<WmGoodsNowProduction>()
|
||||
.Where(it => it.PackageCodeClient.Contains(plan.Patchcode))
|
||||
.Any();
|
||||
// 检查此批次是否出完
|
||||
if (outPartnumberNum >= plan.RequireNum)
|
||||
if (outPartnumberNum >= plan.RequireNum || !hasAny)
|
||||
{
|
||||
// 出完了
|
||||
// 出完了或仓库里没了
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user