| | |
| | | return motionList; |
| | | } |
| | | |
| | | String sourceLoc = task.getOriginLoc();//源库位 |
| | | String targetLoc = task.getDestLoc();//任务目标(借用字段) |
| | | String targetSite = task.getDestSite();//任务类型(借用字段) |
| | | |
| | |
| | | })); |
| | | } else if (targetSite.equals("reset")) { |
| | | //复位 |
| | | } else if (targetSite.equals("takeMove")) { |
| | | //取放货 |
| | | String shuttleLocNo = shuttleProtocol.getCurrentLocNo(); |
| | | |
| | | // 判断穿梭车是否在目标层 |
| | | 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 |
| | | )); |
| | | |
| | | //托盘顶升 |
| | | motionList.add(Motion.build(motion -> { |
| | | motion.setDeviceCtg(DeviceCtgType.SHUTTLE.val()); |
| | | motion.setDevice(String.valueOf(device.getId())); |
| | | motion.setMotionCtg(MotionCtgType.SHUTTLE_PALLET_LIFT.val()); |
| | | })); |
| | | |
| | | // 穿梭车走行至目标库位 |
| | | motionList.addAll(kernelService.shuttleMove( |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(sourceLoc); |
| | | })), |
| | | MotionDto.build((dto -> { |
| | | dto.setShuttleNo(device.getId().intValue()); |
| | | dto.setLocNo(targetLoc); |
| | | })), |
| | | MotionCtgType.SHUTTLE_MOVE |
| | | )); |
| | | |
| | | //托盘下降 |
| | | motionList.add(Motion.build(motion -> { |
| | | motion.setDeviceCtg(DeviceCtgType.SHUTTLE.val()); |
| | | motion.setDevice(String.valueOf(device.getId())); |
| | | motion.setMotionCtg(MotionCtgType.SHUTTLE_PALLET_DOWN.val()); |
| | | })); |
| | | |
| | | } |
| | | } |
| | | |
| | | return motionList; |