From 644fa4aeb93111f0f23c798718f5392850106ce8 Mon Sep 17 00:00:00 2001 From: vincentlu <t1341870251@gmail.com> Date: 星期五, 28 二月 2025 11:05:34 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java | 58 +++++++--------------------------------------------------- 1 files changed, 7 insertions(+), 51 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java index 13d4a97..3bb25ad 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java @@ -4,6 +4,7 @@ import com.zy.acs.common.utils.RedisSupport; import com.zy.acs.framework.common.Cools; import com.zy.acs.framework.common.R; +import com.zy.acs.manager.common.constant.AgvAreaDispatcher; import com.zy.acs.manager.core.cache.CoreCache; import com.zy.acs.manager.core.domain.CodeStepDto; import com.zy.acs.manager.core.domain.type.JobType; @@ -199,57 +200,12 @@ Code startCode = codeService.getCacheById(agvDetail.getRecentCode()); - Set<String> notInCodeSet = new HashSet<>(); - notInCodeSet.add("00000301"); - notInCodeSet.add("00000302"); - notInCodeSet.add("00000303"); - notInCodeSet.add("00000351"); - notInCodeSet.add("00000353"); - notInCodeSet.add("00000401"); - notInCodeSet.add("00000402"); + List<String> codeList = AgvAreaDispatcher.AGV_AREA.get(agvNo); + List<String> disableCodeList = AgvAreaDispatcher.AGV_DISABLE_AREA.get(agvNo); + Collections.shuffle(codeList); - notInCodeSet.add("00000311"); - notInCodeSet.add("00000312"); - notInCodeSet.add("00000313"); - notInCodeSet.add("00000361"); - notInCodeSet.add("00000363"); - notInCodeSet.add("00000411"); - notInCodeSet.add("00000412"); - - notInCodeSet.add("00000046"); - notInCodeSet.add("00000047"); - - notInCodeSet.add("00000270"); - notInCodeSet.add("00000265"); - notInCodeSet.add("00000229"); - notInCodeSet.add("00000188"); - notInCodeSet.add("00000133"); - notInCodeSet.add("00000134"); - notInCodeSet.add("00000279"); - notInCodeSet.add("00000278"); - notInCodeSet.add("00000266"); - notInCodeSet.add("00000267"); - notInCodeSet.add("00000268"); - notInCodeSet.add("00000269"); - notInCodeSet.add("00000271"); - notInCodeSet.add("00000272"); - notInCodeSet.add("00000273"); - notInCodeSet.add("00000274"); - notInCodeSet.add("00000275"); - notInCodeSet.add("00000276"); - notInCodeSet.add("00000277"); - notInCodeSet.add("00000285"); - notInCodeSet.add("00000286"); - notInCodeSet.add("00000280"); - notInCodeSet.add("00000281"); - notInCodeSet.add("00000282"); - notInCodeSet.add("00000283"); - notInCodeSet.add("00000284"); - - Collections.shuffle(CODE_DATA_CACHE); - - for (String endCodeData : CODE_DATA_CACHE) { - if (notInCodeSet.contains(endCodeData)) { continue; } + for (String endCodeData : codeList) { + if (disableCodeList.contains(endCodeData)) { continue; } Code endCode = codeService.getCacheByData(endCodeData); // valid lane @@ -264,7 +220,7 @@ } } - return CODE_DATA_CACHE.stream().findFirst().orElse(null); + return codeList.stream().findFirst().orElse(null); } // --------------------------------------------------------------------------- -- Gitblit v1.9.1