| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | assignCommand.setTaskNo(motion.getTaskNo()); |
| | | assignCommand.setCommands(list); |
| | | |
| | | LiftCommand command = new LiftCommand(); |
| | | List<LiftCommand> command = new ArrayList<>(); |
| | | switch (Objects.requireNonNull(MotionCtgType.get(motion.getMotionCtgEl()))){ |
| | | case LIFT_MOVE: |
| | | // 如果已经在目标层,那边层过滤 |
| | |
| | | } |
| | | |
| | | command = liftThread.getMoveCommand(motion.getTaskNo(), 0, Integer.parseInt(motion.getTarget()), LiftCommandModeType.MOVE); |
| | | list.add(command); |
| | | list.addAll(command); |
| | | return liftAction.assignWork(liftThread.getDevice(), assignCommand); |
| | | case LIFT_WITH_GOODS: |
| | | // if (liftProtocol.getHasTray()) { |
| | |
| | | // } |
| | | |
| | | command = liftThread.getPalletInOutCommand(motion.getTaskNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()), motion.getOriDrt(), motion.getTarDrt(), LiftCommandModeType.PALLET_INOUT); |
| | | list.add(command); |
| | | list.addAll(command); |
| | | return liftAction.assignWork(liftThread.getDevice(), assignCommand); |
| | | case LIFT_WITH_SHUTTLE: |
| | | if (!liftProtocol.getHasCar()) { |
| | |
| | | } |
| | | |
| | | command = liftThread.getMoveWithShuttleCommand(motion.getTaskNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()), LiftCommandModeType.MOVE_CAR); |
| | | list.add(command); |
| | | list.addAll(command); |
| | | return liftAction.assignWork(liftThread.getDevice(), assignCommand); |
| | | case LIFT_WITH_GOODS_AND_SHUTTLE: |
| | | return false; |