From d2d33d9e10b6a68b84a43a1b970a94246ffdf801 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 16:15:54 +0800
Subject: [PATCH] Merge branch 'master-where标签替换'
---
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
index 68bc33f..1f482fc 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -121,8 +121,8 @@
pmo.patname,
pmo.mainsuit
from pat_med_outhosp pmo
- <where>
- pmo.del_flag=0
+ where 1=1
+ and pmo.del_flag=0
<if test="orgid != null ">and pmo.orgid = #{orgid}</if>
<if test="serialnum != null ">and pmo.serialnum = #{serialnum}</if>
<if test="serverState != null ">and pmo.server_state = #{serverState}</if>
@@ -153,7 +153,6 @@
<if test="outhospno != null and outhospno != ''">and pmo.outhospno = #{outhospno}</if>
<if test="diagcheckFlag != null and diagcheckFlag != ''">and pmo.diagcheck_flag = #{diagcheckFlag}</if>
<if test="diagname != null and diagname != ''">and pmo.diagname like concat('%',#{diagname}, '%')</if>
- </where>
order by pmo.update_time desc
</select>
@@ -460,8 +459,8 @@
0 AS rs
FROM
pat_med_outhosp
- <where>
- del_flag=0
+ where 1=1
+ and del_flag = 0
<if test="orgid != null">
and orgid = #{orgid}
</if>
@@ -473,15 +472,14 @@
#{deptcode}
</foreach>
</if>
- </where>
union all
select
0 AS rc,
count(1) AS rs
FROM
service_subtask
- <where>
- del_flag = 0
+ where 1=1
+ and del_flag = 0
and service_type=3
<if test="orgid != null">
and orgid = #{orgid}
@@ -498,15 +496,17 @@
#{deptcode}
</foreach>
</if>
- </where>
) AS combined_data
</select>
<select id="getDeptRanking" parameterType="com.smartor.domain.PatMedReq" resultType="com.smartor.domain.PatMedRes">
SELECT deptname, COUNT(1) AS rc
FROM pat_med_outhosp
- <where>
- del_flag=0
+ where 1=1
+ and del_flag = 0
+ <if test="orgid != null and orgid != ''">
+ and orgid = #{orgid}
+ </if>
<if test="inhospstate != null">
and inhospstate= #{inhospstate}
</if>
@@ -519,7 +519,6 @@
#{deptcode}
</foreach>
</if>
- </where>
</select>
<!-- PatMedOuthospMapper.xml -->
--
Gitblit v1.9.3