From 5da61001a1cbd8beaa44a28eec0779793979f4a3 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 29 十月 2026 17:26:58 +0800
Subject: [PATCH] 【丽水】丽水中 新增 追踪随访推送率:再次随访推送人数/首次出院人次

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

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index d9513ec..9974006 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -82,6 +82,7 @@
         <result property="visitCount" column="visit_count"/>
         <result property="isVisitAgain" column="is_visit_again"/>
         <result property="upid" column="upid"/>
+        <result property="visitType" column="visit_type"/>
         <result property="visitTime" column="visit_time"/>
         <result property="visitDeptName" column="visit_dept_name"/>
         <result property="visitDeptCode" column="visit_dept_code"/>
@@ -404,6 +405,7 @@
         <if test="managementDoctorCode != null ">and management_doctor_code = #{managementDoctorCode}</if>
         <if test="submit != null ">and submit = #{submit}</if>
         <if test="upid != null ">and upid = #{upid}</if>
+        <if test="visitCount != null ">and visit_count = #{visitCount}</if>
         <if test="patfrom != null ">and patfrom = #{patfrom}</if>
         <if test="serviceType != null ">and service_type = #{serviceType}</if>
         <if test="patid != null ">and patid = #{patid}</if>
@@ -949,6 +951,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="startOutHospTime != null">
+            AND date_format(endtime,'%y%m%d') &gt;= date_format(#{startOutHospTime},'%y%m%d')
+        </if>
+        <if test="endOutHospTime != null">
+            AND date_format(endtime,'%y%m%d') &lt;= date_format(#{endOutHospTime},'%y%m%d')
+        </if>
         ) a where a.finished =1)
     </select>
 
@@ -1663,6 +1671,7 @@
         taskid,
         task_name,
         visit_time,
+        visit_dept_code,
         finishtime,
         endtime,
         senddate,
@@ -1951,6 +1960,8 @@
         taskid,
         task_name,
         visit_time,
+        visit_dept_code,
+        visit_dept_name,
         finishtime,
         endtime,
         senddate,

--
Gitblit v1.9.3