Browse Source

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

tags/正式版本
雍文秀 2 years ago
parent
commit
1ea64e7df0

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java View File

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

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml View File

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

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

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

Loading…
Cancel
Save