| | |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | | import com.zy.asrs.service.DeviceDataLogService; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.ShuttleProtocolStatusType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.protocol.ShuttleProtocol; |
| | | import com.zy.core.thread.ShuttleThread; |
| | |
| | | if (System.currentTimeMillis() - shuttleProtocol.getDeviceDataLog() > 1000 * 5) { |
| | | if (shuttleThread.getOriginDeviceData() != null) { |
| | | //采集时间超过5s,保存一次数据记录 |
| | | |
| | | //离线不做日志存储 |
| | | if (shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.OFFLINE)) { |
| | | continue; |
| | | } |
| | | |
| | | //保存数据记录 |
| | | DeviceDataLog deviceDataLog = new DeviceDataLog(); |
| | | deviceDataLog.setOriginData(JSON.toJSONString(shuttleThread.getOriginDeviceData())); |