From 24caea6a373d78bebdc0d400c96778d2776c4b3b Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 五月 2026 16:08:22 +0800
Subject: [PATCH] feat(account): 添加是否生成对账单字段到采购和销售相关视图
---
src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml | 4 +++-
src/main/java/com/ruoyi/account/bean/vo/sales/AccountSalesCollectionVo.java | 3 +++
src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml | 6 +++++-
src/main/java/com/ruoyi/account/bean/vo/purchase/AccountPurchasePaymentVo.java | 3 +++
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/account/bean/vo/purchase/AccountPurchasePaymentVo.java b/src/main/java/com/ruoyi/account/bean/vo/purchase/AccountPurchasePaymentVo.java
index 9a515de..367e17a 100644
--- a/src/main/java/com/ruoyi/account/bean/vo/purchase/AccountPurchasePaymentVo.java
+++ b/src/main/java/com/ruoyi/account/bean/vo/purchase/AccountPurchasePaymentVo.java
@@ -27,5 +27,8 @@
@Excel(name = "閾惰璐﹀彿")
private String bankAccountNum;
+ @Schema(description = "鏄惁鐢熸垚浜嗗璐﹀崟")
+ private boolean isAccountStatemen;
+
}
diff --git a/src/main/java/com/ruoyi/account/bean/vo/sales/AccountSalesCollectionVo.java b/src/main/java/com/ruoyi/account/bean/vo/sales/AccountSalesCollectionVo.java
index 2463143..bde5fe0 100644
--- a/src/main/java/com/ruoyi/account/bean/vo/sales/AccountSalesCollectionVo.java
+++ b/src/main/java/com/ruoyi/account/bean/vo/sales/AccountSalesCollectionVo.java
@@ -19,5 +19,8 @@
@Excel(name = "鍑哄簱鍗曞彿")
private String outboundBatches;
+ @Schema(description = "鏄惁鐢熸垚浜嗗璐﹀崟")
+ private boolean isAccountStatemen;
+
}
diff --git a/src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml b/src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml
index 380548e..89a3681 100644
--- a/src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml
+++ b/src/main/resources/mapper/account/purchase/AccountPurchasePaymentMapper.xml
@@ -24,10 +24,12 @@
sm.supplier_name,
sm.bank_account_num,
sm.bank_account_name,
- apa.invoice_application_no AS invoiceApplicationNo
+ apa.invoice_application_no AS invoiceApplicationNo,
+ if(asd.receipt_number is not null, true, false) as isAccountStatemen
from account_purchase_payment app
left join supplier_manage sm on app.supplier_id = sm.id
left join account_payment_application apa on app.account_payment_application_id=apa.id
+ left join account_statement_details asd on app.payment_number = asd.receipt_number
<where>
<if test="req.supplierId != null">
AND app.supplier_id = #{req.supplierId}
diff --git a/src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml b/src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml
index c3d6b00..4ad55d4 100644
--- a/src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml
+++ b/src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml
@@ -20,13 +20,17 @@
</resultMap>
<select id="listPageAccountSalesCollection"
resultType="com.ruoyi.account.bean.vo.sales.AccountSalesCollectionVo">
- select * from (select ascc.*,
+ select
+ A.* ,
+ if(asd.receipt_number is not null, true, false) as isAccountStatemen
+ from (select ascc.*,
c.customer_name,
GROUP_CONCAT(sour.outbound_batches SEPARATOR ',') AS outboundBatches
from account_sales_collection ascc
left join customer c on ascc.customer_id = c.id
left join stock_out_record sour on FIND_IN_SET(sour.id, ascc.stock_out_record_ids) > 0
GROUP BY ascc.id)A
+ left join account_statement_details asd on A.collection_number = asd.receipt_number
<where>
<if test="req.customerId != null">
AND A.customer_id = #{req.customerId}
--
Gitblit v1.9.3