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

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

tags/正式版本
雍文秀 2 лет назад
Родитель
Сommit
88059345bc

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/report/EReportClassController.java Просмотреть файл

@@ -347,6 +347,8 @@ public class EReportClassController {
347 347
         if(N_Utils.isListEmpty(subjects)) return new ResultVo(1, "没有查看权限");
348 348
         String subjectid = subjects.get(0).get("subjectid").toString();
349 349
         stu.setSubjectid(subjectid);
350
+        Integer showrank = eReportClassService.getShowRank(examid);
351
+        stu.setShowrank(showrank);
350 352
         if (N_Utils.isEmptyInteger(page)) {
351 353
             List<Map> list = eReportClassService.listTeacherCjd(stu);
352 354
             return new ResultVo(0, "获取成功", list);

+ 8
- 0
sexam/src/main/java/com/xhkjedu/sexam/utils/ExamUtil.java Просмотреть файл

@@ -330,7 +330,15 @@ public class ExamUtil {
330 330
                         s.put("schoolrank", "0");
331 331
                         s.put("goal", "0");
332 332
                         s.put("nextgoal", "0");
333
+                    } else if (showrank == 1){
334
+                        s.put("classrank", "0");
335
+                        s.put("classrankpre", "0");
336
+                        s.put("schoolrank", "0");
337
+                        s.put("goal", "0");
338
+                        s.put("nextgoal", "0");
333 339
                     } else {
340
+                        s.put("bzscore", "0");
341
+                        s.put("score", "0");
334 342
                         s.put("classrank", "0");
335 343
                         s.put("classrankpre", "0");
336 344
                         s.put("schoolrank", "0");

+ 2
- 1
sexam/src/main/resources/mapper/report/EReportClassMapper.xml Просмотреть файл

@@ -154,8 +154,9 @@
154 154
 
155 155
     <!--教师考试权限科目-->
156 156
     <select id="listExamSubject" resultType="java.util.Map">
157
-        select es.subjectid,es.subjectname
157
+        select es.subjectid,es.subjectname,p.pnum,p.ptype,p.pscore
158 158
         from e_subject es left join t_teacher_powersb ttp on es.subjectid = ttp.subjectid
159
+        left join e_paper p on es.esid=p.esid
159 160
         where es.examid=#{examid} and ttp.teacherid=#{teacherid}
160 161
         group by es.subjectid
161 162
     </select>

+ 8
- 5
sexam/src/main/resources/mapper/report/ERstudentMapper.xml Просмотреть файл

@@ -362,15 +362,18 @@
362 362
     <!--班级报告教师成绩单-->
363 363
     <select id="listTeacherCjd" resultType="java.util.Map">
364 364
         select cs.examid,cs.classid,cs.studentid,u.username,u.loginname,u.usersex,u.examno
365
-        ,s.score,s.subjectname,s.subjectid
366
-        <if test="stu.showrank==0 or stu.showrank==1">
367
-            ,0 classrank,0 schoolrank
365
+        ,s.subjectname,s.subjectid
366
+        <if test="stu.showrank==0">
367
+            ,0 score,0 classrank,0 schoolrank
368
+        </if>
369
+        <if test="stu.showrank==1">
370
+            ,s.score,0 classrank,0 schoolrank
368 371
         </if>
369 372
         <if test="stu.showrank==2">
370
-            ,s.classrank,0 schoolrank
373
+            ,s.score,s.classrank,0 schoolrank
371 374
         </if>
372 375
         <if test="stu.showrank==3">
373
-            ,s.classrank,s.schoolrank
376
+            ,s.score,s.classrank,s.schoolrank
374 377
         </if>
375 378
         ,eps.device,eps.submittype,eps.endtime
376 379
         from e_class_student cs left join t_user u on cs.studentid=u.userid

Загрузка…
Отмена
Сохранить