From 8f3649533c9a4062cf00f583dfef96dcb7837514 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 21 八月 2026 09:31:07 +0800
Subject: [PATCH] 【丽水】超链接加上remark

---
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml |   43 +++++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 52eef2d..3524fef 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -506,10 +506,10 @@
         <if test="isVisitAgain != null">and is_visit_again = #{isVisitAgain}</if>
         <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0">
             AND visit_dept_code IN
-            <foreach collection="visitDeptCodes" item="visitDeptCodes" open="("
+            <foreach collection="visitDeptCodes" item="visitDeptCode" open="("
                      separator=","
                      close=")">
-                #{visitDeptCodes}
+                #{visitDeptCode}
             </foreach>
         </if>
         <if test="sort != null  and sort==0">order by endtime asc</if>
@@ -1367,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">
@@ -1816,7 +1817,8 @@
             continue_content,
             continue_count,
             continue_time_next,
-            task_situation
+            task_situation,
+            remark
             from service_subtask
             where 1=1
             and del_flag = 0
@@ -2558,8 +2560,9 @@
             </if>
         </if>
         <if test="deptOrDistrict==2">
+            AND (1=1
             <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
-                AND (leavehospitaldistrictcode IN
+                AND leavehospitaldistrictcode IN
                 <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
                          separator=","
                          close=")">
@@ -2569,17 +2572,18 @@
             <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
                 OR deptcode IN
                 <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
-                         close="))">
+                         close=")">
                     #{leaveldeptcode}
                 </foreach>
             </if>
+            )
         </if>
         <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0">
             AND visit_dept_code IN
-            <foreach collection="visitDeptCodes" item="visitDeptCodes" open="("
+            <foreach collection="visitDeptCodes" item="visitDeptCode" open="("
                      separator=","
                      close=")">
-                #{visitDeptCodes}
+                #{visitDeptCode}
             </foreach>
         </if>
         <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">
@@ -2993,7 +2997,8 @@
         continue_content,
         continue_count,
         continue_time_next,
-        task_situation
+        task_situation,
+        remark
         from service_subtask
         where 1=1
         and del_flag = 0
@@ -3057,6 +3062,7 @@
             #{taskId}
         </foreach>
         and s.sendstate=6
+        and d.del_flag=0
         GROUP BY
         t.taskid,
         d.questiontext
@@ -3066,6 +3072,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