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

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

@@ -217,7 +217,7 @@
217 217
 
218 218
     <select id="listByExamId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
219 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 221
         <foreach collection="epids" item="epid" open="and epid in(" separator="," close=")">
222 222
             ${epid}
223 223
         </foreach>
@@ -225,7 +225,7 @@
225 225
     <!--考试试卷学生-->
226 226
     <select id="listByExamAndSubjectId" resultType="com.xhkjedu.sexam.model.reportstu.ERstudent">
227 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 229
         <if test="subjectid!='zf'">
230 230
             and subjectid=#{subjectid}
231 231
         </if>

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

@@ -247,12 +247,12 @@
247 247
         ,(select count(*) from l_course_section_chatroom c where c.sectionid=css2.sectionid and c.userid=css2.studentid)msgnum
248 248
         ,(select count(*) from l_course_section_playback_see s where s.sectionid=css2.sectionid and s.userid=css2.studentid)seenum
249 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 251
         <if test="coursetype==0">
252
-            ,css.classid
252
+            ,css.classid,sum(css.totaltime)totaltime
253 253
         </if>
254 254
         <if test="coursetype==1">
255
-            ,max(cs.classid)classid
255
+            ,max(cs.classid)classid,sum(css.totaltime)/count(cc.ccid) totaltime
256 256
         </if>
257 257
         from l_course_section_student css
258 258
         <if test="coursetype==1">

Loading…
Cancel
Save