代码优化
This commit is contained in:
@@ -219,8 +219,14 @@ public class DataServiceImpl implements IDataService {
|
||||
vo.setSort(item2.getSort());
|
||||
if (Objects.equals("Primary",dataLevel)) {
|
||||
if (Objects.equals("Primary",csDataSetLevel)) {
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
unit = item2.getUnit();
|
||||
if (HarmonicConstant.POWER_LIST.contains(item2.getShowName())) {
|
||||
re = Objects.isNull(statisticalDataDTO) ? 3.14159 : statisticalDataDTO.getValue() / 1000;
|
||||
vo.setAvgValue(Double.valueOf(df.format(re)));
|
||||
unit = "k" + item2.getUnit();
|
||||
} else {
|
||||
vo.setAvgValue(Objects.isNull(statisticalDataDTO) ? 3.14159 : Double.parseDouble(df.format(statisticalDataDTO.getValue())));
|
||||
unit = item2.getUnit();
|
||||
}
|
||||
} else {
|
||||
if(Objects.nonNull(item2.getPrimaryFormula())){
|
||||
switch (item2.getPrimaryFormula()) {
|
||||
|
||||
Reference in New Issue
Block a user