แก้รายงานคำสั่งบรรจุ ลจ

This commit is contained in:
Suphonchai Phoonsawat 2023-09-28 10:11:24 +07:00
parent a3a111834f
commit 68e6e3a63f
5 changed files with 26 additions and 8 deletions

View file

@ -763,6 +763,8 @@ namespace BMA.EHR.Application.Repositories.Commands
.ThenInclude(p => p.Position)
.Include(p => p.Profile)
.ThenInclude(p => p.Salaries)
.Include(p => p.Profile)
.ThenInclude(p => p.Prefix)
on r.RefPlacementProfileId equals p.Id
orderby r.Sequence
select new CommandType16Response
@ -777,7 +779,8 @@ namespace BMA.EHR.Application.Repositories.Commands
GovAidCommandDate = r.Command.GovAidCommandDate == null ? "" :
r.Command.GovAidCommandDate.Value.ToThaiFullDate3().ToThaiNumber(),
StartDate = "", // TODO: Frontend ไม่มีการเก็บค่าไว้ หรือไม่มีเก็บไว้จากระบบบรรจุ ทำให้ดึงมาแสดงไม่ได้
ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiFullDate3().ToThaiNumber()
ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiFullDate3().ToThaiNumber(),
FullName = $"{p.Profile.Prefix!.Name}{p.Profile.FirstName!} {p.Profile.LastName!}"
})
.ToList();
@ -1019,20 +1022,31 @@ namespace BMA.EHR.Application.Repositories.Commands
.ThenInclude(x => x.PositionType)
.Include(x => x.Profile)
.ThenInclude(x => x.PosNo)
.Include(x => x.OrgEmployee)
.ThenInclude(x => x.OrganizationAgency)
.ThenInclude(x => x.OrganizationOrganization)
//.Include(x => x.OrgEmployee)
//.ThenInclude(x => x.PosNo)
.Include(x => x.OrgEmployee)
.ThenInclude(x => x.PositionEmployeePosition)
.Include(x => x.OrgEmployee)
.ThenInclude(x => x.OrganizationPositionEmployeeLevels)
.ThenInclude(x => x.PositionEmployeeLevel)
on r.RefPlacementProfileId equals p.Id
orderby r.Sequence
select new CommandType21Response
{
Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId,
CitizenId = r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Organization = p.Profile!.EmployeeOc,
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
PositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
PositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
Organization = p.OrgEmployee!.OrganizationAgency!.OrganizationOrganization!.Name,
PositionName = p.OrgEmployee.PositionEmployeePosition == null ? "" : p.OrgEmployee.PositionEmployeePosition.Name.ToThaiNumber(),
PositionLevel = p.OrgEmployee.OrganizationPositionEmployeeLevels == null ? "" : p.OrgEmployee.OrganizationPositionEmployeeLevels.First().PositionEmployeeLevel.Name.ToThaiNumber(),
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name.ToThaiNumber(),
PositionNumber = p.OrgEmployee.PosNo == null ? "" : p.OrgEmployee.PosNo.ToThaiNumber(),
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber()
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber(),
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber()
})
.ToList();

View file

@ -27,5 +27,7 @@ namespace BMA.EHR.Application.Responses.Reports
public string StartDate { get; set; } = string.Empty;
public string ActiveDate { get; set; } = string.Empty;
public string FullName { get; set;} = string.Empty;
}
}

View file

@ -21,5 +21,7 @@
public string Salary { get; set; } = string.Empty;
public string RetireDate { get; set;} = string.Empty;
public string CommandYear { get; set; } = string.Empty;
}
}