แก้ไขหมาย้หตุคำสั่ง
This commit is contained in:
parent
a76ba4270f
commit
ccf19c5683
21 changed files with 16530 additions and 70 deletions
|
|
@ -315,8 +315,9 @@ 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 = 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}",
|
||||
|
|
@ -325,14 +326,16 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
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(),
|
||||
// OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _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(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -377,8 +380,9 @@ 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 = 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}",
|
||||
|
|
@ -387,14 +391,16 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
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(),
|
||||
// OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _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(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -431,9 +437,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.ThenInclude(x => x.PositionType)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.Profile)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Educations)
|
||||
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -444,8 +449,9 @@ 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,
|
||||
// Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" :
|
||||
// p.Profile.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}",
|
||||
|
|
@ -454,14 +460,17 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
|
||||
OldPositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.OrganizationPosition == 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(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
LeaveDate = p.Profile.LeaveDate == null ? "" : p.Profile.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -500,7 +509,6 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Educations)
|
||||
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
.Include(x => x.PositionPath)
|
||||
|
|
@ -511,8 +519,9 @@ 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,
|
||||
// Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" :
|
||||
// p.Profile.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}",
|
||||
|
|
@ -521,14 +530,18 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
OldPositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
|
||||
OldPositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
// OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.OrganizationPosition == 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(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
LeaveDate = p.Profile.LeaveDate == null ? "" : p.Profile.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
MilitaryDate = p.MilitaryDate == null ? "" : p.MilitaryDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -683,6 +696,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
|
|
@ -698,7 +712,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue