BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先转为BigDecimal类型 得到percent+"%"
本文摘自 :https://www.cnblogs.com/
海量资源,尽在掌握
BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先转为BigDecimal类型 得到percent+"%"
本文摘自 :https://www.cnblogs.com/