| | |
| | | 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.core.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; |
| | |
| | | |
| | | 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); |
| | | if (!Cools.isEmpty(codeList)) { |
| | | 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 |
| | |
| | | } |
| | | } |
| | | |
| | | return CODE_DATA_CACHE.stream().findFirst().orElse(null); |
| | | return codeList.stream().findFirst().orElse(null); |
| | | } |
| | | |
| | | // --------------------------------------------------------------------------- |
| | |
| | | executePatrolLogic(agvNo); |
| | | // executeUShapeConveyor(agvNo); |
| | | } catch (Exception e) { |
| | | log.error("执行AGV{}跑库任务时发生异常: {}", agvNo, e.getMessage()); |
| | | log.error("执行AGV{}跑库任务时发生异常", agvNo, e); |
| | | } |
| | | }; |
| | | |