Sfoglia il codice sorgente

发布考试完善

tags/正式版本
雍文秀 2 anni fa
parent
commit
acd97cbe7a

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

@@ -101,7 +101,8 @@ public class EBaseService {
101 101
 
102 102
         //考试学生
103 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 108
         List<ESubject> subjects = model.getSubjects();//考试科目

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

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

Loading…
Annulla
Salva