From 45f553e1c5f9d1b948c131fd42ca89d7910ffe03 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 24 九月 2024 18:24:20 +0800
Subject: [PATCH] 代码初始化

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java |   37 ++++++++++++++++++++++++++++++++++---
 1 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
index 578a97b..7f9fd75 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformGroupServiceImpl.java
@@ -17,6 +17,7 @@
 import com.doumee.dao.business.model.PlatformJob;
 import com.doumee.dao.business.model.PlatformShowParam;
 import com.doumee.dao.web.reqeust.PlatformDataDTO;
+import com.doumee.dao.web.response.PlatformGroupWorkVO;
 import com.doumee.dao.web.response.PlatformWorkVO;
 import com.doumee.service.business.PlatformGroupService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -260,7 +261,9 @@
                                     Constants.PlatformJobStatus.CALLED.getKey(),
                                     Constants.PlatformJobStatus.WORKING.getKey(),
                                     Constants.PlatformJobStatus.EXCEPTION.getKey(),
-                                    Constants.PlatformJobStatus.OVER_NUMBER.getKey()
+                                    Constants.PlatformJobStatus.OVER_NUMBER.getKey(),
+                                    Constants.PlatformJobStatus.TRANSFERING.getKey()
+
                             )
 //                    .like(PlatformJob::getArriveDate,DateUtil.getCurrDate())
                     .orderByDesc(PlatformJob::getCreateDate)
@@ -281,7 +284,8 @@
         PlatformWorkVO platformWorkVO = new PlatformWorkVO();
         if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){
             //鑾峰彇鏈堝彴涓嬬殑鎵�鏈変綔涓氭暟鎹�
-            List<PlatformJob> platformJobs = platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platformId)).collect(Collectors.toList());
+            List<PlatformJob> platformJobs = platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platformId)
+             && !Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())).collect(Collectors.toList());
             if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobs)){
                 platformWorkVO.setWorkNum(
                         platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())).collect(Collectors.toList()).size()
@@ -290,7 +294,11 @@
                         platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())).collect(Collectors.toList()).size()
                 );
                 platformWorkVO.setWaitNum(
-                        platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())).collect(Collectors.toList()).size()
+                        platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.TRANSFERING.getKey())
+                        ).collect(Collectors.toList()).size()
+                        +
+                        platformJobList.stream().filter(i->Constants.equalsInteger(platformId,i.getPlatformId())
+                                && Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())).collect(Collectors.toList()).size()
                 );
                 platformWorkVO.setExceptionNum(
                         platformJobs.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.EXCEPTION.getKey())).collect(Collectors.toList()).size()
@@ -303,5 +311,28 @@
 
 
 
+    @Override
+    public PlatformGroupWorkVO getPlatformGroupWork(Integer platformGroupId){
+        PlatformGroupWorkVO platformGroupWorkVO = new PlatformGroupWorkVO();
+        platformGroupWorkVO.setExceptionNum(platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda()
+                .eq(PlatformJob::getPlatformGroupId,platformGroupId)
+                .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey())
+            )
+        );
+
+        platformGroupWorkVO.setWaitNum(platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda()
+                        .eq(PlatformJob::getPlatformGroupId,platformGroupId)
+                        .in(PlatformJob::getStatus,
+                                Constants.PlatformJobStatus.WAIT_CALL.getKey(),
+                                Constants.PlatformJobStatus.IN_WAIT.getKey(),
+                                Constants.PlatformJobStatus.CALLED.getKey()
+
+                        )
+                )
+        );
+        return platformGroupWorkVO;
+    }
+
+
 }
 

--
Gitblit v1.9.3