zjj
2025-02-17 6c41f7890037038b003b1c0e5a4a9c9704ee80f7
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
@@ -1650,11 +1650,6 @@
            return motionList;
        }
        BasConveyorSta basConveyorStaOrigin = basConveyorStaService.selectBySiteNo(task.getOriginSite());
        if (basConveyorStaOrigin == null) {
            return motionList;
        }
        //检测穿梭车是否有任务绑定
        boolean shuttleResult = Utils.checkShuttleHasBinding(shuttleDevice, task.getTaskNo());
        if (shuttleResult) {
@@ -1697,25 +1692,14 @@
        //获取出库任务类型
        TaskCtg taskCtg = taskCtgService.getOne(new LambdaQueryWrapper<TaskCtg>()
                .eq(TaskCtg::getFlag, String.valueOf(TaskCtgType.OUT))
                .eq(TaskCtg::getFlag, String.valueOf(TaskCtgType.MOVE))
                .eq(TaskCtg::getStatus, 1));
        if (taskCtg == null) {
            return motionList;
        }
        //获取输送线路径
        BasConveyorPath basConveyorPath = basConveyorPathService.getOne(new LambdaQueryWrapper<BasConveyorPath>()
                .eq(BasConveyorPath::getDeviceStn, task.getOriginSite())
                .eq(BasConveyorPath::getDeviceNo, liftProtocol.getLiftNo())
                .eq(BasConveyorPath::getTypeNo, taskCtg.getId()));
        if (basConveyorPath == null) {
            return motionList;
        }
        //分析出库路径待机库位
        String lastPathStartLoc = shuttleDispatcher.analyzeOutPathWaitLoc(originLoc, standbyLocNoTo, shuttleDevice);
        if (lastPathStartLoc == null) {
            return motionList;//未分析成功
        }
        /**
         * 出库
@@ -1748,46 +1732,15 @@
                    MotionCtgType.SHUTTLE_PALLET_LIFT
            ));
            if (!originLoc.equals(lastPathStartLoc)) {
                // 穿梭车载货出库至最后一段路径等待
                motionList.addAll(kernelService.shuttleMove(
                        MotionDto.build((dto -> {
                            dto.setShuttleNo(shuttleDevice.getId().intValue());
                            dto.setLocNo(originLoc);
                        })),
                        MotionDto.build((dto -> {
                            dto.setShuttleNo(shuttleDevice.getId().intValue());
                            dto.setShuttleDevice(shuttleDevice);
                            dto.setLocNo(lastPathStartLoc);
                        })),
                        MotionCtgType.SHUTTLE_TRANSPORT
                ));
            }
//            // 穿梭车载货至提升机待机位
//            motionList.addAll(kernelService.shuttleMove(
//                    MotionDto.build((dto -> {
//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
//                        dto.setLocNo(lastPathStartLoc);
//                    })),
//                    MotionDto.build((dto -> {
//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
//                        dto.setShuttleDevice(shuttleDevice);
//                        dto.setLiftNo(transferLiftDevice.getId().intValue());
//                        dto.setLocNo(standbyLocNoTo);
//                        dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//输送站
//                    })),
//                    MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
//            ));
            // 穿梭车走行至目标库位
            motionList.addAll(kernelService.shuttleMove(
                    MotionDto.build((dto -> {
                        dto.setShuttleNo(shuttleDevice.getId().intValue());
                        dto.setLocNo(lastPathStartLoc);
                        dto.setLocNo(originLoc);
                    })),
                    MotionDto.build((dto -> {
                        dto.setShuttleNo(shuttleDevice.getId().intValue());
                        dto.setShuttleDevice(shuttleDevice);
                        dto.setLocNo(locNo);
                    })),
                    MotionCtgType.SHUTTLE_MOVE
@@ -1959,30 +1912,15 @@
                    MotionCtgType.SHUTTLE_PALLET_LIFT
            ));
            if (!originLoc.equals(lastPathStartLoc)) {
                // 穿梭车载货出库至最后一段路径等待
                motionList.addAll(kernelService.shuttleMove(
                        MotionDto.build((dto -> {
                            dto.setShuttleNo(shuttleDevice.getId().intValue());
                            dto.setLocNo(originLoc);
                        })),
                        MotionDto.build((dto -> {
                            dto.setShuttleNo(shuttleDevice.getId().intValue());
                            dto.setShuttleDevice(shuttleDevice);
                            dto.setLocNo(lastPathStartLoc);
                        })),
                        MotionCtgType.SHUTTLE_TRANSPORT
                ));
            }
            // 穿梭车走行至目标库位
            motionList.addAll(kernelService.shuttleMove(
                    MotionDto.build((dto -> {
                        dto.setShuttleNo(shuttleDevice.getId().intValue());
                        dto.setLocNo(lastPathStartLoc);
                        dto.setLocNo(originLoc);
                    })),
                    MotionDto.build((dto -> {
                        dto.setShuttleNo(shuttleDevice.getId().intValue());
                        dto.setShuttleDevice(shuttleDevice);
                        dto.setLocNo(locNo);
                    })),
                    MotionCtgType.SHUTTLE_MOVE