Compare commits
No commits in common. "c2731e421cb4a875f86eaa5ae2ce36128920822a" and "059c52615ebd9ee77c368fa1cf01a0fc2f6b7f01" have entirely different histories.
c2731e421c
...
059c52615e
|
|
@ -220,28 +220,13 @@ public class SampleStatAnalysisService extends ServiceImpl<GardsSampleStatAnalys
|
||||||
Map<String, List<NuclideActConcIntvl>> groupedByNuclideName = nuclideActConcIntvlList.stream()
|
Map<String, List<NuclideActConcIntvl>> groupedByNuclideName = nuclideActConcIntvlList.stream()
|
||||||
.filter(p -> p.getNuclideName() != null)
|
.filter(p -> p.getNuclideName() != null)
|
||||||
.collect(Collectors.groupingBy(NuclideActConcIntvl::getNuclideName));
|
.collect(Collectors.groupingBy(NuclideActConcIntvl::getNuclideName));
|
||||||
|
|
||||||
Map<String, List<NuclideActConcIntvl>> sortedByCount = groupedByNuclideName.entrySet().stream()
|
|
||||||
.sorted(Map.Entry.<String, List<NuclideActConcIntvl>>comparingByValue(
|
|
||||||
Comparator.comparingInt(List::size)
|
|
||||||
).reversed()) // .reversed() 表示从多到少
|
|
||||||
.collect(Collectors.toMap(
|
|
||||||
Map.Entry::getKey,
|
|
||||||
Map.Entry::getValue,
|
|
||||||
(e1, e2) -> e1,
|
|
||||||
LinkedHashMap::new // 使用 LinkedHashMap
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//查询级别 getSample
|
//查询级别 getSample
|
||||||
List<String> nuclideNames = new ArrayList<>(groupedByNuclideName.keySet());
|
List<String> nuclideNames = new ArrayList<>(groupedByNuclideName.keySet());
|
||||||
if (CollectionUtils.isNotEmpty(nuclideNames)) {
|
if (CollectionUtils.isNotEmpty(nuclideNames)) {
|
||||||
//通过台站ID、核素名称查找阈值
|
//通过台站ID、核素名称查找阈值
|
||||||
thresholdResultHisDataList = this.baseMapper.selectByStationAndNuclides(schemaName, Integer.valueOf(stationCode), nuclideNames, startTime, endTime);
|
thresholdResultHisDataList = this.baseMapper.selectByStationAndNuclides(schemaName, Integer.valueOf(stationCode), nuclideNames, startTime, endTime);
|
||||||
}
|
}
|
||||||
// resultMap.put("nuclideActConcIntvlList", groupedByNuclideName);
|
resultMap.put("nuclideActConcIntvlList", groupedByNuclideName);
|
||||||
resultMap.put("nuclideActConcIntvlList", sortedByCount);
|
|
||||||
resultMap.put("sampleLevelDataList", sampleLevelDataList);
|
resultMap.put("sampleLevelDataList", sampleLevelDataList);
|
||||||
resultMap.put("thresholdResultHisDataList", thresholdResultHisDataList);
|
resultMap.put("thresholdResultHisDataList", thresholdResultHisDataList);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|
@ -254,7 +239,6 @@ public class SampleStatAnalysisService extends ServiceImpl<GardsSampleStatAnalys
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定时间范围内的样品等级
|
* 获取指定时间范围内的样品等级
|
||||||
*
|
*
|
||||||
|
|
@ -583,11 +567,7 @@ public class SampleStatAnalysisService extends ServiceImpl<GardsSampleStatAnalys
|
||||||
.collect(Collectors.groupingBy(NuclideActConcIntvl::getStationCode));
|
.collect(Collectors.groupingBy(NuclideActConcIntvl::getStationCode));
|
||||||
|
|
||||||
int colorIndex = 0;
|
int colorIndex = 0;
|
||||||
//TODO
|
|
||||||
Random rand = new Random();
|
|
||||||
|
|
||||||
double min = 100.0;
|
|
||||||
double max = 2000.0;
|
|
||||||
|
|
||||||
for (Map.Entry<String, List<NuclideActConcIntvl>> entry : groupByStation.entrySet()) {
|
for (Map.Entry<String, List<NuclideActConcIntvl>> entry : groupByStation.entrySet()) {
|
||||||
String displayCode = entry.getKey();
|
String displayCode = entry.getKey();
|
||||||
|
|
@ -626,8 +606,6 @@ public class SampleStatAnalysisService extends ServiceImpl<GardsSampleStatAnalys
|
||||||
// 检测值 + 误差条
|
// 检测值 + 误差条
|
||||||
Double conc = r.getConc();
|
Double conc = r.getConc();
|
||||||
Double err = r.getConcErr();
|
Double err = r.getConcErr();
|
||||||
//TODO
|
|
||||||
//Double err =Math.round(min + (max - min) * rand.nextDouble() * 1000000.0) / 1000000.0;
|
|
||||||
if (conc != null && err != null) {
|
if (conc != null && err != null) {
|
||||||
double low = Math.max(conc - err, 0.01);
|
double low = Math.max(conc - err, 0.01);
|
||||||
double high = conc + err;
|
double high = conc + err;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user