This commit is contained in:
wr
2025-01-13 19:19:26 +08:00
parent 6bb50bdd01
commit 173aa100bd
2 changed files with 22 additions and 3 deletions

View File

@@ -1344,10 +1344,29 @@ public class SocketDevResponseService {
}
if (CollUtil.isNotEmpty(adNonHarmonicResultList)) {
detectionDataDealService.acceptAdNon(adNonHarmonicResultList, param.getCode());
Map<String, List<AdNonHarmonicResult>> map = adNonHarmonicResultList.stream().collect(Collectors.groupingBy(x -> x.getMonitorId() + x.getTimeId() + x.getScriptId() + x.getSort() + x.getAdType() + x.getDataType()));
List<AdNonHarmonicResult> info=new ArrayList<>();
map.forEach((key,value)->{
if(value.size()>1){
System.err.println("重复时间戳->"+key+value);
}else{
info.addAll(value);
}
});
detectionDataDealService.acceptAdNon(info, param.getCode());
}
if (CollUtil.isNotEmpty(adHarmonicResultList)) {
detectionDataDealService.acceptAd(adHarmonicResultList, param.getCode());
Map<String, List<AdHarmonicResult>> map = adHarmonicResultList.stream().collect(Collectors.groupingBy(x -> x.getMonitorId() + x.getTimeId() + x.getScriptId() + x.getSort() + x.getAdType() + x.getDataType()));
List<AdHarmonicResult> info=new ArrayList<>();
map.forEach((key,value)->{
if(value.size()>1){
System.err.println("重复时间戳->"+key+value);
}else{
info.addAll(value);
}
});
detectionDataDealService.acceptAd(info, param.getCode());
}
System.out.println("原始数据插入数据库执行成功=========================================");
// };

View File

@@ -689,7 +689,7 @@ public class DetectionServiceImpl {
nf.setMaximumFractionDigits(6);
nf.setGroupingUsed(false);
data.setRadius(nf.format(-errSysDtl.getMaxErrorValue()) + "~" + nf.format(-errSysDtl.getMaxErrorValue()));
data.setRadius(nf.format(-errSys.getMaxErrorValue()) + "~" + nf.format(-errSys.getMaxErrorValue()));
setDetection(dataRule, harmDataList, errSys, data, v);
}
info.add(data);