|
|
@@ -383,6 +383,10 @@ public class FmsConsoleController extends BaseController {
|
|
|
// 计算未使用的地块数量
|
|
|
fmsConsoleStatResVo.setBlockUnUsedNum(fmsConsoleStatResVo.getBlockTotalNum().subtract(fmsConsoleStatResVo.getBlockUsedNum()));
|
|
|
// 计算地块使用率
|
|
|
- fmsConsoleStatResVo.setBlockUsageRate(planArea.divide(fmsConsoleStatResVo.getBlockTotalArea(),2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ if(fmsConsoleStatResVo.getBlockTotalArea().compareTo(new BigDecimal("0"))==0){
|
|
|
+ fmsConsoleStatResVo.setBlockUsageRate(0.00);
|
|
|
+ }else {
|
|
|
+ fmsConsoleStatResVo.setBlockUsageRate(planArea.divide(fmsConsoleStatResVo.getBlockTotalArea(),2, RoundingMode.HALF_UP).doubleValue());
|
|
|
+ }
|
|
|
}
|
|
|
}
|