yudao-module-hrm/src/main/java/cn/iocoder/yudao/module/hrm/service/attendance/HrmAttendanceExceptionServiceImpl.java
@@ -9,6 +9,7 @@
import cn.iocoder.yudao.module.hrm.controller.admin.attendance.vo.HrmAttendanceExceptionSaveReqVO;
import cn.iocoder.yudao.module.hrm.dal.dataobject.attendance.HrmAttendanceExceptionDO;
import cn.iocoder.yudao.module.hrm.dal.mysql.attendance.HrmAttendanceExceptionMapper;
import cn.iocoder.yudao.module.system.api.storage.StorageAttachmentApi;
import cn.iocoder.yudao.module.hrm.dal.redis.HrmNoRedisDAO;
import cn.iocoder.yudao.module.hrm.enums.HrmAuditStatusEnum;
import jakarta.annotation.Resource;
@@ -39,6 +40,8 @@
    @Resource
    private BpmProcessInstanceApi bpmProcessInstanceApi;
    @Resource
    private StorageAttachmentApi storageAttachmentApi;
    @Resource
    private BpmProcessDefinitionService bpmProcessDefinitionService;
    @Override
@@ -47,6 +50,8 @@
        attendanceException.setNo(generateNo());
        attendanceException.setStatus(HrmAuditStatusEnum.DRAFT.getStatus());
        attendanceExceptionMapper.insert(attendanceException);
        storageAttachmentApi.bindAttachments("file", "hrm_attendance_exception",
                attendanceException.getId(), createReqVO.getBlobIds());
        return attendanceException.getId();
    }
@@ -59,11 +64,17 @@
        validateAttendanceExceptionExists(updateReqVO.getId());
        HrmAttendanceExceptionDO updateObj = BeanUtils.toBean(updateReqVO, HrmAttendanceExceptionDO.class);
        attendanceExceptionMapper.updateById(updateObj);
        if (updateReqVO.getBlobIds() != null) {
            storageAttachmentApi.deleteAttachmentsByRecord("hrm_attendance_exception", updateReqVO.getId());
            storageAttachmentApi.bindAttachments("file", "hrm_attendance_exception",
                    updateReqVO.getId(), updateReqVO.getBlobIds());
        }
    }
    @Override
    public void deleteAttendanceException(Long id) {
        validateAttendanceExceptionExists(id);
        storageAttachmentApi.deleteAttachmentsByRecord("hrm_attendance_exception", id);
        attendanceExceptionMapper.deleteById(id);
    }