| | |
| | | } |
| | | } |
| | | |
| | | //清理手动命令 |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public void ManualCommandClean() { |
| | | List<CommandInfo> commandInfos = commandInfoService.selectCompleteManualCommand(); |
| | | for (CommandInfo commandInfo : commandInfos) { |
| | | //指令转日志 |
| | | commandInfoService.saveToHistory(commandInfo.getId()); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | writeFlag = true; |
| | | log.info("写入输送线命令后返回成功,并且回读成功。输送线plc编号={},{},写入次数={}", slave.getId(), JSON.toJSON(staProtocol), writeCount); |
| | | |
| | | Date now = new Date(); |
| | | |
| | | //更新指令状态 |
| | | commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//输送线直接完成状态 |
| | | commandInfo.setCompleteTime(now); |
| | | commandInfoService.updateById(commandInfo); |
| | | |
| | | //更新指令日志 |