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'); }