From 562a960261b75d70abd65aa10528f09aeece94e8 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 24 九月 2024 09:49:23 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 35 ++++++-----------------------------
1 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 854773c..52c1d4a 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -198,31 +198,20 @@
<if test="leaveldeptname != null and leaveldeptname != ''">and b.leaveldeptname like concat('%',
#{leaveldeptname}, '%')
</if>
- <if test="patid != null and patid != ''">and a.id =#{patid}
+ <if test="patid != null and patid != ''">and a.id =#{patid}
</if>
<if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
b.leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')
</if>
- <if test="leavehospitaldistrictcodes != null and leaveldeptcodes != null">
- AND (b.leavehospitaldistrictcode IN
- <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
- #{leavehospitaldistrictcode}
- </foreach>
- OR b.leaveldeptcode IN
- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close="))">
- #{leaveldeptcode}
- </foreach>
- </if>
- <if test="leavehospitaldistrictcodes != null and leaveldeptcodes == null">
+
+ <if test="leavehospitaldistrictcodes != null">
AND b.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
- <if test="leavehospitaldistrictcodes == null and leaveldeptcodes != null">
+ <if test="leaveldeptcodes != null">
AND b.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
close=")">
@@ -311,26 +300,14 @@
#{leavediagname}, '%')
</if>
<if test="drname != null and drname != ''">and b.drname like concat('%', #{drname}, '%')</if>
- <if test="leavehospitaldistrictcodes != null and leaveldeptcodes != null">
- AND (b.leavehospitaldistrictcode IN
- <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
- #{leavehospitaldistrictcode}
- </foreach>
- OR b.leaveldeptcode IN
- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close="))">
- #{leaveldeptcode}
- </foreach>
- </if>
- <if test="leavehospitaldistrictcodes != null and leaveldeptcodes == null">
+ <if test="leavehospitaldistrictcodes != null ">
AND b.leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
- <if test="leavehospitaldistrictcodes == null and leaveldeptcodes != null">
+ <if test="leaveldeptcodes != null">
AND b.leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
close=")">
--
Gitblit v1.9.3