From 46cbb47dcc47099b9a29e8006f14af63f678c7b0 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 24 四月 2026 11:25:44 +0800
Subject: [PATCH] 标准库:查看新增和更新人信息

---
 basic-server/src/main/resources/mapper/StandardTreeMapper.xml |   53 +++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 10 deletions(-)

diff --git a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
index ded9337..95a39f6 100644
--- a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
+++ b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -49,6 +49,7 @@
     <resultMap id="ModelDto" type="com.ruoyi.basic.dto.ModelDto">
         <result property="label" column="model"/>
         <result property="value" column="model"/>
+        <result property="standardTreeId" column="standard_tree_id"/>
     </resultMap>
 
     <sql id="selectStandardTree">
@@ -99,7 +100,8 @@
                sto.id  sample_type_id,
                sto.sort,
                sto.specimen_name_en sample_type_en,
-               p.name_en sample_en
+               p.name_en sample_en,
+               st.id AS standard_tree_id
         from laboratory l
                  left join structure_test_object sto on sto.laboratory_id = l.id
                  left join product p on p.object_id = sto.id
@@ -154,15 +156,7 @@
            or sp.sample = ''
            or sp.sample = '[]'
     </select>
-    <select id="getStandardMethodListBySample" resultType="com.ruoyi.basic.pojo.StandardMethodList">
-        select sm.code,sm.name,sm.remark from standard_method sm
-        left join structure_test_object sto on sm.structure_test_object_id = sto.id
-        where is_use = 1
-        and is_product = 1
-        <if test="sampleType != null">
-            and sto.specimen_name = #{sampleType}
-        </if>
-    </select>
+
     <select id="selectStandardTreeList2" resultType="com.ruoyi.basic.pojo.StandardTree">
         select '涓ぉ绉戞妧妫�娴嬩腑蹇�'        factory,
                l.laboratory_name laboratory,
@@ -338,6 +332,7 @@
             ${ew.customSqlSegment}
         </if>
     </select>
+
     <select id="getIfsByOver" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
         select * from (<include refid="getIfsOrder"/>
         <where>
@@ -351,6 +346,7 @@
         </if>
         order by send_time desc
     </select>
+
     <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
         select * from (<include refid="getIfsOrder"/>
             <where>
@@ -389,4 +385,41 @@
             </foreach>
         </if>
     </select>
+
+    <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto">
+        select model label,
+               model value,
+               id AS standard_tree_id
+        from standard_tree
+        where sample_type = #{sampleType}
+          and sample is null
+    </select>
+
+    <!-- 鏍规嵁鍘熸潗鏂檌d鍒楄〃鏌ヨ鍘熸潗鏂欎俊鎭� -->
+    <select id="getIfsByIds" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
+        <include refid="getIfsOrder"/>
+        where id in
+        <foreach item="id" collection="ifsIds" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+    <select id="selectStandardTreeById" resultType="com.ruoyi.basic.vo.StandardTreeVO">
+        select
+            st.id,
+            st.factory,
+            st.laboratory,
+            st.sample_type,
+            st.sample,
+            st.model,
+            st.create_user,
+            st.create_time,
+            st.update_user,
+            st.update_time,
+            u1.name AS create_user_name,
+            u2.name AS update_user_name
+        from standard_tree st
+        left join user u1 on st.create_user = u1.id
+        left join user u2 on st.update_user = u2.id
+        where st.id = #{standardTreeId}
+    </select>
 </mapper>

--
Gitblit v1.9.3