no message

main
HUOJIN\92525 2026-01-23 20:20:25 +08:00
parent bbd2642acc
commit d1a01af4ca
2 changed files with 3 additions and 4 deletions

View File

@ -80,6 +80,8 @@ public class InventoryLogServiceImpl extends ServiceImpl<InventoryLogMapper, Inv
inventoryLog.setToPointId(dstPointId);
//实际数量不变
inventoryLog.setChangeQty(BigDecimal.ZERO);
inventoryLog.setBeforeQty(inventory.getQuantity());
inventoryLog.setAfterQty(BigDecimalUtil.add(inventory.getQuantity(), BigDecimal.ZERO, 0));
inventoryLog.setBeforeAllocatedQty(BigDecimalUtil.subtract(inventory.getQueuedQty(), AllocatedQty, 0));
inventoryLog.setAfterAllocatedQty(inventory.getQueuedQty());
addInventoryLog(inventoryLog);

View File

@ -773,9 +773,7 @@ public class AllocateProcessor {
*/
private void updateInventoryAllocation(Inventory inventory, BigDecimal allocateQty,
List<Inventory> 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();