From bfccc95235a191ee3f9349fc761fa0ac1217dfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E4=B8=9C?= <17363321594@163.com> Date: Tue, 14 Oct 2025 15:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=85=B7=E7=AE=A1=E7=90=86=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=A6=81=E6=B1=82=E4=BF=AE=E6=AD=A32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shgx/system/service/impl/mold/MoldInfoServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shgx-system/src/main/java/com/shgx/system/service/impl/mold/MoldInfoServiceImpl.java b/shgx-system/src/main/java/com/shgx/system/service/impl/mold/MoldInfoServiceImpl.java index f807fee..1d4f528 100644 --- a/shgx-system/src/main/java/com/shgx/system/service/impl/mold/MoldInfoServiceImpl.java +++ b/shgx-system/src/main/java/com/shgx/system/service/impl/mold/MoldInfoServiceImpl.java @@ -188,10 +188,11 @@ public class MoldInfoServiceImpl implements IMoldInfoService } } else { - if (location.getCapacity() == 0) { - location.setCapacity(0L); + if (location.getCurrentQuantity() == 0) { + location.setCurrentQuantity(0L); + } else { + location.setCurrentQuantity(location.getCurrentQuantity() - 1); } - location.setCurrentQuantity(location.getCurrentQuantity() - 1); if (!location.getCapacity().equals(location.getCurrentQuantity())) { location.setLocationStatus('1'); }