From 8a6174c4cea6ef88a792e7d51273ef7dd88eca8a Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 08 八月 2025 15:46:52 +0800
Subject: [PATCH] 调整查看详情
---
src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerServiceImpl.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerServiceImpl.java b/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerServiceImpl.java
index 80cba1e..d34a291 100644
--- a/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerServiceImpl.java
@@ -75,14 +75,15 @@
LambdaQueryWrapper<MeasuringInstrumentLedgerRecord> measuringInstrumentLedgerRecordLambdaQueryWrapper = new LambdaQueryWrapper<>();
measuringInstrumentLedgerRecordLambdaQueryWrapper.eq(MeasuringInstrumentLedgerRecord::getMeasuringInstrumentLedgerId, item.getId());
List<MeasuringInstrumentLedgerRecord> measuringInstrumentLedgerRecords = measuringInstrumentLedgerRecordMapper.selectList(measuringInstrumentLedgerRecordLambdaQueryWrapper);
+ List<Long> collect = new ArrayList<>();
if(!CollectionUtils.isEmpty(measuringInstrumentLedgerRecords)){
- List<Long> collect = measuringInstrumentLedgerRecords.stream().map(MeasuringInstrumentLedgerRecord::getId).collect(Collectors.toList());
- collect.add(item.getId());
- LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>();
- salesLedgerFileWrapper.in(CommonFile::getCommonId, collect);
- List<CommonFile> commonFiles = commonFileMapper.selectList(salesLedgerFileWrapper);
- item.setCommonFiles(commonFiles);
+ collect = measuringInstrumentLedgerRecords.stream().map(MeasuringInstrumentLedgerRecord::getId).collect(Collectors.toList());
}
+ collect.add(item.getId());
+ LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>();
+ salesLedgerFileWrapper.in(CommonFile::getCommonId, collect);
+ List<CommonFile> commonFiles = commonFileMapper.selectList(salesLedgerFileWrapper);
+ item.setCommonFiles(commonFiles);
});
return measuringInstrumentLedgerIPage;
--
Gitblit v1.9.3