skyouc
2025-12-24 a15a34a5b8ce251f5d25726ee55476adabdbbea0
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -842,6 +842,12 @@
                                                agvId,    // AGV
                                                now    // 工作时间
                                        ));
                                        log.info("TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                                Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                                lastCode.getData(),
                                                lastCode.getCornerBool(),
                                                nextDirection,
                                                180);
                                    } else {
                                        // turn
                                        actionList.add(new Action(
@@ -859,6 +865,12 @@
                                                agvId,    // AGV
                                                now    // 工作时间
                                        ));
                                        log.info("TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                                Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                                lastCode.getData(),
                                                lastCode.getCornerBool(),
                                                nextDirection,
                                                nextDirection);
                                    }
                                    lastDirection = nextDirection;
                                }
@@ -883,6 +895,12 @@
                                            agvId,    // AGV
                                            now    // 工作时间
                                    ));
                                    log.info("TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                            Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                            lastCode.getData(),
                                            lastCode.getCornerBool(),
                                            nextDirection,
                                            180);
                                }
                            }
                        }
@@ -905,6 +923,12 @@
                                    agvId,    // AGV
                                    now    // 工作时间
                            ));
                            log.info("TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                    Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                    lastCode.getData(),
                                    lastCode.getCornerBool(),
                                    nextDirection,
                                    nextDirection);
                            lastDirection = nextDirection;
                        }
@@ -940,7 +964,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 +987,12 @@
                                    agvId,    // AGV
                                    now    // 工作时间
                            ));
                            log.info("TurnCorner posType={}, code={}, corner={}, nextDirection={}, finalAngle={}",
                                    Objects.requireNonNull(TaskPosDto.queryPosType(segment.getPosType())),
                                    lastCode.getData(),
                                    lastCode.getCornerBool(),
                                    null,
                                    turnDirection);
                            lastDirection = workDirection;
                        }
                    }
@@ -978,7 +1008,8 @@
                        assert backpackType != null;
                        // 检验方向
                        if (!lastDirection.equals(workDirection)) {
                            throw new CoolException(agvNo + "号小车方向错误,请推至转弯点手动调整");
                            lastDirection = workDirection;
//                            throw new CoolException(agvNo agvNo+ "号小车方向错误,请推至转弯点手动调整");
                        }
                        // 货架取货
                        Loc oriLoc = locService.getById(task.getOriLoc());
@@ -1020,7 +1051,8 @@
                        assert backpackType != null;
                        // 检验方向
                        if (!lastDirection.equals(workDirection)) {
                            throw new CoolException(agvNo + "号小车方向错误,请推至转弯点手动调整");
                            lastDirection = workDirection;
//                            throw new CoolException(agvNo + "号小车方向错误,请推至转弯点手动调整");
                        }
                        // 暂存点取货货
                        actionList.add(new Action(
@@ -2428,7 +2460,7 @@
        if (Objects.isNull(locSts)) {
            return R.error("数据错误,未找到对应工作状态!!");
        }
        if (!params.getType().equals("loc")) {
        if (params.getType().equals("loc")) {
            Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, params.getCode()));
            if (Objects.isNull(loc)) {
                return R.error("库位信息不存在!!");