From 27df1079c1d230fab29f565f5209f2a02e0def8a Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 20 七月 2026 16:56:51 +0800
Subject: [PATCH] 省立同德的功能

---
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 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 4df6251..22812af 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -6,6 +6,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.gson.Gson;
+import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.redis.RedisCache;
 import com.ruoyi.common.dx.MessageSend;
 import com.ruoyi.common.exception.base.BaseException;
@@ -177,6 +178,8 @@
 
     @Autowired
     private IPatMedOuthospService patMedOuthospService;
+    @Autowired
+    private SysDept2Mapper sysDept2Mapper;
 
     @Value("${spring.profiles.active}")
     private String active;
@@ -404,8 +407,8 @@
             if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(2L);
             if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(3L);
             // 濉厖褰撳墠琛ュ伩
-            if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())){
-                if(StringUtils.isNotEmpty(serviceSubtask.getPreachform())){
+            if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())) {
+                if (StringUtils.isNotEmpty(serviceSubtask.getPreachform())) {
                     //榛樿鍙栫涓�涓�
                     serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]);
                 }
@@ -685,7 +688,10 @@
                 serviceTask.setTemplatename(tempName);
             }
             serviceTask.setLeaveldeptcodes(serviceTaskVO.getLeaveldeptcodes());
-            serviceTask.setLeavehospitaldistrictcode(serviceTask.getLeavehospitaldistrictcode());
+            if (StringUtils.isEmpty(serviceTask.getLeavehospitaldistrictname()) && StringUtils.isNotEmpty(serviceTask.getLeavehospitaldistrictcode())) {
+                SysDept sysDept = sysDept2Mapper.selectDeptByCode(serviceTask.getLeavehospitaldistrictcode(), null);
+                serviceTask.setLeavehospitaldistrictname(sysDept.getDeptName());
+            }
             if (serviceTaskVO.getLongTask() == 1) serviceTask.setSendState(2L);
             serviceTask.setCreateTime(new Date());
             serviceTask.setUpdateTime(new Date());
@@ -711,8 +717,8 @@
                     //鍗楀崕闄勪竴鐨刬cd10code鏄湁閲嶅鐨勶紝鎵�浠ヤ笉鑳界敤鍗楀崕闄勪竴鐨刬cd10code鍘绘煡璇�
                     log.info("----serviceTaskdiag鐨勫�间负锛歿}", serviceTaskdiag);
                     if (!StringUtils.isEmpty(serviceTaskVO.getIcd10name())) {
-                        String[] Icd10Names = serviceTaskVO.getIcd10name().split("$");
-                        String[] Icd10codes = serviceTaskVO.getIcd10code().split("$");
+                        String[] Icd10Names = serviceTaskVO.getIcd10name().split(",");
+                        String[] Icd10codes = serviceTaskVO.getIcd10code().split(",");
                         for (int i = 0; i < Icd10Names.length; i++) {
                             serviceTaskdiag.setIcd10code(Icd10codes[i]);
                             serviceTaskdiag.setIcd10name(Icd10Names[i]);
@@ -2360,7 +2366,6 @@
             serviceSubtask.setRemark("鐢佃瘽鎺ラ�氭垚鍔燂紝鎮h�呮嫆缁濋殢璁�");
             serviceSubtask.setId(Long.valueOf(phoneCallRecordVO.getTaskid()));
             serviceSubtask.setSendstate(6L);
-            serviceSubtask.setFinishtime(new Date());
             serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
 //            int startIndex = phoneCallRecordVO.getRecord_path().indexOf("voice") + "voice".length() + 1;  // 鍔�1鏄烦杩�/绗﹀彿
 //            int endIndex = phoneCallRecordVO.getRecord_path().lastIndexOf("/");
@@ -3699,7 +3704,7 @@
         Map<String, String> map = new HashMap<>();
         map.put("phone", serviceSubtask.getPhone());
         map.put("content", sendMagParam.getContent());
-        String result = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(map));
+        HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(map));
         redisCache.setCacheObject(subTaskId + "recordAccept-hungup", "1", 10, TimeUnit.MINUTES);
         if (StringUtils.isNotEmpty(serviceSubtask.getRemark()))
             serviceSubtask.setRemark("鐢佃瘽鍙戦�佹嫆鎺�,鐭俊琛ュ伩鍙戦�佹垚鍔�");
@@ -4536,6 +4541,23 @@
 
     @Override
     public List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO){
+        String hyperLinkInfoType = heLibraryCountVO.getHyperLinkInfoType();
+        if(StringUtils.isNotEmpty(hyperLinkInfoType)){
+            heLibraryCountVO.setSendstate(null);
+            heLibraryCountVO.setIsFinished(null);
+            switch (hyperLinkInfoType) {
+                case "totalCountInfo":
+                    break;
+                case "sendSuccessCountInfo":
+                    heLibraryCountVO.setSendstate(6L);
+                    break;
+                case "readCountInfo":
+                    heLibraryCountVO.setIsFinished("1");
+                    break;
+                default:
+                    break;
+            }
+        }
         List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.gethelibraryCountHyperlink(heLibraryCountVO);
         return serviceSubtasks;
     }
@@ -4596,8 +4618,8 @@
     }
 
     @Override
-    public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds) {
-        return serviceSubtaskMapper.statQuestionOption(taskIds);
+    public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime) {
+        return serviceSubtaskMapper.statQuestionOption(taskIds, startOutHospTime, endOutHospTime);
     }
 
     private Boolean saveServiceSubtaskDetail(ServiceSubtask serviceSubtask) {

--
Gitblit v1.9.3