From 3ae364164cb9d85acce0b53a1ba5c70a80991308 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期三, 03 七月 2024 22:21:49 +0800 Subject: [PATCH] 温度循环+报告英文换行+检验只有一项的设备查询+光纤配置报告换页+温度湿度 --- 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