|
|
@ -566,6 +566,21 @@ public class IotThingSourceServiceImpl extends BaseServiceImpl<IotThingSourceMap |
|
|
return strings.stream().filter(s -> !StringUtils.isBlank(s)).distinct().collect(Collectors.toList()); |
|
|
return strings.stream().filter(s -> !StringUtils.isBlank(s)).distinct().collect(Collectors.toList()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Long getMaxSort(String configType, Long fromId,Long rootId) { |
|
|
|
|
|
List<IotThingSourceEntity> iotThingSourceEntities = mapper.selectListByQuery( |
|
|
|
|
|
new QueryWrapper() |
|
|
|
|
|
.eq(IotThingSourceEntity::getFromId, fromId) |
|
|
|
|
|
.eq(IotThingSourceEntity::getConfigType, configType) |
|
|
|
|
|
.eq(IotThingSourceEntity::getRootId, rootId) |
|
|
|
|
|
.eq(IotThingSourceEntity::getTenantCode, UserContext.getRealTenantCode()) |
|
|
|
|
|
); |
|
|
|
|
|
if(CollectionUtils.isEmpty(iotThingSourceEntities)){ |
|
|
|
|
|
return 0L; |
|
|
|
|
|
} |
|
|
|
|
|
return iotThingSourceEntities.stream().max(Comparator.comparing(IotThingSourceEntity::getSort)).get().getSort()+1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<IotThingSourceDTO> attrGroupRootId(IotThingSourceReqDTO iotThingSourceDTO) { |
|
|
public List<IotThingSourceDTO> attrGroupRootId(IotThingSourceReqDTO iotThingSourceDTO) { |
|
|
List<IotThingSourceRelationDTO> iotThingSourceRelationDTOList = iotThingSourceDTO.getIotThingSourceRelationDTOList(); |
|
|
List<IotThingSourceRelationDTO> iotThingSourceRelationDTOList = iotThingSourceDTO.getIotThingSourceRelationDTOList(); |
|
|
|