#
zjj
2024-06-22 dcc528dae89242366a86e8b3709479621b95b0c0
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
@@ -3,11 +3,13 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.wcs.core.domain.dto.MotionDto;
import com.zy.asrs.wcs.core.entity.BasConveyorPath;
import com.zy.asrs.wcs.core.entity.ShuttleStandby;
import com.zy.asrs.wcs.core.entity.Task;
import com.zy.asrs.wcs.core.model.enums.DeviceCtgType;
import com.zy.asrs.wcs.core.model.enums.MotionCtgType;
import com.zy.asrs.wcs.core.model.enums.TaskStsType;
import com.zy.asrs.wcs.core.service.BasConveyorPathService;
import com.zy.asrs.wcs.core.service.ShuttleStandbyService;
import com.zy.asrs.wcs.core.service.TaskService;
import com.zy.asrs.wcs.core.utils.ConveyorDispatcher;
@@ -53,6 +55,8 @@
    private DeviceService deviceService;
    @Autowired
    private ShuttleStandbyService shuttleStandbyService;
    @Autowired
    private BasConveyorPathService basConveyorPathService;
    public List<Motion> generateMotion(Task task) {
        List<Motion> motionList = new ArrayList<>();
@@ -492,6 +496,14 @@
            //穿梭车出提升机后小车待机位
            String shuttleFromLiftStandbyLoc = shuttleStandbyFrom.getStandbyLoc();
            //获取输送线路径
            BasConveyorPath basConveyorPath = basConveyorPathService.getOne(new LambdaQueryWrapper<BasConveyorPath>()
                    .eq(BasConveyorPath::getDeviceStn, task.getOriginSite())
                    .eq(BasConveyorPath::getDeviceNo, liftProtocol.getLiftNo()));
            if (basConveyorPath == null) {
                return motionList;
            }
            /**
             * 出库
             * 一、出库起始层有穿梭车
@@ -630,6 +642,19 @@
                            dto.setLocNo(shuttleFromLiftStandbyLoc);
                        })),
                        MotionCtgType.SHUTTLE_MOVE
                ));
                // 输送线运输至出库口
                motionList.addAll(kernelService.conveyorOutbound(
                        MotionDto.build((dto -> {
                            dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
                            dto.setStaNo(basConveyorPath.getDeviceStn());
                        })),
                        MotionDto.build((dto -> {
                            dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
                            dto.setStaNo(basConveyorPath.getStnNo());
                        })),
                        MotionCtgType.CONVEYOR_OUTBOUND
                ));
            /**
@@ -877,6 +902,19 @@
                        MotionCtgType.SHUTTLE_MOVE
                ));
                // 输送线运输至出库口
                motionList.addAll(kernelService.conveyorOutbound(
                        MotionDto.build((dto -> {
                            dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
                            dto.setStaNo(basConveyorPath.getDeviceStn());
                        })),
                        MotionDto.build((dto -> {
                            dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
                            dto.setStaNo(basConveyorPath.getStnNo());
                        })),
                        MotionCtgType.CONVEYOR_OUTBOUND
                ));
            }
        }