|
|
@@ -8,6 +8,7 @@ import com.xunmei.common.core.enums.iot.DeviceTypeEnum;
|
|
|
import com.xunmei.common.core.utils.StringUtils;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
import com.xunmei.iot.dto.deviceInfo.IotDeviceInfoPageDto;
|
|
|
+import com.xunmei.iot.mapper.IotAlarmSubsystemMapper;
|
|
|
import com.xunmei.iot.mapper.IotDeviceInfoMapper;
|
|
|
import com.xunmei.iot.service.IIotDeviceInfoService;
|
|
|
import com.xunmei.iot.vo.deviceInfo.DeviceDetailInfoVo;
|
|
|
@@ -25,6 +26,9 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
|
|
|
@Resource
|
|
|
RemoteOrgService orgService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private IotAlarmSubsystemMapper subsystemMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public TableDataInfo<IotDeviceInfoPageVo> deviceInfoPage(IotDeviceInfoPageDto request) {
|
|
|
if (request.getCheckSub()) {
|
|
|
@@ -65,4 +69,16 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
|
|
|
|
|
|
return detailInfoVo;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public DeviceDetailInfoVo getAlarmHostDetail(Serializable id) {
|
|
|
+ DeviceDetailInfoVo detailInfoVo = baseMapper.getDetailById(id);
|
|
|
+ if (detailInfoVo != null){
|
|
|
+ detailInfoVo.setDeviceTypeName(DeviceTypeEnum.getDescByCode(detailInfoVo.getDeviceType()));
|
|
|
+ //查询报警控制器列表(报警子系统)
|
|
|
+ List<DeviceDetailInfoVo> list = subsystemMapper.getByDeviceCodeAndIotToken(detailInfoVo.getDeviceCode(), detailInfoVo.getIotToken());
|
|
|
+ detailInfoVo.setChildrenInfos(list);
|
|
|
+ }
|
|
|
+ return detailInfoVo;
|
|
|
+ }
|
|
|
}
|