liyong
2026-04-30 bce524765486d9cb726f37692c8647e1a5e7afcb
src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java
@@ -17,6 +17,8 @@
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@Component
public class StockUtils {
@@ -149,11 +151,14 @@
    }
    public void deleteStockOutRecord(Long recordId, String recordType) {
        StockOutRecord one = stockOutRecordService.getOne(new QueryWrapper<StockOutRecord>()
        List<StockOutRecord> one = stockOutRecordService.list(new QueryWrapper<StockOutRecord>()
                .lambda().eq(StockOutRecord::getRecordId, recordId)
                .eq(StockOutRecord::getRecordType, recordType));
        if (ObjectUtils.isNotEmpty(one)) {
            stockOutRecordService.batchDelete(Collections.singletonList(one.getId()));
            List<Long> idList = one.stream()
                    .map(StockOutRecord::getId)
                    .collect(Collectors.toList());
            stockOutRecordService.batchDelete(idList);
        }
    }
}