|
@@ -43,6 +43,8 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
@Autowired
|
|
|
private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
@Autowired
|
|
|
+ private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
|
|
|
+ @Autowired
|
|
|
private ClassGroupDao classGroupDao;
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
@@ -231,6 +233,12 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
if(Objects.isNull(courseSchedule)){
|
|
|
throw new BizException("课程不存在");
|
|
|
}
|
|
|
+
|
|
|
+ List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(studentAttendanceInfo.getCourseScheduleId());
|
|
|
+ if(CollectionUtils.isEmpty(courseScheduleTeacherSalaries)&&Objects.nonNull(courseScheduleTeacherSalaries.get(0).getSettlementTime())){
|
|
|
+ throw new BizException("此课程已结算");
|
|
|
+ }
|
|
|
+
|
|
|
List<Integer> userIds = studentAttendances.stream().map(StudentAttendance::getUserId).collect(Collectors.toList());
|
|
|
studentAttendanceDao.deleteStudentAttendancesByCourseAndUsers(studentAttendanceInfo.getCourseScheduleId().longValue(),userIds);
|
|
|
for (StudentAttendance studentAttendance : studentAttendances) {
|