From fbd4ecb70baf2e671876ca809a81f6e6fe7342ee Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期日, 20 九月 2026 19:52:50 +0800
Subject: [PATCH] feat(inspect): 新增检测标准方法报告文本功能并优化报告生成 - 委托编号生成逻辑调整为下单时生成并校验唯一性,避免审核时重复 - 新增标准模板价格字段及对应的数据模型和数据库映射 - 订单费用详情查询逻辑重构为基于模板价格计算方式 - 新增标准模板与设备绑定关系的数据结构和管理功能 - 委托编号唯一性校验逻辑增强

---
 basic-server/src/main/resources/mapper/StandardMethodMapper.xml |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/basic-server/src/main/resources/mapper/StandardMethodMapper.xml b/basic-server/src/main/resources/mapper/StandardMethodMapper.xml
index 1f50462..b48f4d0 100644
--- a/basic-server/src/main/resources/mapper/StandardMethodMapper.xml
+++ b/basic-server/src/main/resources/mapper/StandardMethodMapper.xml
@@ -21,7 +21,6 @@
                 sm.code,
                 sm.name,
                 sm.structure_test_object_id,
-                sto.specimen_name sample_type,
                 sm.remark,
                 u1.name create_user_name,
                 sm.create_time,
@@ -31,11 +30,14 @@
                 sm.field,
                 sm.name_en,
                 sm.is_use,
-                sm.qualification_id
+                sm.qualification_id,
+                COALESCE((SELECT GROUP_CONCAT(l.laboratory_name ORDER BY COALESCE(l.sort, 0), l.id SEPARATOR '銆�')
+                          FROM standard_method_industry smi JOIN laboratory l ON l.id = smi.industry_id
+                          WHERE smi.standard_method_id = sm.id), '') industry_names,
+                (SELECT COUNT(*) FROM standard_method_attachment sma WHERE sma.standard_method_id = sm.id) attachment_count
                 from standard_method sm
                 left join user u1 on sm.create_user = u1.id
                 left join user u2 on sm.update_user = u2.id
-                left join structure_test_object sto on sm.structure_test_object_id = sto.id
                 where sm.code != '鎶�鏈姹�'
                 ) a
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
@@ -80,6 +82,16 @@
           and is_product = 1
           and structure_test_object_id LIKE CONCAT('%', #{tree}, '%')
     </select>
+    <select id="selectStandardMethodListsByIndustry" resultType="com.ruoyi.basic.pojo.StandardMethodList">
+        select sm.id, sm.code, sm.name, sm.remark
+        from standard_method sm
+                 inner join standard_method_industry smi on smi.standard_method_id = sm.id
+                 inner join laboratory l on l.id = smi.industry_id
+        where sm.is_use = 1
+          and sm.is_product = 1
+          and l.laboratory_name = #{industry}
+        order by sm.id
+    </select>
     <select id="selectListEnum" resultType="com.ruoyi.basic.pojo.StandardMethodList">
         select id,code,name from standard_method
         where is_product = 1

--
Gitblit v1.9.3