fix นับจำนวนคนลาในรายงาน
This commit is contained in:
parent
ffd8974cb6
commit
e86c9c5dc1
2 changed files with 19 additions and 20 deletions
|
|
@ -625,7 +625,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
.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)
|
||||
.Where(x => x.LeaveStartDate.Date <= date.Date && x.LeaveEndDate >= date.Date)
|
||||
.FirstOrDefaultAsync();
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1249,29 +1249,28 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
workTotal += 1;
|
||||
if (timeStamps.IsLocationCheckIn)
|
||||
wfhTotal += 1;
|
||||
else
|
||||
{
|
||||
if (leaveReq != null)
|
||||
{
|
||||
switch (leaveReq.Type.Code.ToUpper())
|
||||
{
|
||||
case "LV-001":
|
||||
case "LV-002":
|
||||
sickTotal += 1;
|
||||
break;
|
||||
case "LV-005":
|
||||
restTotal += 1;
|
||||
break;
|
||||
case "LV-008":
|
||||
studyTotal += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (leaveReq != null)
|
||||
{
|
||||
switch (leaveReq.Type.Code.ToUpper())
|
||||
{
|
||||
case "LV-001":
|
||||
case "LV-002":
|
||||
sickTotal += 1;
|
||||
break;
|
||||
case "LV-005":
|
||||
restTotal += 1;
|
||||
break;
|
||||
case "LV-008":
|
||||
studyTotal += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
employees.Add(emp);
|
||||
count++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue