From c23f58f66ec6acd369dcb4676c63d246f78e0ba7 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 17 七月 2026 10:56:19 +0800
Subject: [PATCH] fix: 图片预览链接修改
---
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 6b48bbe..f988bed 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -30,7 +30,7 @@
pm.model as specification_model,
pm.unit as unit,
CASE
- WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >0 THEN 1
+ WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >= IFNULL(T1.quantity, 0) THEN 1
ELSE 0
END as has_sufficient_stock,
(IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0)) as no_quantity,
@@ -131,7 +131,7 @@
SUM(slp.tax_inclusive_total_price) AS purchaseAmount,
COUNT(DISTINCT slp.sales_ledger_id) AS purchaseTimes,
<!-- 骞冲潎鍗曚环 = 鎬婚噰璐噾棰�/鎬婚噰璐暟閲忥紝淇濈暀2浣嶅皬鏁帮紝閬垮厤闄�0 -->
- ROUND(IF(SUM(slp.quantity) = 0, 0, SUM(slp.tax_inclusive_total_price) / SUM(slp.quantity)), 2) AS averagePrice,
+ ROUND(IF(SUM(slp.quantity) = 0, 0, SUM(slp.tax_inclusive_total_price) / SUM(slp.quantity)), 6) AS averagePrice,
<!-- 璇ヤ骇鍝佸ぇ绫讳笅鏈�鍚庝竴涓綍鍏ユ棩鏈燂紙鍙栧彴璐︿富琛ㄧ殑entry_date锛� -->
MAX(sl.entry_date) AS entryDate,
COALESCE(NULLIF(SUM(t1.return_quantity), 0), 0) AS return_quantity,
--
Gitblit v1.9.3