From e5af4a3513f1fd0a75c7adf9e50a9c9f61ce0306 Mon Sep 17 00:00:00 2001 From: "DESKTOP-2S5P7D1\\Windows 10" Date: Wed, 6 Sep 2023 20:28:18 +0700 Subject: [PATCH] =?UTF-8?q?dashboard=20=E0=B9=80=E0=B8=84=E0=B8=A3?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/InsigniaRequestController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs index 7a6f9619..356816a5 100644 --- a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs @@ -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 });