From 89e166f18d6e33efde0dda97f1fb27f29e675660 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 05 八月 2024 17:57:45 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 78c168a..ab22592 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -315,6 +315,8 @@
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
         d.patid
         <where>
+            d.del_flag != 1
+            AND a.del_flag != 1
             <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
             <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
             <if test="pid != null  and pid != ''">and a.id = #{id}</if>
@@ -353,8 +355,9 @@
                     #{pid}
                 </foreach>
             </if>
-            AND d.del_flag != 1
-            AND a.del_flag != 1
+            <if test="isFilter == true">
+                AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+            </if>
         </where>
     </select>
 
@@ -394,6 +397,8 @@
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
         d.patid
         <where>
+            d.del_flag != 1
+            AND a.del_flag != 1
             <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
             <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
             <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -422,8 +427,9 @@
                     #{pid}
                 </foreach>
             </if>
-            AND d.del_flag != 1
-            AND a.del_flag != 1
+            <if test="isFilter == true">
+                AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+            </if>
         </where>
     </select>
 
@@ -463,6 +469,8 @@
         LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid =
         d.patid
         <where>
+            d.del_flag != 1
+            AND a.del_flag != 1
             <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
             <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
             <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
@@ -492,8 +500,9 @@
                     #{pid}
                 </foreach>
             </if>
-            AND d.del_flag != 1
-            AND a.del_flag != 1
+            <if test="isFilter == true">
+                AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
+            </if>
         </where>
 
     </select>

--
Gitblit v1.9.3