Browse Source

考试报告,课节观看列表

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

+ 6
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

140
             cs.setClassid(list.get(0).getClassid());
140
             cs.setClassid(list.get(0).getClassid());
141
             cs.setStudentid(studentid);
141
             cs.setStudentid(studentid);
142
             cs.setScore(list.stream().mapToDouble(s -> s.getScore()).sum());
142
             cs.setScore(list.stream().mapToDouble(s -> s.getScore()).sum());
143
+            cs.setSstate(list.stream().max(Comparator.comparing(ERstudent::getSstate)).get().getSstate());
143
             schoolStudents.add(cs);
144
             schoolStudents.add(cs);
144
         }
145
         }
145
         Map<Integer, List<ERstudent>> cCollect = students.stream().collect(Collectors.groupingBy(s -> s.getClassid()));
146
         Map<Integer, List<ERstudent>> cCollect = students.stream().collect(Collectors.groupingBy(s -> s.getClassid()));
219
                 cs.setSubjectid(subjectid);
220
                 cs.setSubjectid(subjectid);
220
                 cs.setSubjectname(subjectname);
221
                 cs.setSubjectname(subjectname);
221
                 cs.setScore(csEntry.getValue().stream().mapToDouble(s -> s.getScore()).sum());
222
                 cs.setScore(csEntry.getValue().stream().mapToDouble(s -> s.getScore()).sum());
223
+                cs.setSstate(csEntry.getValue().get(0).getSstate());
222
                 rstudents.add(cs);
224
                 rstudents.add(cs);
223
             }
225
             }
224
             setRank(rstudents, schoolSubStuRank, 2);//学校科目学生分数排名
226
             setRank(rstudents, schoolSubStuRank, 2);//学校科目学生分数排名
318
         rs.setDfrate(N_Utils.getIntegerDivideAndMulitiply(dfnum, stunum));
320
         rs.setDfrate(N_Utils.getIntegerDivideAndMulitiply(dfnum, stunum));
319
         double qkbzc = ExamUtil.standardDiviation(scores);
321
         double qkbzc = ExamUtil.standardDiviation(scores);
320
         rs.setBzc(qkbzc);
322
         rs.setBzc(qkbzc);
321
-        int sknum = list.size();
323
+        int sknum = list.stream().filter(l -> l.getSstate() == 2)
324
+                .map(l -> l.getStudentid()).distinct().collect(Collectors.toList()).size();
322
         rs.setStunum(sknum);//实考人数
325
         rs.setStunum(sknum);//实考人数
323
         rs.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
326
         rs.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
324
         subjectList.add(rs);
327
         subjectList.add(rs);
340
             rc.setClassavgscore(N_Utils.formatDouble(claStatistics.getAverage(), 2));
343
             rc.setClassavgscore(N_Utils.formatDouble(claStatistics.getAverage(), 2));
341
             rc.setSchoolmaxscore(maxscore);
344
             rc.setSchoolmaxscore(maxscore);
342
             rc.setSchoolavgscore(N_Utils.formatDouble(statistics.getAverage(), 2));
345
             rc.setSchoolavgscore(N_Utils.formatDouble(statistics.getAverage(), 2));
343
-            sknum = rstudentList.size();
346
+            sknum = rstudentList.stream().filter(l -> l.getSstate() == 2)
347
+                    .map(l -> l.getStudentid()).distinct().collect(Collectors.toList()).size();
344
             rc.setStunum(sknum);//实考人数
348
             rc.setStunum(sknum);//实考人数
345
             rc.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
349
             rc.setMissnum(stunum - sknum);//缺考人数=计划人数-实考人数
346
             yxnum = rstudentList.stream().filter(l -> l.getScore().compareTo(yxscore) != -1)
350
             yxnum = rstudentList.stream().filter(l -> l.getScore().compareTo(yxscore) != -1)

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

217
 
217
 
218
     <select id="listByExamId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
218
     <select id="listByExamId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
219
         select classid,examid,subjectid,studentid,stuscore score,sstate
219
         select classid,examid,subjectid,studentid,stuscore score,sstate
220
-        from e_paper_student where examid=#{examid} and sstate!=0
220
+        from e_paper_student where examid=#{examid}
221
         <foreach collection="epids" item="epid" open="and epid in(" separator="," close=")">
221
         <foreach collection="epids" item="epid" open="and epid in(" separator="," close=")">
222
             ${epid}
222
             ${epid}
223
         </foreach>
223
         </foreach>
225
     <!--考试试卷学生-->
225
     <!--考试试卷学生-->
226
     <select id="listByExamAndSubjectId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
226
     <select id="listByExamAndSubjectId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
227
         select classid,examid,subjectid,studentid,stuscore score,sstate
227
         select classid,examid,subjectid,studentid,stuscore score,sstate
228
-        from e_paper_student where examid=#{examid} and sstate!=0
228
+        from e_paper_student where examid=#{examid}
229
         <if test="subjectid!='zf'">
229
         <if test="subjectid!='zf'">
230
             and subjectid=#{subjectid}
230
             and subjectid=#{subjectid}
231
         </if>
231
         </if>

+ 3
- 3
slive/src/main/resources/mapper/liveplay/CourseSectionMapper.xml View File

247
         ,(select count(*) from l_course_section_chatroom c where c.sectionid=css2.sectionid and c.userid=css2.studentid)msgnum
247
         ,(select count(*) from l_course_section_chatroom c where c.sectionid=css2.sectionid and c.userid=css2.studentid)msgnum
248
         ,(select count(*) from l_course_section_playback_see s where s.sectionid=css2.sectionid and s.userid=css2.studentid)seenum
248
         ,(select count(*) from l_course_section_playback_see s where s.sectionid=css2.sectionid and s.userid=css2.studentid)seenum
249
         ,c.gradeid,c.classname,(select s.schoolname from t_school s where s.schoolid=c.schoolid)schoolname
249
         ,c.gradeid,c.classname,(select s.schoolname from t_school s where s.schoolid=c.schoolid)schoolname
250
-        from(select css.courseid,css.studentid,css.sectionid,min(css.tostamp)tostamp,sum(css.totaltime)totaltime
250
+        from(select css.courseid,css.studentid,css.sectionid,min(css.tostamp)tostamp
251
         <if test="coursetype==0">
251
         <if test="coursetype==0">
252
-            ,css.classid
252
+            ,css.classid,sum(css.totaltime)totaltime
253
         </if>
253
         </if>
254
         <if test="coursetype==1">
254
         <if test="coursetype==1">
255
-            ,max(cs.classid)classid
255
+            ,max(cs.classid)classid,sum(css.totaltime)/count(cc.ccid) totaltime
256
         </if>
256
         </if>
257
         from l_course_section_student css
257
         from l_course_section_student css
258
         <if test="coursetype==1">
258
         <if test="coursetype==1">

Loading…
Cancel
Save