แก้คำสั่งพ้น
This commit is contained in:
parent
bd7fe04395
commit
ee72e497e2
11 changed files with 18060 additions and 64 deletions
|
|
@ -322,25 +322,27 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
// Education = pf.Educations == null || pf.Educations.Count == 0 ? "" :
|
||||
// pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
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.OrganizationOld == null ? "" : p.OrganizationOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld,
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// OldSalaryDate = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Date.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
// NewOc = p.OrganizationPosition == null || p.OrganizationPosition!.Organization == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
// NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
// NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
// NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
// NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.position == null ? "" : p.position,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
|
|
@ -394,18 +396,23 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
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.OrganizationOld == null ? "" : p.OrganizationOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld,
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// NewOc = p.OrganizationPosition == null || p.OrganizationPosition!.Organization == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
// NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
// NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
// NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
// NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.position == null ? "" : p.position,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
|
|
@ -835,10 +842,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
|
||||
|
|
@ -1128,15 +1135,21 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Organization = p.OrganizationPositionOld,
|
||||
Organization = p.rootOld,
|
||||
OldPositionName = p.OrganizationPositionOld,
|
||||
OldPositionLevel = p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? null : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// NewOc = p.OrganizationPosition == null || p.OrganizationPosition!.Organization == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
// NewPositionName = p.OrgEmployee == null || p.OrgEmployee.PositionEmployeePosition == null ? "" : p.OrgEmployee.PositionEmployeePosition.Name,
|
||||
// NewPositionLevel = p.OrgEmployee == null || p.OrgEmployee.OrganizationPositionEmployeeLevels == null || p.OrgEmployee.OrganizationPositionEmployeeLevels.Count() == 0 ? "" : p.OrgEmployee.OrganizationPositionEmployeeLevels.FirstOrDefault().PositionEmployeeLevel.Name,
|
||||
// NewPositionNumber = p.OrgEmployee == null || p.OrgEmployee.PosNo == null ? "" : p.OrgEmployee.PosNo.ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.position == null ? "" : p.position,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
// NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
|
|
@ -1165,20 +1178,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)
|
||||
|
|
@ -1260,10 +1273,16 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? null : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// NewOc = p.OrganizationPosition == null || p.OrganizationPosition!.Organization == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
// NewPositionName = p.OrgEmployee == null || p.OrgEmployee.PositionEmployeePosition == null ? "" : p.OrgEmployee.PositionEmployeePosition.Name,
|
||||
// NewPositionLevel = p.OrgEmployee == null || p.OrgEmployee.OrganizationPositionEmployeeLevels == null || p.OrgEmployee.OrganizationPositionEmployeeLevels.Count() == 0 ? "" : p.OrgEmployee.OrganizationPositionEmployeeLevels.FirstOrDefault().PositionEmployeeLevel.Name,
|
||||
// NewPositionNumber = p.OrgEmployee == null || p.OrgEmployee.PosNo == null ? "" : p.OrgEmployee.PosNo.ToThaiNumber(),
|
||||
NewOc = p.root == null ? "" : p.root,
|
||||
NewPositionName = p.position == null ? "" : p.position,
|
||||
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
|
||||
// NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
|
||||
NewPositionNumber = p.posMasterNo == null ? "" :
|
||||
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
|
||||
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue