|
@@ -1216,33 +1216,39 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
|
|
|
List<TeacherAttendanceWrapper.CourseTeacherAttendance> attendances = attendanceMap.get(dto.getTeacherId());
|
|
|
if(CollectionUtils.isNotEmpty(attendances)){
|
|
|
dto.setTeacherAttendanceStatus(TeacherAttendanceQueryInfo.TeacherAttendanceEnum.NORMAL);
|
|
|
+ int errCourseNum = 0;
|
|
|
att:for (TeacherAttendanceWrapper.CourseTeacherAttendance attendance : attendances) {
|
|
|
if(attendance.getCourseStatus() == CourseStatusEnum.NOT_START){
|
|
|
continue att;
|
|
|
}
|
|
|
if(attendance.getSignInStatus() == 0 || attendance.getSignOutStatus() == 0){
|
|
|
dto.setTeacherAttendanceStatus(TeacherAttendanceQueryInfo.TeacherAttendanceEnum.ERR);
|
|
|
- break att;
|
|
|
+ errCourseNum++;
|
|
|
+ continue att;
|
|
|
}
|
|
|
if(attendance.getTeachMode() == TeachModeEnum.OFFLINE){
|
|
|
if(StringUtils.isEmpty(attendance.getSignInLongitudeLatitude()) || StringUtils.isEmpty(attendance.getSignOutLongitudeLatitude())){
|
|
|
+ errCourseNum++;
|
|
|
+ }else {
|
|
|
//计算考勤范围
|
|
|
School school = idSchoolMap.get(attendance.getSchoolId());
|
|
|
if(school != null){
|
|
|
Boolean signRange = courseScheduleTeacherSalaryService.getSignRange(school.getLongitudeLatitude(), attendance.getSignInLongitudeLatitude(), attendanceRange);
|
|
|
if(!signRange){
|
|
|
dto.setTeacherAttendanceStatus(TeacherAttendanceQueryInfo.TeacherAttendanceEnum.ERR);
|
|
|
- break att;
|
|
|
+ errCourseNum++;
|
|
|
+ continue att;
|
|
|
}
|
|
|
signRange = courseScheduleTeacherSalaryService.getSignRange(school.getLongitudeLatitude(), attendance.getSignOutLongitudeLatitude(), attendanceRange);
|
|
|
if(!signRange){
|
|
|
dto.setTeacherAttendanceStatus(TeacherAttendanceQueryInfo.TeacherAttendanceEnum.ERR);
|
|
|
- break att;
|
|
|
+ errCourseNum++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ dto.setErrCourseNum(errCourseNum);
|
|
|
}
|
|
|
}
|
|
|
if(queryInfo.getTeacherAttendanceStatus() != null){
|