|
|
@ -12,6 +12,7 @@ import jakarta.annotation.Resource; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
|
import org.dromara.common.core.domain.R; |
|
|
|
import org.dromara.common.sdk.cloudapi.device.*; |
|
|
|
import org.dromara.common.sdk.cloudapi.firmware.*; |
|
|
|
import org.dromara.common.sdk.cloudapi.firmware.api.AbstractFirmwareService; |
|
|
@ -26,32 +27,13 @@ import org.dromara.common.sdk.exception.CloudSDKException; |
|
|
|
import org.dromara.common.sdk.mqtt.CommonTopicRequest; |
|
|
|
import org.dromara.common.sdk.mqtt.IMqttTopicService; |
|
|
|
import org.dromara.common.sdk.mqtt.MqttGatewayPublish; |
|
|
|
import org.dromara.common.sdk.mqtt.events.EventsSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.osd.OsdSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetPublish; |
|
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetReplyResultEnum; |
|
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.requests.RequestsSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.services.ServicesPublish; |
|
|
|
import org.dromara.common.sdk.mqtt.services.ServicesReplyData; |
|
|
|
import org.dromara.common.sdk.mqtt.services.ServicesSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.services.TopicServicesResponse; |
|
|
|
import org.dromara.common.sdk.mqtt.state.StateSubscribe; |
|
|
|
import org.dromara.common.sdk.mqtt.status.StatusSubscribe; |
|
|
|
import org.dromara.common.websocket.dto.BizCodeEnum; |
|
|
|
import org.dromara.sample.common.error.CommonErrorEnum; |
|
|
|
import org.dromara.sample.component.mqtt.model.EventsReceiver; |
|
|
|
import org.dromara.sample.control.model.enums.DroneAuthorityEnum; |
|
|
|
import org.dromara.sample.manage.mapper.IDeviceMapper; |
|
|
|
|
|
|
|
import org.dromara.sample.feign.RemoteSystemFeign; |
|
|
|
import org.dromara.sample.manage.mapper.IPlayTextMapper; |
|
|
|
import org.dromara.sample.manage.model.dto.*; |
|
|
|
import org.dromara.sample.manage.model.entity.DeviceEntity; |
|
|
|
import org.dromara.sample.manage.model.entity.PlayTextEntity; |
|
|
|
import org.dromara.sample.manage.model.enums.DeviceFirmwareStatusEnum; |
|
|
|
import org.dromara.sample.manage.model.enums.PropertySetFieldEnum; |
|
|
|
import org.dromara.sample.manage.model.enums.UserTypeEnum; |
|
|
|
import org.dromara.sample.manage.model.param.DeviceQueryParam; |
|
|
|
import org.dromara.sample.manage.model.receiver.BasicDeviceProperty; |
|
|
|
|
|
|
|
import org.dromara.sample.manage.service.*; |
|
|
|
import org.dromara.system.api.RemoteConfigService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -81,6 +63,9 @@ public class PlayTextServiceImpl implements IPlayTextService { |
|
|
|
@DubboReference |
|
|
|
private RemoteConfigService remoteConfigService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private RemoteSystemFeign remoteSystemFeign; |
|
|
|
|
|
|
|
@Override |
|
|
|
public HttpResultResponse insertPlayText(PlayTextEntity param) { |
|
|
|
param.setTextSn(String.valueOf(UUID.randomUUID())); |
|
|
@ -124,9 +109,9 @@ public class PlayTextServiceImpl implements IPlayTextService { |
|
|
|
public HttpResultResponse streamType(Map<String, Object> objectMap) { |
|
|
|
String top = "task/image/disobey/streamType"; |
|
|
|
//发送mqtt
|
|
|
|
List<String> list = remoteConfigService.selectStreamType(objectMap.get("deviceSn").toString()); |
|
|
|
if (CollectionUtils.isNotEmpty(list)){ |
|
|
|
for (String s : list){ |
|
|
|
List<String> deviceSn = remoteSystemFeign.selectStreamType(objectMap.get("deviceSn").toString()); |
|
|
|
if (CollectionUtils.isNotEmpty(deviceSn)){ |
|
|
|
for (String s : deviceSn){ |
|
|
|
String[] split = s.split(","); |
|
|
|
objectMap.put("deptId",split[0]); |
|
|
|
objectMap.put("deptName",split[1]); |
|
|
@ -137,6 +122,6 @@ public class PlayTextServiceImpl implements IPlayTextService { |
|
|
|
.setData(Objects.requireNonNull(param)),1); |
|
|
|
} |
|
|
|
} |
|
|
|
return HttpResultResponse.error("请求成功"); |
|
|
|
return HttpResultResponse.success("请求成功"); |
|
|
|
} |
|
|
|
} |
|
|
|