From da026a34bcc97b2eb49607a3b02d94d8f683f997 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 07 一月 2026 16:18:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 5110723..1e427e6 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -122,8 +122,8 @@
<select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult">
<include refid="selectServiceTaskVo"/>
- <where>
- del_flag=0
+ where 1=1
+ and del_flag = 0
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
<if test="taskid != null">and taskid = #{taskid}</if>
<if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot},
@@ -152,8 +152,9 @@
</if>
<if test="endTime != null ">and date_format(update_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
-
- <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
+ <if test="deptcode != null and deptcode != ''">
+ and deptcode REGEXP CONCAT('(^|,)', #{deptcode}, '(,|$)')
+ </if>
<if test="deptname != null and deptname != ''">and deptname = #{deptname}</if>
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
@@ -173,10 +174,9 @@
<if test="leavehospitaldistrictname != null ">and leavehospitaldistrictname =
#{leavehospitaldistrictname}
</if>
- <if test="leavehospitaldistrictcode != null ">and leavehospitaldistrictcode =
- #{leavehospitaldistrictcode}
+ <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">
+ and leavehospitaldistrictcode REGEXP CONCAT('(^|,)', #{leavehospitaldistrictcode}, '(,|$)')
</if>
-
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
@@ -191,7 +191,6 @@
#{leaveldeptcode}
</foreach>
</if>
- </where>
order by update_time desc,taskid desc
</select>
@@ -251,19 +250,18 @@
service_task.nexttaskid,
service_task.nexttaskname,
service_task.orgid from service_task
- <where>
- service_task.del_flag=0
+ where 1=1
+ and service_task.del_flag = 0
<!-- and taskid in (-->
<!-- select task_id from service_taskdept-->
- <!-- <where>-->
+ <!-- where 1=1-->
<!-- <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">-->
- <!-- dept_code in-->
+ <!-- and dept_code in-->
<!-- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","-->
<!-- close=")">-->
<!-- #{leaveldeptcode}-->
<!-- </foreach>-->
<!-- </if>-->
- <!-- </where>-->
<!-- )-->
<if test="taskName != null and taskName != ''">and service_task.task_name like concat('%', #{taskName},
'%')
@@ -328,8 +326,6 @@
<if test="leavehospitaldistrictcode != null ">and service_task.leavehospitaldistrictcode =
#{leavehospitaldistrictcode}
</if>
-
- </where>
order by update_time desc,taskid desc
</select>
--
Gitblit v1.9.3