yy
2025-12-30 23b3e8cdd6cef0a48d053e3281fbc5a286ec003c
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -842,7 +842,18 @@
                                                agvId,    // AGV
                                                now    // 工作时间
                                        ));
                                        log.info("1TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                                Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                                lastCode.getData(),
                                                lastCode.getCornerBool(),
                                                nextDirection,
                                                180);
                                    } else {
                                        List<String> list = Arrays.asList("00000051", "00000052", "00000053", "00000054");
                                        Double turnDirection = nextDirection;
                                        if (list.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) {
                                            turnDirection = 180.0;
                                        }
                                        // turn
                                        actionList.add(new Action(
                                                null,    // 编号s
@@ -853,12 +864,18 @@
                                                ActionTypeType.TurnCorner.desc,    // 名称
                                                mapService.isTurnCorner(lastCode.getData()) ? 1D : 0D,    // 属性值
                                                lastCode.getData(),    // 地面码
                                                String.valueOf(nextDirection),   // 动作参数
                                                String.valueOf(turnDirection),   // 动作参数
                                                ActionTypeType.TurnCorner.val(),    // 动作类型
                                                actionPrepareSts,    // 动作进度
                                                agvId,    // AGV
                                                now    // 工作时间
                                        ));
                                        log.info("2TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                                Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                                lastCode.getData(),
                                                lastCode.getCornerBool(),
                                                nextDirection,
                                                nextDirection);
                                    }
                                    lastDirection = nextDirection;
                                }
@@ -883,6 +900,12 @@
                                            agvId,    // AGV
                                            now    // 工作时间
                                    ));
                                    log.info("3TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                            Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                            lastCode.getData(),
                                            lastCode.getCornerBool(),
                                            nextDirection,
                                            180);
                                }
                            }
                        }
@@ -905,6 +928,12 @@
                                    agvId,    // AGV
                                    now    // 工作时间
                            ));
                            log.info("4TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                    Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                    lastCode.getData(),
                                    lastCode.getCornerBool(),
                                    nextDirection,
                                    nextDirection);
                            lastDirection = nextDirection;
                        }
@@ -940,7 +969,7 @@
                if (first) {
                    if (Cools.isEmpty(actionList) || !actionList.get(0).getActionType().equals(ActionTypeType.TurnCorner.val())) {
                        Double turnDirection = workDirection;
                        List<String> list = Arrays.asList("00000051", "00000052", "00000053", "00000054");
                        List<String> list = Arrays.asList("00000050","00000051", "00000052", "00000053", "00000054");
                        if ((Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())).equals(TaskPosDto.PosType.ORI_STA)
                                || Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType()))
                                .equals(TaskPosDto.PosType.DEST_STA)) && list.contains(lastCode.getData())) {
@@ -963,6 +992,12 @@
                                    agvId,    // AGV
                                    now    // 工作时间
                            ));
                            log.info("5TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                    Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                    lastCode.getData(),
                                    lastCode.getCornerBool(),
                                    null,
                                    turnDirection);
                            lastDirection = workDirection;
                        }
                    }