| | |
| | | //只要状态 "0":"作业准备中","1":"飞行作业中","5":"任务空闲" |
| | | if(code == 0 || code == 1 || code == 5) { |
| | | _deviceService.updateWorkType(deviceSn,code); |
| | | RedisOpsUtils.setWithExpire(RedisConst.OSD_STATUS_PREFIX + deviceSn, code, RedisConst.DEVICE_ALIVE_SECOND); |
| | | RedisOpsUtils.set(RedisConst.OSD_STATUS_PREFIX + deviceSn, code); |
| | | } |
| | | } |
| | | } |
| | |
| | | Long deviceOnlineStatus = jsonNode.get("sub_device").get("device_online_status").asLong(); |
| | | if (inDock.equals(1L) && deviceOnlineStatus.equals(0L)) {// 飞行器在舱内且关机状态为6 |
| | | _deviceService.updateWorkType(childDeviceSn, 6L); |
| | | RedisOpsUtils.setWithExpire(RedisConst.OSD_STATUS_PREFIX + device.getChildDeviceSn(), 6, RedisConst.DEVICE_ALIVE_SECOND); |
| | | RedisOpsUtils.set(RedisConst.OSD_STATUS_PREFIX + device.getChildDeviceSn(), 6); |
| | | } |
| | | } |
| | | } |