增加出库时数量校验

This commit is contained in:
刘名喜 2024-11-07 15:47:11 +08:00
parent 83c5a803fb
commit 3060ff4c5e

View File

@ -137,6 +137,11 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
0
);
// 校验库中数量是否足够
if (baseKnifeList.size() < wmsOutPlanDetail.getPlannedQuantity()) {
throw new RuntimeException("库存数量不足以支持本次出库");
}
// 更新出库计划明细
this.wmsOutPlanMapper.updateWmsOutPlanDetailRealQuantityAndDetailStateByWmsOutPlanDetailId(
baseKnifeList.size(),