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
             Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
2283
             Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
2284
             Double tgavgscore = N_Utils.getDoubleDivideForAvg(tgstuscore,qgstulist.size());
2284
             Double tgavgscore = N_Utils.getDoubleDivideForAvg(tgstuscore,qgstulist.size());
2285
 
2285
 
2286
+
2286
             for (Map classm : classes) {
2287
             for (Map classm : classes) {
2287
                 Integer classid = Integer.parseInt(classm.get("classid").toString());
2288
                 Integer classid = Integer.parseInt(classm.get("classid").toString());
2288
                 List<EPaperStudentQuestion> qcstulist = qgstulist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
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
     <select id="listStudentExamHistory" resultType="java.util.Map">
52
     <select id="listStudentExamHistory" resultType="java.util.Map">
53
         select e.examid,e.examdate,s.classrank,s.schoolrank
53
         select e.examid,e.examdate,s.classrank,s.schoolrank
54
         from e_rstudent s LEFT JOIN e_base e on s.examid=e.examid
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
     </select>
56
     </select>
57
 
57
 
58
     <!--学生报告-学科分析-学科名次-->
58
     <!--学生报告-学科分析-学科名次-->
76
     </select>
76
     </select>
77
     <!--学生报告-学科分析-题型分析-->
77
     <!--学生报告-学科分析-题型分析-->
78
     <select id="listSubjectQtypes" resultType="java.util.Map">
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
         from e_rstudent_qtype st left join e_rclass_qtype ct on st.examid=ct.examid
81
         from e_rstudent_qtype st left join e_rclass_qtype ct on st.examid=ct.examid
81
             and st.subjectid=ct.subjectid and st.qtypeid=ct.qtypeid and st.classid=ct.classid
82
             and st.subjectid=ct.subjectid and st.qtypeid=ct.qtypeid and st.classid=ct.classid
82
         where st.examid=#{examid} and st.subjectid=#{subjectid} and st.studentid=#{studentid} order by st.erstid
83
         where st.examid=#{examid} and st.subjectid=#{subjectid} and st.studentid=#{studentid} order by st.erstid
84
     <!--学生报告-学科分析-试题分析(附件)-->
85
     <!--学生报告-学科分析-试题分析(附件)-->
85
     <select id="listSubjectQuestionsForFj" resultType="java.util.Map">
86
     <select id="listSubjectQuestionsForFj" resultType="java.util.Map">
86
         select sq.qn,sq.qorder,sq.stuscore,sq.qscore,cq.qtypename,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate
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
         from e_paper_student_question sq left join e_paper_student ps on sq.epsid=ps.epsid
89
         from e_paper_student_question sq left join e_paper_student ps on sq.epsid=ps.epsid
88
         left join e_rclass_question cq on ps.examid=cq.examid and sq.eptqid=cq.eptqid and sq.classid=cq.classid
90
         left join e_rclass_question cq on ps.examid=cq.examid and sq.eptqid=cq.eptqid and sq.classid=cq.classid
89
         and cq.eptqid=cq.eptqid where ps.examid=#{examid} and ps.subjectid=#{subjectid} and sq.studentid=#{studentid} order by sq.eptqid
91
         and cq.eptqid=cq.eptqid where ps.examid=#{examid} and ps.subjectid=#{subjectid} and sq.studentid=#{studentid} order by sq.eptqid
94
         <result property="qtypename" column="qtypename" />
96
         <result property="qtypename" column="qtypename" />
95
         <result property="classscore" column="classscore" />
97
         <result property="classscore" column="classscore" />
96
         <result property="classsrate" column="classsrate" />
98
         <result property="classsrate" column="classsrate" />
99
+        <result property="classavgscore" column="classavgscore" />
97
         <result property="gradescore" column="gradescore" />
100
         <result property="gradescore" column="gradescore" />
98
         <result property="gradesrate" column="gradesrate" />
101
         <result property="gradesrate" column="gradesrate" />
102
+        <result property="gradeavgscore" column="gradeavgscore" />
99
         <result property="qscore" column="score" />
103
         <result property="qscore" column="score" />
100
         <result property="epid" column="epid" />
104
         <result property="epid" column="epid" />
101
         <result property="qn" column="qn" />
105
         <result property="qn" column="qn" />
109
     </resultMap>
113
     </resultMap>
110
     <select id="listSubjectQuestionsForTk" resultMap="listSubjectQuesTk">
114
     <select id="listSubjectQuestionsForTk" resultMap="listSubjectQuesTk">
111
         select cq.questionid,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate,cq.qtypename,cq.score,
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
         left join e_paper_student ps on cq.epid=ps.epid and cq.classid=ps.classid
117
         left join e_paper_student ps on cq.epid=ps.epid and cq.classid=ps.classid
114
         where  cq.epid=#{epid} and ps.studentid=#{studentid} order by cq.qorder
118
         where  cq.epid=#{epid} and ps.studentid=#{studentid} order by cq.qorder
115
     </select>
119
     </select>

Loading…
Cancel
Save