1
0
Просмотр исходного кода

大题统计增加得分率;修正一些jsp显示错误

ting.yin 6 лет назад
Родитель
Сommit
14e42db81e

+ 17 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/report/model/ReportSubjectGroup.java

@@ -99,17 +99,24 @@ public class ReportSubjectGroup implements Serializable {
     @Column(name = "cv")
     private Double CV;
 
+    /**
+     * 得分率
+     */
+    @ExcelField(title = "得分率", align = 2, sort = 100)
+    @Column(name = "score_rate")
+    private Double scoreRate;
+
     /**
      * 零分人数
      */
-    @ExcelField(title = "零分人数", align = 2, sort = 100)
+    @ExcelField(title = "零分人数", align = 2, sort = 110)
     @Column(name = "zero_count")
     private Integer zeroCount;
 
     /**
      * 满分人数
      */
-    @ExcelField(title = "满分人数", align = 2, sort = 110)
+    @ExcelField(title = "满分人数", align = 2, sort = 120)
     @Column(name = "full_count")
     private Integer fullCount;
 
@@ -217,4 +224,12 @@ public class ReportSubjectGroup implements Serializable {
         this.fullCount = fullCount;
     }
 
+    public Double getScoreRate() {
+        return scoreRate;
+    }
+
+    public void setScoreRate(Double scoreRate) {
+        this.scoreRate = scoreRate;
+    }
+
 }

+ 8 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/report/service/impl/ReportSubjectGroupServiceImpl.java

@@ -12,6 +12,7 @@ import cn.com.qmth.stmms.biz.report.model.ReportSubjectGroup;
 import cn.com.qmth.stmms.biz.report.query.ReportSubjectQuery;
 import cn.com.qmth.stmms.biz.report.service.ReportSubjectGroupService;
 import cn.com.qmth.stmms.biz.utils.DoubleUtil;
+
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.jpa.domain.Specification;
@@ -21,6 +22,7 @@ import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
+
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
@@ -185,6 +187,11 @@ public class ReportSubjectGroupServiceImpl extends BaseQueryService<ReportSubjec
             if (avgScore.doubleValue() > 0) {
                 cv = DoubleUtil.mul(DoubleUtil.div(sd, avgScore, 4), 100);
             }
+            //得分率
+            Double scoreRate = 0d;
+            if(fullScore != 0){
+                scoreRate = DoubleUtil.div(avgScore,fullScore, 2);
+            }
             ReportSubjectGroup reportSubjectGroup = new ReportSubjectGroup();
             reportSubjectGroup.setExamId(examId);
             reportSubjectGroup.setSubjectCode(subjectCode);
@@ -196,6 +203,7 @@ public class ReportSubjectGroupServiceImpl extends BaseQueryService<ReportSubjec
             reportSubjectGroup.setTotalScore(fullScore);
             reportSubjectGroup.setSD(sd);
             reportSubjectGroup.setCV(cv);
+            reportSubjectGroup.setScoreRate(scoreRate);
             reportSubjectGroup.setZeroCount(zeroScoreCount);
             reportSubjectGroup.setFullCount(fullScoreCount);
 

+ 1 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectClass.jsp

@@ -58,7 +58,7 @@
         <th>最低分</th>
         <th>及格数</th>
         <th>及格率</th>
-        <th>及格数</th>
+        <th>优秀数</th>
         <th>优秀率</th>
     </tr>
     </thead>

+ 3 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectGroup.jsp

@@ -48,13 +48,14 @@
 <table id="contentTable" class="table table-striped table-bordered table-condensed">
     <thead>
     <tr>
-        <th>题</th>
+        <th>题</th>
         <th>满分</th>
         <th>最高分</th>
         <th>最低分</th>
         <th>平均分</th>
         <th>标准差</th>
         <th>差异系数(%)</th>
+        <th>得分率</th>
         <th>零分人数</th>
         <th>满分人数</th>
     </tr>
@@ -69,6 +70,7 @@
             <td>${group.avgScore}</td>
             <td>${group.SD}</td>
             <td>${group.CV}</td>
+            <td>${group.scoreRate}</td>
             <td>${group.zeroCount}</td>
             <td>${group.fullCount}</td>
         </tr>

+ 2 - 2
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectTeacher.jsp

@@ -59,8 +59,8 @@
         <th>优秀</th>
         <th>最高分</th>
         <th>最低分</th>
-        <th>及格率(%)</th>
-        <th>优秀率(%)</th>
+        <th>及格率</th>
+        <th>优秀率</th>
         <th>平均数</th>
         <th>平均相对分</th>
     </tr>

+ 2 - 2
stmms-web/src/main/webapp/WEB-INF/views/modules/report/reportSubjectTeacherClass.jsp

@@ -36,8 +36,8 @@
         <th>优秀</th>
         <th>最高分</th>
         <th>最低分</th>
-        <th>及格率(%)</th>
-        <th>优秀率(%)</th>
+        <th>及格率</th>
+        <th>优秀率</th>
         <th>平均数</th>
         <th>平均相对分</th>
     </tr>