liyong
2026-05-11 5419a78b26e0005d65d53ad77ab437e6b5e6f712
src/main/java/com/ruoyi/stock/service/impl/StockInventoryCheckPlanServiceImpl.java
@@ -119,6 +119,8 @@
            return R.fail("盘点单不存在");
        }
        for (StockInventoryCheckItem item : stockInventoryCheckPlanDto.getCheckItems()) {
            //更新库存锁定状态
            stockInventoryService.updateLocked(item.getProductModelId(),item.getBatchNo(), false);
            if (item.getDifferenceQuantity() == null || item.getDifferenceQuantity().compareTo(BigDecimal.ZERO) == 0) {
                continue;
            }
@@ -139,8 +141,6 @@
                //直接审核通过
                stockOutRecordService.batchApprove(Collections.singletonList(stock.getId()), 1);
            }
            //更新库存锁定状态
            stockInventoryService.updateLocked(stockInventoryDto.getProductModelId(),stockInventoryDto.getBatchNo(), true);
        }
        stockInventoryCheckItemMapper.updateById(stockInventoryCheckPlanDto.getCheckItems());
        plan.setStatus(2);