|
@@ -431,9 +431,10 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
SearchHit[] hits2 = searchHits2.getHits();
|
|
|
if (hits2.length > 0) {
|
|
|
JSONObject sourceItem = JSONObject.parseObject(hits2[0].getSourceAsString());
|
|
|
+ JSONObject sourceItem2 = JSONObject.parseObject(hits2[hits2.length-1].getSourceAsString());
|
|
|
data.setMergeTarget(sourceItem.getString("mergeTarget"));
|
|
|
- data.setStartTime(query.getStartTime());
|
|
|
- data.setEndTime(query.getEndTime());
|
|
|
+ data.setStartTime(sourceItem.getString("mergeTime"));
|
|
|
+ data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -540,9 +541,10 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
SearchHit[] hits2 = searchHits2.getHits();
|
|
|
if (hits2.length > 0) {
|
|
|
JSONObject sourceItem = JSONObject.parseObject(hits2[0].getSourceAsString());
|
|
|
+ JSONObject sourceItem2 = JSONObject.parseObject(hits2[hits2.length-1].getSourceAsString());
|
|
|
data.setMergeTarget(sourceItem.getString("mergeTarget"));
|
|
|
- data.setStartTime(query.getStartTime());
|
|
|
- data.setEndTime(query.getEndTime());
|
|
|
+ data.setStartTime(sourceItem.getString("mergeTime"));
|
|
|
+ data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -649,9 +651,10 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
SearchHit[] hits2 = searchHits2.getHits();
|
|
|
if (hits2.length > 0) {
|
|
|
JSONObject sourceItem = JSONObject.parseObject(hits2[0].getSourceAsString());
|
|
|
+ JSONObject sourceItem2 = JSONObject.parseObject(hits2[hits2.length-1].getSourceAsString());
|
|
|
data.setMergeTarget(sourceItem.getString("mergeTarget"));
|
|
|
- data.setStartTime(query.getStartTime());
|
|
|
- data.setEndTime(query.getEndTime());
|
|
|
+ data.setStartTime(sourceItem.getString("mergeTime"));
|
|
|
+ data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -686,7 +689,7 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
|
|
|
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
|
|
|
boolQueryBuilder.filter(QueryBuilders.rangeQuery("receiveTime").gte(query.getStartTime()).lte(query.getEndTime()));
|
|
|
- boolQueryBuilder.filter(QueryBuilders.termQuery("targetProper","1"));
|
|
|
+ boolQueryBuilder.mustNot(QueryBuilders.termQuery("targetProper","0"));
|
|
|
searchSourceBuilder.query(boolQueryBuilder);
|
|
|
// TermsAggregationBuilder aggBuilder = AggregationBuilders.terms("ship_field_agg")
|
|
|
// .field("fusionBatchNum")
|