| | |
| | | |
| | | @Override |
| | | public void updateAttendanceException(HrmAttendanceExceptionSaveReqVO updateReqVO) { |
| | | validateAttendanceExceptionExists(updateReqVO.getId()); |
| | | HrmAttendanceExceptionDO attendanceException = validateAttendanceExceptionExists(updateReqVO.getId()); |
| | | if (!HrmAuditStatusEnum.DRAFT.getStatus().equals(attendanceException.getStatus())) { |
| | | throw exception(ATTENDANCE_EXCEPTION_UPDATE_FAIL_NOT_DRAFT); |
| | | } |
| | | HrmAttendanceExceptionDO updateObj = BeanUtils.toBean(updateReqVO, HrmAttendanceExceptionDO.class); |
| | | attendanceExceptionMapper.updateById(updateObj); |
| | | storageAttachmentApi.updateAttachments("file", "hrm_attendance_exception", updateReqVO.getId(), updateReqVO.getBlobIds()); |
| | |
| | | |
| | | @Override |
| | | public void deleteAttendanceException(Long id) { |
| | | validateAttendanceExceptionExists(id); |
| | | HrmAttendanceExceptionDO attendanceException = validateAttendanceExceptionExists(id); |
| | | if (!HrmAuditStatusEnum.DRAFT.getStatus().equals(attendanceException.getStatus())) { |
| | | throw exception(ATTENDANCE_EXCEPTION_DELETE_FAIL_NOT_DRAFT); |
| | | } |
| | | storageAttachmentApi.deleteAttachmentsByRecord("hrm_attendance_exception", id); |
| | | attendanceExceptionMapper.deleteById(id); |
| | | } |