From 5389773b2d1ae86daec68b00f67c3682dc907e01 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 22 十一月 2024 14:35:48 +0800
Subject: [PATCH] 代码提交(长期任务电话完成)

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

diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
index 688dfaf..3813194 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -192,4 +192,24 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectPatMedOuthospCount" parameterType="com.smartor.domain.PatMedReq"
+            resultType="com.smartor.domain.PatMedRes">
+        SELECT
+        COUNT(id) AS rc,
+        COUNT(DISTINCT patid) AS rs
+        FROM
+        pat_med_outhosp
+        <where>
+            del_flag=0
+            and date_format(admitdate,'%y%m%d') &gt;= date_format(#{startDate},'%y%m%d')
+            and date_format(admitdate,'%y%m%d') &lt;= date_format(#{endDate},'%y%m%d')
+            <if test="deptcodeList != null">
+                and deptcode in
+                <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+                    #{deptcode}
+                </foreach>
+            </if>
+        </where>
+    </select>
 </mapper>

--
Gitblit v1.9.3