Browse Source

学生报告返回平均分

tags/正式版本
王宁 2 years ago
parent
commit
bf0ba23273

+ 1
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

@@ -2283,6 +2283,7 @@ public class EReportGenerateService {
2283 2283
             Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
2284 2284
             Double tgavgscore = N_Utils.getDoubleDivideForAvg(tgstuscore,qgstulist.size());
2285 2285
 
2286
+
2286 2287
             for (Map classm : classes) {
2287 2288
                 Integer classid = Integer.parseInt(classm.get("classid").toString());
2288 2289
                 List<EPaperStudentQuestion> qcstulist = qgstulist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());

+ 7
- 3
sexam/src/main/resources/mapper/report/ERstudentMapper.xml View File

@@ -52,7 +52,7 @@
52 52
     <select id="listStudentExamHistory" resultType="java.util.Map">
53 53
         select e.examid,e.examdate,s.classrank,s.schoolrank
54 54
         from e_rstudent s LEFT JOIN e_base e on s.examid=e.examid
55
-        where s.studentid=#{studentid} and s.subjectid=#{subjectid} order by e.examdate desc limit 10
55
+        where s.studentid=#{studentid} and s.subjectid=#{subjectid} order by e.examdate limit 10
56 56
     </select>
57 57
 
58 58
     <!--学生报告-学科分析-学科名次-->
@@ -76,7 +76,8 @@
76 76
     </select>
77 77
     <!--学生报告-学科分析-题型分析-->
78 78
     <select id="listSubjectQtypes" resultType="java.util.Map">
79
-        select st.qtypename,st.stuscore,st.stusrate,ct.score,ct.srate,ct.gradescore,ct.gradesrate,ct.classscore,ct.classsrate,ct.qns
79
+        select st.qtypename,st.stuscore,st.stusrate,ct.score,ct.srate,ct.gradescore,ct.gradesrate,ct.gradeavgscore
80
+               ,ct.classscore,ct.classsrate,ct.classavgscore,ct.qns
80 81
         from e_rstudent_qtype st left join e_rclass_qtype ct on st.examid=ct.examid
81 82
             and st.subjectid=ct.subjectid and st.qtypeid=ct.qtypeid and st.classid=ct.classid
82 83
         where st.examid=#{examid} and st.subjectid=#{subjectid} and st.studentid=#{studentid} order by st.erstid
@@ -84,6 +85,7 @@
84 85
     <!--学生报告-学科分析-试题分析(附件)-->
85 86
     <select id="listSubjectQuestionsForFj" resultType="java.util.Map">
86 87
         select sq.qn,sq.qorder,sq.stuscore,sq.qscore,cq.qtypename,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate
88
+               ,cq.gradeavgscore,cq.classavgscore
87 89
         from e_paper_student_question sq left join e_paper_student ps on sq.epsid=ps.epsid
88 90
         left join e_rclass_question cq on ps.examid=cq.examid and sq.eptqid=cq.eptqid and sq.classid=cq.classid
89 91
         and cq.eptqid=cq.eptqid where ps.examid=#{examid} and ps.subjectid=#{subjectid} and sq.studentid=#{studentid} order by sq.eptqid
@@ -94,8 +96,10 @@
94 96
         <result property="qtypename" column="qtypename" />
95 97
         <result property="classscore" column="classscore" />
96 98
         <result property="classsrate" column="classsrate" />
99
+        <result property="classavgscore" column="classavgscore" />
97 100
         <result property="gradescore" column="gradescore" />
98 101
         <result property="gradesrate" column="gradesrate" />
102
+        <result property="gradeavgscore" column="gradeavgscore" />
99 103
         <result property="qscore" column="score" />
100 104
         <result property="epid" column="epid" />
101 105
         <result property="qn" column="qn" />
@@ -109,7 +113,7 @@
109 113
     </resultMap>
110 114
     <select id="listSubjectQuestionsForTk" resultMap="listSubjectQuesTk">
111 115
         select cq.questionid,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate,cq.qtypename,cq.score,
112
-        cq.epid,cq.qn,ps.studentid from e_rclass_question cq
116
+        cq.epid,cq.qn,ps.studentid,cq.classavgscore,cq.gradeavgscore from e_rclass_question cq
113 117
         left join e_paper_student ps on cq.epid=ps.epid and cq.classid=ps.classid
114 118
         where  cq.epid=#{epid} and ps.studentid=#{studentid} order by cq.qorder
115 119
     </select>

Loading…
Cancel
Save