From 9a98121231685145fdc0f78ac2d48d02e0eb68d6 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期三, 03 七月 2024 22:22:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- inspect-server/src/main/resources/mapper/InsOrderMapper.xml | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml index ab1e206..e391586 100644 --- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml @@ -97,9 +97,11 @@ ir.url_s, (select count(*) from ins_sample isa2 where isa2.ins_order_id = io.id) sample_num, - concat(ROUND((select count(*) from ins_order_state ios - where ins_state = 5 and ios.ins_order_id = io.id) / (select count(*) from ins_order_state ios2 - where ios2.ins_order_id = io.id) * 100, 2), '%') insProgress, + concat(ROUND((select count(*) from ins_product ip + where state = 1 and ins_result is not null and ip.ins_sample_id in (select id from ins_sample where + ins_sample.ins_order_id= io.id )) / (select count(*) from ins_product ip2 + where state = 1 and ip2.ins_sample_id in (select id from ins_sample where ins_sample.ins_order_id= io.id )) * + 100, 2), '%') insProgress, group_concat(distinct isa.sample_code,' ') sample_code, group_concat(distinct isa.sample,' ') sample_name, group_concat(distinct isa.model,' ') sample_model, @@ -169,8 +171,9 @@ </if> </select> <select id="selectDeviceList" resultType="java.util.Map"> - select device_name,specification_model,management_number,DATE_ADD(date_format(last_calibration_date, - '%Y-%m-%d'),INTERVAL calibration_date month) latest_traceability + select device_name,specification_model,management_number,<!--DATE_ADD(date_format(last_calibration_date, + '%Y-%m-%d'),INTERVAL calibration_date month)--> date_format(next_calibration_date,'%Y-%m-%d') + latest_traceability from device where device.management_number in <foreach collection="names" index="index" open="(" separator="," close=")" item="val"> @@ -288,4 +291,13 @@ from laboratory where laboratory_name = #{laboratory} </select> + <select id="selectReportModelByOrderId" resultType="java.util.Map"> + select distinct id, name + from standard_template + where id in (select template_id + from ins_product + where son_laboratory = #{laboratory} + and ins_sample_id in + (select id from ins_sample where ins_order_id = #{id})) + </select> </mapper> -- Gitblit v1.9.3