From ebea32b73dc5182247165d7040b8f8f5b7d72ed7 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 20 十月 2026 14:54:49 +0800
Subject: [PATCH] 【丽水】处理超时随访任务
---
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml | 84 +++++++++++++++++++++++++++++-------------
1 files changed, 58 insertions(+), 26 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 8d227ba..09634e7 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -15,6 +15,7 @@
<result property="unexecuted" column="unexecuted"/>
<result property="fail" column="fail"/>
<result property="sendDay" column="send_day"/>
+ <result property="delayFinishDays" column="delay_finish_days"/>
<result property="checkuserid" column="checkuserid"/>
<result property="checkusername" column="checkusername"/>
<result property="checktime" column="checktime"/>
@@ -30,6 +31,7 @@
<result property="isupload" column="isupload"/>
<result property="uploadTime" column="upload_time"/>
<result property="orgid" column="orgid"/>
+ <result property="campusid" column="campusid"/>
<result property="pid" column="pid"/>
<result property="guid" column="guid"/>
<result property="preachform" column="preachform"/>
@@ -69,6 +71,7 @@
pat_cycle,
appltype,
send_day,
+ delay_finish_days,
long_task,
show_date,
compensate_date,
@@ -115,6 +118,7 @@
leavehospitaldistrictcode,
leavehospitaldistrictname,
orgid,
+ campusid,
nexttaskflag,
nexttaskid,
nexttaskname,
@@ -161,6 +165,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if>
<if test="compensateDate != null and compensateDate != ''">and compensate_date = #{compensateDate}</if>
<if test="hospType != null and hospType != ''">and hosp_type = #{hospType}</if>
<if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
@@ -203,6 +208,7 @@
service_task.task_name,
service_task.appltype,
service_task.send_day,
+ service_task.delay_finish_days,
service_task.long_task,
service_task.show_date,
service_task.compensate_date,
@@ -252,7 +258,8 @@
service_task.nexttaskflag,
service_task.nexttaskid,
service_task.nexttaskname,
- service_task.orgid from service_task
+ service_task.orgid,
+ service_task.campusid from service_task
where 1=1
and service_task.del_flag = 0
<!-- and taskid in (-->
@@ -342,7 +349,8 @@
<if test="deptname != null and deptname != ''">and service_task.deptname = #{deptname}</if>
<if test="isupload != null ">and service_task.isupload = #{isupload}</if>
<if test="uploadTime != null ">and service_task.upload_time = #{uploadTime}</if>
- <if test="orgid != null and orgid != ''">and service_task.orgid = #{orgid}</if>
+ <if test="orgid != null and orgid != ''">and service_task.orgid = #{orgid}</if>
+ <if test="campusid != null and campusid != ''">and service_task.campusid = #{campusid}</if>
<if test="compensateDate != null and compensateDate != ''">and service_task.compensate_date =
#{compensateDate}
</if>
@@ -370,6 +378,7 @@
<if test="isupload != null ">and service_task.isupload = #{isupload}</if>
<if test="uploadTime != null ">and service_task.upload_time = #{uploadTime}</if>
<if test="orgid != null and orgid != ''">and service_task.orgid = #{orgid}</if>
+ <if test="campusid != null and campusid != ''">and service_task.campusid = #{campusid}</if>
<if test="compensateDate != null and compensateDate != ''">and service_task.compensate_date =
#{compensateDate}
</if>
@@ -389,20 +398,34 @@
<if test="leavehospitaldistrictname != null ">and service_task.leavehospitaldistrictname =
#{leavehospitaldistrictname}
</if>
- <if test="leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0">
- AND service_task.leavehospitaldistrictcode IN
- <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator=","
- close=")">
- #{leavehospitaldistrictcode}
- </foreach>
- </if>
- <if test="leaveldeptcodes!=null and leaveldeptcodes.size()>0">
- AND service_task.deptcode IN
- <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator=","
- close=")">
- #{deptcode}
- </foreach>
- </if>
+ <choose>
+ <when test="(leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0) and (leaveldeptcodes!=null and leaveldeptcodes.size()>0)">
+ AND (
+ service_task.leavehospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")">
+ #{leavehospitaldistrictcode}
+ </foreach>
+ OR service_task.deptcode IN
+ <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ )
+ </when>
+ <otherwise>
+ <if test="leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0">
+ AND service_task.leavehospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")">
+ #{leavehospitaldistrictcode}
+ </foreach>
+ </if>
+ <if test="leaveldeptcodes!=null and leaveldeptcodes.size()>0">
+ AND service_task.deptcode IN
+ <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </otherwise>
+ </choose>
<if test="leavehospitaldistrictcode != null ">and service_task.leavehospitaldistrictcode =
#{leavehospitaldistrictcode}
</if>
@@ -441,6 +464,10 @@
<if test="isupload != null">isupload,</if>
<if test="uploadTime != null">upload_time,</if>
<if test="orgid != null">orgid,</if>
+ <if test="campusid != null and campusid != ''">campusid,</if>
+ <if test="nexttaskflag != null">nexttaskflag,</if>
+ <if test="nexttaskid != null">nexttaskid,</if>
+ <if test="nexttaskname != null">nexttaskname,</if>
<if test="pid != null">pid,</if>
<if test="guid != null">guid,</if>
<if test="preachform != null">preachform,</if>
@@ -466,6 +493,7 @@
<if test="leavehospitaldistrictcode != null ">leavehospitaldistrictcode,</if>
<if test="compensateDate != null and compensateDate != ''">compensate_date,</if>
<if test="sendDay != null ">send_day,</if>
+ <if test="delayFinishDays != null ">delay_finish_days,</if>
<if test="appltype != null ">appltype,</if>
<if test="patCycle != null ">pat_cycle,</if>
<if test="diagType != null and diagType != ''">diag_type,</if>
@@ -494,6 +522,7 @@
<if test="isupload != null">#{isupload},</if>
<if test="uploadTime != null">#{uploadTime},</if>
<if test="orgid != null">#{orgid},</if>
+ <if test="campusid != null and campusid != ''">#{campusid},</if>
<if test="nexttaskflag != null">#{nexttaskflag},</if>
<if test="nexttaskid != null">#{nexttaskid},</if>
<if test="nexttaskname != null">#{nexttaskname},</if>
@@ -520,8 +549,9 @@
<if test="jsy != null and jsy != ''">#{jsy},</if>
<if test="leavehospitaldistrictname != null ">#{leavehospitaldistrictname},</if>
<if test="leavehospitaldistrictcode != null ">#{leavehospitaldistrictcode},</if>
- <if test="compensateDate != null and compensateDate != ''">#{compensateDate}</if>
+ <if test="compensateDate != null and compensateDate != ''">#{compensateDate},</if>
<if test="sendDay != null ">#{sendDay},</if>
+ <if test="delayFinishDays != null ">#{delayFinishDays},</if>
<if test="appltype != null ">#{appltype},</if>
<if test="patCycle != null ">#{patCycle},</if>
<if test="diagType != null and diagType != ''">#{diagType},</if>
@@ -531,21 +561,21 @@
<update id="updateServiceTask" parameterType="com.smartor.domain.ServiceTask">
update service_task
<trim prefix="SET" suffixOverrides=",">
- <if test="taskName != null">task_name = #{taskName},</if>
+ <if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
<if test="templateid != null">templateid = #{templateid},</if>
- <if test="templatename != null">templatename = #{templatename},</if>
+ <if test="templatename != null and templatename != ''">templatename = #{templatename},</if>
<if test="labelinfo != null">labelinfo = #{labelinfo},</if>
<if test="count != null">count = #{count},</if>
<if test="executed != null">executed = #{executed},</if>
<if test="unexecuted != null">unexecuted = #{unexecuted},</if>
<if test="fail != null">fail = #{fail},</if>
<if test="checkuserid != null">checkuserid = #{checkuserid},</if>
- <if test="checkusername != null">checkusername = #{checkusername},</if>
+ <if test="checkusername != null and checkusername != ''">checkusername = #{checkusername},</if>
<if test="checktime != null">checktime = #{checktime},</if>
<if test="type != null">type = #{type},</if>
<if test="typename != null">typename = #{typename},</if>
- <if test="deptcode != null">deptcode = #{deptcode},</if>
- <if test="deptname != null">deptname = #{deptname},</if>
+ <if test="deptcode != null and deptcode != ''">deptcode = #{deptcode},</if>
+ <if test="deptname != null and deptname != ''">deptname = #{deptname},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
@@ -554,13 +584,14 @@
<if test="isupload != null">isupload = #{isupload},</if>
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="orgid != null">orgid = #{orgid},</if>
+ <if test="campusid != null and campusid != ''">campusid = #{campusid},</if>
<if test="nexttaskflag != null">nexttaskflag = #{nexttaskflag},</if>
<if test="nexttaskid != null">nexttaskid = #{nexttaskid},</if>
- <if test="nexttaskname != null">nexttaskname = #{nexttaskname},</if>
+ <if test="nexttaskname != null and nexttaskname!=''">nexttaskname = #{nexttaskname},</if>
<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="preachformDesc != null and preachformDesc!=''">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>
@@ -578,12 +609,13 @@
<if test="longTask != null and longTask != ''">long_task = #{longTask},</if>
<if test="kcb != null and kcb != ''">kcb = #{kcb},</if>
<if test="jsy != null and jsy != ''">jsy = #{jsy},</if>
- <if test="leavehospitaldistrictname != null ">leavehospitaldistrictname = #{leavehospitaldistrictname},
+ <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">leavehospitaldistrictname = #{leavehospitaldistrictname},
</if>
- <if test="leavehospitaldistrictcode != null ">leavehospitaldistrictcode = #{leavehospitaldistrictcode},
+ <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">leavehospitaldistrictcode = #{leavehospitaldistrictcode},
</if>
<if test="compensateDate != null and compensateDate != ''">compensate_date = #{compensateDate},</if>
<if test="sendDay != null ">send_day = #{sendDay},</if>
+ <if test="delayFinishDays != null ">delay_finish_days = #{delayFinishDays},</if>
<if test="appltype != null ">appltype = #{appltype},</if>
<if test="patCycle != null ">pat_cycle = #{patCycle},</if>
<if test="diagType != null and diagType != ''">diag_type = #{diagType},</if>
--
Gitblit v1.9.3