微调
This commit is contained in:
@@ -850,6 +850,7 @@ public class DetectionServiceImpl {
|
||||
errSysDtlMap.put(key, null);
|
||||
}
|
||||
});
|
||||
if (CollUtil.isNotEmpty(devMap)) {
|
||||
devMap.forEach((harm, harmDataList) -> {
|
||||
PqErrSysDtls errSysDtl = errSysDtlMap.get(harm);
|
||||
DetectionData data = new DetectionData();
|
||||
@@ -869,6 +870,7 @@ public class DetectionServiceImpl {
|
||||
}
|
||||
info.add(data);
|
||||
});
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -950,7 +952,7 @@ public class DetectionServiceImpl {
|
||||
for (DevData devData : dev) {
|
||||
List<DevData.SqlDataDTO> sqlDataDTOList = devData.getSqlData();
|
||||
Optional<DevData.SqlDataDTO> first = Optional.empty();
|
||||
if(CollUtil.isNotEmpty(sqlDataDTOList)){
|
||||
if (CollUtil.isNotEmpty(sqlDataDTOList)) {
|
||||
first = sqlDataDTOList.stream().filter(x -> x.getDesc().equals(fundCode)).collect(Collectors.toList()).stream().findFirst();
|
||||
}
|
||||
DevData.SqlDataDTO fund = null;
|
||||
@@ -1221,40 +1223,53 @@ public class DetectionServiceImpl {
|
||||
Map<Double, List<Double>> integerListMap = map.get(type);
|
||||
for (Double i : harmNum) {
|
||||
if (integerListMap.containsKey(i)) {
|
||||
if (i.equals(1.0)&&num != 1) {
|
||||
if (i.equals(1.0) && num != 1) {
|
||||
integerListMap.get(1.0).add(multiply(fund, fund));
|
||||
} else {
|
||||
double v = (num == 1 ? i : (i - num));
|
||||
if (type.equals("A")) {
|
||||
if ((int) v < harm.getList().getA().size()) {
|
||||
integerListMap.get(i).add(multiply(harm.getList().getA().get((int) v), fund));
|
||||
}
|
||||
|
||||
}
|
||||
if (type.equals("B")) {
|
||||
if ((int) v < harm.getList().getB().size()) {
|
||||
integerListMap.get(i).add(multiply(harm.getList().getB().get((int) v), fund));
|
||||
}
|
||||
}
|
||||
if (type.equals("C")) {
|
||||
if ((int) v < harm.getList().getC().size()) {
|
||||
integerListMap.get(i).add(multiply(harm.getList().getC().get((int) v), fund));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Map<Double, List<Double>> integerListMap = new LinkedHashMap<>(5);
|
||||
for (Double i : harmNum) {
|
||||
List<Double> integerList = new ArrayList<>();
|
||||
if (i.equals(1.0)&&num != 1) {
|
||||
if (i.equals(1.0) && num != 1) {
|
||||
integerList.add(multiply(fund, fund));
|
||||
integerListMap.put(1.0, integerList);
|
||||
} else {
|
||||
double v = (num == 1 ? i : (i - num));
|
||||
if (type.equals("A")) {
|
||||
if ((int) v < harm.getList().getA().size()) {
|
||||
integerList.add(multiply(harm.getList().getA().get((int) v), fund));
|
||||
}
|
||||
}
|
||||
if (type.equals("B")) {
|
||||
if ((int) v < harm.getList().getB().size()) {
|
||||
integerList.add(multiply(harm.getList().getB().get((int) v), fund));
|
||||
}
|
||||
}
|
||||
if (type.equals("C")) {
|
||||
if ((int) v < harm.getList().getC().size()) {
|
||||
integerList.add(multiply(harm.getList().getC().get((int) v), fund));
|
||||
}
|
||||
}
|
||||
integerListMap.put(i, integerList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user