|
@@ -414,7 +414,7 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
// 构建查询条件
|
|
|
BoolQueryBuilder boolQueryBuilder2 = QueryBuilders.boolQuery();
|
|
|
SearchSourceBuilder searchSourceBuilder2 = new SearchSourceBuilder();
|
|
|
- boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("trackDeviceNo", "*,"+ item.getBatchNumber() +",*"));
|
|
|
+ boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("targetSource", "*"+ item.getBatchNumber() +"*"));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.rangeQuery("mergeTime").gte(query.getStartTime()).lte(query.getEndTime()));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.termsQuery("mergeType","RADAR","AIS_RADAR","BEIDOU_RADAR","AIS_BEIDOU_RADAR"));
|
|
|
searchSourceBuilder2.query(boolQueryBuilder2)
|
|
@@ -431,11 +431,11 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
if (totalHits<5) {
|
|
|
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(sourceItem.getString("mergeTime"));
|
|
|
- data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
+ Map<String, Object> map = hits2[0].getSourceAsMap();
|
|
|
+ Map<String, Object> map2 = hits2[hits2.length-1].getSourceAsMap();
|
|
|
+ data.setMergeTarget(map.get("mergeTarget").toString());
|
|
|
+ data.setStartTime(map.get("mergeTime").toString());
|
|
|
+ data.setEndTime(map2.get("mergeTime").toString());
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -548,11 +548,11 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
if (totalHits<5) {
|
|
|
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(sourceItem.getString("mergeTime"));
|
|
|
- data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
+ Map<String, Object> map = hits2[0].getSourceAsMap();
|
|
|
+ Map<String, Object> map2 = hits2[hits2.length-1].getSourceAsMap();
|
|
|
+ data.setMergeTarget(map.get("mergeTarget").toString());
|
|
|
+ data.setStartTime(map.get("mergeTime").toString());
|
|
|
+ data.setEndTime(map2.get("mergeTime").toString());
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -648,7 +648,7 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
// 构建查询条件
|
|
|
BoolQueryBuilder boolQueryBuilder2 = QueryBuilders.boolQuery();
|
|
|
SearchSourceBuilder searchSourceBuilder2 = new SearchSourceBuilder();
|
|
|
- boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("trackDeviceNo", "*,"+ item.getBatchNumber() +",*"));
|
|
|
+ boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("targetSource", "*"+ item.getBatchNumber() +"*"));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.rangeQuery("mergeTime").gte(query.getStartTime()).lte(query.getEndTime()));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.termsQuery("mergeType","AIS","RADAR","AIS_BEIDOU","AIS_RADAR","BEIDOU_RADAR","AIS_BEIDOU_RADAR"));
|
|
|
searchSourceBuilder2.query(boolQueryBuilder2)
|
|
@@ -665,11 +665,11 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
if (totalHits<5) {
|
|
|
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(sourceItem.getString("mergeTime"));
|
|
|
- data.setEndTime(sourceItem2.getString("mergeTime"));
|
|
|
+ Map<String, Object> map = hits2[0].getSourceAsMap();
|
|
|
+ Map<String, Object> map2 = hits2[hits2.length-1].getSourceAsMap();
|
|
|
+ data.setMergeTarget(map.get("mergeTarget").toString());
|
|
|
+ data.setStartTime(map.get("mergeTime").toString());
|
|
|
+ data.setEndTime(map2.get("mergeTime").toString());
|
|
|
data.setBatchNumber(item.getBatchNumber());
|
|
|
data.setOriginalCount(item.getCount());
|
|
|
data.setTrackCount(totalHits);
|
|
@@ -757,7 +757,7 @@ public class FusionAnalysisServiceImpl implements FusionAnalysisService {
|
|
|
// 构建查询条件
|
|
|
BoolQueryBuilder boolQueryBuilder2 = QueryBuilders.boolQuery();
|
|
|
SearchSourceBuilder searchSourceBuilder2 = new SearchSourceBuilder();
|
|
|
- boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("trackDeviceNo", "*,"+ item.getBatchNumber() +",*"));
|
|
|
+ boolQueryBuilder2.filter(QueryBuilders.wildcardQuery("targetSource", "*"+ item.getBatchNumber() +"*"));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.termQuery("targetType","0"));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.rangeQuery("mergeTime").gte(query.getStartTime()).lte(query.getEndTime()));
|
|
|
boolQueryBuilder2.filter(QueryBuilders.termsQuery("mergeType","RADAR","AIS_RADAR","BEIDOU_RADAR","AIS_BEIDOU_RADAR"));
|