#
vincentlu
2025-01-14 aa5c831b256f6fa85851cfe8bfa53c5e3b7ce8be
#
2个文件已修改
25 ■■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PathQueueConsumer.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -653,9 +653,9 @@
//            JSONObject storeDirection = configService.getVal("storeDirection", JSONObject.class);
            int angleOffsetVal = configService.getVal("mapAngleOffsetVal", Integer.class);
            String agvNo = agvService.getAgvNo(agvId);
            if (!agvService.judgeEnable(agvId)) {
                throw new CoolException("AGV[" + agvNo + "]当前不可用...");
            }
//            if (!agvService.judgeEnable(agvId)) {
//                throw new CoolException("AGV[" + agvNo + "]当前不可用...");
//            }
            AgvModel agvModel = agvModelService.getByAgvId(agvId);
            Double workDirection = agvModel.getWorkDirection();
@@ -989,27 +989,20 @@
                    now    // 工作时间
            ));
//            List<Action> newActionList = new ArrayList<>(actionList);
//            List<Action> optimizeList = actionService.optimizeSort(actionList);
            List<Action> optimizeList = actionSorter.optimizeSort(actionList);
            List<Action> newActionList = new ArrayList<>(optimizeList);
            List<Action> newActionList = actionSorter.optimizeSort(actionList);
            String groupId = String.valueOf(snowflakeIdWorker.nextId()).substring(3);
            // save action
            int i = newActionList.size();
            for (Action action : newActionList) {
                action.setUuid(String.valueOf(snowflakeIdWorker.nextId()).substring(3));
//                action.setUuid(String.valueOf(snowflakeIdWorker.nextId()).substring(3));
                action.setGroupId(groupId);
                action.setPriority(i);
                if (!actionService.save(action)) {
                    throw new BusinessException(action.getName() + "动作保存失败");
                }
                i -= 1;
            }
            if (!actionService.saveBatch(newActionList)) {
                throw new BusinessException("group[" + groupId + "] 动作保存失败");
            }
            // update segment
            for (Segment item : segmentList) {
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PathQueueConsumer.java
@@ -37,7 +37,7 @@
        this.consumerExecutor.execute(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    Thread.sleep(30);
                    Thread.sleep(50);
                    List<UnlockPathTask> tasks = new ArrayList<>();
                    // if unlockTaskQueue was empty, then block
                    tasks.add(unlockTaskQueue.take());