From feb86efc4e8a8d2da00e4832bcd81825726617bf Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 04 六月 2026 13:48:25 +0800
Subject: [PATCH] feat(iot): 物联设备接口新增存放位置字段

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

diff --git a/src/main/resources/mapper/sales/ShippingInfoMapper.xml b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
index aa73dac..161b384 100644
--- a/src/main/resources/mapper/sales/ShippingInfoMapper.xml
+++ b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -19,15 +19,18 @@
         s.update_user,
         s.tenant_id,
         sl.sales_contract_no,
+        s.outbound_batches,
         pm.model as specification_model,
         pm.unit,
         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 +50,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 +78,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 +104,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