From 569e8be78cc357147a403daa1af8dfe6dd7d5308 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 18 八月 2026 18:22:10 +0800
Subject: [PATCH] 1.处理药品宣教的问题 2.处理南华满意度的功能 3.处理随访导出的问题 4.处理南华短信的问题

---
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml |   44 +++++++++++++-------------------------------
 1 files changed, 13 insertions(+), 31 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 4db0375..eb75f99 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -281,7 +281,6 @@
         <include refid="selectServiceSubtaskVo"/>
         where 1=1
         and del_flag = 0
-        and sendstate != 5
         <if test="orgid != null and orgid != ''">
             and orgid = #{orgid}
         </if>
@@ -291,26 +290,6 @@
         <if test="taskid != null ">and taskid = #{taskid}</if>
         <if test="visitTime != null">
             AND date_format(visit_time,'%y%m%d') &lt;= date_format(#{visitTime},'%y%m%d')
-        </if>
-        <if test="sendstate != null ">and sendstate = #{sendstate}</if>
-        <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if>
-        <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if>
-        <if test="continueCount != null ">and continue_count = #{continueCount}</if>
-        <if test="continueTimeNext != null ">and continue_time_next = #{continueTimeNext}</if>
-        UNION ALL
-        <include refid="selectServiceSubtaskVo"/>
-        where 1=1
-        and del_flag = 0
-        and sendstate = 5
-        <if test="orgid != null and orgid != ''">
-            and orgid = #{orgid}
-        </if>
-        <if test="subId != null">
-            AND id = #{subId}
-        </if>
-        <if test="taskid != null ">and taskid = #{taskid}</if>
-        <if test="visitTime != null">
-            AND date_format(visit_time,'%y%m%d') &lt;= date_format(DATE_ADD(#{visitTime}, INTERVAL 1 DAY),'%y%m%d')
         </if>
         <if test="sendstate != null ">and sendstate = #{sendstate}</if>
         <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if>
@@ -1388,16 +1367,17 @@
             <if test="continueTimeNext != null ">continue_time_next = #{continueTimeNext,jdbcType=TIMESTAMP},</if>
             <if test="continueContent != null ">continue_content = #{continueContent},</if>
         </trim>
-        where
-        <if test="patid != null ">
-            patid = #{patid}
-        </if>
-        <if test="taskid != null ">
-            and taskid = #{taskid}
-        </if>
-        <if test="id != null ">
-            and id = #{id}
-        </if>
+        <where>
+            <if test="patid != null ">
+                patid = #{patid}
+            </if>
+            <if test="taskid != null ">
+                and taskid = #{taskid}
+            </if>
+            <if test="id != null ">
+                and id = #{id}
+            </if>
+        </where>
     </update>
 
     <update id="updateServiceSubtaskByTaskGuid" parameterType="com.smartor.domain.ServiceSubtask">
@@ -3078,6 +3058,7 @@
             #{taskId}
         </foreach>
         and s.sendstate=6
+        and d.del_flag=0
         GROUP BY
         t.taskid,
         d.questiontext
@@ -3087,6 +3068,7 @@
             #{taskId}
         </foreach>
         AND s.sendstate = 6
+        and d.del_flag=0
       <if test="startOutHospTime != null">
         AND date_format(s.endtime,'%y%m%d') &gt;= date_format(#{startOutHospTime},'%y%m%d')
     </if>

--
Gitblit v1.9.3