| | |
| | | // 判断穿梭车是否在目标层 |
| | | if (Utils.getLev(shuttleLocNo) == Utils.getLev(locNo)) { |
| | | |
| | | // 穿梭车走行至目标库位 |
| | | motionList.addAll(kernelService.shuttleMove( |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(shuttleDevice.getId().intValue()); |
| | | dto.setLocNo(shuttleLocNo); |
| | | })), |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(shuttleDevice.getId().intValue()); |
| | | dto.setLocNo(locNo); |
| | | })), |
| | | MotionCtgType.SHUTTLE_MOVE |
| | | )); |
| | | if (!shuttleLocNo.equals(locNo)) {//小车不在目标库位 |
| | | // 穿梭车走行至目标库位 |
| | | motionList.addAll(kernelService.shuttleMove( |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(shuttleDevice.getId().intValue()); |
| | | dto.setLocNo(shuttleLocNo); |
| | | })), |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(shuttleDevice.getId().intValue()); |
| | | dto.setLocNo(locNo); |
| | | })), |
| | | MotionCtgType.SHUTTLE_MOVE |
| | | )); |
| | | } |
| | | |
| | | } else { |
| | | //小车跨层 |
| | | |
| | | //获取距离目标位置最近的空闲提升机 |
| | | LiftThread liftThread = liftDispatcher.searchIdleLift(locNo, task.getHostId()); |
| | | //获取距离目标位置最近的空闲可换层提升机 |
| | | LiftThread liftThread = liftDispatcher.searchIdleLift(locNo, task.getHostId(), true); |
| | | if (liftThread == null) { |
| | | return motionList; |
| | | } |
| | |
| | | // 判断穿梭车是否在目标层 |
| | | if (Utils.getLev(shuttleLocNo) == Utils.getLev(targetLoc)) { |
| | | |
| | | // 穿梭车走行至源库位 |
| | | motionList.addAll(kernelService.shuttleMove( |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(shuttleLocNo); |
| | | })), |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(sourceLoc); |
| | | })), |
| | | MotionCtgType.SHUTTLE_MOVE |
| | | )); |
| | | if (!shuttleLocNo.equals(sourceLoc)) {//小车不在目标库位 |
| | | // 穿梭车走行至源库位 |
| | | motionList.addAll(kernelService.shuttleMove( |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(shuttleLocNo); |
| | | })), |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(sourceLoc); |
| | | })), |
| | | MotionCtgType.SHUTTLE_MOVE |
| | | )); |
| | | } |
| | | |
| | | //托盘顶升 |
| | | motionList.add(Motion.build(motion -> { |