Browse Source

debug 驾驶舱算法

tags/24080901
PoffyZhang 1 year ago
parent
commit
8d98e474cf
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java View File

@@ -130,7 +130,7 @@ public class BizUtils {
} }


public static String computeRise(Integer numa, Integer numb) { public static String computeRise(Integer numa, Integer numb) {
if(Objects.isNull(numa) || Objects.isNull(numb)){
if(Objects.isNull(numa) || Objects.isNull(numb) || numa.equals(0) || numb.equals(0)){
return "0"; return "0";
} }
return BigDecimal.valueOf((numa - numb) * 100.0).divide(BigDecimal.valueOf(numb),2, RoundingMode.CEILING) return BigDecimal.valueOf((numa - numb) * 100.0).divide(BigDecimal.valueOf(numb),2, RoundingMode.CEILING)


Loading…
Cancel
Save