| | |
| | | /** |
| | | * 考勤异常申请 Service 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Service |
| | | @Validated |
| | |
| | | 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()); |
| | | } |
| | | storageAttachmentApi.updateAttachments("file", "hrm_attendance_exception", updateReqVO.getId(), updateReqVO.getBlobIds()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | // 2. 校验流程定义存在且为激活状态 |
| | | // 全局免审批:业务校验通过后直接执行审批通过逻辑,无需流程模型。 |
| | | if (bpmProcessInstanceApi.isGlobalAutoApprove()) { |
| | | attendanceExceptionMapper.updateById(HrmAttendanceExceptionDO.builder() |
| | | .id(id) |
| | | .processInstanceId("") |
| | | .status(HrmAuditStatusEnum.PROCESS.getStatus()) |
| | | .build()); |
| | | updateAttendanceExceptionAuditStatus(id, HrmAuditStatusEnum.APPROVE.getStatus()); |
| | | return; |
| | | } |
| | | |
| | | if (processDefinitionKey != null) { |
| | | bpmProcessDefinitionService.getActiveProcessDefinition(processDefinitionKey); |
| | | } |