diff --git a/jetlinks-components/elasticsearch-component/pom.xml b/jetlinks-components/elasticsearch-component/pom.xml
index a619d3be..a46253f5 100644
--- a/jetlinks-components/elasticsearch-component/pom.xml
+++ b/jetlinks-components/elasticsearch-component/pom.xml
@@ -72,6 +72,11 @@
reactor-netty
+
+ ${project.groupId}
+ things-component
+ ${project.version}
+
\ No newline at end of file
diff --git a/jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/aggreation/DefaultAggregationService.java b/jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/aggreation/DefaultAggregationService.java
deleted file mode 100644
index c26796ec..00000000
--- a/jetlinks-components/elasticsearch-component/src/main/java/org/jetlinks/community/elastic/search/aggreation/DefaultAggregationService.java
+++ /dev/null
@@ -1,268 +0,0 @@
-package org.jetlinks.community.elastic.search.aggreation;
-
-import lombok.extern.slf4j.Slf4j;
-import org.elasticsearch.ElasticsearchException;
-import org.elasticsearch.ElasticsearchParseException;
-import org.elasticsearch.action.ActionListener;
-import org.elasticsearch.action.search.SearchRequest;
-import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.client.RequestOptions;
-import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds;
-import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.hswebframework.ezorm.core.param.QueryParam;
-import org.hswebframework.ezorm.core.param.TermType;
-import org.jetlinks.community.elastic.search.ElasticRestClient;
-import org.jetlinks.community.elastic.search.aggreation.bucket.Bucket;
-import org.jetlinks.community.elastic.search.aggreation.bucket.BucketAggregationsStructure;
-import org.jetlinks.community.elastic.search.aggreation.bucket.BucketResponse;
-import org.jetlinks.community.elastic.search.aggreation.bucket.Sort;
-import org.jetlinks.community.elastic.search.aggreation.enums.BucketType;
-import org.jetlinks.community.elastic.search.aggreation.enums.MetricsType;
-import org.jetlinks.community.elastic.search.aggreation.enums.OrderType;
-import org.jetlinks.community.elastic.search.aggreation.metrics.MetricsAggregationStructure;
-import org.jetlinks.community.elastic.search.index.ElasticSearchIndexManager;
-import org.jetlinks.community.elastic.search.service.AggregationService;
-import org.jetlinks.community.elastic.search.service.DefaultElasticSearchService;
-import org.jetlinks.community.elastic.search.utils.ElasticSearchConverter;
-import org.jetlinks.community.elastic.search.utils.ReactorActionListener;
-import org.jetlinks.community.timeseries.query.AggregationQueryParam;
-import org.springframework.beans.factory.annotation.Autowired;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-import reactor.core.publisher.MonoSink;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @author bsetfeng
- * @since 1.0
- **/
-//@Service
-@Slf4j
-public class DefaultAggregationService implements AggregationService {
-
- private final ElasticRestClient restClient;
-
- private final ElasticSearchIndexManager indexManager;
-
- @Autowired
- public DefaultAggregationService(ElasticSearchIndexManager indexManager,
- ElasticRestClient restClient) {
- this.restClient = restClient;
- this.indexManager = indexManager;
- }
-
-// @Override
-// public Mono metricsAggregation(String index, QueryParam queryParam,
-// MetricsAggregationStructure structure) {
-// return createSearchSourceBuilder(queryParam, index)
-// .map(builder -> new SearchRequest(index)
-// .source(builder.aggregation(structure.getType().aggregationBuilder(structure.getName(), structure.getField()))))
-// .flatMap(request -> Mono.create(monoSink ->
-// restClient.getQueryClient().searchAsync(request, RequestOptions.DEFAULT, translatorActionListener(monoSink))))
-// .map(searchResponse -> structure.getType().getResponse(structure.getName(), searchResponse));
-// }
-//
-// @Override
-// public Mono bucketAggregation(String index, QueryParam queryParam, BucketAggregationsStructure structure) {
-// return createSearchSourceBuilder(queryParam, index)
-// .map(builder -> new SearchRequest(index)
-// .source(builder
-// .aggregation(structure.getType().aggregationBuilder(structure))
-// //.aggregation(AggregationBuilders.topHits("last_val").from(1))
-// ))
-//// .doOnNext(searchRequest -> {
-//// if (log.isDebugEnabled()) {
-//// log.debug("聚合查询ElasticSearch:{},参数:{}", index, JSON.toJSON(searchRequest.source().toString()));
-//// }
-//// })
-// .flatMap(request -> Mono.create(monoSink ->
-// restClient
-// .getQueryClient()
-// .searchAsync(request, RequestOptions.DEFAULT, translatorActionListener(monoSink))))
-// .map(response -> BucketResponse.builder()
-// .name(structure.getName())
-// .buckets(structure.getType().convert(response.getAggregations().get(structure.getName())))
-// .build())
-// ;
-//
-// }
-
- private Mono createSearchSourceBuilder(QueryParam queryParam, String index) {
-
- return indexManager
- .getIndexMetadata(index)
- .map(metadata -> ElasticSearchConverter.convertSearchSourceBuilder(queryParam, metadata));
- }
-
- private ActionListener translatorActionListener(MonoSink sink) {
- return new ActionListener() {
- @Override
- public void onResponse(T response) {
- sink.success(response);
- }
-
- @Override
- public void onFailure(Exception e) {
- if (e instanceof ElasticsearchException) {
- if (((ElasticsearchException) e).status().getStatus() == 404) {
- sink.success();
- return;
- } else if (((ElasticsearchException) e).status().getStatus() == 400) {
- sink.error(new ElasticsearchParseException("查询参数格式错误", e));
- }
- }
- sink.error(e);
- }
- };
- }
-
- @Override
- public Flux