|
|
@@ -24,6 +24,7 @@ import com.yunfeiyun.agmp.iotm.device.common.domin.DeviceRefreshDto;
|
|
|
import com.yunfeiyun.agmp.iotm.device.common.domin.IotDeviceDataListReqVo;
|
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.IotDeviceBaseService;
|
|
|
import com.yunfeiyun.agmp.iotm.device.common.service.impl.IotDeviceBaseServiceImpl;
|
|
|
+import com.yunfeiyun.agmp.iotm.device.qxsqz.domain.IotQxzConfigDto;
|
|
|
import com.yunfeiyun.agmp.iotm.device.qxsqz.domain.IotQxzConfigEditReqVo;
|
|
|
import com.yunfeiyun.agmp.iotm.device.qxsqz.domain.QxzDataLast24hDto;
|
|
|
import com.yunfeiyun.agmp.iotm.util.MongoUtil;
|
|
|
@@ -398,7 +399,7 @@ public class IIotQxzCommService extends IotDeviceBaseServiceImpl implements IotD
|
|
|
log.info("【“刷新”指令集任务】创建成功,taskUuid:{}", taskUuid);
|
|
|
}
|
|
|
|
|
|
- public JSONObject configInfo(IotDeviceDataListReqVo reqVo){
|
|
|
+ public IotQxzConfigDto configInfo(IotDeviceDataListReqVo reqVo){
|
|
|
String devBid = reqVo.getDevBid();
|
|
|
if(StringUtils.isEmpty(devBid)){
|
|
|
throw new IotBizException(IotErrorCode.PARAM_INVALID.getCode(),"参数不能为空");
|
|
|
@@ -408,17 +409,18 @@ public class IIotQxzCommService extends IotDeviceBaseServiceImpl implements IotD
|
|
|
throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"设备不存在");
|
|
|
}
|
|
|
IotDeviceconfig iotDeviceconfig = iIotDeviceconfigService.selectIotDeviceConfigByDevBid(devBid);
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
+ IotQxzConfigDto iotQxzConfigDto = new IotQxzConfigDto();
|
|
|
if(iotDeviceconfig != null){
|
|
|
- jsonObject = JSONObject.parseObject(iotDeviceconfig.getDevcfgContext());
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(iotDeviceconfig.getDevcfgContext());
|
|
|
+ iotQxzConfigDto.setInterval((String) jsonObject.get("interval"));
|
|
|
}
|
|
|
- return jsonObject;
|
|
|
+ return iotQxzConfigDto;
|
|
|
}
|
|
|
|
|
|
public String sendConfigCmd(IotQxzConfigEditReqVo reqVo) {
|
|
|
IotDevice iotDevice = reqVo.getIotDevice();
|
|
|
String devBid = iotDevice.getDevBid();
|
|
|
- JSONObject devConfig = reqVo.getDevConfig();
|
|
|
+ IotQxzConfigDto devConfig = reqVo.getDevConfig();
|
|
|
|
|
|
IotDeviceconfig iotDeviceconfig = iIotDeviceconfigService.selectIotDeviceConfigByDevBid(devBid);
|
|
|
if (null == iotDeviceconfig) {
|