From 3060ff4c5ebc198736ce6bdc855c6bdc46deb3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 7 Nov 2024 15:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=BA=E5=BA=93=E6=97=B6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java index 0f44851..06f31d0 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java @@ -137,6 +137,11 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { 0 ); + // 校验库中数量是否足够 + if (baseKnifeList.size() < wmsOutPlanDetail.getPlannedQuantity()) { + throw new RuntimeException("库存数量不足以支持本次出库"); + } + // 更新出库计划明细 this.wmsOutPlanMapper.updateWmsOutPlanDetailRealQuantityAndDetailStateByWmsOutPlanDetailId( baseKnifeList.size(),