แก้ api พ้นราชการ

This commit is contained in:
Kittapath 2024-05-21 19:41:55 +07:00
parent 2a3a151f34
commit 63b02dcc4c
19 changed files with 54771 additions and 431 deletions

View file

@ -835,10 +835,10 @@ namespace BMA.EHR.Application.Repositories.Commands
var report_data = (from r in raw_data
join p in _dbContext.Set<RetirementResign>()
.Include(p => p.Profile)
.ThenInclude(p => p.Position)
.Include(p => p.Profile)
.ThenInclude(p => p.Salaries)
//.Include(p => p.Profile)
//.ThenInclude(p => p.Position)
//.Include(p => p.Profile)
//.ThenInclude(p => p.Salaries)
on r.RefPlacementProfileId equals p.Id
orderby r.Sequence
select new CommandType17Response
@ -846,7 +846,7 @@ namespace BMA.EHR.Application.Repositories.Commands
Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId,
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
PositionName = p.position ?? "",
Organization = p.OrganizationPositionOld ?? "",
PositionLevel = p.PositionLevelOld ?? "",
PositionType = p.PositionTypeOld ?? "",
@ -1165,20 +1165,20 @@ namespace BMA.EHR.Application.Repositories.Commands
var report_data = (from r in raw_data
join p in _dbContext.Set<RetirementResign>()
.Include(x => x.Profile)
.ThenInclude(x => x.Position)
.Include(x => x.Profile)
.ThenInclude(x => x.PositionLevel)
.Include(x => x.Profile)
.ThenInclude(x => x.PositionType)
.Include(x => x.Profile)
.ThenInclude(x => x.PosNo)
//.Include(x => x.Profile)
//.ThenInclude(x => x.Position)
//.Include(x => x.Profile)
//.ThenInclude(x => x.PositionLevel)
//.Include(x => x.Profile)
//.ThenInclude(x => x.PositionType)
//.Include(x => x.Profile)
//.ThenInclude(x => x.PosNo)
.Include(x => x.Profile)
.ThenInclude(x => x.PositionEmployeePosition)
.Include(x => x.Profile)
.ThenInclude(x => x.PositionEmployeeLevel)
//.Include(x => x.Profile)
//.ThenInclude(x => x.PositionEmployeePosition)
//.Include(x => x.Profile)
//.ThenInclude(x => x.PositionEmployeeLevel)
//.Include(x => x.OrgEmployee)
//.ThenInclude(x => x.OrganizationAgency)
//.ThenInclude(x => x.OrganizationOrganization)
@ -1197,7 +1197,7 @@ namespace BMA.EHR.Application.Repositories.Commands
CitizenId = r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Organization = p.OrganizationPositionOld ?? "",
PositionName = p.Profile.PositionEmployeePosition == null ? "" : p.Profile.PositionEmployeePosition.Name.ToThaiNumber(),
PositionName = p.position ?? "",
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld.ToThaiNumber(),
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld.ToThaiNumber(),
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),