Selaa lähdekoodia

教师考勤查询

dzx 1 kuukausi sitten
vanhempi
commit
793a2c0ce7

+ 3 - 1
src/main/java/com/xjrsoft/module/attendance/service/impl/AttendanceStatisticsServiceImpl.java

@@ -216,6 +216,8 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
 
             //3.5、循环计算,并存入insertList,方便后续批量入库
             List<AttendanceStatisticsRecord> insertList = new ArrayList<>();
+            List<String> leaveTypeList = new ArrayList<>();
+            leaveTypeList.add("事假");leaveTypeList.add("公假");leaveTypeList.add("病假");leaveTypeList.add("会议活动");
             for (User user : userList) {
                 AttendanceStatisticsRecord record = new AttendanceStatisticsRecord();
                 record.setUserId(user.getId());
@@ -249,7 +251,7 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
                         if("到校".equals(attendanceRecord.getAttendanceStatus())){
                             normalCount ++;
                             content += "正常(" + attendanceRecord.getRecordTime().toLocalTime().format(timeDtf) + ")";
-                        }else if("请假".equals(attendanceRecord.getAttendanceStatus())){
+                        }else if(leaveTypeList.contains(attendanceRecord.getAttendanceStatus())){
                             leaveCount ++;
                             content += "请假";
                         }else{