From 71c4428446f6d5692de5dd6d0b9451bbe046247b Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 08 四月 2025 22:25:42 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 036a68a..6d19dff 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -432,7 +432,7 @@
             resultMap="PatArchiveOthreInfoResult">
 
         SELECT
-        DISTINCT a.id,
+        a.id,
         a.age_unit,
         a.age_unit2,
         a.patid_his,
@@ -485,7 +485,6 @@
                     #{tagId}
                 </foreach>
             </if>
-
         </where>
         order by a.update_time desc
     </select>
@@ -493,9 +492,8 @@
 
     <select id="selectPatArchiveInfoByInhosp" parameterType="com.smartor.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
-
         select
-        DISTINCT a.id,
+        a.id,
         a.age_unit,
         a.age_unit2,
         a.inhospno,
@@ -629,9 +627,8 @@
 
     <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
-
         select
-        DISTINCT a.id,
+        a.id,
         a.age_unit,
         a.age_unit2,
         a.patid_his,
@@ -669,6 +666,7 @@
         a.create_time,
         a.isupload,
         a.upload_time,
+        t.tagname,
         a.pattype
         from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
@@ -755,6 +753,7 @@
         a.create_time,
         a.isupload,
         a.upload_time,
+        t.tagname,
         a.pattype
         from pat_med_physical d JOIN pat_archive a ON a.id = d.patid
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
@@ -804,7 +803,7 @@
             resultMap="PatArchiveOthreInfoResult">
 
         select
-        distinct a.idcardno,
+        a.idcardno,
         a.id,
         a.age_unit,
         a.age_unit2,
@@ -891,9 +890,6 @@
             <if test="diagname != null and diagname != ''">
                 AND d.diagname LIKE concat('%',#{diagname}, '%')
             </if>
-            <if test="deptname != null and deptname != ''">
-                AND d.deptname LIKE concat('%',#{deptname}, '%')
-            </if>
             <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
                 AND d.leavehospitaldistrictcode IN
                 <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
@@ -918,14 +914,13 @@
                 AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
             </if>
         </where>
-        order by a.update_time desc
     </select>
 
     <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
 
         select
-        distinct a.idcardno,
+        a.idcardno,
         a.id,
         a.age_unit,
         a.age_unit2,
@@ -963,6 +958,7 @@
         a.create_time,
         a.isupload,
         a.upload_time,
+        t.tagname,
         a.pattype
         from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
@@ -1011,7 +1007,7 @@
             resultMap="PatArchiveOthreInfoResult">
 
         select
-        distinct a.idcardno,
+        a.idcardno,
         a.id,
         a.age_unit,
         a.age_unit2,
@@ -1049,6 +1045,7 @@
         a.create_time,
         a.isupload,
         a.upload_time,
+        t.tagname,
         a.pattype
         from pat_med_physical d JOIN pat_archive a ON a.id = d.patid
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =

--
Gitblit v1.9.3