| | |
| | | @ManagerAuth(memo = "入库") |
| | | @PostMapping("/crn/operator/put") |
| | | public R crnPut(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/take") |
| | | public R crnTake(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/stockMove") |
| | | public R crnStockMove(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/siteMove") |
| | | public R crnSiteMove(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/bacOrigin") |
| | | public R crnBacOrigin(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/reverseOrigin") |
| | | public R reverseOrigin(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/taskComplete") |
| | | public R crnTaskComplete(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | |
| | | @PostMapping("/crn/operator/clearCommand") |
| | | public R crnClearCommand(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | if (param.getCrnNo() == null) { |
| | | throw new CoolException("请选择堆垛机"); |
| | | } |
| | |
| | | @PostMapping("/crn/operator/handleReset") |
| | | public R handleReset(CrnOperatorParam param) throws Exception { |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | if (param.getCrnNo() == null) { |
| | | throw new CoolException("请选择堆垛机"); |
| | | } |
| | |
| | | crnCommand.setCommand((short) 0); // 任务完成确认位 |
| | | // 延时发送 |
| | | Thread.sleep(1000L); |
| | | if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(2, crnCommand), false)) { |
| | | if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(5, crnCommand), false)) { |
| | | return R.ok(); |
| | | } else { |
| | | throw new CoolException("命令下发失败"); |
| | |
| | | @PostMapping("/crn/operator/auto") |
| | | public R crnAuto(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/semiAutomatic") |
| | | public R crnsemiAutomatic(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/hand") |
| | | public R onlineWrk1(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/onlineWrk1") |
| | | public R onlineWrk2(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/onlineWrk2") |
| | | public R onlineWrk3(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/onlineWrk3") |
| | | public R onlineWrk4(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/onlineWrk4") |
| | | public R crnHand(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | |
| | | @PostMapping("/crn/operator/reset") |
| | | public R crnReset(CrnOperatorParam param){ |
| | | // 系统运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | return R.error("wcs系统状态为开启"); |
| | | } |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | | // } |
| | | short[] array = new short[9]; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |