| | |
| | | // codeMatrixIdxList.add(codeMatrixIdx); |
| | | // } |
| | | |
| | | List<int[]> codeMatrixIdxList = mapDataDispatcher.getCodeMatrixIdxList(null, path); |
| | | // List<int[]> codeMatrixIdxList = mapDataDispatcher.getCodeMatrixIdxList(null, path); |
| | | |
| | | // System.out.println(codeMatrixIdxList.toString()); |
| | | |
| | | return R.ok().add(codeMatrixIdxList); |
| | | // return R.ok().add(codeMatrixIdxList); |
| | | |
| | | for (String codeData : path) { |
| | | Code code = codeService.getCacheByData(codeData); |
| | | Code byId = codeService.getCacheById(code.getId()); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | // @RequestMapping(value = "/system/route/generate", method = {RequestMethod.GET, RequestMethod.POST}) |
| | |
| | | .eq(FuncSta::getType, FuncStaType.STANDBY.toString()) |
| | | .orderByAsc(FuncSta::getId)); |
| | | |
| | | List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().orderByAsc(Agv::getId)); |
| | | List<Agv> agvList = agvService.list(new LambdaQueryWrapper<Agv>().eq(Agv::getStatus, StatusType.ENABLE.val).orderByAsc(Agv::getId)); |
| | | |
| | | for (int i = 0; i < standbyFunStaList.size(); i++) { |
| | | int size = Math.min(standbyFunStaList.size(), agvList.size()); |
| | | |
| | | for (int i = 0; i < size; i++) { |
| | | |
| | | FuncSta funcSta = standbyFunStaList.get(i); |
| | | Code code = codeService.getById(funcSta.getCode()); |
| | | Code code = codeService.getCacheById(funcSta.getCode()); |
| | | |
| | | Agv agv = agvList.get(i); |
| | | AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId()); |
| | |
| | | |
| | | // start |
| | | Collections.shuffle(list); |
| | | List<Agv> agvs = list.subList(0, count); |
| | | if (list.size() > count) { |
| | | list = list.subList(0, count); |
| | | } |
| | | int result = 0; |
| | | for (Agv agv : agvs) { |
| | | for (Agv agv : list) { |
| | | patrolService.startupPatrol(agv.getUuid()); |
| | | result++; |
| | | } |