From 91ab1a15515c4c213b2ac4f777a7f20c3d0d59ad Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 28 三月 2025 13:49:53 +0800
Subject: [PATCH] 一个订单在每个站点检验都需要扫码入库报检,在中间站点复核继续试验之后默认自动将样品出库,且在列表中也不需要再展示出来,到最后一步复核结束反而是需要手动去出库不能自动出库,且出库之后也不需要在页面展示

---
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml |   63 ++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index f8decca..f9bc603 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -29,6 +29,7 @@
         SELECT
         a.*,
         ios.ins_state,
+        ios.is_out,
         ios.laboratory son_laboratory,
         ios.verify_tell,
         verify_user,
@@ -94,6 +95,7 @@
         ios.create_time
         ) b
         where ins_state is not null
+        and (is_out is null or is_out !=1)
         and son_laboratory=#{sonLaboratory}
         and state =1
         <if test="laboratory!=null and laboratory!=''">
@@ -150,7 +152,7 @@
         </if>
         OR isu.user_id is NULL
         ) a
-          ON ios.ins_order_id = a.id AND ios.laboratory = #{sonLaboratory} and a.sampleId=ios.ins_sample_id
+        ON ios.ins_order_id = a.id AND ios.laboratory = #{sonLaboratory} and a.sampleId=ios.ins_sample_id
         left join
         (SELECT td.user_id order_user_id, td.ins_sample_id FROM ins_sample_user td,(SELECT max(id) id FROM
         ins_sample_user where son_laboratory=#{sonLaboratory} GROUP BY ins_sample_id) md where td.id = md.id
@@ -180,6 +182,7 @@
                inspection_item_class_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
+
                ip.factory     ip_factory,
                ip.laboratory  ip_laboratory,
                ip.sample_type ip_sample_type,
@@ -269,6 +272,7 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
                ipr2.often,
                ipr2.port,
@@ -341,6 +345,7 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
                ipr2.often,
                ipr2.port,
@@ -373,21 +378,21 @@
     </select>
     <select id="selectSampleProductListByOrderId2" resultMap="sampleDto">
         select isa.*,
-               ios.num          num1,
-               ip.id            ip_id,
+               ios.num        num1,
+               ip.id          ip_id,
                inspection_item,
                inspection_item_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                inspection_item_class,
                inspection_item_class_en,
-               ip.factory       ip_factory,
-               ip.laboratory    ip_laboratory,
-               ip.sample_type   ip_sample_type,
-               ip.sample        ip_sample,
-               ip.model         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        ip_unit,
                price,
                man_hour,
                man_hour_group,
@@ -403,13 +408,13 @@
                ask,
                tell,
                `last_value`,
-               ip.ins_result    ip_ins_result,
+               ip.ins_result  ip_ins_result,
                state,
                ip.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,
+               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,
 
                ip.method_s
@@ -422,21 +427,21 @@
     </select>
     <select id="selectSampleProductListByOrder2Id2" resultMap="sampleDto">
         select isa.*,
-               ios.num          num1,
-               ip.id            ip_id,
+               ios.num        num1,
+               ip.id          ip_id,
                inspection_item,
                inspection_item_en,
                inspection_item_subclass,
                inspection_item_subclass_en,
                inspection_item_class,
                inspection_item_class_en,
-               ip.factory       ip_factory,
-               ip.laboratory    ip_laboratory,
-               ip.sample_type   ip_sample_type,
-               ip.sample        ip_sample,
-               ip.model         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        ip_unit,
                price,
                man_hour,
                man_hour_group,
@@ -452,13 +457,13 @@
                ask,
                tell,
                `last_value`,
-               ip.ins_result    ip_ins_result,
+               ip.ins_result  ip_ins_result,
                state,
                ip.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,
+               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,
                ip.method_s
         from ins_sample isa
@@ -543,6 +548,7 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
                ipr2.often,
                ipr2.port,
@@ -613,6 +619,7 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
                ipr2.often,
                ipr2.port,
@@ -681,6 +688,7 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
                ipr2.often,
                ipr2.port,
@@ -821,6 +829,7 @@
         <result property="beforeNote" column="before_note" jdbcType="VARCHAR"/>
         <result property="afterCheck" column="after_check" jdbcType="VARCHAR"/>
         <result property="afterNote" column="after_note" jdbcType="VARCHAR"/>
+        <result property="testResult" column="test_result" jdbcType="VARCHAR"/>
         <result property="equipName" column="equip_name" jdbcType="VARBINARY"/>
     </resultMap>
     <resultMap id="insProductResult2" type="com.yuanchu.mom.pojo.InsProductResult2">

--
Gitblit v1.9.3