| | |
| | | package com.ard.sample.manage.service.impl; |
| | | |
| | | import com.ard.common.core.redis.RedisConst; |
| | | import com.ard.common.core.redis.RedisOpsUtils; |
| | | import com.ard.sample.component.mqtt.model.CommonTopicReceiver; |
| | | import com.ard.sample.component.websocket.config.ConcurrentWebSocketSession; |
| | | import com.ard.sample.component.websocket.enums.MessageType; |
| | |
| | | //只要状态 "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); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | | receiver.setType(MessageType.STATUS.getType()+"-network"); |