From 996c3fb89b185eedf2fd58a6c5bd5586e04cdccf Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 八月 2025 17:47:01 +0800
Subject: [PATCH] 电路试验,不同频段的要求值可以进行调整

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

diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index f8decca..fb9385f 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,
@@ -53,7 +54,7 @@
         io.send_time,
         isa.id sampleId,
         isa.sample sample,
-        isa.sample_code sampleCode,
+        isa.sample_code ,
         userName,
         userNameId,
         checkName,
@@ -80,9 +81,12 @@
         ORDER BY ins_sample_id
         )isu2 ON isu2.ins_sample_id = isa.id
         WHERE io.state = 1 and send_time is not null
-        <if test="userName !=null and userName!=''">
-            and ( (userName like CONCAT ('%', #{userName},'%') )
-            or (checkName like CONCAT ('%', #{userName},'%') ) )
+        <if test="sampleCode !=null and sampleCode!=''">
+            and (isa.sample_code like CONCAT ('%', #{sampleCode},'%') )
+        </if>
+        <if test="myName !=null and myName!=''">
+            and ( (userName like CONCAT ('%', #{myName},'%') )
+            or (checkName like CONCAT ('%', #{myName},'%') ) )
         </if>
         ) a
         ON ios.ins_order_id = a.id AND ios.laboratory = #{sonLaboratory} and ios.ins_sample_id=a.sampleId
@@ -94,6 +98,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 +155,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 +185,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,
@@ -251,7 +257,7 @@
                method,
                man_day,
                bsm,
-               ask,
+               ip.ask,
                `last_value`,
                ip.ins_result    ip_ins_result,
                state,
@@ -269,7 +275,9 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
+               ipr2.ask ask2,
                ipr2.often,
                ipr2.port,
                ipr2.angle,
@@ -323,7 +331,7 @@
                method,
                man_day,
                bsm,
-               ask,
+               ip.ask,
                `last_value`,
                ip.ins_result    ip_ins_result,
                state,
@@ -341,7 +349,9 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
+               ipr2.ask ask2,
                ipr2.often,
                ipr2.port,
                ipr2.angle,
@@ -373,21 +383,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 +413,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 +432,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 +462,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
@@ -525,7 +535,7 @@
                method,
                man_day,
                bsm,
-               ask,
+               ip.ask,
                `last_value`,
                ip.ins_result    ip_ins_result,
                state,
@@ -543,7 +553,9 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
+               ipr2.ask  ask2,
                ipr2.often,
                ipr2.port,
                ipr2.angle,
@@ -595,7 +607,7 @@
                method,
                man_day,
                bsm,
-               ask,
+               ip.ask,
                `last_value`,
                ip.ins_result    ip_ins_result,
                state,
@@ -613,7 +625,9 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
+               ipr2.ask ask2,
                ipr2.often,
                ipr2.port,
                ipr2.angle,
@@ -663,7 +677,7 @@
                method,
                man_day,
                bsm,
-               ask,
+               ip.ask,
                `last_value`,
                ip.ins_result    ip_ins_result,
                state,
@@ -681,7 +695,9 @@
                ipr.before_note,
                ipr.after_check,
                ipr.after_note,
+               ipr.test_result,
                ipr2.frequency,
+               ipr2.ask ask2,
                ipr2.often,
                ipr2.port,
                ipr2.angle,
@@ -821,10 +837,12 @@
         <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">
         <result column="frequency" property="frequency" jdbcType="VARCHAR"/>
+        <result column="ask2" property="ask" jdbcType="VARCHAR"/>
         <result column="often" property="often" jdbcType="VARCHAR"/>
         <result column="port" property="port" jdbcType="VARCHAR"/>
         <result column="angle" property="angle" jdbcType="VARCHAR"/>

--
Gitblit v1.9.3