数据参数异常修改

This commit is contained in:
wr
2024-01-09 16:19:59 +08:00
parent ab1abd8259
commit c47db8a4d2

View File

@@ -228,7 +228,11 @@ public class RStatHarmonicMServiceImpl extends ServiceImpl<RStatHarmonicMMapper,
// Float averageOverDay = Float.parseFloat(
// df.format(value.getOverDay() / (value.getOverLimitMeasurementAccrued() * 1.0)));
Float averageOverDay = (float)value.getOverDay()/value.getOverLimitMeasurementAccrued();
rIconVO.setAverageOverDay(Float.parseFloat(String.format("%.2f", averageOverDay)));
if(Double.isNaN(averageOverDay)){
rIconVO.setAverageOverDay(0.0F);
}else{
rIconVO.setAverageOverDay(Float.parseFloat(String.format("%.2f", averageOverDay)));
}
arrayVOList.add(rIconVO);
}
});