Browse Source

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

tags/正式版本
雍文秀 2 years ago
parent
commit
04748d9d26

+ 10
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportClassService.java View File

105
         EBase base = eBaseMapper.getShowRankById(rank.getExamid());
105
         EBase base = eBaseMapper.getShowRankById(rank.getExamid());
106
         Integer showrank = base.getTeashowrank();
106
         Integer showrank = base.getTeashowrank();
107
         if(showrank == 0) return new ArrayList<>();
107
         if(showrank == 0) return new ArrayList<>();
108
-        rank.setShowrank(base.getTeashowrank());
108
+        rank.setShowrank(showrank);
109
         return eRclassMapper.listPjf(rank);
109
         return eRclassMapper.listPjf(rank);
110
     }
110
     }
111
 
111
 
112
     //单科概况-高频错题
112
     //单科概况-高频错题
113
     public List<Map> listGpCt(ERankParamVo rank) {
113
     public List<Map> listGpCt(ERankParamVo rank) {
114
+        EBase base = eBaseMapper.getShowRankById(rank.getExamid());
115
+        rank.setShowrank(base.getTeashowrank());
114
         List<Map> gpctList = eRclassMapper.listGpCt(rank);
116
         List<Map> gpctList = eRclassMapper.listGpCt(rank);
115
         for (Map ct : gpctList) {
117
         for (Map ct : gpctList) {
116
             //知识点
118
             //知识点
162
 
164
 
163
     //单科概况-需关注学生
165
     //单科概况-需关注学生
164
     public List<Map> listGzXs(ERankParamVo rank) {
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
         return eRclassMapper.listGzXs(rank);
171
         return eRclassMapper.listGzXs(rank);
166
     }
172
     }
167
 
173
 
336
 
342
 
337
     //单科概况-等级统计
343
     //单科概况-等级统计
338
     public List<Map> listDkGkDjTj(ERankParamVo rank) {
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
         return eRclassRankMapper.listDkGkDjTj(rank);
348
         return eRclassRankMapper.listDkGkDjTj(rank);
340
     }
349
     }
341
 
350
 

+ 16
- 7
sexam/src/main/resources/mapper/report/ERclassMapper.xml View File

37
             ,0 classmaxscore,0 classavgscore,0 classavgscorerank,0 schoolmaxscore,0 schoolavgscore
37
             ,0 classmaxscore,0 classavgscore,0 classavgscorerank,0 schoolmaxscore,0 schoolavgscore
38
         </if>
38
         </if>
39
         <if test="rank.showrank==1">
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
         </if>
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
             ,er.classmaxscore,er.classavgscore,er.classavgscorerank,er.schoolmaxscore,er.schoolavgscore
43
             ,er.classmaxscore,er.classavgscore,er.classavgscorerank,er.schoolmaxscore,er.schoolavgscore
47
         </if>
44
         </if>
48
         from e_rclass er
45
         from e_rclass er
66
     </select>
63
     </select>
67
     <!--班级报告-单科概况-需关注学生-->
64
     <!--班级报告-单科概况-需关注学生-->
68
     <select id="listGzXs" resultType="java.util.Map">
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
         <if test="rank.ranktype==3">,es.score*0.6 hgscore</if>
73
         <if test="rank.ranktype==3">,es.score*0.6 hgscore</if>
71
         from e_rstudent er left join t_user u on er.studentid=u.userid
74
         from e_rstudent er left join t_user u on er.studentid=u.userid
72
         <if test="rank.ranktype==3">
75
         <if test="rank.ranktype==3">
88
     </select>
91
     </select>
89
     <!--班级报告-单科概况-高频错题-->
92
     <!--班级报告-单科概况-高频错题-->
90
     <select id="listGpCt" resultType="java.util.Map">
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
         ,epq.eptname,epqq.answer,epqq.ctype,epa.pointjson
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
         from e_rclass_question erq left join e_paper_qtype_question epqq on erq.epid = epqq.epid and erq.qorder=epqq.qorder
102
         from e_rclass_question erq left join e_paper_qtype_question epqq on erq.epid = epqq.epid and erq.qorder=epqq.qorder
94
         left join e_paper_qtype epq on epqq.eptid = epq.eptid
103
         left join e_paper_qtype epq on epqq.eptid = epq.eptid
95
         left join e_paper_analyze epa on erq.epid = epa.epid
104
         left join e_paper_analyze epa on erq.epid = epa.epid

Loading…
Cancel
Save