From 2ca5feb7aae6de3f37b34d0007a35b84a6a30f33 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 18 三月 2026 15:48:23 +0800
Subject: [PATCH] 【丽水】获取当前用户随访数量统计 补充

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |    1 +
 smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java                       |    1 +
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml                       |    3 ++-
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index 10d2848..f43a74c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -658,6 +658,7 @@
      *         pendingVisitCount: 褰撳墠鐧诲綍浜烘埅姝粖鏃ュ緟闅忚鎬婚噺
      *         failedVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″け璐ユ�婚噺
      *         abnormalVisitVount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″紓甯告�婚噺
+     *         allVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔℃�婚噺
      */
     @ApiOperation("鑾峰彇褰撳墠鐢ㄦ埛闅忚鏁伴噺缁熻")
     @PostMapping("/getCurrentUserServiceSubtaskCount")
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
index 9a0ffc8..5be1d90 100644
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -173,6 +173,7 @@
      *         pendingVisitCount: 褰撳墠鐧诲綍浜烘埅姝粖鏃ュ緟闅忚鎬婚噺
      *         failedVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″け璐ユ�婚噺
      *         abnormalVisitVount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″紓甯告�婚噺
+     *         allVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔℃�婚噺
      */
     public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity serviceSubtaskVO);
 }
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 0190f40..f473c9d 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -2261,7 +2261,8 @@
         SELECT
         COUNT(CASE WHEN sendstate IN (1, 2) AND date_format(senddate,'%y%m%d') &lt;= 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
+        COUNT(CASE WHEN isabnormal IN (1, 2) THEN 1 END)                           AS abnormalVisitCount,
+        COUNT(*) AS allVisitCount
         FROM service_subtask
         WHERE del_flag = '0'
         <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">

--
Gitblit v1.9.3