| | |
| | | package com.ard.sample.manage.service.impl; |
| | | |
| | | import com.ard.common.core.redis.RedisOpsUtils; |
| | | import com.ard.sample.manage.model.dto.DeviceDTO; |
| | | import com.ard.sample.manage.service.IDeviceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public void cronOnlineTask() { |
| | | List<DeviceDTO> devicesList = _deviceService.getDevicesTopoForWeb(); |
| | | for (DeviceDTO device : devicesList) { |
| | | String key = "online:" + device.getDeviceSn(); |
| | | //String key = "online:" + device.getDeviceSn(); |
| | | //System.out.println("在线状态:"+RedisOpsUtils.checkExist(key)); |
| | | // 更新机场设备状态:"3"-"设备已离线", |
| | | if(!RedisOpsUtils.checkExist(key)){ |
| | | if(!_deviceService.checkDeviceOnline(device.getDeviceSn())){ |
| | | _deviceService.updateWorkType(device.getDeviceSn(), 3L); |
| | | } |
| | | } |