Browse Source

发布考试完善

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

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java View File

101
 
101
 
102
         //考试学生
102
         //考试学生
103
         students.forEach(s -> s.setExamid(examid));
103
         students.forEach(s -> s.setExamid(examid));
104
-        eClassStudentMapper.insertList(students);
104
+        students = students.stream().filter(s -> !N_Utils.isEmptyInteger(s.getStudentid())).collect(Collectors.toList());
105
+        if(N_Utils.isListNotEmpty(students)) eClassStudentMapper.insertList(students);
105
 
106
 
106
         //考试科目
107
         //考试科目
107
         List<ESubject> subjects = model.getSubjects();//考试科目
108
         List<ESubject> subjects = model.getSubjects();//考试科目

+ 1
- 0
sexam/src/main/resources/mapper/exam/EClassMapper.xml View File

8
         <foreach collection="classids" item="classid" index="index" open="(" separator="," close=")">
8
         <foreach collection="classids" item="classid" index="index" open="(" separator="," close=")">
9
             ${classid}
9
             ${classid}
10
         </foreach>
10
         </foreach>
11
+        and classnum!=0
11
     </select>
12
     </select>
12
     <!--考试班级-->
13
     <!--考试班级-->
13
     <select id="listByExamId" resultType="java.util.Map">
14
     <select id="listByExamId" resultType="java.util.Map">

Loading…
Cancel
Save