From d476e7d1595e131f2bb7bb1a62c00fa3e82fb0a7 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期一, 19 十月 2026 17:23:30 +0800
Subject: [PATCH] feat: 添加员工工资明细中的请假、缺勤、迟到、早退次数及手动扣工资字段
---
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 6059825..e5b00a1 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -80,6 +80,7 @@
AND sir.record_id = slp.sales_ledger_id
AND (
(sir.batch_no IS NOT NULL AND sir.batch_no LIKE CONCAT('%-', slp.id))
+ OR (sir.batch_no IS NOT NULL AND sir.batch_no LIKE CONCAT('%-', slp.product_model_id, '-%'))
OR (sir.batch_no IS NULL AND sir.product_model_id = slp.product_model_id)
)
WHERE sir.approval_status = 1
@@ -151,8 +152,8 @@
SUM(slp.quantity) AS purchaseNum,
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,
+ <!-- 骞冲潎鍗曚环 = 鎬婚噰璐噾棰�/鎬婚噰璐暟閲忥紝淇濈暀6浣嶅皬鏁帮紝閬垮厤闄�0 -->
+ 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