From c427ed3db05c772cec3658949e19bcf1b6c0d2a7 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 22 八月 2023 15:03:16 +0800
Subject: [PATCH] 改动5.0
---
inspection-server/src/main/resources/mapper/InspectionMapper.xml | 79 +++++++++++++++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 1 deletions(-)
diff --git a/inspection-server/src/main/resources/mapper/InspectionMapper.xml b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
index 6d7526d..737fb6b 100644
--- a/inspection-server/src/main/resources/mapper/InspectionMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -20,10 +20,87 @@
from lims_laboratory.inspection i
join lims_laboratory.user u on i.user_id = u.id
join lims_laboratory.inspection_material im on i.id = im.inspection_id
- where i.state=1
+ where i.state=1
<if test="message!=null">
and i.code like concat('%', #{message}, '%')
or im.name like concat('%', #{message}, '%')
</if>
</select>
+
+ <!--璁$畻妫�楠岀殑妫�楠屽崟鏁伴噺-->
+ <select id="seleCountIns" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and inspection_status in (0, 1)
+ </select>
+
+ <!--璁$畻鏈楠岀殑妫�楠屽崟鏁伴噺-->
+ <select id="seleCountUnIns" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and inspection_status is null
+ </select>
+
+ <!--鑾峰彇妫�楠屽崟鎬绘暟-->
+ <select id="getcount" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ </select>
+
+ <!--妫�楠岀粨璁�,妫�楠屾暟閲�-->
+ <select id="qualified" resultType="java.lang.Long">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type = 0
+ <if test="b!=null ">
+ and inspection_status = #{b}
+ </if>
+ <if test="b==null">
+ and inspection_status is null
+ </if>
+ </select>
+
+ <!--璁$畻鍘熸潗鏂欎笌鎴愬搧鐨勫悎鏍肩巼-->
+ <select id="getResultNum" resultType="java.util.Map">
+ select inspection_status result,
+ count(id) num
+ from lims_laboratory.inspection
+ where state = 1
+ group by result
+ order by num desc
+ </select>
+
+ <!--璁$畻鍘熸潗鏂欐楠屽崟鎬绘暟-->
+ <select id="getallmater" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type = 0
+ </select>
+
+ <!--璁$畻鎴愬搧妫�楠屽崟鎬绘暟-->
+ <select id="getallfin" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type in (1, 2)
+ </select>
+
+ <!--璁$畻鍘熸潗鏂欏悎鏍肩巼-->
+ <select id="qualifiedfin" resultType="java.lang.Long">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type in (1, 2)
+ <if test="i!=null ">
+ and inspection_status = #{i}
+ </if>
+ <if test="i==null">
+ and inspection_status is null
+ </if>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3