From 01ccffbea8813dfc810295d7716b07265faac899 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 18 三月 2026 15:30:34 +0800
Subject: [PATCH] 【丽水】接口用户科室关系表bug
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index c9698fc..0190f40 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -2257,4 +2257,28 @@
</if>
</select>
+ <select id="getCurrentUserServiceSubtaskCount" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" resultType="map">
+ SELECT
+ COUNT(CASE WHEN sendstate IN (1, 2) AND date_format(senddate,'%y%m%d') <= date_format(CURDATE(),'%y%m%d') THEN 1 END) AS pendingVisitCount,
+ COUNT(CASE WHEN sendstate = 5 THEN 1 END) AS failedVisitCount,
+ COUNT(CASE WHEN isabnormal IN (1, 2) THEN 1 END) AS abnormalVisitCount
+ FROM service_subtask
+ WHERE del_flag = '0'
+ <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
+ AND leavehospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
+ separator=","
+ close=")">
+ #{leavehospitaldistrictcode}
+ </foreach>
+ </if>
+ <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
+ AND deptcode IN
+ <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
+ close=")">
+ #{leaveldeptcode}
+ </foreach>
+ </if>
+ </select>
+
</mapper>
--
Gitblit v1.9.3