From 7bae2c55ff2d9c94d30df77ad2dfbc66bb703209 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 06 九月 2024 17:40:33 +0800
Subject: [PATCH] 电路试验

---
 inspect-server/src/main/resources/mapper/InsProductMapper.xml |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsProductMapper.xml b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
index dc00e69..4394f11 100644
--- a/inspect-server/src/main/resources/mapper/InsProductMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -108,4 +108,14 @@
                 and state = 1
                 and is2.ins_order_id = #{orderId}) A
     </select>
+
+    <select id="selectInsProductCountByOrderId" resultType="int">
+        select COUNT(1)
+        from ins_product ip
+                 left join ins_sample isa on ip.ins_sample_id = isa.id
+                 left join ins_order io on isa.ins_order_id = io.id
+        where io.id = #{orderId}
+          and (ip.ins_result is null or ip.ins_result = 2)
+          and ip.state = 1
+    </select>
 </mapper>

--
Gitblit v1.9.3