From 5f73eb1fb9d04040fe6ba377d5ae582024429f2f Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 20 九月 2026 14:15:02 +0800
Subject: [PATCH] feat(sales): 添加客户交易详情中的付款金额字段

---
 src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml b/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
index 46925aa..55fefa7 100644
--- a/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ProcurementRecordOutMapper.xml
@@ -105,6 +105,8 @@
         t2.product_category,
         t1.id,
         t1.code,
+        t1.batch_no,
+        t5.shipping_no,
         t2.specification_model,
         t2.unit,
         t2.tax_rate,
@@ -120,6 +122,7 @@
         left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1
         left join sales_ledger t3 on t3.id = t2.sales_ledger_id
         left join procurement_record_storage t4 on t4.id = t1.procurement_record_storage_id
+        left join shipping_info t5 on t5.id = t1.shipping_info_id
         <where>
             and t1.type = 2
             <if test="req.customerName != null and req.customerName != ''">
@@ -180,6 +183,18 @@
         order by id desc
         limit 1
     </select>
+    <select id="listBatchNoByProductModelId" resultType="com.ruoyi.procurementrecord.bean.vo.BatchNoOptionVo">
+        select si.product_model_id,
+               si.batch_no,
+               (si.qualitity - ifnull(si.locked_quantity, 0)) as availableQuantity
+        from stock_inventory si
+        where si.product_model_id = #{productModelId}
+          and si.batch_no is not null
+          and si.batch_no != ''
+          and (si.qualitity - ifnull(si.locked_quantity, 0)) > 0
+        order by si.batch_no
+    </select>
+
     <select id="listPageBySemiProduct" resultType="com.ruoyi.procurementrecord.bean.dto.ProcurementRecordOutPageDto">
         select
         t1.id,

--
Gitblit v1.9.3