This commit is contained in:
parent
764a27fbd5
commit
ea34087f11
2 changed files with 20 additions and 3 deletions
|
|
@ -1588,11 +1588,18 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
var data = await data_insigniaQuery.Select(x => new
|
||||
{
|
||||
CitizenId = x.CitizenId,
|
||||
Prefix = x.Prefix,
|
||||
FullName = $"{x.Prefix}{x.FirstName} {x.LastName}",
|
||||
PosTypeName = x.PosTypeName,
|
||||
PosLevelName = x.PosLevelName,
|
||||
Position = x.Position,
|
||||
Root = x.Root
|
||||
Root = x.Root,
|
||||
OrganizationOrganizationReceive = x.OrganizationOrganizationReceive,
|
||||
OrganizationOrganizationSend = x.OrganizationOrganizationSend,
|
||||
IsApprove = x.IsApprove == true ? "ได้รับ" : "ไม่ได้รับ",
|
||||
RequestInsignia = x.RequestInsignia.Name,
|
||||
Number = x.Number,
|
||||
DatePayment = x.DatePayment,
|
||||
}).ToListAsync();
|
||||
|
||||
return data;
|
||||
|
|
|
|||
|
|
@ -331,24 +331,34 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
try
|
||||
{
|
||||
var insignalPeriod = await _repository.GetKhr4TotalReport(req.roundId, type, req.node, req.nodeId);
|
||||
var nameNote = await _repository.GetNameInsigniaNote(req.roundId);
|
||||
var year = await _repository.GetYearInsigniaNote(req.roundId);
|
||||
var detailList = new List<dynamic>();
|
||||
var row = 1;
|
||||
var org = "";
|
||||
var number = "";
|
||||
var citizenId = "0";
|
||||
foreach (var _data in insignalPeriod)
|
||||
{
|
||||
citizenId = _data.GetType().GetProperty("CitizenId").GetValue(_data);
|
||||
org = _data.GetType().GetProperty("Root").GetValue(_data);
|
||||
number = _data.GetType().GetProperty("Number").GetValue(_data);
|
||||
var datePayment = _data.GetType().GetProperty("DatePayment").GetValue(_data);
|
||||
detailList.Add(new
|
||||
{
|
||||
row = row.ToString().ToThaiNumber(),
|
||||
citizenId = citizenId.ToString().ToThaiNumber(),
|
||||
prefix = _data.GetType().GetProperty("Prefix").GetValue(_data),
|
||||
fullName = _data.GetType().GetProperty("FullName").GetValue(_data),
|
||||
posTypeName = _data.GetType().GetProperty("PosTypeName").GetValue(_data),
|
||||
posLevelName = _data.GetType().GetProperty("PosLevelName").GetValue(_data),
|
||||
position = _data.GetType().GetProperty("Position").GetValue(_data),
|
||||
root = _data.GetType().GetProperty("Root").GetValue(_data),
|
||||
organizationOrganizationReceive = _data.GetType().GetProperty("OrganizationOrganizationReceive").GetValue(_data),
|
||||
organizationOrganizationSend = _data.GetType().GetProperty("OrganizationOrganizationSend").GetValue(_data),
|
||||
isApprove = _data.GetType().GetProperty("IsApprove").GetValue(_data),
|
||||
requestInsignia = _data.GetType().GetProperty("RequestInsignia").GetValue(_data),
|
||||
number = number == null ? "" : number.ToString().ToThaiNumber(),
|
||||
datePayment = datePayment == null ? "" : datePayment.ToThaiShortDate().ToThaiNumber(),
|
||||
});
|
||||
row = row + 1;
|
||||
}
|
||||
|
|
@ -362,7 +372,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
{
|
||||
profileType = type == "employee" ? "ลูกจ้างประจำ" : "ข้าราชการสามัญกรุงเทพมหานคร",
|
||||
org = org,
|
||||
name = nameNote,
|
||||
year = year,
|
||||
date = date,
|
||||
data = detailList,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue