From bffa9aa668a470f7f9063fd975e9dc456933a900 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 03 四月 2026 15:54:32 +0800
Subject: [PATCH] 【丽水】历史随访 selectServiceSubtaskByDiagname 不查宣教数据
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 24990ba..c2d5882 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -651,6 +651,12 @@
</if>
<if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if>
<if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if>
+ <if test="visitCount != null and visitCount == 1">
+ AND visit_count = 1
+ </if>
+ <if test="visitCount != null and visitCount > 1">
+ AND visit_count > 1
+ </if>
<if test="groupKey != null and groupKey != ''">
AND ${groupKey} IN
<foreach collection="groupKeyList" item="key" open="(" separator=","
@@ -703,6 +709,7 @@
resultMap="ServiceSubtaskResult">
select sendstate,starttime,endtime,nurse_name,phone,sex,task_name,sendname,leavediagname,visit_time FROM
service_subtask WHERE del_flag=0
+ and service_type != 4
<if test="leavediagname != null">and leavediagname like concat('%',#{leavediagname}, '%')</if>
<if test="sendname != null">and sendname like concat('%',#{sendname}, '%')</if>
<if test="taskName != null">and task_name like concat('%',#{taskName}, '%')</if>
@@ -712,8 +719,8 @@
<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>
- GROUP BY sendname,sendstate,starttime,endtime,nurse_name,phone,sex,task_name,leavediagname,visit_time ORDER BY
- visit_time
+ GROUP BY sendname,sendstate,starttime,endtime,nurse_name,phone,sex,task_name,leavediagname,visit_time
+ ORDER BY sendname,visit_time
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -1393,6 +1400,12 @@
<if test="type != null">
and type = #{type}
</if>
+ <if test="visitCount != null and visitCount == 1">
+ AND visit_count = 1
+ </if>
+ <if test="visitCount != null and visitCount > 1">
+ AND visit_count > 1
+ </if>
<if test="groupKey != null and groupKey != '' and groupKeyList != null and groupKeyList.size>0">
AND ${groupKey} IN
<foreach collection="groupKeyList" item="key" open="(" separator=","
@@ -1449,6 +1462,12 @@
<if test="type != null">
and type = #{type}
</if>
+ <if test="visitCount != null and visitCount == 1">
+ AND visit_count = 1
+ </if>
+ <if test="visitCount != null and visitCount > 1">
+ AND visit_count > 1
+ </if>
<if test="groupKey != null and groupKey != ''">
group by ${groupKey}
</if>
--
Gitblit v1.9.3