Browse Source

处理刘子麟写的bug

夏文涛 1 year ago
parent
commit
12e4cc42a8

+ 4 - 4
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -1486,10 +1486,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         int checkInBedTotal = welcomeBedService.count(wrapper);
         int checkInBedTotal = welcomeBedService.count(wrapper);
 
 
         //        报到率
         //        报到率
-        BigDecimal total = new BigDecimal(enrollmentTotal);
-        BigDecimal bedTotal = new BigDecimal(checkInBedTotal);
-        BigDecimal bigDecimal = bedTotal.divide(total).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
-        String registrationRate = String.format("%.2f",(enrollmentTotal / checkInBedTotal) * 100);
+//        BigDecimal total = new BigDecimal(enrollmentTotal);
+//        BigDecimal bedTotal = new BigDecimal(checkInBedTotal);
+//        BigDecimal bigDecimal = bedTotal.divide(total).setScale(4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+        String registrationRate = String.format("%.2f",(double)(checkInBedTotal/enrollmentTotal) * 100);
 
 
 
 
         LocalDateTime start = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
         LocalDateTime start = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);