BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先轉(zhuǎn)為BigDecimal類(lèi)型 得到percent+"%"
本文摘自 :https://www.cnblogs.com/
海量資源,盡在掌握
BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先轉(zhuǎn)為BigDecimal類(lèi)型 得到percent+"%"
本文摘自 :https://www.cnblogs.com/