|
|
@@ -1,10 +1,13 @@
|
|
|
package com.yunfeiyun.agmp.iotm.web.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.yunfeiyun.agmp.common.constant.ErrorCode;
|
|
|
import com.yunfeiyun.agmp.common.utils.DateUtils;
|
|
|
import com.yunfeiyun.agmp.common.utils.SecurityUtils;
|
|
|
import com.yunfeiyun.agmp.common.utils.StringUtils;
|
|
|
+import com.yunfeiyun.agmp.iot.common.constant.IotErrorCode;
|
|
|
import com.yunfeiyun.agmp.iot.common.domain.*;
|
|
|
+import com.yunfeiyun.agmp.iot.common.domain.reqvo.IotYbqdataReqVo;
|
|
|
import com.yunfeiyun.agmp.iot.common.enums.EnumCbdMarkType;
|
|
|
import com.yunfeiyun.agmp.iot.common.exception.IotBizException;
|
|
|
import com.yunfeiyun.agmp.iot.common.service.MongoService;
|
|
|
@@ -351,4 +354,18 @@ public class IotScreenServiceImpl implements IIotScreenService {
|
|
|
return devList;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public IotYbqEnvData ybqEnvInfo(IotYbqdataReqVo reqVo) {
|
|
|
+ String devBid = reqVo.getDevBid();
|
|
|
+ if (StringUtils.isEmpty(devBid)) {
|
|
|
+ throw new IotBizException(IotErrorCode.FAILURE.getCode(), "设备id不可为空");
|
|
|
+ }
|
|
|
+ String ybqType = reqVo.getDateDevType();
|
|
|
+ if (StringUtils.isEmpty(ybqType)) {
|
|
|
+ throw new IotBizException(IotErrorCode.FAILURE.getCode(), "数据类型不可为空");
|
|
|
+ }
|
|
|
+ Map<String, Object> map = BeanUtil.beanToMap(reqVo);
|
|
|
+ return (IotYbqEnvData) mongoService.findOne(IotYbqEnvData.class, map, "ybqdataCreatedDate", "desc");
|
|
|
+ }
|
|
|
+
|
|
|
}
|