From 31ccc9cd47f96cea6e4e13b078187fd3201c4666 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 04 九月 2026 16:35:24 +0800
Subject: [PATCH] feat(report): 更新检测报告模板并优化报告生成功能 - 优化设备信息展示格式,支持多设备列表显示 - 统一检测报告和检验报告使用新版模板格式

---
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml |   45 +++++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 84af8bb..59e0cfd 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -61,6 +61,7 @@
         <result property="tell" column="tell" jdbcType="VARCHAR"/>
         <result property="lastValue" column="last_value" jdbcType="VARCHAR"/>
         <result property="insResult" column="ip_ins_result" jdbcType="INTEGER"/>
+        <result property="isBinding" column="ip_is_binding" jdbcType="INTEGER"/>
         <result property="state" column="state" jdbcType="INTEGER"/>
         <result property="insBushId" column="ins_bush_id" jdbcType="INTEGER"/>
         <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/>
@@ -141,9 +142,10 @@
                man_day,
                bsm,
                ask,
-               `last_value`,
-               ip.ins_result  ip_ins_result,
-               state,
+                `last_value`,
+                ip.ins_result  ip_ins_result,
+                ip.is_binding  ip_is_binding,
+                state,
                ins_sample_id,
                ip.create_user ip_create_user,
                ip.update_user ip_update_user,
@@ -177,9 +179,9 @@
         io.send_time,
         io.order_type,
         case when
-            io.type_source = 0
-            then io.sample_view
-            else io.sample end sample,
+        io.type_source = 0
+        then io.sample_view
+        else io.sample end sample,
         GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model,
         userName,
         checkName,
@@ -192,7 +194,9 @@
         ira.url,
         ira.url_s,
         ira.temp_url_pdf,
-        iiq.is_copper
+        iiq.is_copper,
+        iiq.is_split_order,
+        iiq.material_prop AS material_prop
         FROM
         ins_order io
         LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id
@@ -203,7 +207,7 @@
         FROM ins_sample_user u LEFT JOIN  user uu ON u.user_id = uu.id
         WHERE u.state=0
         <if test="sonLaboratory!= null and sonLaboratory != ''">
-           and son_laboratory=#{sonLaboratory}
+            and son_laboratory=#{sonLaboratory}
         </if>
         GROUP BY ins_sample_id
         ORDER BY ins_sample_id
@@ -250,7 +254,8 @@
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
-        ORDER BY send_time asc
+        ORDER BY send_time desc
+
     </select>
 
     <select id="inspectionOrderDetailsTaskSwitching" resultType="com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo">
@@ -354,6 +359,7 @@
                tell,
                `last_value`,
                ip.ins_result  ip_ins_result,
+               ip.is_binding  ip_is_binding,
                state,
                ins_sample_id,
                ip.create_user ip_create_user,
@@ -413,6 +419,7 @@
                ask,
                `last_value`,
                ip.ins_result  ip_ins_result,
+               ip.is_binding  ip_is_binding,
                state,
                ins_sample_id,
                ip.create_user ip_create_user,
@@ -463,7 +470,8 @@
             ifs.id inventoryQuantityId,
             ifs.buy_unit_meas buyUnitMeas,
             io.test_quantity testQuantity,
-            ifs.buy_unit_meas buyUnitMeas
+            ifs.buy_unit_meas buyUnitMeas,
+            ifs.declare_date declareDate
         FROM
             ifs_inventory_quantity ifs
                 LEFT JOIN ins_order io ON ifs.id = io.ifs_inventory_id
@@ -502,6 +510,7 @@
                tell,
                `last_value`,
                ip.ins_result  ip_ins_result,
+               ip.is_binding  ip_is_binding,
                state,
                ins_sample_id,
                ip.create_user ip_create_user,
@@ -514,6 +523,7 @@
                ipr.equip_value,
                ip.method_s,
                ip.radius,
+               ip.structure_item_parameter_id,
                isa.special_standard_method
         from ins_sample isa
                  left join ins_product ip on isa.id = ip.ins_sample_id
@@ -555,9 +565,6 @@
         <if test="repetitionTag != null and repetitionTag != ''">
             and ip.repetition_tag = #{repetitionTag}
         </if>
-        <if test="isDisqualification != null and isDisqualification != ''">
-            and ip.ins_result = 0
-        </if>
         order by sort asc
     </select>
 
@@ -572,9 +579,6 @@
         and ins_fibers_id is null
         and standard_method_list_id is not null
         and ip.raw_material_tag = #{rawMaterialTag}
-        <if test="isDisqualification != null and isDisqualification != ''">
-            and ip.ins_result = 0
-        </if>
         order by sort asc
     </select>
 
@@ -697,4 +701,13 @@
         order by ip.sort asc
     </select>
 
+    <!-- 鏍规嵁璁㈠崟id鏌ヨ鏍峰搧 -->
+    <select id="getSampleByOrderId" resultType="com.ruoyi.inspect.pojo.InsSample">
+        select is2.*,
+               sml.name standard_method_name
+        from ins_sample is2
+                 left join standard_method sml on sml.id = is2.standard_method_list_id
+        where is2.ins_order_id = #{insOrderId}
+    </select>
+
 </mapper>

--
Gitblit v1.9.3