| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | |
| | | 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; |