BAOLH
2025-11-27 3da564c545375e4e1403455652a0a2babf6923f0
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/service/impl/AttendanceLeaveServiceImpl.java
@@ -561,11 +561,14 @@
        LocalDateTime endLocalDateTime = localDateTime.withDayOfMonth(1).plusMonths(1).minusDays(1).withHour(23).withMinute(59).withSecond(59);
        // 因换休3个月后会被结算,只能统计未结算的,仅当前时间3个月内(只参考月份)的可统计。
        LocalDateTime nowLocalDateTime = localDateTime.now().minusMonths(2L).withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0);
        if (nowLocalDateTime.isBefore(startLocalDateTime) || nowLocalDateTime.isAfter(endLocalDateTime)) {
            return Double.valueOf(0);
        LocalDateTime currentStartLocalDateTime = localDateTime.now().minusMonths(2L).withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).withNano(0);
        LocalDateTime currentEndLocalDateTime = localDateTime.now().withDayOfMonth(1).plusMonths(1).minusDays(1).withHour(23).withMinute(59).withSecond(59).withNano(0);
        Calculate finalCalculate = new Calculate(currentStartLocalDateTime, currentEndLocalDateTime).getOverlap(new Calculate(startLocalDateTime, endLocalDateTime));
        if (finalCalculate != null) {
            startLocalDateTime = finalCalculate.getStart();
            endLocalDateTime = finalCalculate.getEnd();
        } else {
            startLocalDateTime = nowLocalDateTime;
            return Double.valueOf(0);
        }
        // 查询可用调休申请