แก้รายงาน
This commit is contained in:
parent
2c1527b863
commit
04b8885e18
11 changed files with 31 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
var report_data = (from r in raw_data
|
||||
join p in _dbContext.Set<PlacementProfile>()
|
||||
.Include(x => x.PlacementEducations)
|
||||
.Include(x => x.Placement)
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
|
|
@ -81,6 +82,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType01Response
|
||||
{
|
||||
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
|
||||
p.PlacementEducations.FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -119,6 +122,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
var report_data = (from r in raw_data
|
||||
join p in _dbContext.Set<PlacementProfile>()
|
||||
.Include(x => x.PlacementEducations)
|
||||
.Include(x => x.Placement)
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
|
|
@ -130,6 +134,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType01Response
|
||||
{
|
||||
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
|
||||
p.PlacementEducations.FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -167,6 +173,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
var report_data = (from r in raw_data
|
||||
join p in _dbContext.Set<PlacementProfile>()
|
||||
.Include(x => x.PlacementEducations)
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -184,6 +191,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
|
||||
p.PlacementEducations.FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -226,6 +235,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
var report_data = (from r in raw_data
|
||||
join p in _dbContext.Set<PlacementProfile>()
|
||||
.Include(x => x.PlacementEducations)
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -243,6 +253,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
|
||||
p.PlacementEducations.FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -298,10 +310,13 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionType)
|
||||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
.Include(x => x.Educations)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = pf.Educations == null || pf.Educations.Count == 0 ? "" :
|
||||
pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -357,10 +372,13 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionType)
|
||||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
.Include(x => x.Educations)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = pf.Educations == null || pf.Educations.Count == 0 ? "" :
|
||||
pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -413,6 +431,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.ThenInclude(x => x.PositionType)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Educations)
|
||||
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
|
|
@ -424,6 +444,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" :
|
||||
p.Profile.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -476,6 +498,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.ThenInclude(x => x.PositionType)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Educations)
|
||||
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
|
|
@ -487,6 +511,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" :
|
||||
p.Profile.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -1006,7 +1032,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
PositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiShortDate2().ToThaiNumber()
|
||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue