From f6aec46c12ec5c447aaee863093afecae20e46ec Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 02 二月 2026 13:59:53 +0800
Subject: [PATCH] #

---
 zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
index 490fddb..d4eea2c 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
@@ -3,6 +3,7 @@
 import com.alibaba.fastjson.JSON;
 import com.zy.acs.framework.common.Cools;
 import com.zy.acs.framework.common.SnowflakeIdWorker;
+import com.zy.acs.manager.common.config.UplinkProperties;
 import com.zy.acs.manager.common.domain.TaskDto;
 import com.zy.acs.manager.common.exception.BusinessException;
 import com.zy.acs.manager.manager.entity.Code;
@@ -10,6 +11,7 @@
 import com.zy.acs.manager.manager.entity.Sta;
 import com.zy.acs.manager.manager.entity.Task;
 import com.zy.acs.manager.manager.enums.TaskTypeType;
+import com.zy.acs.manager.manager.enums.TaskUplinkStateType;
 import com.zy.acs.manager.manager.service.CodeService;
 import com.zy.acs.manager.manager.service.LocService;
 import com.zy.acs.manager.manager.service.StaService;
@@ -36,9 +38,12 @@
     private MapService mapService;
     @Autowired
     private SnowflakeIdWorker snowflakeIdWorker;
+    @Autowired
+    private UplinkProperties uplinkProperties;
 
     public List<Task> validTaskDtoList(List<TaskDto> taskDtoList) {
         List<Task> taskList = new ArrayList<>();
+        String uplinkSts = uplinkProperties.getEnabled() ? TaskUplinkStateType.PENDING.toString() : TaskUplinkStateType.SKIPPED.toString();
         for (TaskDto taskDto : taskDtoList) {
             if (Cools.isEmpty(taskDto.getSeqNum())) {
                 throw new BusinessException("Task seqNum can't be empty!");
@@ -140,6 +145,7 @@
                         throw new BusinessException("seqNum:" + task.getSeqNum() + " is wrong锛宱riLoc锛�" + task.getOriLoc() + " is unable to reach destLoc" + task.getDestLoc());
                     }
                     task.setPhase(JSON.toJSONString(pathList));
+                    task.setUplinkSts(uplinkSts);
                     break;
                 case LOC_TO_STA:
                     oriLoc = locService.getById(task.getOriLoc());
@@ -158,6 +164,7 @@
                         throw new BusinessException("seqNum:" + task.getSeqNum() + " is wrong锛宱riLoc锛�" + task.getOriLoc() + " can't move to destSta" + task.getDestSta());
                     }
                     task.setPhase(JSON.toJSONString(pathList));
+                    task.setUplinkSts(uplinkSts);
                     break;
                 case STA_TO_LOC:
                     oriSta = staService.getById(task.getOriSta());
@@ -176,6 +183,7 @@
                         throw new BusinessException("seqNum:" + task.getSeqNum() + " is wrong锛宱riSta锛�" + task.getOriSta() + " is unable to react destLoc" + task.getDestLoc());
                     }
                     task.setPhase(JSON.toJSONString(pathList));
+                    task.setUplinkSts(uplinkSts);
                     break;
                 case STA_TO_STA:
                     oriSta = staService.getById(task.getOriSta());
@@ -194,6 +202,7 @@
                         throw new BusinessException("seqNum:" + task.getSeqNum() + " is wrong锛宱riSta锛�" + task.getOriSta() + " can't move to destSta" + task.getDestSta());
                     }
                     task.setPhase(JSON.toJSONString(pathList));
+                    task.setUplinkSts(uplinkSts);
                     break;
                 default:
                     throw new BusinessException("seqNum:" + task.getSeqNum() + " is wrong锛� cause this type not exist");

--
Gitblit v1.9.1