From 03bb698cf9156b010602891cc8abcf5f12b498c9 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 15 一月 2026 09:38:30 +0800
Subject: [PATCH] yys 供应商往来
---
src/main/java/com/ruoyi/purchase/dto/PaymentRegistrationDto.java | 6 ++++++
src/main/java/com/ruoyi/purchase/dto/PaymentLedgerDto.java | 2 ++
src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml | 4 ++--
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/dto/PaymentLedgerDto.java b/src/main/java/com/ruoyi/purchase/dto/PaymentLedgerDto.java
index dc97a72..11e2f46 100644
--- a/src/main/java/com/ruoyi/purchase/dto/PaymentLedgerDto.java
+++ b/src/main/java/com/ruoyi/purchase/dto/PaymentLedgerDto.java
@@ -8,6 +8,8 @@
// 渚涘簲鍟嗗悕绉�
private String supplierName;
+ private Long supplierId;
+
// 寮�濮嬫棩鏈�
private String startDate;
diff --git a/src/main/java/com/ruoyi/purchase/dto/PaymentRegistrationDto.java b/src/main/java/com/ruoyi/purchase/dto/PaymentRegistrationDto.java
index 2561c8d..8d56648 100644
--- a/src/main/java/com/ruoyi/purchase/dto/PaymentRegistrationDto.java
+++ b/src/main/java/com/ruoyi/purchase/dto/PaymentRegistrationDto.java
@@ -32,6 +32,12 @@
// 寰呬粯娆鹃噾棰�
private BigDecimal unPaymentAmount;
+ // 浠樻閲戦
+ private BigDecimal paymentAmount;
+
+ // 搴斾粯閲戦
+ private BigDecimal payableAmount;
+
// 绋庣巼
private String taxRate;
diff --git a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
index 70f7543..b8defca 100644
--- a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
+++ b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
@@ -191,7 +191,7 @@
IFNULL( SUM(T2.current_payment_amount) , 0 ) AS paymentAmount,
IFNULL((IFNULL(SUM(contract_amount),0) - IFNULL(SUM(T2.current_payment_amount),0)),0) AS payableAmount
FROM purchase_ledger T1
- LEFT JOIN payment_registration T2 ON T1.id = T2.sales_ledger_id
+ LEFT JOIN payment_registration T2 ON T1.id = T2.purchase_ledger_id
<where>
<if test="req.supplierName != null and req.supplierName != '' ">
T1.supplier_name LIKE CONCAT ('%',#{req.supplierName},'%')
@@ -209,7 +209,7 @@
T1.purchase_contract_number,
T2.payment_date
FROM purchase_ledger T1
- LEFT JOIN payment_registration T2 ON T1.id = T2.sales_ledger_id
+ LEFT JOIN payment_registration T2 ON T1.id = T2.purchase_ledger_id
<where>
T1.supplier_id = #{req.supplierId}
<if test="req.supplierName != null and req.supplierName != '' ">
--
Gitblit v1.9.3