wangliang 4 年之前
父節點
當前提交
d927f7f099

+ 3 - 1
themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java

@@ -124,7 +124,9 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
                         teExamStudent.setClassNo(examStudentImportDto.getClassNo());
                         teExamStudent.setRoomCode(examStudentImportDto.getRoomCode());
                         teExamStudent.setRoomName(examStudentImportDto.getRoomName());
-                        teExamStudent.setExamActivityId(teExamActivity.getId());
+                        if (Objects.nonNull(teExamActivity)) {
+                            teExamStudent.setExamActivityId(teExamActivity.getId());
+                        }
                     }
                     teExamStudentService.saveOrUpdate(teExamStudent);
                     roomCodeAndNameSet.add(teExamStudent.getRoomCode() + ":" + teExamStudent.getRoomName());