#
vincentlu
3 天以前 1bbfdfcecf243ba36512b59da80e41602ad50263
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/service/impl/MissionServiceImpl.java
@@ -151,8 +151,7 @@
            AgvDetail agvDetail = agvDetailService.selectMajorByAgvId(firstAction.getAgvId());
            Double lastDirection = MapService.mapToNearest(agvDetail.getAgvAngle());
            List<Action> fullActionList = actionService.list(
                    new LambdaQueryWrapper<Action>()
            List<Action> fullActionList = actionService.list(new LambdaQueryWrapper<Action>()
                            .eq(Action::getGroupId, actionGroupId)
                            .select(Action::getId, Action::getActionType, Action::getPriority)
                            .orderByDesc(Action::getPriority)
@@ -181,6 +180,13 @@
                if (null != turnActionId) {
                    Action turn = actionService.getById(turnActionId);
                    Double direction = Double.parseDouble(turn.getParams());
                    if (!lastDirection.equals(direction)) {
                        if (!code.getCornerBool()) {
                            throw new CoolException(agvDetail.getAgvId$() + "号小车方向错误,请推至转弯点手动调整");
                        }
                    }
                    // new turn action
                    prependTurn = new Action(
                            null,    // 编号
@@ -219,9 +225,10 @@
        }
        int i = newActionList.size();
        for (Action action : newActionList) {
            action.setId(null);
            action.setPriority(i);
            if (!actionService.save(action)) {
                throw new BusinessException(action.getName() + " Action Update Fail!");
                throw new BusinessException(action.getName() + " Action Save Fail!");
            }
            i -= 1;
        }