两个Integer数相除得到整数百分比 并四舍五入
BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先转为BigDecimal类型 得到percent+"%"
BigDecimal percent =BigDecimal.valueOf(wosCourseVo.getLearnStuNum()*100).divide(BigDecimal.valueOf(wosCourseVo.getStudentsNum()), 0, BigDecimal.ROUND_HALF_UP);
先转为BigDecimal类型 得到percent+"%"