#
vincentlu
2025-01-13 8e492faebda1640adfc30a780fc95b9ecd019c6d
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -301,8 +301,8 @@
                        oriLoc = locService.getById(task.getOriLoc());
                        destLoc = locService.getById(task.getDestLoc());
                        startCode = codeService.getById(oriLoc.getCode());
                        endCode = codeService.getById(destLoc.getCode());
                        startCode = codeService.getCacheById(oriLoc.getCode());
                        endCode = codeService.getCacheById(destLoc.getCode());
                        TaskPosDto.packagePosGroup(groups, task, startCode, TaskPosDto.PosType.ORI_LOC, sameGroupXy);
                        TaskPosDto.packagePosGroup(groups, task, endCode, TaskPosDto.PosType.DEST_LOC, sameGroupXy);
@@ -311,8 +311,8 @@
                        oriLoc = locService.getById(task.getOriLoc());
                        destSta = staService.getById(task.getDestSta());
                        startCode = codeService.getById(oriLoc.getCode());
                        endCode = codeService.getById(destSta.getCode());
                        startCode = codeService.getCacheById(oriLoc.getCode());
                        endCode = codeService.getCacheById(destSta.getCode());
                        TaskPosDto.packagePosGroup(groups, task, startCode, TaskPosDto.PosType.ORI_LOC, sameGroupXy);
                        TaskPosDto.packagePosGroup(groups, task, endCode, TaskPosDto.PosType.DEST_STA, sameGroupXy);
@@ -321,8 +321,8 @@
                        oriSta = staService.getById(task.getOriSta());
                        destLoc = locService.getById(task.getDestLoc());
                        startCode = codeService.getById(oriSta.getCode());
                        endCode = codeService.getById(destLoc.getCode());
                        startCode = codeService.getCacheById(oriSta.getCode());
                        endCode = codeService.getCacheById(destLoc.getCode());
                        TaskPosDto.packagePosGroup(groups, task, startCode, TaskPosDto.PosType.ORI_STA, sameGroupXy);
                        TaskPosDto.packagePosGroup(groups, task, endCode, TaskPosDto.PosType.DEST_LOC, sameGroupXy);
@@ -331,8 +331,8 @@
                        oriSta = staService.getById(task.getOriSta());
                        destSta = staService.getById(task.getDestSta());
                        startCode = codeService.getById(oriSta.getCode());
                        endCode = codeService.getById(destSta.getCode());
                        startCode = codeService.getCacheById(oriSta.getCode());
                        endCode = codeService.getCacheById(destSta.getCode());
                        TaskPosDto.packagePosGroup(groups, task, startCode, TaskPosDto.PosType.ORI_STA, sameGroupXy);
                        TaskPosDto.packagePosGroup(groups, task, endCode, TaskPosDto.PosType.DEST_STA, sameGroupXy);
@@ -397,7 +397,7 @@
            }
            // re-order by agv current position
            Code currCode = codeService.getById(agvDetail.getRecentCode());
            Code currCode = codeService.getCacheById(agvDetail.getRecentCode());
            Double[] currPosition = new Double[] {currCode.getX(), currCode.getY()};
            List<List<TaskPosDto>> pickGroups = new ArrayList<>();
@@ -517,7 +517,7 @@
                    List<FuncSta> idleFunStaList = funcStaService.findInIdleStatus(FuncStaType.query(taskType), agvId);
                    if (!Cools.isEmpty(idleFunStaList)) {
                        FuncSta funcSta = funcStaService.checkoutClosestFunSta(agvDetail.getRecentCode(), idleFunStaList);
                        endCode = codeService.getById(funcSta.getCode());
                        endCode = codeService.getCacheById(funcSta.getCode());
                    }
                    if (null == endCode) {
                        log.warn("AGV[{}] failed to search destination,there hadn't any idle funSta,TaskTypeType:{}", agvNo, taskType.toString());
@@ -666,7 +666,7 @@
            List<Action> actionList = new ArrayList<>();
            // start node
            Code lastCode = codeService.getById(agvDetail.getRecentCode());
            Code lastCode = codeService.getCacheById(agvDetail.getRecentCode());
            Double lastDirection = agvDetail.getAgvAngle();
            if (!lastCode.getData().equals(pathList.get(0))) {
                throw new CoolException("AGV[" + agvNo + "]定位偏移...");
@@ -679,7 +679,7 @@
                Task task = taskService.getById(segment.getTaskId());
                // 节点条码
                Code code = codeService.getById(segment.getEndNode());
                Code code = codeService.getCacheById(segment.getEndNode());
                // 需要走行
                if (!lastCode.getData().equals(code.getData())) {
@@ -1077,8 +1077,8 @@
                }
            }
            Agv agv = agvService.getById(actionList.get(0).getAgvId());
            AgvAction agvAction = new AgvAction(agv.getUuid(), actionGroupId);
            String agvNo = agvService.getAgvNo(actionList.get(0).getAgvId());
            AgvAction agvAction = new AgvAction(agvNo, actionGroupId);
            for (Action action : actionList) {
                switch (Objects.requireNonNull(ActionTypeType.get(action.getActionTypeEl()))) {