From 15e7d7914452cb21646034e428d0bbf734d35edb Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期二, 29 八月 2023 11:47:37 +0800 Subject: [PATCH] 修改 --- chart-server/src/main/resources/mapper/WorkMapper.xml | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/chart-server/src/main/resources/mapper/WorkMapper.xml b/chart-server/src/main/resources/mapper/WorkMapper.xml index 7da6829..5d3c2ab 100644 --- a/chart-server/src/main/resources/mapper/WorkMapper.xml +++ b/chart-server/src/main/resources/mapper/WorkMapper.xml @@ -3,11 +3,11 @@ <mapper namespace="com.yuanchu.limslaboratory.mapper.WorkMapper"> <!--璐d换浜洪」鐩暟缁熻--> <select id="dutyMater" resultType="java.util.Map"> - select n.name, 鏈畬鎴�, 宸插畬鎴� - from (select distinct user.name, count(inspection_product.id) '鏈畬鎴�' + select n.name, unfinish, finsh + from (select distinct user.name, count(inspection_product.id) unfinish from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_pro_id = user.id - where state = 1 + where inspection_product.state = 1 and test_state is null and inspection_product.inspection_material_id in (select id @@ -20,10 +20,10 @@ and type = #{type} and start_time between #{startTime} and #{endTime})) group by user.name) n, - (select distinct user.name, count(inspection_product.id) '宸插畬鎴�' + (select distinct user.name, count(inspection_product.id) finsh from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_pro_id = user.id - where state = 1 + where inspection_product.state = 1 and test_state is not null and inspection_product.inspection_material_id in (select id @@ -41,11 +41,11 @@ <!--鎵ц浜洪」鐩暟缁熻--> <select id="executeMater" resultType="java.util.Map"> - select n.name, 鏈畬鎴�, 宸插畬鎴� - from (select distinct user.name, count(inspection_product.id) '鏈畬鎴�' + select n.name, unfinsh, finsh + from (select distinct user.name, count(inspection_product.id) unfinsh from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_id = user.id - where state = 1 + where inspection_product.state = 1 and test_state is null and inspection_product.inspection_material_id in (select id @@ -58,10 +58,10 @@ and type = #{type} and start_time between #{startTime} and #{endTime})) group by user.name) n, - (select distinct user.name, count(inspection_product.id) '宸插畬鎴�' + (select distinct user.name, count(inspection_product.id) finsh from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_id = user.id - where state = 1 + where inspection_product.state = 1 and test_state is not null and inspection_product.inspection_material_id in (select id @@ -79,11 +79,11 @@ <!--璐d换浜烘墽琛岀巼--> <select id="dutytimely" resultType="java.util.Map"> - select n.name, 椤圭洰鎬绘暟, 鍙婃椂瀹屾垚鏁� / 椤圭洰鎬绘暟 * 100 '鍙婃椂鐜�' - from (select distinct user.name, count(inspection_product.id) '椤圭洰鎬绘暟' + select n.name, total, finshByTime / total * 100 timely + from (select distinct user.name, count(inspection_product.id) total from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_pro_id = user.id - where state = 1 + where inspection_product.state = 1 and inspection_product.inspection_material_id in (select id from lims_laboratory.inspection_material @@ -95,7 +95,7 @@ and type = #{type} and start_time between #{startTime} and #{endTime})) group by user.name) n, - (select distinct user.name, count(inspection_product.id) '鍙婃椂瀹屾垚鏁�' + (select distinct user.name, count(inspection_product.id) finshByTime from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_pro_id = user.id @@ -122,11 +122,11 @@ <!--鎵ц浜哄強鏃剁巼--> <select id="executetimely" resultType="java.util.Map"> - select n.name, 椤圭洰鎬绘暟, 鍙婃椂瀹屾垚鏁� / 椤圭洰鎬绘暟 * 100 '鍙婃椂鐜�' - from (select distinct user.name, count(inspection_product.id) '椤圭洰鎬绘暟' + select n.name, total, finshByTime / total * 100 timely + from (select distinct user.name, count(inspection_product.id) total from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_id = user.id - where state = 1 + where inspection_product.state = 1 and inspection_product.inspection_material_id in (select id from lims_laboratory.inspection_material @@ -138,7 +138,7 @@ and type = #{type} and start_time between #{startTime} and #{endTime})) group by user.name) n, - (select distinct user.name, count(inspection_product.id) '鍙婃椂瀹屾垚鏁�' + (select distinct user.name, count(inspection_product.id) finshByTime from lims_laboratory.inspection_product left join lims_laboratory.user on inspection_product.user_id = user.id -- Gitblit v1.9.3