浏览代码

Merge remote-tracking branch 'origin/master' into ywx

tags/正式版本
雍文秀 2 年前
父节点
当前提交
1ea64e7df0

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java 查看文件

@@ -153,11 +153,14 @@ public class EReportStudentService {
153 153
      **/
154 154
     public List<Map> listSubjectQuestions(Integer examid, Integer studentid, String subjectid) {
155 155
         List<Map> list = eRstudentMapper.listSubjectQuestions(examid, studentid, subjectid);
156
+        Double paperscore = list.stream().mapToDouble(s -> Double.parseDouble(s.get("qscore").toString())).sum();
156 157
         for (Map m : list) {
157 158
             Double stuscore = Double.parseDouble(m.get("stuscore").toString());
158 159
             Double qscore = Double.parseDouble(m.get("qscore").toString());
159 160
             Double stusrate = N_Utils.getDoubleDivideAndMulitiply(stuscore, qscore);
160 161
             m.put("stusrate", stusrate);
162
+            Double srate = N_Utils.getDoubleDivideAndMulitiply(qscore,paperscore);
163
+            m.put("srate",srate);
161 164
         }
162 165
         return list;
163 166
     }

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml 查看文件

@@ -210,7 +210,7 @@
210 210
     <!--获取学生试卷基础信息和得分-->
211 211
     <select id="getStudentPaperScore" resultType="java.util.Map">
212 212
         SELECT ps.epsid,ps.epid,ps.studentid,u.username stuname,u.loginname,ps.stuscore,s.subjectid,s.subjectname,
213
-        e.examname,e.gradeid,c.classname,p.ptype,p.hearfile
213
+        e.examname,e.gradeid,c.classname,p.ptype,p.hasfile,p.hearfile,p.hearnum
214 214
         from e_paper_student ps left join e_subject s on ps.esid=s.esid
215 215
         left join e_paper p on ps.epid = p.epid
216 216
         left join e_base e on ps.examid=e.examid

+ 9
- 9
sexam/src/main/resources/mapper/report/ERstudentMapper.xml 查看文件

@@ -56,29 +56,29 @@
56 56
     <select id="listSubjectPoints" resultType="java.util.Map">
57 57
         select sp.pointid,sp.pointname,sp.stuscore,sp.stusrate,cp.score,cp.srate,cp.gradescore,cp.gradesrate,cp.classscore,cp.classsrate,cp.qns
58 58
         from e_rstudent_point sp left join e_rclass_point cp on sp.examid=cp.examid
59
-            and sp.subjectid=cp.subjectid and sp.pointid=cp.pointid
59
+            and sp.subjectid=cp.subjectid and sp.pointid=cp.pointid and sp.classid=cp.classid
60 60
         where sp.examid=#{examid} and sp.subjectid=#{subjectid} and sp.studentid=#{studentid} order by sp.pointid
61 61
     </select>
62 62
     <!--学生报告-学科分析-难易度分析-->
63 63
     <select id="listSubjectComplexitys" resultType="java.util.Map">
64 64
         select sc.complexity,sc.stuscore,sc.stusrate,cc.score,cc.srate,cc.gradescore,cc.gradesrate,cc.classscore,cc.classsrate,cc.qns
65 65
         from e_rstudent_complexity sc left join e_rclass_complexity cc on sc.examid=cc.examid
66
-            and sc.subjectid=cc.subjectid and sc.complexity=cc.complexity
66
+            and sc.subjectid=cc.subjectid and sc.complexity=cc.complexity and sc.classid=cc.classid
67 67
         where sc.examid=#{examid} and sc.subjectid=#{subjectid} and sc.studentid=#{studentid} order by sc.complexity
68 68
     </select>
69 69
     <!--学生报告-学科分析-题型分析-->
70 70
     <select id="listSubjectQtypes" resultType="java.util.Map">
71 71
         select st.qtypename,st.stuscore,st.stusrate,ct.score,ct.srate,ct.gradescore,ct.gradesrate,ct.classscore,ct.classsrate,ct.qns
72 72
         from e_rstudent_qtype st left join e_rclass_qtype ct on st.examid=ct.examid
73
-            and st.subjectid=ct.subjectid and st.qtypeid=ct.qtypeid
74
-        where st.examid=#{examid} and st.subjectid=#{subjectid} and st.studentid=#{studentid}
73
+            and st.subjectid=ct.subjectid and st.qtypeid=ct.qtypeid and st.classid=ct.classid
74
+        where st.examid=#{examid} and st.subjectid=#{subjectid} and st.studentid=#{studentid} order by st.erstid
75 75
     </select>
76 76
     <!--学生报告-学科分析-试题分析-->
77 77
     <select id="listSubjectQuestions" resultType="java.util.Map">
78 78
         select sq.qn,sq.qorder,sq.stuscore,sq.qscore,q.qtypeid,q.qtypename,cq.classscore,cq.classsrate,cq.gradescore,cq.gradesrate
79 79
         from e_paper_student_question sq left join e_paper_student ps on sq.epsid=ps.epsid
80 80
         left join e_paper_qtype_question q on sq.eptqid=q.eptqid
81
-        left join e_rclass_question cq on ps.examid=cq.examid and sq.eptqid=cq.eptqid
81
+        left join e_rclass_question cq on ps.examid=cq.examid and sq.eptqid=cq.eptqid and sq.classid=cq.classid
82 82
         and cq.eptqid=cq.eptqid where ps.examid=#{examid} and ps.subjectid=#{subjectid} and sq.studentid=#{studentid} order by sq.eptqid
83 83
     </select>
84 84
 
@@ -131,7 +131,7 @@
131 131
         cq.classavgscore,cq.gradeavgscore
132 132
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
133 133
         left join t_question mq on q.questionpid=mq.questionid
134
-        left join e_rclass_question cq on sq.eptqid=cq.eptqid
134
+        left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
135 135
         left join e_paper_qtype_question pq on sq.eptqid=pq.eptqid
136 136
         where sq.epid=#{epid} and sq.studentid=#{studentid} GROUP BY sq.epsqid order by sq.qorder,q.sorder
137 137
     </select>
@@ -151,7 +151,7 @@
151 151
     <select id="listStudentQuestionsFj" resultType="java.util.Map">
152 152
         select sq.epsqid,sq.eptqid,sq.ctype,sq.questionid,sq.qn,sq.qorder,sq.qscore,sq.stuscore,sq.answered,
153 153
                sq.answertype,sq.stuanswer,sq.stuanswertxt,cq.classavgscore,cq.gradeavgscore
154
-        from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid
154
+        from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
155 155
         where sq.epid=#{epid} and sq.studentid=#{studentid} group by sq.epsqid order by sq.qorder
156 156
     </select>
157 157
 
@@ -184,7 +184,7 @@
184 184
                cq.classavgscore,cq.gradeavgscore
185 185
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
186 186
         left join t_question mq on q.questionpid=mq.questionid
187
-        left join e_rclass_question cq on sq.eptqid=cq.eptqid
187
+        left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
188 188
         left join e_paper_qtype_question pq on sq.eptqid=pq.eptqid
189 189
         where sq.examid=#{examid} and sq.subjectid=#{subjectid} and sq.studentid=#{studentid} and sq.stuscore &lt; sq.qscore
190 190
         GROUP BY sq.epsqid order by sq.qorder,q.sorder
@@ -195,7 +195,7 @@
195 195
         select sq.epsqid,sq.eptqid,sq.ctype,sq.qn,sq.qorder,sq.qscore,sq.stuscore,sq.answered,
196 196
                sq.answertype,sq.stuanswer,sq.stuanswertxt,q.qtypeid,q.qtypename,q.optionnum,q.answer,
197 197
                cq.classavgscore,cq.gradeavgscore
198
-        from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid
198
+        from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
199 199
         left join e_paper_qtype_question q on sq.eptqid=q.eptqid
200 200
         where sq.examid=#{examid} and sq.subjectid=#{subjectid} and sq.studentid=#{studentid} group by sq.epsqid order by sq.qorder
201 201
 

正在加载...
取消
保存