| | |
| | | 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; |
| | |
| | | private DeviceService deviceService; |
| | | @Autowired |
| | | private ShuttleStandbyService shuttleStandbyService; |
| | | @Autowired |
| | | private BasConveyorPathService basConveyorPathService; |
| | | |
| | | public List<Motion> generateMotion(Task task) { |
| | | List<Motion> motionList = new ArrayList<>(); |
| | |
| | | //穿梭车出提升机后小车待机位 |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 出库 |
| | | * 一、出库起始层有穿梭车 |
| | |
| | | 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 |
| | | )); |
| | | |
| | | /** |
| | |
| | | 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 |
| | | )); |
| | | |
| | | } |
| | | |
| | | } |