From 8e52d3e600ff49869cc612fd9bf1cc64ac304f50 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 30 五月 2026 17:20:48 +0800
Subject: [PATCH] feat(sales): 添加销售报价单ID查询条件支持

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

diff --git a/src/main/resources/mapper/sales/ShippingInfoMapper.xml b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
index aa73dac..9021eb4 100644
--- a/src/main/resources/mapper/sales/ShippingInfoMapper.xml
+++ b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -24,10 +24,12 @@
         p.product_name,
         sl.customer_name,
         spd.totalQuantity,
-        sor.outboundBatches
+        sor.outboundBatches,
+        pl.purchase_contract_number
         FROM shipping_info s
         LEFT JOIN (select shipping_info_id,sum(quantity) totalQuantity from shipping_product_detail GROUP BY shipping_info_id) spd ON spd.shipping_info_id = s.id
         LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
+        LEFT JOIN purchase_ledger pl ON sl.purchase_ledger_id = pl.id
         LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1
         left join product_model pm on slp.product_model_id = pm.id
         left join product p on pm.product_id = p.id
@@ -47,6 +49,9 @@
         </if>
         <if test="req.expressNumber != null and req.expressNumber != ''">
             AND s.express_number LIKE CONCAT('%',#{req.expressNumber},'%')
+        </if>
+        <if test="req.customerId != null">
+            AND sl.customer_id = #{req.customerId}
         </if>
         order by create_time DESC
     </select>
@@ -72,6 +77,7 @@
             slp.product_category,
             slp.specification_model,
             slp.unit,
+            slp.product_model_id,
             sor.outbound_batches,
             sor.stock_out_num,
             sor.batch_no,
@@ -97,6 +103,7 @@
                 si.id = #{shippingId}
             </if>
         </where>
+        order by sor.id
     </select>
     <select id="getShippingInfoByCustomerName" resultType="com.ruoyi.sales.pojo.ShippingInfo">
         select * from shipping_info si

--
Gitblit v1.9.3