Procházet zdrojové kódy

成绩统计:合格率和优秀率,违纪率,改为以实考为除数

deason před 1 rokem
rodič
revize
0b871f56dc

+ 9 - 9
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStatisticServiceImpl.java

@@ -199,9 +199,9 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
         info.setUnFinishCount(info.getAllCount() - info.getFinishCount());
         if (info.getAllCount() > 0) {
             info.setUnFinishRate(MathUtils.percentage(info.getUnFinishCount(), info.getAllCount()));
-            info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getAllCount()));
-            info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getAllCount()));
-            info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getAllCount()));
+            info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getFinishCount()));
+            info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getFinishCount()));
+            info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getFinishCount()));
         }
 
         // 获取考试信息
@@ -244,9 +244,9 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
             info.setUnFinishCount(info.getAllCount() - info.getFinishCount());
             if (info.getAllCount() > 0) {
                 info.setUnFinishRate(MathUtils.percentage(info.getUnFinishCount(), info.getAllCount()));
-                info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getAllCount()));
-                info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getAllCount()));
-                info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getAllCount()));
+                info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getFinishCount()));
+                info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getFinishCount()));
+                info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getFinishCount()));
             }
         }
 
@@ -292,9 +292,9 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
             info.setUnFinishCount(info.getAllCount() - info.getFinishCount());
             if (info.getAllCount() > 0) {
                 info.setUnFinishRate(MathUtils.percentage(info.getUnFinishCount(), info.getAllCount()));
-                info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getAllCount()));
-                info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getAllCount()));
-                info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getAllCount()));
+                info.setPassScoreRate(MathUtils.percentage(info.getPassScoreCount(), info.getFinishCount()));
+                info.setGoodScoreRate(MathUtils.percentage(info.getGoodScoreCount(), info.getFinishCount()));
+                info.setIllegalityRate(MathUtils.percentage(info.getIllegalityCount(), info.getFinishCount()));
             }
         }