From 987e38327f849e1b13d8541246dde08d877db0e8 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 14:10:43 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid
---
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml | 70 ++++++++++++++++++++---------------
1 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 47d8fd3..3baf21f 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -33,6 +33,7 @@
<result property="pid" column="pid"/>
<result property="guid" column="guid"/>
<result property="preachform" column="preachform"/>
+ <result property="preachformDesc" column="preachform_desc"/>
<result property="sendType" column="send_type"/>
<result property="sendState" column="send_state"/>
<result property="hospType" column="hosp_type"/>
@@ -79,6 +80,7 @@
text_param,
templateid,
templatename,
+ preachform_desc,
labelinfo,
count,
executed,
@@ -120,18 +122,20 @@
<select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult">
<include refid="selectServiceTaskVo"/>
- <where>
- del_flag=0
+ WHERE 1=1
+ <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+
+ 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},
- '%')
+ <if test="sendTimeSlot != null and sendTimeSlot != ''">
+ and send_time_slot like concat('%', #{sendTimeSlot},'%')
</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
<if test="longTask != null and longTask != ''">and long_task = #{longTask}</if>
<if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if>
- <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
- '%')
+ <if test="templatename != null and templatename != ''">
+ and templatename like concat('%', #{templatename},'%')
</if>
<if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if>
<if test="count != null ">and count = #{count}</if>
@@ -150,8 +154,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>
@@ -171,25 +176,24 @@
<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=","
- close=")">
+ AND close=")">
#{leavehospitaldistrictcode}
</foreach>
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">
AND deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
- close=")">
+ AND close=")">
#{leaveldeptcode}
</foreach>
</if>
- </where>
+
order by update_time desc,taskid desc
</select>
@@ -235,6 +239,7 @@
service_task.pid,
service_task.guid,
service_task.preachform,
+ service_task.preachform_desc,
service_task.send_type,
service_task.send_state,
service_task.send_time_slot,
@@ -248,11 +253,15 @@
service_task.nexttaskid,
service_task.nexttaskname,
service_task.orgid from service_task
- <where>
- service_task.del_flag=0
+ WHERE 1=1
+ <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+
+ AND service_task.del_flag=0
<!-- and taskid in (-->
<!-- select task_id from service_taskdept-->
- <!-- <where>-->
+ <!-- WHERE 1=1
+ <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+-->
<!-- <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">-->
<!-- dept_code in-->
<!-- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","-->
@@ -260,21 +269,19 @@
<!-- #{leaveldeptcode}-->
<!-- </foreach>-->
<!-- </if>-->
- <!-- </where>-->
+ <!-- -->
<!-- )-->
- <if test="taskName != null and taskName != ''">and service_task.task_name like concat('%', #{taskName},
- '%')
+ <if test="taskName != null and taskName != ''">
+ and service_task.task_name like concat('%', #{taskName},'%')
</if>
- <if test="sendTimeSlot != null and sendTimeSlot != ''">and service_task.send_time_slot like concat('%',
- #{sendTimeSlot},
- '%')
+ <if test="sendTimeSlot != null and sendTimeSlot != ''">
+ and service_task.send_time_slot like concat('%',#{sendTimeSlot},'%')
</if>
<if test="templateid != null and templateid != ''">and service_task.templateid = #{templateid}</if>
<if test="longTask != null and longTask != ''">and service_task.long_task = #{longTask}</if>
<if test="serviceType != null and serviceType != ''">and service_task.service_type = #{serviceType}</if>
- <if test="templatename != null and templatename != ''">and service_task.templatename like concat('%',
- #{templatename},
- '%')
+ <if test="templatename != null and templatename != ''">
+ and service_task.templatename like concat('%',#{templatename},'%')
</if>
<if test="labelinfo != null and labelinfo != ''">and service_task.labelinfo = #{labelinfo}</if>
<if test="count != null ">and service_task.count = #{count}</if>
@@ -289,13 +296,13 @@
<if test="sendDay != null ">and service_task.send_day = #{sendDay}</if>
<if test="type != null and type != ''">and service_task.type = #{type}</if>
<if test="typename != null and typename != ''">and service_task.typename like concat('%', #{typename},
- '%')
+ '%')
</if>
<if test="beginTime != null ">and date_format( service_task.update_time,'%y%m%d') >=
- date_format(#{beginTime},'%y%m%d')
+ AND date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null ">and date_format( service_task.update_time,'%y%m%d') <=
- date_format(#{endTime},'%y%m%d')
+ AND date_format(#{endTime},'%y%m%d')
</if>
<if test="deptcode != null and deptcode != ''">and service_task.deptcode = #{deptcode}</if>
@@ -326,7 +333,7 @@
#{leavehospitaldistrictcode}
</if>
- </where>
+
order by update_time desc,taskid desc
</select>
@@ -365,6 +372,7 @@
<if test="pid != null">pid,</if>
<if test="guid != null">guid,</if>
<if test="preachform != null">preachform,</if>
+ <if test="preachformDesc != null">preachform_desc,</if>
<if test="sendType != null">send_type,</if>
<if test="sendState != null">send_state,</if>
<if test="hospType != null and hospType != ''">hosp_type,</if>
@@ -419,6 +427,7 @@
<if test="pid != null">#{pid},</if>
<if test="guid != null">#{guid},</if>
<if test="preachform != null">#{preachform},</if>
+ <if test="preachformDesc != null">#{preachformDesc},</if>
<if test="sendType != null">#{sendType},</if>
<if test="sendState != null">#{sendState},</if>
<if test="hospType != null and hospType != ''">#{hospType},</if>
@@ -477,6 +486,7 @@
<if test="pid != null">pid = #{pid},</if>
<if test="guid != null">guid = #{guid},</if>
<if test="preachform != null">preachform = #{preachform},</if>
+ <if test="preachformDesc != null">preachform_desc = #{preachformDesc},</if>
<if test="sendType != null">send_type = #{sendType},</if>
<if test="sendState != null">send_state = #{sendState},</if>
<if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if>
--
Gitblit v1.9.3