From eb845e8be695ed1280a7cbf854a4d1dedf9db30d Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 30 十月 2026 15:02:55 +0800
Subject: [PATCH] 【丽水】/smartor/serviceSubtask/getSfStatisticsHyperlink 和 /smartor/serviceSubtask/getSfStatistics 统计的时候,对于 service_subtask.current_preachForm 为空的数据 当成 service_subtask.preachform 字符串的第一个执行方式、首次待随访全部(visitCount = 1 && sendstate in (1、2、3、7)) 区别于原先的待随访,这个是给市一使用的 再次待随访全部(visitCount > 1 && sendstate in (1、2、3、7)) 区别于原先的待随访,这个是给市一使用的 首次待随访待发送(visitCount = 1 && sendstate in (1、2)) 再次待随访待发送(visitCount > 1 && sendstate in (1、2)) 首次待随访已发送(visitCount = 1 && sendstate = in (3、7)) 再次待随访已发送(visitCount > 1 && sendstate = in (3、7)) 首次已发送(visitCount = 1 && sendstate = 3) 再次已发送(visitCount > 1 && sendstate = 3)
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 53aefec..c67e8c4 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -1655,6 +1655,35 @@
where patid = #{patid} and taskid = #{taskid}
</update>
+ <!-- 浜哄伐闅忚锛氳蒋鍒犻櫎鎮h�呭嚭闄㈣褰曞搴旂殑鏈畬鎴愰殢璁夸换鍔� -->
+ <update id="deleteUnfinishedServiceSubtaskByInhospids">
+ update service_subtask
+ set del_flag = 1
+ where del_flag = 0
+ and patid = #{patid}
+ and sendstate in
+ <foreach collection="sendstates" item="sendstate" open="(" separator="," close=")">
+ #{sendstate}
+ </foreach>
+ and inhospid in
+ <foreach collection="inhospids" item="inhospid" open="(" separator="," close=")">
+ #{inhospid}
+ </foreach>
+ </update>
+
+ <!-- 浜哄伐闅忚閲嶅鏍¢獙锛氬悓涓�鎮h�呭悓涓�浠诲姟涓嬫槸鍚﹀凡鏈夋湭瀹屾垚闅忚浠诲姟 -->
+ <select id="countUnfinishedServiceSubtaskByPatidAndTaskid" resultType="int">
+ select count(1)
+ from service_subtask
+ where del_flag = 0
+ and patid = #{patid}
+ and taskid = #{taskid}
+ and sendstate in
+ <foreach collection="sendstates" item="sendstate" open="(" separator="," close=")">
+ #{sendstate}
+ </foreach>
+ </select>
+
<select id="getSfStatistics" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
resultMap="ServiceSubtaskResult">
select id,
@@ -1672,7 +1701,7 @@
deptname,
sendstate,
preachform,
- current_preachform,
+ <include refid="effectiveCurrentPreachformExpr"/> AS current_preachform,
excep,
nurse_id,
nurse_name,
@@ -1961,7 +1990,7 @@
deptname,
sendstate,
preachform,
- current_preachform,
+ <include refid="effectiveCurrentPreachformExpr"/> AS current_preachform,
excep,
nurse_id,
nurse_name,
@@ -2062,7 +2091,7 @@
</foreach>
</if>
<if test="currentPreachform != null">
- AND current_preachform = #{currentPreachform}
+ AND <include refid="effectiveCurrentPreachformExpr"/> = #{currentPreachform}
<if test="followUpCountStyle != null and followUpCountStyle = '1'">
AND sendstate != 4
</if>
--
Gitblit v1.9.3