From 4e1d90d7cfaef3c7a2893e6fcb946ce7dabe938e Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 24 十月 2025 13:54:52 +0800
Subject: [PATCH] 最新版本541200007

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java |   46 +++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
index 1a800e3..0c33cda 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -2638,8 +2638,10 @@
     @Transactional
     public void autoPlatformCallCar(WmsService wmsService){
         //鏌ヨ褰撳墠寮�鍚殑鏈堝彴鏁版嵁
-        List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO)
-                .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE)
+        List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda()
+                .eq(PlatformGroup::getStatus,Constants.ZERO)
+                .eq(PlatformGroup::getIsdeleted,Constants.ZERO)
+                .eq(PlatformGroup::getAutoCall,Constants.ONE)
         );
         if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(allPlatformGroup)){
             log.error("========鏈堝彴鑷姩鍙彿============缁撴潫锛氭棤鑷姩鍙彿鏈堝彴缁�");
@@ -2672,6 +2674,7 @@
         List<PlatformJob> noticeList = new ArrayList<>();
         //寰幆鎵�鏈夎嚜鍔ㄥ彨鍙锋湀鍙�
         for (PlatformGroup platformGroup:autoCallGroup) {
+            log.error("========鏈堝彴缁勮嚜鍔ㄥ彨鍙�============ --"+platformGroup.getName());
             List<Platform> platforms = platformList.stream().filter(i->Constants.equalsInteger(i.getGroupId(),platformGroup.getId())).collect(Collectors.toList());
             if(CollectionUtils.isEmpty(platforms)){
                 log.error("========鏈堝彴鑷姩鍙彿============缁撴潫锛氭棤鑷姩鍙彿鏈堝彴-"+platformGroup.getName());
@@ -2705,7 +2708,8 @@
                 Integer workNum = platformJobJoinMapper.selectCount(new QueryWrapper<PlatformJob>().lambda()
                         .eq(PlatformJob::getIsdeleted,Constants.ZERO)
                         .eq(PlatformJob::getPlatformId,platform.getId())
-                        .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey())).intValue();
+                        .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),Constants.PlatformJobStatus.WORKING.getKey())
+                ) .intValue();
                 if(workNum>=workingNum){
                     log.error("========鏈堝彴鑷姩鍙彿============缁撴潫锛氳秴杩囪嚜鍔ㄥ彨鍙蜂綔涓氶檺鍒�-"+platform.getName());
                     continue;
@@ -2834,8 +2838,7 @@
                 if((((platforms.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).collect(Collectors.toList()).size()>Constants.ZERO)?Constants.ONE:Constants.ZERO)
                                 +
                                 ((platforms.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList()).size()>Constants.ZERO)?Constants.ONE:Constants.ZERO)
-                )==Constants.ONE
-                ){
+                )==Constants.ONE ){
                     isDefaul = true;
                 }
             }
@@ -2994,6 +2997,9 @@
                             typeParam = 1;//
                         }
                     }
+                }else{
+                    //棰勭害杞﹀叏閮ㄦ暎浠�
+                    typeParam = 1;
                 }
             }
 
@@ -3030,6 +3036,36 @@
                 .eq(PlatformJob::getId,platformJob.getId())
         );
     }
+    @Override
+    public void backToWatiSign(Integer jobId,LoginUserInfo loginUserInfo){
+        if(Objects.isNull(jobId)){
+            throw new BusinessException(ResponseStatus.BAD_REQUEST);
+        }
+        PlatformJob platformJob = platformJobMapper.selectById(jobId);
+        if(Objects.isNull(platformJob)){
+            throw new BusinessException(ResponseStatus.DATA_EMPTY);
+        }
+        if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
+            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝鐘舵�佸凡娴佽浆");
+        }
+
+        PlatformJob oldPlatformJob = new PlatformJob();
+        BeanUtils.copyProperties(platformJob,oldPlatformJob);
+
+        platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey());
+        platformJob.setEditDate(new Date());
+        platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda()
+                .eq(PlatformJob::getId,platformJob.getId())
+                .set(PlatformJob::getEditor,loginUserInfo.getId())
+                .set(PlatformJob::getSignDate,null)
+                .set(PlatformJob::getSingType,null)
+                .set(PlatformJob::getSignDistance,null)
+                .set(PlatformJob::getStatus,platformJob.getStatus())
+                .set(PlatformJob::getEditDate,platformJob.getEditDate()));
+        //瀛樺偍鎿嶄綔鏃ュ織
+        savePlatformLog(Constants.PlatformJobLogType.BACK_TO_WAIT_SIGNIN.getKey(),oldPlatformJob,platformJob,
+                Constants.PlatformJobLogType.BACK_TO_WAIT_SIGNIN.getInfo());
+    }
 
 
 

--
Gitblit v1.9.3