| | |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setAckFinish((short)1); |
| | | if (write(crnCommand)) { |
| | | log.info(crnProtocol.getCrnNo()+"号堆垛机任务等待wcs确认,当前状态"+crnProtocol.getStatusType()); |
| | | resetFlag = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (System.currentTimeMillis() - crnProtocol.getDeviceDataLog() > 1000 * 5) { |
| | | if (crnProtocol.getAlarm() > 0) { |
| | | crnProtocol.setLastCommandTime(-1L); |
| | | } |
| | | |
| | | if (crnProtocol.getAlarm() == 0 && crnProtocol.getLastCommandTime() == -1) { |
| | | crnProtocol.setLastCommandTime(System.currentTimeMillis()); |
| | | } |
| | | |
| | | if (System.currentTimeMillis() - crnProtocol.getDeviceDataLog() > 1000 * 1) { |
| | | //采集时间超过5s,保存一次数据记录 |
| | | //保存数据记录 |
| | | DeviceDataLogService deviceDataLogService = SpringUtils.getBean(DeviceDataLogService.class); |