From 15e31c6e6550f9e8bf6fb1df5ca5ad4cc726b64f Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期六, 26 八月 2023 13:30:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 inspection-server/src/main/resources/mapper/InspectionProductMapper.xml |   45 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/inspection-server/src/main/resources/mapper/InspectionProductMapper.xml b/inspection-server/src/main/resources/mapper/InspectionProductMapper.xml
index 594632c..1af01e7 100644
--- a/inspection-server/src/main/resources/mapper/InspectionProductMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionProductMapper.xml
@@ -1,13 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.yuanchu.limslaboratory.mapper.InspectionProductMapper">
-    <update id="upda">
-        update lims_laboratory.inspection_product
-        set test_state=null
-        where id = #{id}
-          and state = 1
-    </update>
-
     <!--鏍规嵁妫�楠屽崟id鏌ヨ妫�楠岄」鐩殑妫�楠岀粨鏋�-->
     <select id="getresult" resultType="java.lang.Integer">
         select test_state
@@ -18,7 +11,41 @@
     <!--鏍规嵁妫�楠屾牱鍝乮d浣滃簾妫�楠岄」鐩�-->
     <update id="updat">
         update lims_laboratory.inspection_product
-            set state=0
-        where inspection_material_id=#{id}
+        set state=0
+        where inspection_material_id = #{id}
     </update>
+
+    <!--璁$畻宸叉楠岄」鐩暟閲�-->
+    <select id="seleCountInspro" resultType="java.lang.Integer">
+        select count(id)
+        from lims_laboratory.inspection_product
+        where state = 1
+          and test_state in (0, 1)
+    </select>
+
+    <!--璁$畻鏈楠岄」鐩暟閲�-->
+    <select id="seleCountUnInspro" resultType="java.lang.Integer">
+        select count(id)
+        from lims_laboratory.inspection_product
+        where state = 1
+          and test_state is null
+    </select>
+
+    <!--鑾峰彇妫�楠岄」鐩�,璁惧,妫�楠屽紑濮嬫椂闂�,鎵ц浜�,妫�楠岀粨鏉熸椂闂�-->
+    <select id="getResultNum" resultType="java.util.Map">
+        select ip.name,
+               equipment_name                      instrumentname,
+               DATE_FORMAT(start_time, '%Y-%m-%d') startTime,
+               user.name                           checkname,
+               DATE_FORMAT(end_time, '%Y-%m-%d')   endTime
+        from lims_laboratory.inspection_product ip
+                 left join lims_laboratory.inspection_material on ip.inspection_material_id = inspection_material.id
+                 left join lims_laboratory.inspection i on inspection_material.inspection_id = i.id
+                 left join lims_laboratory.instrument on ip.instrument_id = instrument.id
+                 left join lims_laboratory.user on ip.user_id = user.id
+        where ip.state = 1
+          and test_state is null
+        order by start_time
+        limit 4
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3