| | |
| | | array[1] = staProtocol.getStaNo(); |
| | | // OperateResult write = siemensS7Net.Write("DB100." + index*4, array); |
| | | |
| | | CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class); |
| | | CommandInfo commandInfo = new CommandInfo(); |
| | | commandInfo.setWrkNo(staProtocol.getWorkNo().intValue()); |
| | | commandInfo.setCommandStatus(1); |
| | | commandInfo.setStartTime(new Date()); |
| | | commandInfo.setDevice("devp"); |
| | | commandInfo.setCommand(JSON.toJSONString(staProtocol)); |
| | | commandInfoService.insert(commandInfo); |
| | | |
| | | OperateResult writeResult; |
| | | //任务下发次数 |
| | | int writeCount = 0; |
| | |
| | | if ((siteId == 101 || siteId == 201)&&(staProtocol.getWorkNo() == 0 && staProtocol.getStaNo() ==0)) { |
| | | staProtocol.setPakMk(true); |
| | | } |
| | | |
| | | //更新指令状态 |
| | | CommandInfoService commandInfoService = SpringUtils.getBean(CommandInfoService.class); |
| | | CommandInfo commandInfo = staProtocol.getCommandInfo(); |
| | | commandInfo.setCommandStatus(2); |
| | | commandInfoService.updateById(commandInfo); |
| | | } |
| | | |
| | | } |