From 8c65f898ed6e5b0c7a94c792c4562f6ec831dccd Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 07 十一月 2026 08:50:53 +0800
Subject: [PATCH] feat: 完善质检、生产、销售、财务与人事模块并接入审批流程
---
yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpFinancePaymentMapper.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpFinancePaymentMapper.java b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpFinancePaymentMapper.java
index 84657d2..a8781d5 100644
--- a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpFinancePaymentMapper.java
+++ b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/dal/mysql/finance/ErpFinancePaymentMapper.java
@@ -73,14 +73,20 @@
* @return key 涓烘潵绁ㄧ紪鍙凤紝value 涓哄凡浠樻閲戦
*/
default Map<Long, BigDecimal> selectPaymentPriceMapByInvoiceId(Collection<Long> invoiceIds) {
+ return selectPaymentPriceMapByInvoiceIdAndStatus(invoiceIds, List.of(
+ ErpAuditStatus.PROCESS.getStatus(), ErpAuditStatus.APPROVING.getStatus(),
+ ErpAuditStatus.APPROVE.getStatus()));
+ }
+
+ default Map<Long, BigDecimal> selectPaymentPriceMapByInvoiceIdAndStatus(
+ Collection<Long> invoiceIds, Collection<Integer> statuses) {
if (CollUtil.isEmpty(invoiceIds)) {
return Collections.emptyMap();
}
// SQL sum 鏌ヨ
List<Map<String, Object>> result = selectMaps(new QueryWrapper<ErpFinancePaymentDO>()
.select("invoice_id, SUM(payment_price) AS total_payment_price")
- .in("status", ErpAuditStatus.PROCESS.getStatus(), // 鏈鏍� + 瀹℃壒涓� + 宸插鏍�
- ErpAuditStatus.APPROVING.getStatus(), ErpAuditStatus.APPROVE.getStatus())
+ .in("status", statuses)
.groupBy("invoice_id")
.in("invoice_id", invoiceIds));
// 鑾峰緱閲戦
@@ -115,4 +121,4 @@
.inIfPresent(ErpFinancePaymentDO::getStatus, statuses));
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3