From ea25a4d9db55901a861b4ff22737fcf24c7bb26c Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 29 四月 2026 10:58:39 +0800
Subject: [PATCH] 优化共享客户以及列表查询

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

diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 712124a..0f014e9 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -99,6 +99,10 @@
             <if test="req.status != null and req.status ">
                 AND slp.pending_tickets_total &gt; 0
             </if>
+            <if test="req.supplierNameOrContractNo != null and req.supplierNameOrContractNo != ''">
+                AND (sl.supplier_name like concat('%',#{req.supplierNameOrContractNo},'%') or
+                sl.purchase_contract_number like concat('%',#{req.supplierNameOrContractNo},'%'))
+            </if>
         </where>
         order by slp.register_date desc
     </select>
@@ -131,9 +135,7 @@
         <if test="req.productCategory != null and req.productCategory != ''">
             AND slp.product_category = #{req.productCategory}
         </if>
-        <!-- 鎸変骇鍝佸ぇ绫诲垎缁勮仛鍚� -->
-        GROUP BY slp.product_category
-        <!-- 鎸変骇鍝佸ぇ绫绘帓搴� -->
+        GROUP BY slp.product_category, slp.specification_model, sl.supplier_name
         ORDER BY slp.product_category
     </select>
     <select id="selectProductBomStructure" resultType="com.ruoyi.sales.dto.LossProductModelDto">

--
Gitblit v1.9.3