瀏覽代碼

班级报告、单科报告 分数排名显示控制

tags/正式版本
雍文秀 2 年之前
父節點
當前提交
04748d9d26

+ 10
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java 查看文件

@@ -105,12 +105,14 @@ public class EReportClassService {
105 105
         EBase base = eBaseMapper.getShowRankById(rank.getExamid());
106 106
         Integer showrank = base.getTeashowrank();
107 107
         if(showrank == 0) return new ArrayList<>();
108
-        rank.setShowrank(base.getTeashowrank());
108
+        rank.setShowrank(showrank);
109 109
         return eRclassMapper.listPjf(rank);
110 110
     }
111 111
 
112 112
     //单科概况-高频错题
113 113
     public List<Map> listGpCt(ERankParamVo rank) {
114
+        EBase base = eBaseMapper.getShowRankById(rank.getExamid());
115
+        rank.setShowrank(base.getTeashowrank());
114 116
         List<Map> gpctList = eRclassMapper.listGpCt(rank);
115 117
         for (Map ct : gpctList) {
116 118
             //知识点
@@ -162,6 +164,10 @@ public class EReportClassService {
162 164
 
163 165
     //单科概况-需关注学生
164 166
     public List<Map> listGzXs(ERankParamVo rank) {
167
+        EBase base = eBaseMapper.getShowRankById(rank.getExamid());
168
+        Integer showrank = base.getTeashowrank();
169
+        if (showrank == 0) return new ArrayList<>();
170
+        rank.setShowrank(showrank);
165 171
         return eRclassMapper.listGzXs(rank);
166 172
     }
167 173
 
@@ -336,6 +342,9 @@ public class EReportClassService {
336 342
 
337 343
     //单科概况-等级统计
338 344
     public List<Map> listDkGkDjTj(ERankParamVo rank) {
345
+        EBase base = eBaseMapper.getShowRankById(rank.getExamid());
346
+        Integer showrank = base.getTeashowrank();
347
+        if (showrank != 3) return new ArrayList<>();
339 348
         return eRclassRankMapper.listDkGkDjTj(rank);
340 349
     }
341 350
 

+ 16
- 7
sexam/src/main/resources/mapper/report/ERclassMapper.xml 查看文件

@@ -37,12 +37,9 @@
37 37
             ,0 classmaxscore,0 classavgscore,0 classavgscorerank,0 schoolmaxscore,0 schoolavgscore
38 38
         </if>
39 39
         <if test="rank.showrank==1">
40
-            ,er.classmaxscore,er.classavgscore,0 classavgscorerank,0 schoolmaxscore,0 schoolavgscore
40
+            ,er.classmaxscore,er.classavgscore,0 classavgscorerank,er.schoolmaxscore,er.schoolavgscore
41 41
         </if>
42
-        <if test="rank.showrank==2">
43
-            ,er.classmaxscore,er.classavgscore,er.classavgscorerank,0 schoolmaxscore,0 schoolavgscore
44
-        </if>
45
-        <if test="rank.showrank==3">
42
+        <if test="rank.showrank==2 or rank.showrank==3">
46 43
             ,er.classmaxscore,er.classavgscore,er.classavgscorerank,er.schoolmaxscore,er.schoolavgscore
47 44
         </if>
48 45
         from e_rclass er
@@ -66,7 +63,13 @@
66 63
     </select>
67 64
     <!--班级报告-单科概况-需关注学生-->
68 65
     <select id="listGzXs" resultType="java.util.Map">
69
-        select u.username,er.score,er.classrank,er.classrankpre,er.goal
66
+        select u.username
67
+        <if test="rank.showrank==1">
68
+            ,er.score,0 classrank,0 classrankpre
69
+        </if>
70
+        <if test="rank.showrank!=1">
71
+            ,er.score,er.classrank,er.classrankpre
72
+        </if>
70 73
         <if test="rank.ranktype==3">,es.score*0.6 hgscore</if>
71 74
         from e_rstudent er left join t_user u on er.studentid=u.userid
72 75
         <if test="rank.ranktype==3">
@@ -88,8 +91,14 @@
88 91
     </select>
89 92
     <!--班级报告-单科概况-高频错题-->
90 93
     <select id="listGpCt" resultType="java.util.Map">
91
-        select erq.eptqid,erq.qn,erq.classsrate,erq.gradesrate,erq.answerjson,erq.erroroption
94
+        select erq.eptqid,erq.qn,erq.answerjson,erq.erroroption
92 95
         ,epq.eptname,epqq.answer,epqq.ctype,epa.pointjson
96
+        <if test="rank.showrank==0">
97
+            ,0 classsrate,0 gradesrate
98
+        </if>
99
+        <if test="rank.showrank!=0">
100
+            ,erq.classsrate,erq.gradesrate
101
+        </if>
93 102
         from e_rclass_question erq left join e_paper_qtype_question epqq on erq.epid = epqq.epid and erq.qorder=epqq.qorder
94 103
         left join e_paper_qtype epq on epqq.eptid = epq.eptid
95 104
         left join e_paper_analyze epa on erq.epid = epa.epid

Loading…
取消
儲存