例如:
BigDecimal b = new BigDecimal(rate2);
//有效位数:2,
rate2 = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
例如:
BigDecimal b = new BigDecimal(rate2);
//有效位数:2,
rate2 = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();