From 11dfe38106cf027cf93455a1cbdaa49b06deb86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Tue, 7 May 2024 11:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93-=E5=87=BA=E5=BA=93=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4=EF=BC=8C=E9=81=87=E5=88=B0=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E6=89=B9=E6=AC=A1=E6=97=B6=E6=A3=80=E6=9F=A5=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E6=98=AF=E5=90=A6=E6=9C=89=E5=BA=93=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E5=BA=93=E5=AD=98=E5=88=99=E5=85=81=E8=AE=B8=E4=B8=8B?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=89=B9=E6=AC=A1=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Service/mes/wms/WmOutOrderService.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ZR.Service/mes/wms/WmOutOrderService.cs b/ZR.Service/mes/wms/WmOutOrderService.cs index 5d291105..0af95150 100644 --- a/ZR.Service/mes/wms/WmOutOrderService.cs +++ b/ZR.Service/mes/wms/WmOutOrderService.cs @@ -832,11 +832,14 @@ namespace ZR.Service.mes.wms // 按顺序检查是否出完 if (plan.Patchcode != shortPackageCode) { - + // 此批次是否还有库存 + bool hasAny = Context.Queryable() + .Where(it => it.PackageCodeClient.Contains(plan.Patchcode)) + .Any(); // 检查此批次是否出完 - if (outPartnumberNum >= plan.RequireNum) + if (outPartnumberNum >= plan.RequireNum || !hasAny) { - // 出完了 + // 出完了或仓库里没了 continue; } else