| | |
| | | basDevp.setOutEnable(outEnable ? "Y" : "N"); |
| | | } |
| | | basDevpService.updateById(basDevp); |
| | | boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (result) { |
| | | return R.ok(); |
| | | } else { |
| | |
| | | staProtocol.setWorkNo(0); |
| | | staProtocol.setStaNo(0); |
| | | basDevpService.updateById(basDevp); |
| | | boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if (result) { |
| | | return R.ok(); |
| | | } else { |
| | |
| | | } |
| | | staProtocol.setWorkNo( 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo()); |
| | | boolean result = CommandUtils.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if (result) { |
| | | return R.ok(); |
| | | } else { |