From ec23ec3d3dc4ec1ba7d79ba4f46ae2c31d5a16a9 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 10:49:10 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid

---
 smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml b/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
index 7bbd5a9..f4ae969 100644
--- a/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/HospitalRecordMapper.xml
@@ -134,7 +134,8 @@
     <select id="selectHospitalRecordList" parameterType="com.smartor.domain.HospitalRecord"
             resultMap="HospitalRecordResult">
         <include refid="selectHospitalRecordVo"/>
-        <where>
+        WHERE 1=1
+
             <if test="ID != null  and ID != ''">and ID = #{ID}</if>
             <if test="sourceSystem != null  and sourceSystem != ''">and SourceSystem = #{sourceSystem}</if>
             <if test="messageID != null  and messageID != ''">and MessageID = #{messageID}</if>
@@ -174,7 +175,7 @@
             <if test="encAdmSource != null  and encAdmSource != ''">and EncAdmSource = #{encAdmSource}</if>
             <if test="encInhostype != null  and encInhostype != ''">and EncInhostype = #{encInhostype}</if>
             <if test="encDietName != null  and encDietName != ''">and EncDietName like concat('%', #{encDietName},
-                '%')
+                AND '%')
             </if>
             <if test="encOuthostype != null  and encOuthostype != ''">and EncOuthostype = #{encOuthostype}</if>
             <if test="encVisitnum != null  and encVisitnum != ''">and EncVisitnum = #{encVisitnum}</if>
@@ -202,7 +203,7 @@
             <if test="encDiagList != null  and encDiagList != ''">and EncDiagList = #{encDiagList}</if>
             <if test="directorCode != null  and directorCode != ''">and DirectorCode = #{directorCode}</if>
             <if test="directorName != null  and directorName != ''">and DirectorName like concat('%', #{directorName},
-                '%')
+                AND '%')
             </if>
             <if test="dncDiagnosisCode != null  and dncDiagnosisCode != ''">and EncDiagnosisCode = #{dncDiagnosisCode}
             </if>
@@ -214,7 +215,7 @@
             </if>
             <if test="taskStatus != null  and taskStatus != ''">and taskStatus = #{taskStatus}</if>
             <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-        </where>
+        
     </select>
 
     <select id="selectHospitalRecordByID" parameterType="String" resultMap="HospitalRecordResult">

--
Gitblit v1.9.3