This commit is contained in:
xy
2024-12-27 11:01:48 +08:00
parent b377ad7c95
commit 04cdb50b13

View File

@@ -249,9 +249,11 @@ public class DataServiceImpl implements IDataService {
}
vo.setAvgValue(Double.valueOf(df.format(re)));
}else {
re = statisticalDataDTO.getValue();
if (Objects.nonNull(statisticalDataDTO)) {
re = statisticalDataDTO.getValue();
vo.setAvgValue(Double.valueOf(df.format(re)));
}
unit = item2.getUnit();
vo.setAvgValue(Double.valueOf(df.format(re)));
}
}
} else {
@@ -273,8 +275,10 @@ public class DataServiceImpl implements IDataService {
}
vo.setAvgValue(Double.valueOf(df.format(re)));
}else {
re = statisticalDataDTO.getValue();
vo.setAvgValue(Double.valueOf(df.format(re)));
if (Objects.nonNull(statisticalDataDTO)) {
re = statisticalDataDTO.getValue();
vo.setAvgValue(Double.valueOf(df.format(re)));
}
}
} else {
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));