From 2c27abdc366d09cfa68f120ef22a1991dcf7a1ea Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 23 四月 2026 14:50:30 +0800
Subject: [PATCH] 完善bug

---
 src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml b/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
index c378c6a..b303d28 100644
--- a/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
@@ -37,6 +37,7 @@
         t1.sales_ledger_product_id,
         t1.create_user,
         t2.specification_model,
+        t2.product_model_id,
         t2.unit,
         t2.tax_rate,
         t2.tax_inclusive_unit_price,
@@ -48,7 +49,7 @@
         t1.create_time,
         t1.update_time,
         t1.create_by,
-        t2.warn_num
+        ifnull(t1.warn_num, t2.warn_num) as warnNum
         from  procurement_record_storage t1
                   left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id
                   left join purchase_ledger t3 on t3.id = t2.sales_ledger_id
@@ -107,7 +108,7 @@
         t1.create_time,
         t1.update_time,
         t1.create_by,
-        t2.warn_num
+        ifnull(t1.warn_num, t2.warn_num) as warnNum
         from  procurement_record_storage t1
         left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id
         left join purchase_ledger t3 on t3.id = t2.sales_ledger_id
@@ -163,4 +164,4 @@
                   left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id
                   left join purchase_ledger t3 on t3.id = t2.sales_ledger_id
     </select>
-</mapper>
\ No newline at end of file
+</mapper>

--
Gitblit v1.9.3