yy
2025-12-30 afbdf224dcc6f4c5d0f9331e25b99e0621cb6afd
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -768,7 +768,7 @@
                Task task = taskService.getById(segment.getTaskId());
                TaskPosDto.PosType posType = Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType()));
                boolean isStation = posType.equals(TaskPosDto.PosType.ORI_STA) || posType.equals(TaskPosDto.PosType.DEST_STA);
                boolean isLoc = posType.equals(TaskPosDto.PosType.ORI_LOC) || posType.equals(TaskPosDto.PosType.DEST_LOC);
                // 节点条码
                Code code = codeService.getCacheById(segment.getEndNode());
@@ -792,7 +792,7 @@
                        boolean reverse = false;
                        if (nextDirection.equals((workDirection + 180) % 360)) {
                            List<String> list = Arrays.asList("00000050", "00000051", "00000052", "00000053", "00000054", "00000080", "00000081", "00000082", "00000083", "00000084");
                            if (isStation && list.contains(lastCode.getData())) {
                            if ((isStation && list.contains("00000050")) || (isLoc && list.contains("00000080"))) {
                                reverse = false;
                                lastDirection = nextDirection;
                            } else {
@@ -819,7 +819,7 @@
                                    nextDirection = lastDirection;
                                    reverse = true;
                                } else {
                                    if (isStation && (lastCode.getData().equals("00000050") || lastCode.getData().equals("00000080"))) {
                                    if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && lastCode.getData().equals("00000080"))) {
                                        // turn
                                        reverse = false;
                                        actionList.add(new Action(
@@ -844,6 +844,11 @@
                                                nextDirection,
                                                180);
                                    } else {
                                        List<String> list = Arrays.asList("00000051", "00000052", "00000053", "00000054");
                                        Double turnDirection = nextDirection;
                                        if ((isStation && list.contains("00000050")) || (isLoc && list.contains("00000080"))) {
                                            turnDirection = 180.0;
                                        }
                                        // turn
                                        actionList.add(new Action(
                                                null,    // 编号s
@@ -854,7 +859,7 @@
                                                ActionTypeType.TurnCorner.desc,    // 名称
                                                mapService.isTurnCorner(lastCode.getData()) ? 1D : 0D,    // 属性值
                                                lastCode.getData(),    // 地面码
                                                String.valueOf(nextDirection),   // 动作参数
                                                String.valueOf(turnDirection),   // 动作参数
                                                ActionTypeType.TurnCorner.val(),    // 动作类型
                                                actionPrepareSts,    // 动作进度
                                                agvId,    // AGV
@@ -870,7 +875,7 @@
                                    lastDirection = nextDirection;
                                }
                            } else {
                                if (isStation && (lastCode.getData().equals("00000050") || lastCode.getData().equals("00000080"))) {
                                if ((isStation && lastCode.getData().equals("00000050")) || (isLoc && lastCode.getData().equals("00000080"))) {
                                    // turn
                                    reverse = false;
                                    actionList.add(new Action(
@@ -958,7 +963,7 @@
                    if (Cools.isEmpty(actionList) || !actionList.get(0).getActionType().equals(ActionTypeType.TurnCorner.val())) {
                        Double turnDirection = workDirection;
                        List<String> list = Arrays.asList("00000050","00000051", "00000052", "00000053", "00000054", "00000080", "00000081", "00000082", "00000083", "00000084");
                        if (isStation && list.contains(lastCode.getData())) {
                        if ((isStation && list.contains("00000050")) || (isLoc && list.contains("00000080"))) {
                            turnDirection = workDirection + 180.0;
                        }
                        if (lastCode.getCornerBool()) {