|
@@ -57,7 +57,7 @@ public class BeidouAnalySisServiceImpl implements BeidouAnalySisService {
|
|
|
|
|
|
@Override
|
|
|
public List<ExportVo> export(QueryVo query) {
|
|
|
- Set<String> result = new HashSet<>();
|
|
|
+ Map<String,Integer> result = new ConcurrentHashMap<>();
|
|
|
List<String> beidouList = new LinkedList<>();
|
|
|
Map<String, CountDTO> idenNewStringMap = new ConcurrentHashMap<>();
|
|
|
String time = DateUtils.format(new Date(), "yyyy-MM-dd");
|
|
@@ -138,8 +138,13 @@ public class BeidouAnalySisServiceImpl implements BeidouAnalySisService {
|
|
|
if(null != countDTO){
|
|
|
if(null != countDTO.getCount()){
|
|
|
if(countDTO.getCount() > 1){
|
|
|
+ //mergeTarget
|
|
|
List<String> data = countDTO.getData();
|
|
|
- result.addAll(data);
|
|
|
+ if(null != data && 0 < data.size()){
|
|
|
+ for (String item : data) {
|
|
|
+ result.put(item,countDTO.getCount());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -152,7 +157,7 @@ public class BeidouAnalySisServiceImpl implements BeidouAnalySisService {
|
|
|
SearchSourceBuilder exportSearchSourceBuilder = new SearchSourceBuilder();
|
|
|
exportSearchSourceBuilder.size(1000000);
|
|
|
exportSearchSourceBuilder.trackTotalHits(true);
|
|
|
- exportSearchSourceBuilder.query(QueryBuilders.termsQuery("mergeTarget",result));
|
|
|
+ exportSearchSourceBuilder.query(QueryBuilders.termsQuery("mergeTarget",result.keySet()));
|
|
|
exportFusionSearchRequest.source(exportSearchSourceBuilder);
|
|
|
List<ExportVo> data = new ArrayList<>();
|
|
|
try {
|
|
@@ -162,10 +167,22 @@ public class BeidouAnalySisServiceImpl implements BeidouAnalySisService {
|
|
|
Map<String, Object> sourceAsMap = hit.getSourceAsMap();
|
|
|
String mergeTarget = (String) sourceAsMap.get("mergeTarget");
|
|
|
String targetSource = (String) sourceAsMap.get("targetSource");
|
|
|
- ExportVo tianaoVo = new ExportVo();
|
|
|
- tianaoVo.setMergeTarget(mergeTarget);
|
|
|
- tianaoVo.setStartTime(targetSource);
|
|
|
- data.add(tianaoVo);
|
|
|
+ String mergeTime = (String) sourceAsMap.get("mergeTime");
|
|
|
+ Integer count = result.get(mergeTarget);
|
|
|
+ ExportVo exportVo = new ExportVo();
|
|
|
+ exportVo.setMergeTarget(mergeTarget);
|
|
|
+ exportVo.setTargetSource(targetSource);
|
|
|
+ exportVo.setEndTime(mergeTime);
|
|
|
+ exportVo.setCount(count);
|
|
|
+ List<FusionNewShipJsonDTO> targetSourceList = JSON.parseArray(targetSource, FusionNewShipJsonDTO.class);
|
|
|
+ for (FusionNewShipJsonDTO item : targetSourceList) {
|
|
|
+ if (null != item) {
|
|
|
+ if (null != item.getType() && "BEIDOU".equals(item.getType())) {
|
|
|
+ exportVo.setStartTime(item.getSourceTime());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data.add(exportVo);
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|