From e04ce40a547fb63dc9c9f101902fad9952396f37 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期五, 12 七月 2024 16:53:34 +0800
Subject: [PATCH] 检验项目的导入添加支持多个sheet与三级检测项目添加
---
inspect-server/src/main/resources/mapper/InsSampleMapper.xml | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index af4aea4..f6c177f 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -25,7 +25,7 @@
</resultMap>
<select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO">
- select * from(
+ select * from(select * from(
SELECT
a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id,(ios.verify_user = #{userId}) verify_user
FROM
@@ -63,6 +63,7 @@
a.type DESC,
a.id
) b
+ where ins_state is not null)A
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
</if>
@@ -162,6 +163,7 @@
and state = 1
and ins_fiber_id is null
and ins_fibers_id is null
+ and isa.sample_code NOT REGEXP '/'
</select>
<select id="getInsOrderAndSample" resultMap="sampleDto">
select isa.*,
@@ -207,7 +209,9 @@
ipr.equip_name,
ip.method_s,
ip.tell,
- ip.dic
+ ip.dic,
+ ip.temperature,
+ ip.humidity
from ins_sample isa
left join ins_product ip on isa.id = ip.ins_sample_id
left join ins_product_result ipr on ip.id = ipr.ins_product_id
@@ -301,6 +305,8 @@
select ip.id ip_id,
inspection_item,
inspection_item_en,
+ inspection_item_class,
+ inspection_item_class_en,
inspection_item_subclass,
inspection_item_subclass_en,
ip.factory ip_factory,
@@ -448,7 +454,6 @@
and ins_fibers_id is null
</select>
<select id="getReportModel" resultType="java.util.Map">
-
</select>
<resultMap id="sampleDto" type="com.yuanchu.mom.dto.SampleProductDto">
@@ -516,6 +521,8 @@
<result property="methodS" column="method_s"/>
<result property="tell" column="tell"/>
<result property="dic" column="dic"/>
+ <result property="temperature" column="temperature"/>
+ <result property="humidity" column="humidity"/>
<collection property="insProductResult" resultMap="insProductResult"/>
</resultMap>
@@ -552,4 +559,36 @@
<result property="equipValue" column="equip_value" jdbcType="VARCHAR"/>
<result property="equipName" column="equip_name" jdbcType="VARBINARY"/>
</resultMap>
+
+ <resultMap id="sampleVo" type="com.yuanchu.mom.vo.SampleVo">
+ <id property="id" column="id" jdbcType="INTEGER"/>
+ <result property="insResult" column="ins_result" jdbcType="INTEGER"/>
+ <result property="insOrderId" column="ins_order_id" jdbcType="INTEGER"/>
+ <result property="joinModel" column="join_model" jdbcType="VARCHAR"/>
+ <result property="joinName" column="join_name" jdbcType="VARCHAR"/>
+ <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/>
+ <result property="factory" column="factory" jdbcType="VARCHAR"/>
+ <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/>
+ <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/>
+ <result property="sample" column="sample" jdbcType="VARCHAR"/>
+ <result property="model" column="model" jdbcType="VARCHAR"/>
+ <result property="insState" column="ins_state" jdbcType="INTEGER"/>
+ <result property="joinNum" column="join_num" jdbcType="INTEGER"/>
+ <result property="remark" column="remark" jdbcType="VARCHAR"/>
+ <result property="createUser" column="create_user" jdbcType="INTEGER"/>
+ <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+ <result property="standardMethodListId" column="standard_method_list_id"/>
+ <result property="methodName" column="methodName" jdbcType="VARCHAR"/>
+ <result property="unit" column="unit"/>
+ </resultMap>
+
+ <select id="getDetailById" resultMap="sampleVo">
+ select is2.*,
+ code methodName
+ from ins_sample is2
+ inner join standard_method sm on standard_method_list_id = sm.id
+ where is2.id=#{sampleId}
+ </select>
</mapper>
--
Gitblit v1.9.3