From c62e26954e41360fc6a2efc874815aa84f8b0073 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 21 五月 2025 14:45:10 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java |   58 ++++++++++++++--------------------------------------------
 1 files changed, 14 insertions(+), 44 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
index a50c0e2..dd7e71e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -12,7 +12,6 @@
 import com.ruoyi.common.utils.RSAPublicKeyExample;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.common.SendService;
 import com.smartor.domain.*;
 import com.smartor.service.IServiceSubtaskService;
 import com.smartor.service.IServiceTaskService;
@@ -22,12 +21,9 @@
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -57,19 +53,6 @@
     @Autowired
     private RSAPublicKeyExample rsaPublicKeyExample;
 
-    @Autowired
-    private SendService sendService;
-
-    @PostMapping("/test")
-    public TableDataInfo test(@RequestBody SendMagParam sendMagParam) {
-        try {
-            Boolean aBoolean = sendService.sendMsg(sendMagParam);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
     /**
      * 鏌ヨ璇煶浠诲姟鍒楄〃
      */
@@ -84,33 +67,20 @@
 
         if (CollectionUtils.isNotEmpty(serviceTaskVOS)) {
             for (ServiceTaskVO ServiceTaskVO : serviceTaskVOS) {
-                if (serviceTask.getAppltype().equals("1") || serviceTask.getAppltype().equals("2")) {
-                    ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
-                    serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid());
-                    serviceSubtaskVO.setStartOutHospTime(serviceTask.getStartOutHospTime());
-                    serviceSubtaskVO.setEndOutHospTime(serviceTask.getEndOutHospTime());
-                    List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(serviceSubtaskVO);
-                    if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) {
-                        //宸插彂閫�
-                        long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count();
-                        //鏈彂閫�
-                        long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count();
-                        ServiceTaskVO.setYfs(yfs);
-                        ServiceTaskVO.setWfs(wfs);
-                    }
-                } else if (serviceTask.getAppltype().equals("3") || serviceTask.getAppltype().equals("4")) {
-                    ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
-                    serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid());
-                    List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(serviceSubtaskVO);
-                    if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) {
-                        //宸插彂閫�
-                        long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count();
-                        //鏈彂閫�
-                        long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count();
-                        ServiceTaskVO.setYfs(yfs);
-                        ServiceTaskVO.setWfs(wfs);
-                    }
+                ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
+                serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid());
+                serviceSubtaskVO.setStartOutHospTime(serviceTask.getStartOutHospTime());
+                serviceSubtaskVO.setEndOutHospTime(serviceTask.getEndOutHospTime());
+                List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(serviceSubtaskVO);
+                if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) {
+                    //宸插彂閫侊紙瀛愪换鍔′腑鐨� sendstate=1涓鸿棰嗗彇锛�
+                    long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> (serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() >= 3L) || (serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 1L)).collect(Collectors.toList()).stream().count();
+                    //鏈彂閫�
+                    long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count();
+                    ServiceTaskVO.setYfs(yfs);
+                    ServiceTaskVO.setWfs(wfs);
                 }
+
             }
             //鑾峰彇total
             long total = PageUtils.count(new ISelect() {
@@ -118,7 +88,7 @@
                 public void doSelect() {
                     serviceTask.setPageNum(null);
                     serviceTask.setPageSize(null);
-                    serviceTaskService.selectServiceTaskList(serviceTask);
+                    serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask);
                 }
             });
 

--
Gitblit v1.9.3