From 52a7c9b093bcb05ee128b3ad8338007aad2cfccb Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 27 一月 2026 17:09:26 +0800
Subject: [PATCH] 业务管理:问题修复

---
 inspect-server/src/main/resources/mapper/InsReportMapper.xml |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsReportMapper.xml b/inspect-server/src/main/resources/mapper/InsReportMapper.xml
index d0350eb..68615c0 100644
--- a/inspect-server/src/main/resources/mapper/InsReportMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsReportMapper.xml
@@ -20,10 +20,22 @@
         iiq.is_copper,
         iiq.material_prop,
         ip.son_laboratory,
-        iiq.update_batch_no,
-        iiq.part_desc,
-        iiq.supplier_name,
-        iiq.contract
+        CASE
+        WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.update_batch_no
+        ELSE io.update_batch_no
+        END AS update_batch_no,
+        CASE
+        WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.part_desc
+        ELSE io.part_desc
+        END AS part_desc,
+        CASE
+        WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.supplier_name
+        ELSE io.supplier_name
+        END AS supplier_name,
+        CASE
+        WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.contract
+        ELSE io.contract
+        END AS contract
         from ins_report ir
         left join ins_order io on io.id = ir.ins_order_id
         LEFT JOIN ifs_inventory_quantity iiq ON iiq.id = io.ifs_inventory_id

--
Gitblit v1.9.3