From bd6c66c1a161e9f0fe94b94bed7935b2bde541f2 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 14 五月 2025 18:14:32 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 053c52c..04266b6 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -646,7 +646,7 @@
FROM pat_med_outhosp
<where>
del_flag=0
- <if test="deptcodeList != null">
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
@@ -663,7 +663,7 @@
<where>
del_flag=0
and inhospstate=0
- <if test="deptcodeList != null">
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
@@ -678,7 +678,7 @@
<where>
del_flag=0
and inhospstate=1
- <if test="deptcodeList != null">
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
@@ -693,7 +693,7 @@
<where>
del_flag=0
and inhospstate=1
- <if test="deptcodeList != null">
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
@@ -703,8 +703,6 @@
</if>
) AS combined
GROUP BY deptname;
-
-
</select>
<select id="selectPatMedInhospCount" parameterType="com.smartor.domain.PatMedReq"
resultType="com.smartor.domain.PatMedRes">
@@ -725,7 +723,7 @@
and date_format(endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d')
and date_format(endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d')
</if>
- <if test="deptcodeList != null">
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
and deptcode in
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
--
Gitblit v1.9.3