Browse Source

Merge pull request 'master' (#8) from master into V3

Reviewed-on: http://git.lrdaiot.cn:9000/thing/thing_api/pulls/8
qingyuan_dev_new
夏超 2 years ago
parent
commit
ee8254bb8c
  1. 3
      modules/thing/src/main/java/com/thing/device/analysisdata/service/impl/AnalysisDataServiceImpl.java
  2. 1
      modules/thing/src/main/java/com/thing/thing/group/service/impl/IotGroupInfoServiceImpl.java
  3. 2
      modules/thing/src/main/java/com/thing/thing/model/service/impl/IotThingModelServiceImpl.java

3
modules/thing/src/main/java/com/thing/device/analysisdata/service/impl/AnalysisDataServiceImpl.java

@ -100,8 +100,8 @@ public class AnalysisDataServiceImpl implements AnalysisDataService {
Map<String, Object> resMap = new HashMap<>(); Map<String, Object> resMap = new HashMap<>();
//获取数据源信息 //获取数据源信息
List<IotThingSourceDTO> iotThingSourceList = iotThingSourceService.findAllByFromIdAndThingIdAndConfigType( List<IotThingSourceDTO> iotThingSourceList = iotThingSourceService.findAllByFromIdAndThingIdAndConfigType(
monitoringDataReqDTO.getThingRelationList().stream().map(IotThingSourceDTO::getThingId).toList(),
null, null,
monitoringDataReqDTO.getThingRelationList().stream().map(IotThingSourceDTO::getThingId).toList(),
monitoringDataReqDTO.getConfigType(), monitoringDataReqDTO.getConfigType(),
monitoringDataReqDTO.getThingRelationList().stream().map(IotThingSourceDTO::getRootId).toList() monitoringDataReqDTO.getThingRelationList().stream().map(IotThingSourceDTO::getRootId).toList()
); );
@ -248,6 +248,7 @@ public class AnalysisDataServiceImpl implements AnalysisDataService {
IotThingSourceDTO iotThingSourceDTO = first.get(); IotThingSourceDTO iotThingSourceDTO = first.get();
relationDTO.setThingAttrUnit(iotThingSourceDTO.getThingAttrUnit()); relationDTO.setThingAttrUnit(iotThingSourceDTO.getThingAttrUnit());
relationDTO.setDataDealConfig(iotThingSourceDTO.getDataDealConfig()); relationDTO.setDataDealConfig(iotThingSourceDTO.getDataDealConfig());
relationDTO.setDataTreatingMark(iotThingSourceDTO.getDataTreatingMark());
}}); }});
viewSourceDTO.setDictList(relationDTOList); viewSourceDTO.setDictList(relationDTOList);
return viewSourceDTO; return viewSourceDTO;

1
modules/thing/src/main/java/com/thing/thing/group/service/impl/IotGroupInfoServiceImpl.java

@ -473,6 +473,7 @@ public class IotGroupInfoServiceImpl extends BaseServiceImpl<IotGroupInfoMapper,
groupInfoEntity.setThumbnailUrl(dto.getThumbnailUrl()); groupInfoEntity.setThumbnailUrl(dto.getThumbnailUrl());
groupInfoEntity.setIsDefault(dto.getIsDefault()); groupInfoEntity.setIsDefault(dto.getIsDefault());
groupInfoEntity.setRemark(dto.getRemark()); groupInfoEntity.setRemark(dto.getRemark());
groupInfoEntity.setSort(dto.getSort());
updateById(groupInfoEntity); updateById(groupInfoEntity);
} }

2
modules/thing/src/main/java/com/thing/thing/model/service/impl/IotThingModelServiceImpl.java

@ -262,7 +262,7 @@ public class IotThingModelServiceImpl extends BaseServiceImpl<IotThingModelMappe
if (StringUtils.isNotBlank(attrs)) { if (StringUtils.isNotBlank(attrs)) {
attrList.addAll(Arrays.stream(attrs.split(",")).distinct().toList()); attrList.addAll(Arrays.stream(attrs.split(",")).distinct().toList());
} }
return tsKvService.findPageTsKvByCodeAndAttrs(entityCode, attrList, startTime,endTime, false,page, limit);
return tsKvService.findPageLatestByCodesAndAttrs(Lists.newArrayList(entityCode), attrList, false,page, limit);
} }

Loading…
Cancel
Save