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/PatArchiveOutMapper.xml | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
index ea37b26..705f198 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
@@ -76,7 +76,8 @@
<select id="selectPatArchiveOutList" parameterType="com.smartor.domain.PatArchiveOut"
resultMap="PatArchiveOutResult">
<include refid="selectPatArchiveOutVo"/>
- <where>
+ WHERE 1=1
+
<if test="patientno != null and patientno != ''">and patientno = #{patientno}</if>
<if test="pattype != null and pattype != ''">and pattype = #{pattype}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
@@ -104,7 +105,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="membertype != null and membertype != ''">and membertype = #{membertype}</if>
- </where>
+
</select>
<select id="selectPatArchiveOutByPatid" parameterType="Long" resultMap="PatArchiveOutResult">
@@ -116,8 +117,9 @@
select aa.name1 as name, aa.count as count
from (
SELECT "浣忛櫌" as name1, count(1) as count FROM `pat_med_inhosp`
- <where>
- del_flag = 0 and endtime = null
+ WHERE 1=1
+
+ AND del_flag = 0 and endtime = null
<if test="deptIds != null ">and deptId in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
@@ -128,11 +130,12 @@
#{drCode}
</foreach>
</if>
- </where>
+
union
select "鍑洪櫌" name1, count(1) as count FROM `pat_med_inhosp`
- <where>
- del_flag=0 and endtime != null
+ WHERE 1=1
+
+ AND del_flag=0 and endtime != null
<if test="deptIds != null ">and deptId in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
@@ -143,7 +146,7 @@
#{drCode}
</foreach>
</if>
- </where>
+
union
select "闂ㄨ瘖" name1, count(1) as count FROM `pat_med_outhosp`
where del_flag=0
--
Gitblit v1.9.3