From b7e7d3b7a9bbe237e88e54eb395724717752b91e Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 22 八月 2023 18:07:54 +0800
Subject: [PATCH] 试验管理-》合格率统计
---
inspection-server/src/main/resources/mapper/InspectionMapper.xml | 57 +++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/inspection-server/src/main/resources/mapper/InspectionMapper.xml b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
index e2feafa..e97fc5a 100644
--- a/inspection-server/src/main/resources/mapper/InspectionMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -51,6 +51,20 @@
</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
@@ -58,15 +72,6 @@
where state = 1
group by result
order by num desc
- </select>
-
- <!--璁$畻鍘熸潗鏂欎笌鎴愬搧鐨勫悎鏍肩巼-->
- <select id="qualified" resultType="java.lang.Long">
- select count(id)
- from lims_laboratory.inspection
- where state = 1
- and type = 0
- and inspection_status = #{b}
</select>
<!--璁$畻鍘熸潗鏂欐楠屽崟鎬绘暟-->
@@ -82,6 +87,38 @@
select count(id)
from lims_laboratory.inspection
where state = 1
- and type in (1,2)
+ 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>
+
+ <!--鏌ヨ璇ユ棩鏈熺殑鍘熸潗鏂欐楠屾暟閲�-->
+ <select id="getMaterByDay" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type = 0
+ and create_time = #{dayofWeek}
+ </select>
+
+ <!--鏌ヨ璇ユ棩鏈熺殑鎴愬搧妫�楠屾暟閲�-->
+ <select id="getFinByDay" resultType="java.lang.Integer">
+ select count(id)
+ from lims_laboratory.inspection
+ where state = 1
+ and type in (1, 2)
+ and create_time = #{dayofWeek}
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3