From 9f1e1bbdfa9d8d3b747a50ea2f2a3432c7c06639 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 14 八月 2025 18:07:00 +0800
Subject: [PATCH] 修改销售管理-回款登记,金额不许超过发票金额
---
src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerRecordServiceImpl.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerRecordServiceImpl.java b/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerRecordServiceImpl.java
index 0dbdc71..e9b191c 100644
--- a/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/measuringinstrumentledger/service/impl/MeasuringInstrumentLedgerRecordServiceImpl.java
@@ -35,6 +35,7 @@
import java.util.Date;
import java.util.List;
import java.util.UUID;
+import java.util.stream.Collectors;
/**
* @author :yys
@@ -64,7 +65,8 @@
IPage<MeasuringInstrumentLedgerRecord> measuringInstrumentLedgerRecordIPage = measuringInstrumentLedgerRecordMapper.listPage(page, measuringInstrumentLedgerRecord);
measuringInstrumentLedgerRecordIPage.getRecords().forEach(item -> {
LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>();
- salesLedgerFileWrapper.eq(CommonFile::getCommonId, item.getId());
+ salesLedgerFileWrapper.eq(CommonFile::getCommonId, item.getId())
+ .eq(CommonFile::getType, FileNameType.MEASURINGRecord.getValue());
List<CommonFile> commonFiles = commonFileMapper.selectList(salesLedgerFileWrapper);
item.setCommonFiles(commonFiles);
});
@@ -88,14 +90,12 @@
if(!measuringInstrumentLedgerRecord1.getValid().equals(measuringInstrumentLedgerRecord.getValid())){
MeasuringInstrumentLedger measuringInstrumentLedger = measuringInstrumentLedgerMapper.selectById(measuringInstrumentLedgerRecord1.getMeasuringInstrumentLedgerId());
if(measuringInstrumentLedger != null){
+ measuringInstrumentLedger.setValid(measuringInstrumentLedgerRecord.getValid());
measuringInstrumentLedger.setNextDate(new Date(measuringInstrumentLedger.getMostDate().getTime() + measuringInstrumentLedgerRecord.getValid() * 24 * 60 * 60 * 1000L));
}
measuringInstrumentLedgerMapper.updateById(measuringInstrumentLedger);
}
- // 鍒犻櫎闄勪欢
- LambdaQueryWrapper<CommonFile> delWrapper = new LambdaQueryWrapper<>();
- delWrapper.eq(CommonFile::getCommonId, measuringInstrumentLedgerRecord.getId());
- commonFileMapper.delete(delWrapper);
+ measuringInstrumentLedgerRecordMapper.updateById(measuringInstrumentLedgerRecord);
// 璁板綍闄勪欢缁戝畾
migrateTempFilesToFormal(measuringInstrumentLedgerRecord.getId(), measuringInstrumentLedgerRecord.getTempFileIds(), FileNameType.MEASURINGRecord.getValue());
return true;
--
Gitblit v1.9.3