This commit is contained in:
parent
0bc0fb2c99
commit
221f700722
2 changed files with 6 additions and 4 deletions
|
|
@ -139,7 +139,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
return data;
|
||||
}
|
||||
|
||||
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int node)
|
||||
public async Task<List<ProcessUserTimeStamp>> GetTimestampByDateLateAsync(string type, string role, string nodeId, int node, DateTime StartDate, DateTime EndDate)
|
||||
{
|
||||
var _nodeId = Guid.Parse(nodeId);
|
||||
var data = new List<ProcessUserTimeStamp>();
|
||||
|
|
@ -147,6 +147,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
{
|
||||
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
||||
.Where(x => x.CheckInStatus == "LATE")
|
||||
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.ToListAsync();
|
||||
|
|
@ -155,6 +156,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
{
|
||||
data = await _dbContext.Set<ProcessUserTimeStamp>().AsQueryable()
|
||||
.Where(x => x.CheckInStatus == "LATE")
|
||||
.Where(u => u.CheckIn.Date >= StartDate && u.CheckIn.Date <= EndDate)
|
||||
.Where(x => x.ProfileType == type.Trim().ToUpper())
|
||||
.Where(x => node == 4 ? x.Child4Id == _nodeId : (node == 3 ? x.Child3Id == _nodeId : (node == 2 ? x.Child2Id == _nodeId : (node == 1 ? x.Child1Id == _nodeId : (node == 0 ? x.RootId == _nodeId : true)))))
|
||||
.Where(x => node == 0 ? x.Child1Id == null : (node == 1 ? x.Child2Id == null : (node == 2 ? x.Child3Id == null : (node == 3 ? x.Child4Id == null : true))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue