Crazy před 4 měsíci
rodič
revize
cea8bb89a4

+ 3 - 1
yudao-module-md/yudao-module-md-biz/src/main/java/Acs/EventSearch.java

@@ -33,6 +33,7 @@ import java.util.Collections;
 import java.util.List;
 
 import cn.iocoder.yudao.module.md.service.*;
+import org.jetbrains.annotations.Nullable;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
@@ -57,7 +58,8 @@ public final class EventSearch {
      * @throws InterruptedException
      */
 
-    public static List<Object> searchAllEvent(int lUserID ,AdminUserService adminUserService,StudentAttendanceService studentAttendanceService, FileApi fileApi) throws UnsupportedEncodingException, InterruptedException {
+    @Nullable
+    public static List<Object> searchAllEvent(int lUserID , AdminUserService adminUserService, StudentAttendanceService studentAttendanceService, FileApi fileApi) throws UnsupportedEncodingException, InterruptedException {
         int i = 0; //事件条数
         HCNetSDK.NET_DVR_ACS_EVENT_COND struAcsEventCond = new HCNetSDK.NET_DVR_ACS_EVENT_COND();
         struAcsEventCond.read();

+ 0 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java

@@ -293,7 +293,6 @@ public class DeptController {
             }
             double graduationRate = 0.0;
 
-            //TODO
             List<AdminUserDO> filteredStudents = studentList.stream()
                     .filter(student -> {
                         if (student.getGrade() != null) {
@@ -313,7 +312,6 @@ public class DeptController {
                         return false;
                     })
                     .collect(Collectors.toList());
-            System.out.println("SHANGDASDAS"+filteredStudents);
 
             long totalStudents = filteredStudents.size();
             long graduatedStudents = filteredStudents.stream()

+ 10 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentAttendance/StudentAttendanceController.java

@@ -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();