From d8c86797adaef6c416efae16586f350ae77bde4b Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期六, 12 九月 2026 12:43:08 +0800
Subject: [PATCH] feat: 库存入库/出库字段全链路、采购台账申请提交时间、储罐租客信息、油库储罐模块
---
src/main/resources/mapper/basic/CustomerMapper.xml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerMapper.xml b/src/main/resources/mapper/basic/CustomerMapper.xml
index 75327ef..037cc23 100644
--- a/src/main/resources/mapper/basic/CustomerMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerMapper.xml
@@ -128,7 +128,7 @@
c.customer_name,
T1.contractAmounts AS contractAmounts,
IFNULL(T2.receiptPaymentAmount, 0) AS receiptPaymentAmount,
- T1.contractAmounts - (IFNULL(T2.receiptPaymentAmount, 0) - IFNULL(T4.returnAmount, 0)) AS receiptableAmount,
+ T1.contractAmounts - IFNULL(T2.receiptPaymentAmount, 0) - IFNULL(T4.returnAmount, 0) AS receiptableAmount,
IFNULL(T4.returnAmount, 0) AS returnAmount
from (select customer_id, sum(contract_amount) as contractAmounts from sales_ledger group by customer_id) T1
left join (select customer_id, sum(collection_amount) as receiptPaymentAmount from account_sales_collection group by customer_id) T2 on T1.customer_id = T2.customer_id
@@ -142,7 +142,7 @@
where rm.status=1
group by sl.customer_id
) T4 on T4.customer_id=T1.customer_id
- left join customer c on T1.customer_id = c.id
+ inner join customer c on T1.customer_id = c.id
<where>
<if test="customerName!=null and customerName!=''">
AND c.customer_name LIKE CONCAT('%', #{customerName}, '%')
@@ -157,7 +157,7 @@
sl.execution_date,
sl.contract_amount AS contract_amount,
IFNULL(T1.receiptPaymentAmount, 0) AS receiptPaymentAmount,
- sl.contract_amount - (IFNULL(T1.receiptPaymentAmount, 0) - IFNULL(T3.returnAmount, 0)) AS receiptableAmount,
+ sl.contract_amount - IFNULL(T1.receiptPaymentAmount, 0) - IFNULL(T3.returnAmount, 0) AS receiptableAmount,
IFNULL(T3.returnAmount, 0) AS returnAmount
from sales_ledger sl
left join (
--
Gitblit v1.9.3