| | |
| | | commandInfo.setStartTime(new Date()); |
| | | commandInfo.setDevice(SlaveType.Crn.toString()); |
| | | |
| | | commandPackage.setWrkNo(wrkNo); |
| | | commandPackage.setCommand(command); |
| | | commandPackage.setDevice("堆垛机"); |
| | | |
| | | commandInfo.setCommand(JSON.toJSONString(commandPackage)); |
| | | commandInfoService.insert(commandInfo);//插入指令 |
| | | |
| | | command.setCommandId(commandInfo.getId()); |
| | | commandPackage.setWrkNo(wrkNo); |
| | | commandPackage.setDevice("堆垛机"); |
| | | commandPackage.setCommand(command);//保存命令报文 |
| | | commandInfo.setCommand(JSON.toJSONString(commandPackage)); |
| | | commandInfoService.updateById(commandInfo); |
| | | |
| | | //将指令进行投递 |
| | | if (!MessageQueue.offer(type, id, task)) { |
| | |
| | | commandInfo.setStartTime(new Date()); |
| | | commandInfo.setDevice(SlaveType.Devp.toString()); |
| | | |
| | | commandPackage.setWrkNo(wrkNo); |
| | | commandPackage.setCommand(staProtocol); |
| | | commandPackage.setDevice("输送线"); |
| | | |
| | | commandInfo.setCommand(JSON.toJSONString(commandPackage)); |
| | | commandInfoService.insert(commandInfo);//插入指令 |
| | | |
| | | staProtocol.setCommandId(commandInfo.getId()); |
| | | commandPackage.setCommand(staProtocol); |
| | | commandPackage.setWrkNo(wrkNo); |
| | | commandPackage.setDevice("输送线"); |
| | | commandInfo.setCommand(JSON.toJSONString(commandPackage));//保存命令报文 |
| | | commandInfoService.updateById(commandInfo); |
| | | |
| | | //将指令进行投递 |
| | | if (!MessageQueue.offer(type, id, task)) { |
| | | return false; |