From 722fa40345f1fc650eaeae4a721c3ae4106d92a8 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期三, 18 九月 2024 19:03:56 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml index 6787df2..d305d95 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml @@ -495,14 +495,26 @@ <if test="deptname != null and deptname != ''"> AND d.deptname LIKE concat('%',#{deptname}, '%') </if> - <if test="leavehospitaldistrictcodes != null"> + <if test="leavehospitaldistrictcodes != null and leaveldeptcodes != null"> + AND d.leavehospitaldistrictcode IN + <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," + close=")"> + #{leavehospitaldistrictcode} + </foreach> + OR d.leaveldeptcode IN + <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," + close=")"> + #{leaveldeptcode} + </foreach> + </if> + <if test="leavehospitaldistrictcodes != null and leaveldeptcodes == null"> AND d.leavehospitaldistrictcode IN <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")"> #{leavehospitaldistrictcode} </foreach> </if> - <if test="leaveldeptcodes != null"> + <if test="leavehospitaldistrictcodes == null and leaveldeptcodes != null"> AND d.leaveldeptcode IN <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," close=")"> -- Gitblit v1.9.3