From 4c563cb7274be53e15f8ce5537ef6e57e15b6458 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期二, 02 四月 2024 18:01:31 +0800 Subject: [PATCH] 检验报告 --- inspect-server/src/main/resources/mapper/InsSampleMapper.xml | 102 +++++++++++++++++++++++++++++++++++---------------- 1 files changed, 70 insertions(+), 32 deletions(-) diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml index 6fd61d9..bede559 100644 --- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml @@ -18,10 +18,8 @@ <result property="model" column="model" jdbcType="VARCHAR"/> <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> <result property="insState" column="ins_state" jdbcType="INTEGER"/> - <result property="sendTime" column="send_time" jdbcType="TIMESTAMP"/> <result property="joinNum" column="join_num" jdbcType="INTEGER"/> <result property="remark" column="remark" jdbcType="VARCHAR"/> - <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> <result property="createUser" column="create_user" jdbcType="INTEGER"/> <result property="updateUser" column="update_user" jdbcType="INTEGER"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> @@ -31,7 +29,7 @@ <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO"> select * from( SELECT - * + a.*,ios.ins_state,ios.verify_tell FROM ( SELECT @@ -43,7 +41,6 @@ io.sample_type, isu.user_id, ip.son_laboratory, - io.ins_state, io.ins_result FROM ins_order io @@ -58,6 +55,7 @@ ip.son_laboratory, io.id ) a + LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory where a.user_id = #{userId} OR a.user_id is NULL ORDER BY a.user_id DESC, @@ -71,17 +69,17 @@ <select id="selectSampleProductListByOrderId" resultMap="sampleDto"> select isa.*, - ip.id, + ip.id ip_id, inspection_item, inspection_item_classify, inspection_item_subclass, - ip.factory, - ip.laboratory, - ip.sample_type, - ip.sample, - ip.model, + ip.factory ip_factory, + ip.laboratory ip_laboratory, + ip.sample_type ip_sample_type, + ip.sample ip_sample, + ip.model ip_model, son_laboratory, - ip.unit, + ip.unit ip_unit, price, man_hour, man_hour_group, @@ -96,17 +94,59 @@ bsm, ask, `last_value`, - ip.ins_result, + ip.ins_result ip_ins_result, state, ins_sample_id, - ip.create_user, - ip.update_user, - ip.create_time, - ip.update_time, + ip.create_user ip_create_user, + ip.update_user ip_update_user, + ip.create_time ip_create_time, + ip.update_time ip_update_time, template_id from ins_sample isa - left join ins_product ip on isa.id = ip.ins_sample_id + left join ins_product ip on isa.id = ip.ins_sample_id where ins_order_id = #{id} + and state = 1 + </select> + <select id="getInsOrderAndSample" resultMap="sampleDto"> + select isa.*, + ip.id ip_id, + inspection_item, + inspection_item_classify, + inspection_item_subclass, + ip.factory ip_factory, + ip.laboratory ip_laboratory, + ip.sample_type ip_sample_type, + ip.sample ip_sample, + ip.model ip_model, + son_laboratory, + ip.unit ip_unit, + price, + man_hour, + man_hour_group, + inspection_item_type, + inspection_value_type, + device_group, + checkout_number, + section, + value_type, + method, + man_day, + bsm, + ask, + `last_value`, + ip.ins_result ip_ins_result, + state, + ins_sample_id, + ip.create_user ip_create_user, + ip.update_user ip_update_user, + ip.create_time ip_create_time, + ip.update_time ip_update_time, + template_id + from ins_sample isa + left join ins_product ip on isa.id = ip.ins_sample_id + where ins_order_id = #{id} + and state = 1 + and ip.son_laboratory = #{laboratory} </select> <resultMap id="sampleDto" type="com.yuanchu.mom.dto.SampleProductDto"> @@ -123,10 +163,8 @@ <result property="model" column="model" jdbcType="VARCHAR"/> <result property="isLeave" column="is_leave" jdbcType="INTEGER"/> <result property="insState" column="ins_state" jdbcType="INTEGER"/> - <result property="sendTime" column="send_time" jdbcType="TIMESTAMP"/> <result property="joinNum" column="join_num" jdbcType="INTEGER"/> <result property="remark" column="remark" jdbcType="VARCHAR"/> - <result property="appointed" column="appointed" jdbcType="TIMESTAMP"/> <result property="createUser" column="create_user" jdbcType="INTEGER"/> <result property="updateUser" column="update_user" jdbcType="INTEGER"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> @@ -137,17 +175,17 @@ </resultMap> <resultMap id="product" type="com.yuanchu.mom.pojo.InsProduct"> - <id property="id" column="ip.id" jdbcType="INTEGER"/> + <id property="id" column="ip_id" jdbcType="INTEGER"/> <result property="inspectionItem" column="inspection_item" jdbcType="VARCHAR"/> <result property="inspectionItemClassify" column="inspection_item_classify" jdbcType="VARCHAR"/> <result property="inspectionItemSubclass" column="inspection_item_subclass" jdbcType="VARCHAR"/> - <result property="factory" column="ip.factory" jdbcType="VARCHAR"/> - <result property="laboratory" column="ip.laboratory" jdbcType="VARCHAR"/> - <result property="sampleType" column="ip.sample_type" jdbcType="VARCHAR"/> - <result property="sample" column="ip.sample" jdbcType="VARCHAR"/> - <result property="model" column="ip.model" jdbcType="VARCHAR"/> + <result property="factory" column="ip_factory" jdbcType="VARCHAR"/> + <result property="laboratory" column="ip_laboratory" jdbcType="VARCHAR"/> + <result property="sampleType" column="ip_sample_type" jdbcType="VARCHAR"/> + <result property="sample" column="ip_sample" jdbcType="VARCHAR"/> + <result property="model" column="ip_model" jdbcType="VARCHAR"/> <result property="sonLaboratory" column="son_laboratory" jdbcType="VARCHAR"/> - <result property="unit" column="ip.unit" jdbcType="VARCHAR"/> + <result property="unit" column="ip_unit" jdbcType="VARCHAR"/> <result property="price" column="price" jdbcType="DECIMAL"/> <result property="manHour" column="man_hour" jdbcType="DOUBLE"/> <result property="manHourGroup" column="man_hour_group" jdbcType="VARCHAR"/> @@ -162,13 +200,13 @@ <result property="bsm" column="bsm" jdbcType="VARCHAR"/> <result property="ask" column="ask" jdbcType="VARCHAR"/> <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> - <result property="insResult" column="ip.ins_result" jdbcType="INTEGER"/> + <result property="insResult" column="ip_ins_result" jdbcType="INTEGER"/> <result property="state" column="state" jdbcType="INTEGER"/> <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> - <result property="createUser" column="ip.create_user" jdbcType="INTEGER"/> - <result property="updateUser" column="ip.update_user" jdbcType="INTEGER"/> - <result property="createTime" column="ip.create_time" jdbcType="TIMESTAMP"/> - <result property="updateTime" column="ip.update_time" jdbcType="TIMESTAMP"/> - <result property="templateId" column="ip.template_id" jdbcType="INTEGER"/> + <result property="createUser" column="ip_create_user" jdbcType="INTEGER"/> + <result property="updateUser" column="ip_update_user" jdbcType="INTEGER"/> + <result property="createTime" column="ip_create_time" jdbcType="TIMESTAMP"/> + <result property="updateTime" column="ip_update_time" jdbcType="TIMESTAMP"/> + <result property="templateId" column="template_id" jdbcType="INTEGER"/> </resultMap> </mapper> -- Gitblit v1.9.3