dashboard เครื่องราช

This commit is contained in:
DESKTOP-2S5P7D1\Windows 10 2023-09-06 20:28:18 +07:00
parent 0d6b4bee62
commit e5af4a3513

View file

@ -861,7 +861,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
.ToListAsync();
var allUserUser = await _context.InsigniaRequests
.Where(x => x.Period == insigniaPeriod)
.Select(x => x.RequestProfiles.Count())
.Where(x => RoleAdmin == true ? x.RequestStatus == "st5" : (RoleInsignia2 == true ? (x.RequestStatus == "st3" || x.RequestStatus == "st4") : x.Id != null))
.Select(x => x.RequestProfiles.Count(x => x.Status != "DELETE" && x.Status != "REJECT"))
.SumAsync();
return Success(new { OrgAllCount = orgAllCount.Count(), OrgSendCount = orgAllCount.Where(x => x.RequestStatus != "st1" && x.RequestStatus != "st2").Count(), OrgNoSendCount = orgAllCount.Where(x => x.RequestStatus == "st1" && x.RequestStatus == "st2").Count(), AllUserUser = allUserUser });