liding
2026-04-15 6f68532e0612ea1b4384610b4da2fb5bff8433c5
src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java
@@ -118,7 +118,6 @@
                .eq(StockInRecord::getRecordType, recordType));
        if (ObjectUtils.isNotEmpty(one)) {
            stockInRecordService.batchDelete(Collections.singletonList(one.getId()));
        }
        //将库存减回来
        StockInventoryDto stockInventoryDto = new StockInventoryDto();
        stockInventoryDto.setRecordId(recordId);
@@ -126,13 +125,13 @@
        stockInventoryDto.setQualitity(one.getStockInNum());
        stockInventoryMapper.updateSubtractStockInventory((stockInventoryDto));
    }
    }
    public void deleteStockOutRecord(Long recordId, String recordType) {
        StockOutRecord one = stockOutRecordService.getOne(new QueryWrapper<StockOutRecord>()
                .lambda().eq(StockOutRecord::getRecordId, recordId)
                .eq(StockOutRecord::getRecordType, recordType));
        if (ObjectUtils.isNotEmpty(one)) {
            stockOutRecordService.batchDelete(Collections.singletonList(one.getId()));
        }
        //将库存加回来
        StockInventoryDto stockInventoryDto = new StockInventoryDto();
        stockInventoryDto.setRecordId(recordId);
@@ -141,3 +140,4 @@
        stockInventoryMapper.updateAddStockInventory((stockInventoryDto));
    }
}
}