Commit 14841f6c by guojx

销售结构接口四舍五入

parent 541e92a2
...@@ -194,8 +194,8 @@ public class DataController { ...@@ -194,8 +194,8 @@ public class DataController {
} }
BigDecimal bd = new BigDecimal(a.toString()); BigDecimal bd = new BigDecimal(a.toString());
bd = bd.multiply(new BigDecimal(100)); bd = bd.multiply(new BigDecimal(100));
bd = bd.divide(new BigDecimal(b.toString())); bd = bd.divide(new BigDecimal(b.toString()), 2, BigDecimal.ROUND_HALF_UP);
bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); // bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);
return bd.toString(); return bd.toString();
} }
......
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