From 41fbb4ddbecc9eb4368a8eab1190663ae49f8ab9 Mon Sep 17 00:00:00 2001 From: gaowdong Date: Fri, 11 Jul 2025 16:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E9=93=BE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/ims/service/impl/ImsIntoInventoryServiceImpl.java | 3 +++ .../core/ims/service/impl/ImsOutInventoryServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsIntoInventoryServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsIntoInventoryServiceImpl.java index 78083ca..c80d4dc 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsIntoInventoryServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsIntoInventoryServiceImpl.java @@ -104,6 +104,9 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService if(Objects.isNull(imsIntoInventoryVO)) { throw new ServiceException("入库单不存在"); } + if(Long.valueOf(2).equals(imsIntoInventoryVO.getStatus())) { + throw new ServiceException("入库单已入库"); + } ImsIntoInventory imsIntoInventory = new ImsIntoInventory(); BeanUtils.copyProperties(imsIntoInventoryUpdate, imsIntoInventory); imsIntoInventory.setUpdateTime(DateUtils.getNowDate()); diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsOutInventoryServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsOutInventoryServiceImpl.java index 45bcf3b..d1b6f49 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsOutInventoryServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/ImsOutInventoryServiceImpl.java @@ -123,6 +123,9 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService if(Objects.isNull(imsOutInventoryVO)) { throw new ServiceException("出库单不存在"); } + if(Long.valueOf(2).equals(imsOutInventoryVO.getStatus())) { + throw new ServiceException("该出库单已出库"); + } ImsOutInventory imsOutInventory = new ImsOutInventory(); BeanUtils.copyProperties(imsOutInventoryUpdate, imsOutInventory); imsOutInventory.setUpdateTime(DateUtils.getNowDate());