|
|
|
@ -393,9 +393,19 @@ public class IotThingsServiceImpl implements IotThingsService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public EqDTO getInfo(Long id) { |
|
|
|
|
|
|
|
EqDTO info = new EqDTO(); |
|
|
|
//获取设备 |
|
|
|
IotThingEntity eq = iotThingEntityDao.selectOneById(id); |
|
|
|
|
|
|
|
IotThingBaseInfoEntity baseInfoEntity = iotThingBaseInfoService.getById(id); |
|
|
|
if (baseInfoEntity==null){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
Long thingId = baseInfoEntity.getThingId(); |
|
|
|
if (thingId==null){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
IotThingEntity eq = iotThingEntityDao.selectOneById(thingId); |
|
|
|
if (eq==null){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
@ -411,8 +421,7 @@ public class IotThingsServiceImpl implements IotThingsService { |
|
|
|
info.setUpdateDate(eq.getUpdateDate()); |
|
|
|
// BeanUtils.copyProperties(eq,info); |
|
|
|
//获取设备基础信息 |
|
|
|
IotThingBaseInfoDTO baseInfoDTO = iotThingBaseInfoService.getByThingsId(id); |
|
|
|
BeanUtils.copyProperties(baseInfoDTO,info); |
|
|
|
BeanUtils.copyProperties(baseInfoEntity,info); |
|
|
|
|
|
|
|
List<EqAttacmentDTO> imageUrls = new ArrayList<>(); |
|
|
|
List<EqAttacmentDTO> attachmentUrls = new ArrayList<>(); |
|
|
|
|