From fd6d26f8ffe6a37533e741337f3eca9134d934c7 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 15 一月 2025 10:42:59 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java | 25 +++++++++---------------- 1 files changed, 9 insertions(+), 16 deletions(-) diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java index 59ca80b..8b08e91 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java @@ -250,7 +250,7 @@ try { // valid ----------------------------------------------- Agv agv = agvService.getById(agvId); - if (!agvService.judgeEnable(agv.getId(), true)) { + if (!agvService.judgeEnable(agv.getId(), false)) { return; } if (!Cools.isEmpty(taskService.selectInSts(agvId, TaskStsType.ASSIGN, TaskStsType.PROGRESS))) { @@ -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) { -- Gitblit v1.9.1