From 717abbe819892d3cded73b12772b216b48d7e357 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 29 七月 2026 14:55:14 +0800
Subject: [PATCH] 【丽水】宣教超链接跳转调整

---
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java |   20 ++++++++++++++------
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml            |    6 ++++--
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index 67be372..dffe37f 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -2617,16 +2617,21 @@
     @Cacheable(value = "sfStatistics", key = "T(org.springframework.util.DigestUtils).md5DigestAsHex(#serviceSubtaskCountReq.toString().getBytes())", unless = "#result == null or #result.isEmpty()")
     public List<ServiceSubtaskStatistic> getSfStatistics(ServiceSubtaskCountReq serviceSubtaskCountReq) {
         log.info("getSfStatistics鐨勫叆鍙備负锛歿}", serviceSubtaskCountReq);
-        String groupKey = "drcode";
+        String drcode = "drcode";
+        //缂欎簯浜烘皯 鏍规嵁缁忕鍖荤敓鍒嗙粍
+        if(serviceSubtaskCountReq.getOrgid().equals("47246116333112211A1001")){
+            drcode = "management_doctor_code";
+        }
+        String groupKey = drcode;
         if (serviceSubtaskCountReq.getStatisticaltype() != null && serviceSubtaskCountReq.getStatisticaltype() == 1) {
             if (serviceSubtaskCountReq.getDrcode() != null && !serviceSubtaskCountReq.getDrcode().isEmpty()) {
-                groupKey = "drcode";
+                groupKey = drcode;
             } else {
                 groupKey = "leavehospitaldistrictcode";
             }
         } else if (serviceSubtaskCountReq.getStatisticaltype() != null && serviceSubtaskCountReq.getStatisticaltype() == 2) {
             if (serviceSubtaskCountReq.getDrcode() != null && !serviceSubtaskCountReq.getDrcode().isEmpty()) {
-                groupKey = "drcode";
+                groupKey = drcode;
             } else {
                 groupKey = "deptcode";
             }
@@ -2639,12 +2644,15 @@
         serviceSubtaskCountReq.setGroupKeyList(groupKeyList);
         List<ServiceSubtask> rawData = serviceSubtaskMapper.getSfStatistics(serviceSubtaskCountReq);
         switch (groupKey) {
-            case "deptcode":
-                collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDeptcode()).orElse("Unknown")));
-                break;
             case "drcode":
                 collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDrcode()).orElse("Unknown")));
                 break;
+            case "management_doctor_code":
+                collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getManagementDoctorCode()).orElse("Unknown")));
+                break;
+            case "deptcode":
+                collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDeptcode()).orElse("Unknown")));
+                break;
             case "leavehospitaldistrictcode":
                 collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getLeavehospitaldistrictcode()).orElse("Unknown")));
                 break;
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index be5a061..8be95f9 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -1484,6 +1484,8 @@
         orgid,
         drcode,
         drname,
+        management_doctor_code,
+        management_doctor,
         leavehospitaldistrictcode,
         leavehospitaldistrictname,
         deptcode,
@@ -2916,7 +2918,7 @@
         </choose>
     </select>
 
-    <select id="gethelibraryCountHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
+    <select id="gethelibraryCountHyperlink" parameterType="com.smartor.domain.VO.HeLibraryCountVO"
             resultMap="ServiceSubtaskResult">
         select id,
         visit_count,
@@ -2966,7 +2968,7 @@
         <if test="sendstate != null">
             AND sendstate = #{sendstate}
         </if>
-        <if test="isFinished != null and isFinished == '1'">
+        <if test="isFinished != null and isFinished = '1'">
             AND finishtime is not null
         </if>
         <if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size() > 0">

--
Gitblit v1.9.3