|
@@ -459,7 +459,11 @@ public class StudentAttendanceController {
|
|
|
if (errorList.isEmpty()) {
|
|
|
result.getDailyErrorList().add(0);
|
|
|
} else {
|
|
|
- result.getDailyErrorList().add(errorList.size());
|
|
|
+ //TODO未打卡的异常去重(以防万一)
|
|
|
+ Set<String> uniqueErrorStudents = normalList.stream()
|
|
|
+ .map(StudentAttendanceDO::getUserNumber) // 获取学生名字
|
|
|
+ .collect(Collectors.toSet()); // 转换为 Set 去重
|
|
|
+ result.getDailyErrorList().add(uniqueErrorStudents.size());
|
|
|
}
|
|
|
|
|
|
if (excuseList.isEmpty()) {
|
|
@@ -493,8 +497,12 @@ public class StudentAttendanceController {
|
|
|
Set<String> uniqueNormalStudents = normalList.stream()
|
|
|
.map(StudentAttendanceDO::getUserNumber) // 获取学生名字
|
|
|
.collect(Collectors.toSet()); // 转换为 Set 去重
|
|
|
+ //TODO未打卡的异常去重(以防万一)
|
|
|
+ Set<String> uniqueErrorStudents = normalList.stream()
|
|
|
+ .map(StudentAttendanceDO::getUserNumber) // 获取学生名字
|
|
|
+ .collect(Collectors.toSet()); // 转换为 Set 去重
|
|
|
|
|
|
- Integer errorNum =errorList.size();
|
|
|
+ Integer errorNum =uniqueErrorStudents.size();
|
|
|
Integer normalNum =uniqueNormalStudents.size();
|
|
|
Integer excuseNum =excuseList.size();
|
|
|
weekendAttendanceResVO result = new weekendAttendanceResVO();
|