|
|
@ -9,6 +9,7 @@ import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
import org.dromara.common.sdk.cloudapi.device.*; |
|
|
|
import org.dromara.common.sdk.cloudapi.firmware.*; |
|
|
|
import org.dromara.common.sdk.cloudapi.firmware.api.AbstractFirmwareService; |
|
|
|
import org.dromara.common.sdk.cloudapi.livestream.VideoTypeEnum; |
|
|
|
import org.dromara.common.sdk.cloudapi.property.api.AbstractPropertyService; |
|
|
|
import org.dromara.common.sdk.cloudapi.tsa.DeviceIconUrl; |
|
|
|
import org.dromara.common.sdk.cloudapi.tsa.TopologyDeviceModel; |
|
|
@ -60,6 +61,9 @@ import java.util.List; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static org.dromara.common.core.utils.StringUtils.DASH; |
|
|
|
import static org.dromara.common.core.utils.StringUtils.SLASH; |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @author sean.zhou |
|
|
@ -270,14 +274,15 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
|
|
|
|
DeviceDTO subDevice = getDevicesByParams(DeviceQueryParam.builder().deviceSn(gateway.getChildDeviceSn()).build()).get(0); |
|
|
|
subDevice.setStatus(deviceRedisService.checkDeviceOnline(subDevice.getDeviceSn())); |
|
|
|
List<CapacityCameraDTO> capacityCameraByDeviceSn = capacityCameraService.getCapacityCameraByDeviceSn(gateway.getChildDeviceSn()); |
|
|
|
/*List<CapacityCameraDTO> capacityCameraByDeviceSn = capacityCameraService.getCapacityCameraByDeviceSn(gateway.getChildDeviceSn()); |
|
|
|
String videoId = ""; |
|
|
|
if(capacityCameraByDeviceSn != null && capacityCameraByDeviceSn.size() > 0 ){ |
|
|
|
if(capacityCameraByDeviceSn.get(0).getVideosList().size() > 0){ |
|
|
|
videoId = gateway.getChildDeviceSn() + "/" + capacityCameraByDeviceSn.get(0).getIndex() + "/" + capacityCameraByDeviceSn.get(0).getVideosList().get(0).getIndex(); |
|
|
|
} |
|
|
|
} |
|
|
|
subDevice.setVideoId(videoId); |
|
|
|
}*/ |
|
|
|
String deviceVideoEnum = DeviceVideoEnum.find(subDevice.getDeviceName()).getDevice(); |
|
|
|
subDevice.setVideoId(new VideoId(subDevice.getDeviceSn()+SLASH+deviceVideoEnum+SLASH + VideoTypeEnum.NORMAL.getType() + DASH+DeviceTypeVideoEnum.ZERO.getVideoType()).toString()); |
|
|
|
gateway.setChildren(subDevice); |
|
|
|
// gateway.setVideoId(DeviceEnum.videoId);
|
|
|
|
// payloads
|
|
|
|