From bcb36b7dd1f5727670ab52c65af85f8b29394ca9 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 12 三月 2026 11:32:00 +0800
Subject: [PATCH] yys 修改供应商往来bug
---
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java | 13 +++++++------
src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
index 0d2e349..13a7f4a 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -380,13 +380,14 @@
// 搴斾粯鎬婚噾棰濋噾棰濊绠�
BigDecimal amountTotal = BigDecimal.ZERO;
if(CollectionUtils.isNotEmpty(paymentRecordList)) {
+ // 鏍稿績鍒嗙粍姹傚拰閫昏緫
Map<LocalDate, List<PaymentHistoryRecordVo>> dateListMap = paymentRecordList.stream().collect(
- Collectors.groupingBy(
- PaymentHistoryRecordVo::getHappenTime,
- LinkedHashMap::new,
- Collectors.toList()
- )
- );
+ Collectors.groupingBy(
+ PaymentHistoryRecordVo::getHappenTime,
+ LinkedHashMap::new,
+ Collectors.toList()
+ )
+ );
for (LocalDate localDate : dateListMap.keySet()) {
BigDecimal currentPaymentAmount = BigDecimal.ZERO;
BigDecimal invoiceAmount = BigDecimal.ZERO;
diff --git a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
index d8b9241..d0e241a 100644
--- a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
+++ b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
@@ -129,7 +129,7 @@
SELECT * FROM(
SELECT
T1.issue_date AS happenTime,
- IFNULL(T1.invoice_amount,0) AS invoiceAmount,
+ sum(IFNULL(T1.invoice_amount,0)) AS invoiceAmount,
'1' AS type,
0 AS currentPaymentAmount
FROM
@@ -141,7 +141,7 @@
payment_date AS happenTime,
0 AS invoiceAmount,
'0' AS type,
- current_payment_amount AS currentPaymentAmount
+ sum(ifnull(current_payment_amount,0)) AS currentPaymentAmount
FROM payment_registration
WHERE supplier_id = #{supplierId}
) T1
--
Gitblit v1.9.3