| | |
| | | } |
| | | |
| | | public void unlockPath(String agvNo, String codeData) { |
| | | if (Cools.isEmpty(agvNo, codeData)) { |
| | | return; |
| | | } |
| | | try { |
| | | unlockTaskQueue.offer(new UnlockPathTask(agvNo, codeData), 5, TimeUnit.SECONDS); |
| | | |
| | | // Integer lev = null; |
| | | // |
| | | // String[][] codeMatrix = mapDataDispatcher.getCodeMatrix(null); |
| | | // int[] codeMatrixIdx = mapDataDispatcher.getCodeMatrixIdx(lev, codeData); |
| | | // |
| | | // |
| | | // DynamicNode[][] dynamicMatrix = mapDataDispatcher.getDynamicMatrix(lev); |
| | | // |
| | | // DynamicNode dynamicNode = dynamicMatrix[codeMatrixIdx[0]][codeMatrixIdx[1]]; |
| | | // |
| | | // |
| | | // int serial = dynamicNode.getSerial(); |
| | | // |
| | | // List<int[]> resetCodeIdxList = 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)) { |
| | | // if (node.getSerial() < serial) { |
| | | // resetCodeIdxList.add(new int[] {i, j}); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // if (!Cools.isEmpty(resetCodeIdxList)) { |
| | | // |
| | | // mapDataDispatcher.clearDynamicMatrixByCodeList(lev, resetCodeIdxList); |
| | | // } |
| | | |
| | | } catch (InterruptedException e) { |
| | | log.error("unlockTaskQueue", e); |
| | | } |