From 09361264d6d87b8ce57b61a26c5507dbc0a01031 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 28 八月 2026 23:16:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_建诚恒商贸' into dev_天津_玮苓乐器

---
 src/main/resources/mapper/stock/StockOutRecordMapper.xml |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockOutRecordMapper.xml b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
index 202de6b..b36f443 100644
--- a/src/main/resources/mapper/stock/StockOutRecordMapper.xml
+++ b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -62,7 +62,7 @@
                 and p.id in (select id from product_tree)
             </if>
         </where>
-        order by sor.id desc
+        order by sor.create_time desc
     </select>
     <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData">
         SELECT
@@ -89,7 +89,7 @@
                 and sor.record_type = #{params.recordType}
             </if>
         </where>
-        order by sor.id desc
+        order by sor.outbound_batches desc
     </select>
 
     <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo">
@@ -100,6 +100,7 @@
         sor.create_time as shippingDate,
         p.product_name,
         pm.model as specification_model,
+        slp.tax_rate,
         sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount,
         s.shipping_no,
         sl.sales_contract_no
@@ -116,6 +117,9 @@
         <if test="req.customerName != null and req.customerName != ''">
             AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%')
         </if>
+        <if test="req.customerId != null ">
+            AND sl.customer_id = #{req.customerId}
+        </if>
         <if test="req.startDate != null and req.endDate != null">
             AND s.shipping_date BETWEEN #{req.startDate} AND #{req.endDate}
         </if>

--
Gitblit v1.9.3