deason 1 年之前
父节点
当前提交
2ed6a592c8

+ 10 - 2
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamStatisticEntity.java

@@ -64,8 +64,9 @@ public class ExamStatisticEntity extends JpaEntity {
     /**
      * 违纪人数
      */
-    //@Column(nullable = false)
-    //private Integer illegalityCount;
+    @Column(nullable = false)
+    private Integer illegalityCount;
+
     public Long getId() {
         return id;
     }
@@ -130,4 +131,11 @@ public class ExamStatisticEntity extends JpaEntity {
         this.goodScoreCount = goodScoreCount;
     }
 
+    public Integer getIllegalityCount() {
+        return illegalityCount;
+    }
+
+    public void setIllegalityCount(Integer illegalityCount) {
+        this.illegalityCount = illegalityCount;
+    }
 }

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

@@ -149,6 +149,7 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
                     result.setFinishCount(finishCount);
                     result.setPassScoreCount(passScoreCount);
                     result.setGoodScoreCount(goodScoreCount);
+                    result.setIllegalityCount(0);//todo
                     result.setUpdateTime(new Date());
                     examStatisticRepo.save(result);
                 }
@@ -170,7 +171,8 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
         sql.append(" sum(all_count) as allCount,");
         sql.append(" sum(finish_count) as finishCount,");
         sql.append(" sum(pass_score_count) as passScoreCount,");
-        sql.append(" sum(good_score_count) as goodScoreCount");
+        sql.append(" sum(good_score_count) as goodScoreCount,");
+        sql.append(" sum(illegality_count) as illegalityCount");
         sql.append(" from ec_oe_exam_statistic");
         sql.append(" where exam_id = ").append(examId);
 
@@ -203,7 +205,8 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
         sql.append(" sum(all_count) as allCount,");
         sql.append(" sum(finish_count) as finishCount,");
         sql.append(" sum(pass_score_count) as passScoreCount,");
-        sql.append(" sum(good_score_count) as goodScoreCount");
+        sql.append(" sum(good_score_count) as goodScoreCount,");
+        sql.append(" sum(illegality_count) as illegalityCount");
         sql.append(" from ec_oe_exam_statistic");
         sql.append(" where exam_id = ").append(examId);
         if (courseId != null) {
@@ -250,7 +253,8 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
         sql.append(" sum(all_count) as allCount,");
         sql.append(" sum(finish_count) as finishCount,");
         sql.append(" sum(pass_score_count) as passScoreCount,");
-        sql.append(" sum(good_score_count) as goodScoreCount");
+        sql.append(" sum(good_score_count) as goodScoreCount,");
+        sql.append(" sum(illegality_count) as illegalityCount");
         sql.append(" from ec_oe_exam_statistic");
         sql.append(" where exam_id = ").append(examId);
         if (orgId != null) {