#
vincentlu
2025-02-24 6a05567014939c6ff847a4665a8c3019f24b450d
zy-acs-manager/src/main/java/com/zy/acs/manager/core/DemoController.java
@@ -108,11 +108,18 @@
//            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})
@@ -131,12 +138,14 @@
                .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());
@@ -193,9 +202,11 @@
        // 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++;
        }