设备详情安防页面数据第一版
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.fastbee.data.service.devicedetail;
|
||||
|
||||
import com.fastbee.common.model.vo.iot.QueryLogVo;
|
||||
import com.fastbee.data.domain.vo.AnfangInfoVo;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.waterele.domain.MaWatereleRecord;
|
||||
import com.fastbee.waterele.domain.dto.MaGuangaiRecordDto;
|
||||
@ -27,4 +28,6 @@ public interface IDeviceDetailService {
|
||||
ArrayList<Object> gongdianChart(QueryLogVo queryLogVo);
|
||||
|
||||
List<XjInspectionRecords> xunjianRecord(QueryLogVo queryLogVo);
|
||||
|
||||
AnfangInfoVo anfangInfo(Long deviceId);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.fastbee.data.service.devicedetail.impl;
|
||||
|
||||
import com.fastbee.common.model.vo.iot.QueryLogVo;
|
||||
import com.fastbee.common.utils.DevParamsUtils;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.data.domain.vo.AnfangInfoVo;
|
||||
import com.fastbee.data.service.devicedetail.IDeviceDetailService;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.ThingsModel;
|
||||
@ -110,6 +112,32 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnfangInfoVo anfangInfo(Long deviceId) {
|
||||
//获取监控设备信息
|
||||
Device device = iDeviceService.selectDeviceByDeviceId(deviceId);
|
||||
if (device == null) {
|
||||
throw new RuntimeException("未查到该设备");
|
||||
}
|
||||
AnfangInfoVo anfangInfoVo = new AnfangInfoVo();
|
||||
//获取设备参数
|
||||
Map<String, Object> devParams = DevParamsUtils.getDevParams(device.getDevParams());
|
||||
//安防设备
|
||||
String jiankongIds = devParams.get("jiankongIds").toString();
|
||||
if(StringUtils.isNotEmpty(jiankongIds)){
|
||||
Device jiankongDevice = iDeviceService.selectDeviceByDeviceId(Long.parseLong(jiankongIds));
|
||||
anfangInfoVo.setJiankongDevice(jiankongDevice);
|
||||
}
|
||||
//安防设备
|
||||
String anfangIds = devParams.get("anfangIds").toString();
|
||||
//获取设备安防状态
|
||||
if(StringUtils.isNotEmpty(anfangIds)){
|
||||
Device anfangDevice = iDeviceService.selectDeviceByDeviceId(Long.parseLong(anfangIds));
|
||||
//获取当前安防告警状态
|
||||
}
|
||||
//获取安防历史记录
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user