From a372d79cd899979322d950e91044fc21171f7fd0 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 11 五月 2026 16:49:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro

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

diff --git a/src/main/resources/mapper/stock/StockOutRecordMapper.xml b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
index 8615294..b4619d8 100644
--- a/src/main/resources/mapper/stock/StockOutRecordMapper.xml
+++ b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -86,4 +86,33 @@
         order by sor.id desc
     </select>
 
+    <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.SalesOutboundVo">
+    SELECT
+        sor.id,
+        sor.outbound_batches,
+        sl.customer_name,
+        s.shipping_date,
+        p.product_name,
+        slp.specification_model,
+        sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount,
+        s.shipping_no,
+        sl.sales_contract_no
+        FROM stock_out_record sor
+        left join shipping_info s on sor.record_id = s.id
+        LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.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
+        WHERE s.status='宸插彂璐�' and sor.record_type='13'
+        <if test="req.outboundBatches != null and req.outboundBatches != ''">
+            AND sor.outbound_batches LIKE CONCAT('%',#{req.outboundBatches},'%')
+        </if>
+        <if test="req.customerName != null and req.customerName != ''">
+            AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%')
+        </if>
+        <if test="req.startDate != null and req.endDate != null">
+            AND s.shipping_date BETWEEN #{startDate} AND #{endDate}
+        </if>
+        order by sor.id DESC
+    </select>
 </mapper>

--
Gitblit v1.9.3