From 138f31f7ed04842abca552dc8eaa912b3191e059 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 28 九月 2026 10:56:49 +0800
Subject: [PATCH] 处理患者再入院状态代码提交

---
 smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 9a47f1f..9dbf769 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -661,6 +661,19 @@
           AND d.del_flag = 0
     </select>
 
+    <!-- 鎵归噺鍙栨偅鑰呮爣绛撅紝鏇夸唬閫愯璋冪敤 getTagnameBypatid锛涙瘡琛屽惈 patid銆乼agname 涓や釜 key -->
+    <select id="getTagnameByPatids" resultType="java.util.HashMap">
+        SELECT d.patid                     AS patid,
+               GROUP_CONCAT(d.tagname, ', ') AS tagname
+        FROM pat_archivetag d
+        WHERE d.del_flag = 0
+          AND d.patid IN
+        <foreach collection="patids" item="patid" open="(" separator="," close=")">
+            #{patid}
+        </foreach>
+        GROUP BY d.patid
+    </select>
+
 
     <select id="selectPatMedInhospByInhospid" parameterType="Long" resultMap="PatMedInhospResult">
         <include refid="selectPatMedInhospVo"/>
@@ -749,6 +762,18 @@
     </select>
 
 
+    <!-- 鎸夋偅鑰呯紪鍙� + 鍑洪櫌鏃ユ湡鏌ヨ鍑洪櫌璁板綍锛堝嚭闄㈡椂闂村彧姣旇緝鍒板ぉ锛屼笉姣旇緝鏃跺垎绉掞級锛岀敤浜庡垽鏂偅鑰呮槸鍚﹀啀鍏ラ櫌 -->
+    <select id="selectOutInhospByPatnoAndOutDate" resultMap="PatMedInhospResult">
+        <include refid="selectPatMedInhospVo"/>
+        where del_flag = 0
+        and inhospstate = '1'
+        <if test="patno != null and patno != ''">and patno = #{patno}</if>
+        <if test="dayStart != null">and endtime &gt;= #{dayStart}</if>
+        <if test="dayEnd != null">and endtime &lt; #{dayEnd}</if>
+        order by inhospid desc
+    </select>
+
+
     <insert id="insertPatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp" useGeneratedKeys="true"
             keyProperty="inhospid">
         insert into pat_med_inhosp

--
Gitblit v1.9.3