#
Junjie
2 天以前 6694bb8752aced4b818f2976442d66ae3a52e9e8
src/main/java/com/zy/common/utils/NavigateMapData.java
@@ -202,10 +202,10 @@
                lists = loadPathLock(lists, lev);
            }
            if(mapType.equals(NavigationMapType.TRAFFIC_CONTROL)) {
                //加载交通管制
                lists = loadTrafficControl(lists, lev);
            }
//            if(mapType.equals(NavigationMapType.TRAFFIC_CONTROL)) {
//                //加载交通管制
//                lists = loadTrafficControl(lists, lev);
//            }
        }
        //加载白名单节点
@@ -444,77 +444,6 @@
                    lists.set(row, list);
                }
            }
//            HashMap<String, Integer> deviceMap = trafficControlThread.getDeviceMap();
//            if(deviceMap == null) {
//                throw new CoolException("get traffic control device map error");
//            }
//
//            for (Map.Entry<String, Integer> entry : deviceMap.entrySet()) {
//                String key = entry.getKey();
//                Integer shuttleNo = entry.getValue();
//                if (shuttleNo <= 0) {
//                    continue;
//                }
//
//                Object object = redisUtil.get(RedisKeyType.SHUTTLE_FLAG.key + shuttleNo);
//                if (object == null) {
//                    continue;
//                }
//
//                int taskNo = Integer.parseInt(String.valueOf(object));
//
//                Object obj = redisUtil.get(RedisKeyType.SHUTTLE_WORK_FLAG.key + taskNo);
//                if (obj == null) {
//                    continue;
//                }
//
//                ShuttleRedisCommand redisCommand = null;
//                try {
//                    redisCommand = objectMapper.readValue(String.valueOf(obj), ShuttleRedisCommand.class);
//                } catch (IOException e) {
//                    throw new RuntimeException(e);
//                }
//
//                if (redisCommand == null) {
//                    continue;
//                }
//
//                ShuttleAssignCommand assignCommand = redisCommand.getAssignCommand();
//                List<ShuttleCommand> commands = assignCommand.getCommands();
//
//                List<NavigateNode> controlLocList = new ArrayList<>();
//                for (ShuttleCommand command : commands) {
//                    if (command.getComplete()) {
//                        continue;
//                    }
//
//                    if (command.getMode() == ShuttleCommandModeType.MOVE.id) {
//                        List<NavigateNode> nodes = command.getNodes();
//                        for (NavigateNode node : nodes) {
//                            if(!controlLocList.contains(node)) {
//                                controlLocList.add(node);
//                            }
//                        }
//                    }
//                }
//
//                for (NavigateNode node : controlLocList) {
//                    int row = node.getX();
//                    int bay = node.getY();
//
//                    List<MapNode> list = lists.get(row);
//                    MapNode mapNode = list.get(bay);
//
//                    //节点设置成Disable
//                    mapNode.setValue(MapNodeType.DISABLE.id);
//
//                    //更新list
//                    list.set(bay, mapNode);
//                    lists.set(row, list);
//                }
//
//            }
        } catch (Exception e) {
            e.printStackTrace();
        }