From 93d8a38f9fd0746b9ce6ac7541bf2b8b48f7c63c Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 18 十二月 2024 13:11:24 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java index c7c9dd0..dbda04c 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java @@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.time.StopWatch; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.util.*; @@ -29,6 +30,8 @@ @Component("mapService") public class MapService { + @Value("${floyd.enable}") + private Boolean floydEnable; @Autowired private CodeService codeService; @Autowired @@ -92,6 +95,9 @@ * 瀵诲潃 ===>> Floyd */ public synchronized List<String> validFeasibility(Code startCode, Code endCode) { + if (!floydEnable) { + return Arrays.asList("00000001", "00000002", "00000003", "00000004", "00000005", "00000006"); + } int startIdx = floydNavigateService.codeIdx(startCode.getId()); int endIdx = floydNavigateService.codeIdx(endCode.getId()); @@ -198,14 +204,20 @@ Integer serial = dynamicNode.getSerial(); + long time = dynamicNode.getTime(); List<String> resetCodeList = new ArrayList<>(); for (int i = 0; i < dynamicMatrix.length; i++) { for (int j = 0; j < dynamicMatrix[i].length; j++) { + + if (i == codeMatrixIdx[0] && j == codeMatrixIdx[1]) { continue; } + DynamicNode node = dynamicMatrix[i][j]; - if (node.getVehicle().equals(agvNo) && node.getSerial() < serial) { - resetCodeList.add(codeMatrix[i][j]); + if (node.getVehicle().equals(agvNo)) { + if (node.getSerial() < serial || node.getTime() != time) { + resetCodeList.add(codeMatrix[i][j]); + } } } } @@ -221,7 +233,7 @@ } } catch (Exception e) { - log.error("TrafficService.unlockPath", e); + log.error("MapService.unlockPath", e); } } -- Gitblit v1.9.1