| | |
| | | shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.IDLE);//任务状态-空闲 |
| | | shuttleProtocol.setPakMk(true);//作业标记复位 |
| | | return R.ok(); |
| | | } else if (shuttleTaskModeType == ShuttleTaskModeType.SHUTTLE_CONTROL) { |
| | | //小车管制 |
| | | NyShuttleHttpCommand suspendCommand = NyHttpUtils.getSuspendCommand(shuttleSlave.getId(), assignCommand.getTaskNo().intValue(), true); |
| | | ArrayList<NyShuttleHttpCommand> commands = new ArrayList<>(); |
| | | commands.add(suspendCommand); |
| | | assignCommand.setCommands(commands); |
| | | } else if (shuttleTaskModeType == ShuttleTaskModeType.SHUTTLE_CANCEL_CONTROL) { |
| | | //小车取消管制 |
| | | NyShuttleHttpCommand suspendCommand = NyHttpUtils.getSuspendCommand(shuttleSlave.getId(), assignCommand.getTaskNo().intValue(), false); |
| | | ArrayList<NyShuttleHttpCommand> commands = new ArrayList<>(); |
| | | commands.add(suspendCommand); |
| | | assignCommand.setCommands(commands); |
| | | } else { |
| | | throw new CoolException("未知命令"); |
| | | } |
| | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth(memo = "修改数据") |
| | | public R shuttleUpdate(@RequestParam Integer shuttleNo, |
| | | @RequestParam Integer workNo, |
| | | @RequestParam String pakMk){ |
| | | @RequestParam Integer workNo, |
| | | @RequestParam String pakMk, |
| | | @RequestParam Integer token) { |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo); |
| | | if (shuttleThread == null) { |
| | | return R.error("plc已掉线"); |
| | |
| | | if (pakMk != null) { |
| | | shuttleProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | if (token != null) { |
| | | shuttleProtocol.setToken(token); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |