From cc9e229da3a5d06be13e9ade5b5254d403f47c57 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 02 四月 2026 14:42:30 +0800
Subject: [PATCH] 生产报表相关接口

---
 src/main/resources/mapper/sales/SalesLedgerProductMapper.xml |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index d139950..e0f219f 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -110,6 +110,7 @@
         slp.product_category AS productCategory,
         slp.specification_model AS specificationModel,
         sl.supplier_name AS supplierName,
+        pm.material_code AS materialCode,
         SUM(slp.quantity) AS purchaseNum,
         SUM(slp.tax_inclusive_total_price) AS purchaseAmount,
         COUNT(DISTINCT slp.sales_ledger_id) AS purchaseTimes,
@@ -120,6 +121,9 @@
         FROM sales_ledger_product slp
         <!-- 鍏宠仈鍙拌处涓昏〃锛氳幏鍙栧綍鍏ユ棩鏈焑ntry_date -->
         LEFT JOIN purchase_ledger sl ON slp.sales_ledger_id = sl.id
+        <!-- 鍏宠仈浜у搧鍨嬪彿琛細鑾峰彇鏂欏彿material_code -->
+        LEFT JOIN product_model pm ON pm.id = slp.product_model_id
+        <!-- 閲囪喘鏃ユ湡绛涢�夛細鍙�夋潯浠� -->
         WHERE slp.type = 2 <!-- 鍥哄畾绛涢�夛細閲囪喘鍙拌处锛坱ype=2锛� -->
         <!-- 閲囪喘鏃ユ湡绛涢�夛細鍙�夋潯浠� -->
         <if test="req.entryDateStart != null and req.entryDateEnd != null">

--
Gitblit v1.9.3