Commit fb6e2c24 authored by jichao's avatar jichao

改bug

parent 7e6cfd76
...@@ -360,7 +360,7 @@ public class OverViewServiceImpl implements OverViewService { ...@@ -360,7 +360,7 @@ public class OverViewServiceImpl implements OverViewService {
if (total.compareTo(new BigDecimal(0)) == 0) if (total.compareTo(new BigDecimal(0)) == 0)
energyCountMVo.setPercent(total + "%"); energyCountMVo.setPercent(total + "%");
else else
energyCountMVo.setPercent(energyCountMVo.getEnergy().divide(total).multiply(new BigDecimal(100)).setScale(1) + "%"); energyCountMVo.setPercent(energyCountMVo.getEnergy().divide(total, 1, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)) + "%");
} }
} }
return list; return list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment