แก้ report เครื่องราช
This commit is contained in:
parent
5065ad3269
commit
99598ffd2a
7 changed files with 83 additions and 47 deletions
|
|
@ -158,6 +158,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
Position = r.Position == null ? "-" : r.Position.Name,
|
||||
OCName = r.OcId == null ? "-" : _organizationCommonRepository.GetOrganizationNameFullPath(r.OcId.Value, false, false),
|
||||
BirthDate = r.BirthDate.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateAppoint = !string.IsNullOrEmpty(r.DateAppoint.ToString()) ? DateTime.Parse(r.DateAppoint.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : string.Empty,
|
||||
})
|
||||
.FirstOrDefault();
|
||||
if (profile == null)
|
||||
|
|
@ -737,16 +738,18 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
Gendor = x.Profile.Gender == null ? null : x.Profile.Gender.Name,
|
||||
RequestInsigniaName = x.RequestInsignia.Name,
|
||||
InsigniaInitial = $"{x.RequestInsignia.Name}({x.RequestInsignia.ShortName})",
|
||||
OcId = x.Request.Organization.Id
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
var insignia = (from r in data_insignia
|
||||
group r by new { OcId = r.OcId } into g
|
||||
group r by new { OcId = r.OcId, InsigniaInitial = r.InsigniaInitial } into g
|
||||
select new
|
||||
{
|
||||
RowNo = 1,
|
||||
DepartmentName = _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(),
|
||||
G2Male = g.Sum(x => x.Gendor == "ชาย" ? 1 : 0).ToString().ToThaiNumber(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue