zouyu
6 天以前 79f9c8f092ccc4160e7732bf3f94a2b7ae750617
人员考勤:导出数据与天数不对应问题修复
已修改1个文件
9 ■■■■ 文件已修改
performance-server/src/main/java/com/ruoyi/performance/service/impl/StaffAttendanceTrackingRecordServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/ruoyi/performance/service/impl/StaffAttendanceTrackingRecordServiceImpl.java
@@ -472,8 +472,10 @@
                AtomicInteger maternityLeaveCount = new AtomicInteger(0);//产假天数
                AtomicInteger attendanceDayCount = new AtomicInteger(0);//出勤天数
                AtomicDouble attendanceWorkHourCount = new AtomicDouble(0D);//出勤总时间
                for (int j = 0; j < shiftMapDtos.size(); j++) {
                    PerformanceShiftMapDto shiftMapDto = shiftMapDtos.get(j);
                for (int j = 0; j < attendanceDateList.size(); j++) {
                    LocalDate localDate = attendanceDateList.get(j);
                    PerformanceShiftMapDto shiftMapDto = shiftMapDtos.stream().filter(f -> f.getWorkTime().toLocalDate().equals(localDate)).findFirst().orElse(null);
                    if(Objects.nonNull(shiftMapDto)){
                    //统计各假期和公差的天数
                    if(StringUtils.contains(shiftMapDto.getShiftName(),holidayLeaveKeyword)){
                        holidayCount.getAndIncrement();
@@ -517,6 +519,9 @@
                            annotationTextList.add(new StaffAttendanceAnnotationTextExcelData(i,j,shiftMapDto.getAnnotationText()));
                        }
                    }
                    }else{
                        shiftList.add("");
                    }
                }
                if(StringUtils.isNoneBlank(staffAttendanceDTO.getAttendanceReportType()) && StringUtils.equals(staffAttendanceDTO.getAttendanceReportType(), CalendarType.MONTH.name())){
                    attendanceExcelData.setShiftList(shiftList);