This commit is contained in:
parent
ce8736b083
commit
7016df503a
2 changed files with 13 additions and 7 deletions
|
|
@ -844,13 +844,16 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
OcId = x.Request.OrganizationId // Organization ID
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var org = _userProfileRepository.GetOc(nodeId, node, AccessToken);
|
||||
var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}";
|
||||
var insignia = (from r in data
|
||||
group r by new { OcId = r.OcId, InsigniaInitial = r.InsigniaInitial } into g
|
||||
select new
|
||||
{
|
||||
RowNo = 1,
|
||||
DepartmentName = _userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken).Root, //_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false),
|
||||
DepartmentName = organizationName,
|
||||
//_userProfileRepository.GetOc(g.Key.OcId, 0, AccessToken).Root,
|
||||
//_organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false),
|
||||
InsigniaInitial = g.Key.InsigniaInitial,
|
||||
G1Male = g.Sum(x => x.Gendor == "ชาย" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(),
|
||||
G1Female = g.Sum(x => x.Gendor == "หญิง" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(),
|
||||
|
|
@ -1733,6 +1736,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
RequestInsigniaName = x.RequestInsignia.Name,
|
||||
IsApprove = x.IsApprove,
|
||||
InsigniaInitial = $"{x.RequestInsignia.Name}({x.RequestInsignia.ShortName})", // Insignia's full name and short name
|
||||
DatePayment = x.DatePayment,
|
||||
OcId = x.Root
|
||||
}).ToListAsync();
|
||||
var insignia = (from r in data
|
||||
|
|
@ -1743,8 +1747,10 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
DepartmentName = g.Key.OcId,
|
||||
InsigniaTypeName = g.Key.InsigniaTypeName,
|
||||
RequestInsigniaName = g.Key.RequestInsigniaName,
|
||||
Pending = g.Sum(x => x.IsApprove == false ? 1 : 0),
|
||||
Done = g.Sum(x => x.IsApprove == true ? 1 : 0),
|
||||
/* Pending = g.Sum(x => x.IsApprove == false ? 1 : 0),
|
||||
Done = g.Sum(x => x.IsApprove == true ? 1 : 0),*/
|
||||
Pending = g.Sum(x => x.DatePayment == null ? 1 : 0),
|
||||
Done = g.Sum(x => x.DatePayment != null ? 1 : 0),
|
||||
Remark = "",
|
||||
}).ToList();
|
||||
|
||||
|
|
@ -1803,7 +1809,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
CitizenId = x.CitizenId,
|
||||
Prefix = x.Prefix,
|
||||
FullName = $"{x.Prefix}{x.FirstName} {x.LastName}",
|
||||
FullName = $"{x.FirstName} {x.LastName}",
|
||||
PosTypeName = x.PosTypeName,
|
||||
PosLevelName = x.PosLevelName,
|
||||
Position = x.Position,
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
sum = (pending + done).ToString().ToThaiNumber(),
|
||||
});
|
||||
pendingSum = pendingSum + pending;
|
||||
doneSum = pendingSum + done;
|
||||
doneSum = doneSum + done;
|
||||
pending = 0;
|
||||
done = 0;
|
||||
row = 1;
|
||||
|
|
@ -763,7 +763,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
sum = (pending + done).ToString().ToThaiNumber(),
|
||||
});
|
||||
pendingSum = pendingSum + pending;
|
||||
doneSum = pendingSum + done;
|
||||
doneSum = doneSum + done;
|
||||
detailList.Add(new
|
||||
{
|
||||
row = "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue