From 87794ed4e7b7cf7b13f7deef5da3e3ff03255d81 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期日, 04 八月 2024 23:01:09 +0800 Subject: [PATCH] 检验任务负责人展示修改 --- inspect-server/src/main/resources/mapper/InsOrderMapper.xml | 56 +++++++------------------------------------------------- 1 files changed, 7 insertions(+), 49 deletions(-) diff --git a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml index 6c549ad..76adfdd 100644 --- a/inspect-server/src/main/resources/mapper/InsOrderMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsOrderMapper.xml @@ -19,6 +19,8 @@ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="updateUser" column="update_user" jdbcType="INTEGER"/> <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> + <result property="revocationInsProductIds" column="revocation_ins_product_ids" /> + <result property="isRevocation" column="is_revocation" /> </resultMap> <resultMap id="OrderThingDto" type="com.yuanchu.mom.dto.OrderThingDto"> @@ -60,37 +62,9 @@ <select id="selectInsOrderPage" resultType="com.yuanchu.mom.dto.SampleOrderDto"> select * from ( - <!--SELECT - io.*, - ir.id report_id, - ir.url, - ir.url_s, - (select count(*) from ins_sample isa2 - where isa2.ins_order_id = io.id and CHAR_LENGTH(isa2.sample_code) <32 ) sample_num, - 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, - u.name - FROM - ins_order io - LEFT JOIN ins_sample isa ON io.id = isa.ins_order_id - LEFT JOIN ( SELECT id, ins_order_id, is_ratify, url,url_s FROM ins_report WHERE is_ratify = 1 ) ir ON io.id = - ir.ins_order_id - left join user u on io.create_user = u.id - where 1=1 - <if test="laboratory!=null and laboratory!=''"> - and io.laboratory=#{laboratory} - </if> - GROUP BY - io.id--> - SELECT io.*, + isau.user_id assign, ir.id report_id, ir.url, ir.url_s, @@ -104,6 +78,8 @@ ins_order io LEFT JOIN ins_sample isa ON io.id = isa.ins_order_id + LEFT JOIN + ins_sample_user isau ON isau.ins_sample_id = io.id LEFT JOIN (SELECT id, ins_order_id, is_ratify, url, url_s FROM ins_report WHERE is_ratify = 1) ir ON io.id = ir.ins_order_id LEFT JOIN @@ -130,8 +106,8 @@ <if test="laboratory!=null and laboratory!=''"> AND io.laboratory=#{laboratory} </if> - GROUP BY - io.id + GROUP BY io.id,type + order by type desc,io.id desc ) a <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} @@ -500,23 +476,5 @@ select name from department_lims where id = #{depLimsId} - </select> - - <select id="getDeviceMessage" resultType="java.util.Map"> - select d.device_name, d.management_number, d.file_type, d.collect_url - FROM - device d, - device_data_config ddc - <if test="sample != '' and sample != null"> - inner join structure_item_parameter sip on sip.sample like concat('%', #{sample}, '%') and sip.id = ddc.structure_item_parameter_id - </if> - where d.ip = #{ip} - and ddc.inspection_item = #{inspectionItem} - <if test="inspectionItemSubclass != '' and inspectionItemSubclass != null"> - and ddc.inspection_item_subclass = #{inspectionItemSubclass} - </if> - and d.device_status = 0 - and d.ins_product_ids is not null - limit 1 </select> </mapper> -- Gitblit v1.9.3