#
Junjie
2025-07-27 db32ffbad65906185ba768a3dc7364337473b1b2
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -386,6 +386,13 @@
                return false;
            }
            //检测是否存在移动任务
            WrkMast moveWorking = wrkMastService.selectShuttleHasMoveWorking(wrkMast.getShuttleNo());
            if (moveWorking != null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,小车存在移动任务", wrkMast.getWrkNo());
                return false;
            }
            ShuttleAssignCommand assignCommand = new ShuttleAssignCommand();
            assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo()); // 四向穿梭车编号
            assignCommand.setTaskMode(ShuttleTaskModeType.TRANSPORT.id);//小车移库任务
@@ -492,6 +499,13 @@
                return false;
            }
            //检测是否存在移动任务
            WrkMast moveWorking = wrkMastService.selectShuttleHasMoveWorking(wrkMast.getShuttleNo());
            if (moveWorking != null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,小车存在移动任务", wrkMast.getWrkNo());
                return false;
            }
            //检测障碍物车
            boolean checkObstacle = shuttleOperaUtils.checkObstacle(wrkMast.getLocNo(), new ArrayList<Integer>() {{
                add(shuttleProtocol.getShuttleNo());
@@ -506,9 +520,10 @@
            assignCommand.setTaskMode(ShuttleTaskModeType.TRANSPORT.id);//小车移库任务
            assignCommand.setTaskNo(wrkMast.getWrkNo());//任务号
            assignCommand.setAuto(true);//自动模式
            assignCommand.setLocNo(wrkMast.getLocNo());
            //获取小车到输送站点行走命令
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(wrkMast.getSourceLocNo(), wrkMast.getLocNo(), NavigationMapType.getDfxWithDevice(), assignCommand, shuttleThread);
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(wrkMast.getSourceLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.DFX), assignCommand, shuttleThread);
            if (commands == null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,路径计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
                return false;
@@ -1807,7 +1822,7 @@
            assignCommand.setLocNo(wrkMast.getLocNo());//目标库位
            //获取小车到目标库位命令
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread);
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread);
            if (commands == null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,路径计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
                return false;//路径计算失败