From 8dce4b82eeece943b56182eeebc1c9332625924c Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期三, 04 六月 2025 14:25:16 +0800
Subject: [PATCH] 付款流水功能开发
---
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 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 667df89..624bc1a 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -47,8 +47,6 @@
private PurchaseLedgerMapper purchaseLedgerMapper;
- private InvoicePurchaseMapper invoicePurchaseMapper;
-
private SalesLedgerMapper salesLedgerMapper;
private SupplierManageMapper supplierManageMapper;
@@ -83,7 +81,8 @@
List<PaymentRegistration> paymentRegistrations = paymentRegistrationMapper.selectList(new QueryWrapper<PaymentRegistration>()
.eq("ticket_registration_id", registrationDto.getTicketRegistrationId()));
BigDecimal total = paymentRegistrations.stream().map(PaymentRegistration::getCurrentPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
- registrationDto.setUnPaymentAmount(registrationDto.getInvoiceAmount().subtract(total));
+ BigDecimal invoiceAmount = (null != registrationDto.getInvoiceAmount())? registrationDto.getInvoiceAmount() : BigDecimal.ZERO;
+ registrationDto.setUnPaymentAmount(invoiceAmount.subtract(total));
}
return list;
}
@@ -344,6 +343,17 @@
return result;
}
+ /**
+ * 鏌ヨ浠樻鐧昏鍒楄〃
+ *
+ * @param paymentRegistrationDto 浠樻鐧昏
+ * @return 浠樻鐧昏闆嗗悎
+ */
+ @Override
+ public List<PaymentRegistrationDto> paymentHistoryList(PaymentRegistrationDto paymentRegistrationDto) {
+ return paymentRegistrationMapper.paymentHistoryList(paymentRegistrationDto);
+ }
+
// 鎵归噺鏌ヨ閲囪喘鍙拌处锛堝綋鏈堬級
private Map<Long, List<PurchaseLedger>> batchQueryPurchaseLedgers(List<Long> supplierIds, LocalDate startDate, LocalDate endDate) {
LambdaQueryWrapper<PurchaseLedger> query = new LambdaQueryWrapper<>();
--
Gitblit v1.9.3