From 25a0ba7b2706db3c5ee546da3e0e7c909777b890 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 29 七月 2026 15:37:32 +0800
Subject: [PATCH] 1,患者过滤状态修改(之前只支持发送之前的过滤,现在支持发送之后的过滤,如果任务发送后,外链不能再打开) 2.在出入院表新增入院申请单字段 3.采集入院数据时,同时要采集importanceFlagCode    emergencyLevelCode 4.外链的发送,也要查询子任务状态,如果是不执行,也不能再发送

---
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 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..95d1918 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -6,7 +6,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.gson.Gson;
-import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.dx.MessageSend;
@@ -18,7 +17,6 @@
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.mapper.SysConfigMapper;
 import com.ruoyi.system.service.ISysConfigService;
-import com.smartor.common.DeepSeekApi;
 import com.smartor.common.FtpService;
 import com.smartor.common.MtSubmitSmUtil;
 import com.smartor.config.PhoneUtils;
@@ -33,7 +31,6 @@
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.MapUtils;
 import org.apache.commons.lang3.ObjectUtils;
-import org.apache.ibatis.annotations.Param;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -2617,16 +2614,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 +2641,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;

--
Gitblit v1.9.3