fix(库存模块): 修复库存调整无法生效 bug

库存调整:修复所有商品调整点击确认之后未生效 bug
This commit is contained in:
rcx
2026-08-06 18:07:38 +08:00
parent 315d96063a
commit 57649dbdfa
@@ -269,10 +269,8 @@ public class InventoryAdjustmentRecordDomainService {
genInventoryStandingDetail(materialInventory, inventoryAdjustmentRecordDO.getAdjustQuantity());
}
// ===== 修复:末尾更新加 null 保护,且 adjustType=2 已即时落库,只在 adjustType=1 时再更新 =====
if (ObjectUtil.isNotNull(materialInventory)
&& inventoryAdjustmentRecordDO.getAdjustType() != null
&& inventoryAdjustmentRecordDO.getAdjustType().equals(1)) {
// ===== 修复:末尾更新加 null 保护 =====
if (ObjectUtil.isNotNull(materialInventory)) {
materialInventoryService.updateById(materialInventory);
}
Boolean insert = inventoryAdjustmentRecordService.insert(inventoryAdjustmentRecord);