diff --git a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java index 38926b5..5e13866 100644 --- a/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java +++ b/cpte-boot-module/cpte-module-wms/src/main/java/org/cpte/modules/inventoryLog/service/impl/InventoryLogServiceImpl.java @@ -80,6 +80,8 @@ public class InventoryLogServiceImpl extends ServiceImpl updateToInventory) { - BigDecimal quantity = BigDecimalUtil.add(inventory.getQuantity(), allocateQty, 0); BigDecimal queuedQty = BigDecimalUtil.add(inventory.getQueuedQty(), allocateQty, 0); - inventory.setQuantity(quantity); inventory.setQueuedQty(queuedQty); inventory.setStatus(InventoryStatusEnum.ALLOCATED.getValue()); updateToInventory.add(inventory); @@ -852,8 +850,7 @@ public class AllocateProcessor { // 判断是否整托分配 BigDecimal availableQty = BigDecimalUtil.subtract(inventory.getQuantity(), inventory.getQueuedQty(), 0); - Integer izAll = allocateQty.compareTo(availableQty) >= 0 ? 0 : 1; - + Integer izAll = availableQty.compareTo(BigDecimal.ZERO) <=0 ? 0 : 1; // 目标库位 //Point toPoint = inventoryScore.getOutPoint();