From 54a351c35dd08521efcd71d7c846478deb46c888 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 08 六月 2026 18:09:53 +0800
Subject: [PATCH] feat(production): 添加生产作业任务分页查询功能
---
src/main/resources/mapper/basic/CustomerMapper.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerMapper.xml b/src/main/resources/mapper/basic/CustomerMapper.xml
index 8117c66..25b98fa 100644
--- a/src/main/resources/mapper/basic/CustomerMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerMapper.xml
@@ -118,7 +118,7 @@
left join (
SELECT
sl.customer_id,
- sum(sor.stock_out_num * slp.tax_inclusive_unit_price) as outboundAmount
+ sum(sor.stock_out_num * slp.tax_inclusive_unit_price / IFNULL(NULLIF(slp.single_quantity, 0), 1)) as outboundAmount
FROM stock_out_record sor
LEFT join shipping_info s on sor.record_id = s.id
LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
@@ -169,7 +169,7 @@
left join (
SELECT
sl.id,
- sum(sor.stock_out_num * slp.tax_inclusive_unit_price) as outboundAmount
+ sum(sor.stock_out_num * slp.tax_inclusive_unit_price / IFNULL(NULLIF(slp.single_quantity, 0), 1)) as outboundAmount
FROM stock_out_record sor
left join shipping_info s on sor.record_id = s.id
LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
--
Gitblit v1.9.3