3 天以前 b852254d90e7d1955db31db154193ec8ee84d8b3
yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/listener/HrmAttendanceExceptionStatusListener.java
@@ -56,11 +56,15 @@
        // 更新审批状态
        attendanceExceptionService.updateAttendanceExceptionAuditStatus(exceptionId, auditStatus);
        // 补卡审批通过后,更新考勤记录
        if (HrmAttendanceExceptionTypeEnum.SUPPLEMENT.getType().equals(exception.getType())
                && HrmAuditStatusEnum.APPROVE.getStatus().equals(auditStatus)) {
            log.info("[onApplicationEvent] 补卡申请({}) 审批通过,开始更新考勤记录", exceptionId);
            attendanceRecordService.supplementClockIn(exception);
        // 补卡/加班审批通过后,更新考勤记录(补卡回填上下班时间,加班回写加班时长)
        if (HrmAuditStatusEnum.APPROVE.getStatus().equals(auditStatus)) {
            if (HrmAttendanceExceptionTypeEnum.SUPPLEMENT.getType().equals(exception.getType())) {
                log.info("[onApplicationEvent] 补卡申请({}) 审批通过,开始更新考勤记录", exceptionId);
                attendanceRecordService.supplementClockIn(exception);
            } else if (HrmAttendanceExceptionTypeEnum.OVERTIME.getType().equals(exception.getType())) {
                log.info("[onApplicationEvent] 加班申请({}) 审批通过,开始回写加班时长", exceptionId);
                attendanceRecordService.recordOvertime(exception);
            }
        }
    }