แก้รายงานการแสดงวันลา
This commit is contained in:
parent
c0d7aa92cc
commit
34da86653f
4 changed files with 224 additions and 49 deletions
|
|
@ -602,6 +602,17 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<LeaveRequest?> GetLeavePeriodAsync(Guid keycloakUserId, DateTime date)
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
.Where(x => x.LeaveStartDate.Date >= date.Date && x.LeaveEndDate <= date.Date)
|
||||
.FirstOrDefaultAsync();
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue