|
@@ -157,7 +157,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
if(!CollectionUtils.isEmpty(examRoomStudentRelations)){
|
|
|
examRoomStudentRelationDao.batchInsert(examRoomStudentRelations);
|
|
|
examTeacherSalaryService.teacherSalarySettlementWithExam(examRoom.getExaminationBasicId());
|
|
|
- examRoom.setExamRoomStudentNum(examRoom.getExamRoomStudentNum()+examRoomStudentRelations.size());
|
|
|
+ examRoom.setExamRoomStudentNum(examRoomStudentRelationDao.countStudentsWithRoom(examRoom.getId()));
|
|
|
examRoomDao.update(examRoom);
|
|
|
}
|
|
|
if(!CollectionUtils.isEmpty(studentExamResults)){
|
|
@@ -219,6 +219,9 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
studentExamResult.setExamRoomId(examRoomId);
|
|
|
studentExamResultDao.update(studentExamResult);
|
|
|
+
|
|
|
+ examRoom.setExamRoomStudentNum(examRoomStudentRelationDao.countStudentsWithRoom(examRoom.getId()));
|
|
|
+ examRoomDao.update(examRoom);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -290,8 +293,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
List<Long> registIds = Arrays.asList(registIdsStr.split(",")).stream().map(e -> Long.valueOf(e)).collect(Collectors.toList());
|
|
|
examRoomStudentRelationDao.deleteStudentsFromExamRoom(examRoomId, registIds);
|
|
|
studentExamResultDao.deleteWithRegists(registIds);
|
|
|
- int deleteNum = examCertificationService.deleteWithRegist(registIds);
|
|
|
- examRoom.setExamRoomStudentNum(examRoom.getExamRoomStudentNum()-deleteNum);
|
|
|
+ examRoom.setExamRoomStudentNum(examRoomStudentRelationDao.countStudentsWithRoom(examRoom.getId()));
|
|
|
examRoomDao.update(examRoom);
|
|
|
examTeacherSalaryService.teacherSalarySettlementWithExam(examRoom.getExaminationBasicId());
|
|
|
}
|