| | |
| | | return R.error("线程不存在"); |
| | | } |
| | | |
| | | CrnCommand command = crnThread.getResetCommand(crnNo, 9999); |
| | | CrnCommand command = crnThread.getResetCommand(9999, crnNo); |
| | | MessageQueue.offer(SlaveType.Crn, crnNo, new Task(2, command)); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (commandTaskMode.equals(CrnTaskModeType.RESET.id)) { |
| | | commandTaskNo = 0; |
| | | commandTaskMode = 0; |
| | | |
| | | if (!Cools.isEmpty(command.getLocNo())){ |
| | | OperateResult resultAck = siemensNet.Write("DB110." + command.getIndex() * 2, command.getValue()); |
| | | if (resultAck.IsSuccess) { |
| | | Integer index = command.getIndex()*2 + 200; |
| | | OperateResult resultAck1 = siemensNet.Write("DB110." + index, command.getValue()); |
| | | if (resultAck1.IsSuccess) { |
| | | News.info("库位橙色按钮命令下发[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } else { |
| | | News.error("库位白色灯命令下发失败[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } |
| | | News.info("库位白色灯命令下发[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } else { |
| | | News.error("库位白色灯命令下发失败[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | short[] array = new short[9]; |
| | |
| | | wrkMast.setWeight(Cools.isEmpty(crnProtocol.getWeight()) ? 11.11 : crnProtocol.getWeight()); |
| | | wrkMast.setIoTime(new Date()); |
| | | if (wrkMastService.updateById(wrkMast)) { |
| | | CrnCommand resetCommand = crnThread.getResetCommand(crnProtocol.getCrnNo(), crnProtocol.getTaskNo()); |
| | | CrnCommand resetCommand = crnThread.getResetCommand(crnProtocol.getTaskNo(), crnProtocol.getCrnNo()); |
| | | MessageQueue.offer(SlaveType.Crn, crnProtocol.getCrnNo(), new Task(2, resetCommand)); |
| | | News.info("堆垛机任务状态更新成功,堆垛机号={},工作号={}", basCrnp.getCrnNo(), crnProtocol.getTaskNo()); |
| | | } |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWeight(crnProtocol.getWeight()); |
| | | if (wrkMastService.updateById(wrkMast)) { |
| | | CrnCommand resetCommand = crnThread.getResetCommand(crnProtocol.getCrnNo(), crnProtocol.getTaskNo()); |
| | | CrnCommand resetCommand = crnThread.getResetCommand(crnProtocol.getTaskNo(), crnProtocol.getCrnNo()); |
| | | if (i>-1){ |
| | | resetCommand.setLocNo(locNo); |
| | | resetCommand.setIndex(i); |
| | |
| | | News.info("请求WMS堆垛机状态上报接口成功!!!url:{};request:{};response:{}", wmsUrl + wmsSystemCrnStatusUrl, |
| | | JSON.toJSONString(locMast.getBarcode()), response); |
| | | } else { |
| | | result = 0; |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setLocNo(locMast.getLocNo()); |
| | | command.setIndex(idx); |
| | | command.setValue((short)0); |
| | | MessageQueue.offer(SlaveType.Crn, crnNo, new Task(5, command)); |
| | | News.info("请求WMS堆垛机状态上报接口失败,接口返回Code异常!!!url:{};request:{};response:{}", |
| | | wmsUrl + wmsSystemCrnStatusUrl, JSON.toJSONString(locMast.getBarcode()), response); |
| | | } |