From 78c9129e9045fafe4c2f7333b3dcafde6b20b96d Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 05 十二月 2024 15:20:51 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml index 76b9086..ea37b26 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml @@ -112,6 +112,45 @@ where patid = #{patid} </select> + <select id="selectPatArchiveCount" parameterType="Long" resultType="com.smartor.domain.PerSonWorkbenchDto"> + 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 + <if test="deptIds != null ">and deptId in + <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> + #{deptId} + </foreach> + </if> + <if test="drCodes != null ">and drcode in + <foreach collection="drCodes" item="drCode" open="(" separator="," close=")"> + #{drCode} + </foreach> + </if> + </where> + union + select "鍑洪櫌" name1, count(1) as count FROM `pat_med_inhosp` + <where> + del_flag=0 and endtime != null + <if test="deptIds != null ">and deptId in + <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> + #{deptId} + </foreach> + </if> + <if test="drCodes != null ">and drcode in + <foreach collection="drCodes" item="drCode" open="(" separator="," close=")"> + #{drCode} + </foreach> + </if> + </where> + union + select "闂ㄨ瘖" name1, count(1) as count FROM `pat_med_outhosp` + where del_flag=0 + ) aa + + </select> + <insert id="insertPatArchiveOut" parameterType="com.smartor.domain.PatArchiveOut" useGeneratedKeys="true" keyProperty="patid"> insert into pat_archive_out -- Gitblit v1.9.3