|
@@ -862,20 +862,27 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
int currentCourseError = indexBaseMonthDataDao.getCurrentCourseError(month,organIdList);
|
|
|
fourChild.add(new IndexErrInfoDto(IndexErrorType.CURRENT_COURSE_ERROR, currentCourseError));
|
|
|
});
|
|
|
-
|
|
|
- //课程考勤异常
|
|
|
- int teacherAttendanceError = 0;
|
|
|
- int studentAttendanceError = 0;
|
|
|
- int noAttendance = 0;
|
|
|
- if(classGroupIds == null || classGroupIds.size() > 0){
|
|
|
- teacherAttendanceError = indexBaseMonthDataDao.getTeacherAttendanceError(organIds,startTime,classGroupIds,tenantId);
|
|
|
- studentAttendanceError = indexBaseMonthDataDao.getStudentAttendanceError(organIds,startTime,classGroupIds,tenantId);
|
|
|
- noAttendance = indexBaseMonthDataDao.getNoAttendance(organIds,startTime,classGroupIds,tenantId);
|
|
|
+ CompletableFuture future2 = null;
|
|
|
+ if(classGroupIds == null || classGroupIds.size() > 0) {
|
|
|
+ future2 = this.async(() -> {
|
|
|
+ //课程考勤异常
|
|
|
+ int teacherAttendanceError = indexBaseMonthDataDao.getTeacherAttendanceError(organIdList, startTime, classGroupIdList, tenantId);
|
|
|
+ int studentAttendanceError = indexBaseMonthDataDao.getStudentAttendanceError(organIdList, startTime, classGroupIdList, tenantId);
|
|
|
+ int noAttendance = indexBaseMonthDataDao.getNoAttendance(organIdList, startTime, classGroupIdList, tenantId);
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, teacherAttendanceError));
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_EXCEPTION_ATTENDANCE, studentAttendanceError));
|
|
|
+ //课程异常
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, noAttendance));
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, 0));
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_EXCEPTION_ATTENDANCE, 0));
|
|
|
+ //课程异常
|
|
|
+ fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS, 0));
|
|
|
+ }
|
|
|
+ if(classGroupIds == null || classGroupIds.size() > 0) {
|
|
|
+ future2.join();
|
|
|
}
|
|
|
- fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_EXCEPTION_ATTENDANCE, teacherAttendanceError));
|
|
|
- fourChild.add(new IndexErrInfoDto(IndexErrorType.STUDENT_EXCEPTION_ATTENDANCE, studentAttendanceError));
|
|
|
- //课程异常
|
|
|
- fourChild.add(new IndexErrInfoDto(IndexErrorType.TEACHER_NOT_A_CLASS,noAttendance));
|
|
|
future1.join();
|
|
|
four.setNum(fourChild.stream().mapToInt(IndexErrInfoDto::getNum).sum());
|
|
|
four.setResult(fourChild);
|