wangliang 4 년 전
부모
커밋
d927f7f099
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      themis-business/src/main/java/com/qmth/themis/business/templete/service/impl/TempleteLogicServiceImpl.java

+ 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());