From d3bf339bd64d7b7efddc0afdd4beb1866b8b5a04 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期六, 21 九月 2024 00:47:55 +0800
Subject: [PATCH] 代码提交

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

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 6b01e6b..65a6411 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -146,6 +146,34 @@
             <if test="sendState != null  ">and send_state = #{sendState}</if>
             <if test="leavehospitaldistrictname != null  ">and leavehospitaldistrictname = #{leavehospitaldistrictname}</if>
             <if test="leavehospitaldistrictcode != null  ">and leavehospitaldistrictcode = #{leavehospitaldistrictcode}</if>
+            <if test="leavehospitaldistrictcodes != null and leaveldeptcodes != null">
+                AND (leavehospitaldistrictcode IN
+                <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
+                         close=")">
+                    #{leavehospitaldistrictcode}
+                </foreach>
+                OR deptcode IN
+                <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
+                         close="))">
+                    #{leaveldeptcode}
+                </foreach>
+            </if>
+            <if test="leavehospitaldistrictcodes != null and leaveldeptcodes == null">
+                AND leavehospitaldistrictcode IN
+                <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
+                         close=")">
+                    #{leavehospitaldistrictcode}
+                </foreach>
+            </if>
+            <if test="leavehospitaldistrictcodes == null and leaveldeptcodes != null">
+                AND deptcode IN
+                <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
+                         close=")">
+                    #{leaveldeptcode}
+                </foreach>
+            </if>
+
+
         </where>
         order by update_time desc,taskid desc
     </select>

--
Gitblit v1.9.3