Browse Source

课堂报告完善

tags/正式3.2.0
雍文秀 2 years ago
parent
commit
fbd1e0e087

+ 1
- 0
sclass/src/main/java/com/xhkjedu/sclass/service/classroom/ClassroomService.java View File

@@ -418,6 +418,7 @@ public class ClassroomService {
418 418
         List<ReportExamVo> exams = classroomMapper.listPaper(roomid);
419 419
         for (ReportExamVo exam : exams) {
420 420
             Integer realstunum = exam.getYtjnum();
421
+            exam.setWtjnum(room.getRealstunum()-realstunum);
421 422
             List<String> paperfiles = classroomPaperFileMapper.listFilepath(exam.getPaperid());
422 423
             exam.setPaperfiles(paperfiles);
423 424
 

+ 2
- 2
sclass/src/main/resources/mapper/classroom/ClassroomMapper.xml View File

@@ -378,8 +378,8 @@
378 378
     </select>
379 379
     <!--获取课堂考试列表-->
380 380
     <select id="listPaper" resultType="com.xhkjedu.sclass.vo.classroom.ReportExamVo">
381
-        SELECT p.paperid,p.papername,c.classid,truncate(SUM(ps.stuscore)*100/(p.paperscore*COUNT(ps.psid)),2)scorerate
382
-        ,truncate(SUM(ps.stuscore)/COUNT(ps.psid),2)avgscore,MAX(ps.stuscore)maxscore,COUNT(ps.psid)ytjnum,0 wjtnum
381
+        SELECT p.paperid,p.papername,c.classid,ifnull(truncate(SUM(ps.stuscore)*100/(p.paperscore*COUNT(ps.psid)),2),0)scorerate
382
+        ,ifnull(truncate(SUM(ps.stuscore)/COUNT(ps.psid),2),0)avgscore,ifnull(MAX(ps.stuscore),0)maxscore,COUNT(ps.psid)ytjnum
383 383
         FROM t_classroom_paper p
384 384
         LEFT JOIN t_classroom_paper_student ps ON p.paperid=ps.paperid
385 385
         LEFT JOIN t_classroom_askteacher rt ON p.paperid=rt.paperid

Loading…
Cancel
Save