|
@@ -80,7 +80,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
- public void addStudentAttendances(StudentAttendanceDto studentAttendanceInfos) {
|
|
|
+ public Map<String, Object> addStudentAttendances(StudentAttendanceDto studentAttendanceInfos) {
|
|
|
List<StudentAttendance> studentAttendances = studentAttendanceInfos.getStudentAttendances();
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
if (Objects.isNull(sysUser)) {
|
|
@@ -174,8 +174,11 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
courseSchedule.setLeaveStudentNum(leaveStudentNum);
|
|
|
courseScheduleDao.update(courseSchedule);
|
|
|
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+
|
|
|
if (!courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.VIP)) {
|
|
|
- return;
|
|
|
+ result.put("status",1);
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isBlank(studentAttendanceInfos.getSignInLongitudeLatitude())) {
|
|
@@ -205,6 +208,12 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(StringUtils.isEmpty(studentAttendanceInfos.getRemark())&&!isInScore){
|
|
|
+ //当前为异常签到,请填写原因!
|
|
|
+ result.put("status",2);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
TeacherAttendance teacherAttendance = teacherAttendanceDao.findByTeacherAttendanceInfo(sysUser.getId().longValue(), courseSchedule.getId());
|
|
|
|
|
|
teacherAttendance.setSignInLongitudeLatitude(studentAttendanceInfos.getSignInLongitudeLatitude());
|
|
@@ -226,6 +235,10 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
} else {
|
|
|
teacherAttendanceDao.insert(teacherAttendance);
|
|
|
}
|
|
|
+
|
|
|
+ result.put("status",0);
|
|
|
+ result.put("currentTime",date);
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|