|
@@ -23,6 +23,7 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -80,6 +81,9 @@ public class TeacherAttendanceController extends BaseController {
|
|
public HttpResponseResult studentAttendanceNormalRemind(Long courseId){
|
|
public HttpResponseResult studentAttendanceNormalRemind(Long courseId){
|
|
//获取正常签到的学生信息
|
|
//获取正常签到的学生信息
|
|
List<StudentAttendance> studentAttendances = studentAttendanceDao.findByCourseId(courseId);
|
|
List<StudentAttendance> studentAttendances = studentAttendanceDao.findByCourseId(courseId);
|
|
|
|
+ if(CollectionUtils.isEmpty(studentAttendances)){
|
|
|
|
+ return succeed();
|
|
|
|
+ }
|
|
List<StudentAttendance> normal = studentAttendances.stream().filter(studentAttendance -> studentAttendance.getStatus() == StudentAttendanceStatusEnum.NORMAL).collect(Collectors.toList());
|
|
List<StudentAttendance> normal = studentAttendances.stream().filter(studentAttendance -> studentAttendance.getStatus() == StudentAttendanceStatusEnum.NORMAL).collect(Collectors.toList());
|
|
if (normal != null && normal.size() > 0) {
|
|
if (normal != null && normal.size() > 0) {
|
|
Map<Integer, String> receivers = new HashMap<>();
|
|
Map<Integer, String> receivers = new HashMap<>();
|