From dd57e7785687fa49096a2853589a02a29c37931d Mon Sep 17 00:00:00 2001
From: JYW <2013732181@qq.com>
Date: 星期二, 23 四月 2024 08:59:34 +0800
Subject: [PATCH] 2024-04-23 印章后端

---
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index e87d717..f5822aa 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -51,12 +51,12 @@
         io.state = 1
         AND io.ins_state != 5
         and send_time is not null
+        and (isu.user_id = #{userId} OR isu.user_id is NULL)
         GROUP BY
         ip.son_laboratory,
         io.id
         ) a
         LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory
-        where a.user_id = #{userId} OR a.user_id is NULL
         ORDER BY
         a.user_id DESC,
         a.type DESC,
@@ -145,9 +145,13 @@
                ip.update_user ip_update_user,
                ip.create_time ip_create_time,
                ip.update_time ip_update_time,
-               template_id
+               template_id,
+               ipr.ins_value,
+               ipr.com_value,
+               ipr.equip_value
         from ins_sample isa
         left join ins_product ip on isa.id = ip.ins_sample_id
+        left join ins_product_result ipr on ip.id = ipr.ins_product_id
         where ins_order_id = #{id}
         and state = 1
         and ip.son_laboratory = #{laboratory}

--
Gitblit v1.9.3