Commit 79fd08f9 by zhangkb

修改计算综合的方法逻辑

parent bafa5486
...@@ -139,8 +139,10 @@ public class CalculateUtils { ...@@ -139,8 +139,10 @@ public class CalculateUtils {
if(formula.toString().endsWith("+")) { if(formula.toString().endsWith("+")) {
formula.deleteCharAt(formula.length()-1); formula.deleteCharAt(formula.length()-1);
} }
calValue = String.format("%.4f", if(StringUtils.isNotBlank(formula.toString())) {
new BigDecimal(((Number)AviatorEvaluator.execute(formula.toString())).doubleValue())); calValue = String.format("%.4f",
new BigDecimal(((Number)AviatorEvaluator.execute(formula.toString())).doubleValue()));
}
} }
return calValue; return calValue;
} }
......
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