แก้คำสั่งบรรจุ
This commit is contained in:
parent
7c0b7f1aa7
commit
2678b7fc59
8 changed files with 18664 additions and 44 deletions
|
|
@ -195,6 +195,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)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -202,13 +203,6 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
join pf in _dbContext.Set<Profile>()
|
||||
.Include(x => x.Position)
|
||||
.Include(x => x.PositionLevel)
|
||||
.Include(x => x.PositionType)
|
||||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
|
|
@ -217,13 +211,20 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
Probation = pf.IsProbation ? "(อยู่ระหว่างปฏิบัติหน้าที่ราชการ)" : "",
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldOc = p.rootOld == null ? "" : p.rootOld,
|
||||
//Probation = pf.IsProbation ? "(อยู่ระหว่างปฏิบัติหน้าที่ราชการ)" : "",
|
||||
Probation = "",
|
||||
OldPositionName = p.positionNameOld == null ? "" : p.positionNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
|
||||
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "" :
|
||||
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.positionName == null ? "" : p.positionName,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
|
|
@ -265,6 +266,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)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -272,13 +274,6 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
join pf in _dbContext.Set<Profile>()
|
||||
.Include(x => x.Position)
|
||||
.Include(x => x.PositionLevel)
|
||||
.Include(x => x.PositionType)
|
||||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
|
|
@ -287,12 +282,17 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldOc = p.rootOld == null ? "" : p.rootOld,
|
||||
OldPositionName = p.positionNameOld == null ? "" : p.positionNameOld,
|
||||
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
|
||||
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
|
||||
OldPositionNumber = p.posMasterNoOld == null ? "" :
|
||||
p.nodeOld == "4" ? $"{ p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "3" ? $"{ p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
|
||||
p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.positionName == null ? "" : p.positionName,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue