fix ใบสมัคร
This commit is contained in:
parent
ec8a6de291
commit
04b20e49c9
2 changed files with 120 additions and 62 deletions
|
|
@ -88,38 +88,38 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
p.Id,
|
||||
AvatarId = p.ProfileImg == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.ProfileImg.Id,
|
||||
ExamIdenNumber = p.ExamIdenNumber == null ? "-" : p.ExamIdenNumber,
|
||||
PositionName = p.PositionExam == null ? "-" : p.PositionExam.PositionName,
|
||||
PositionLevelName = p.PositionExam == null ? "-" : p.PositionExam.PositionLevelName,
|
||||
PeriodExamName = p.PeriodExam == null ? "-" : p.PeriodExam.Name,
|
||||
PeriodExamRound = p.PeriodExam == null ? "-" : p.PeriodExam.Round.ToString(),
|
||||
PeriodExamYear = p.PeriodExam == null ? "-" : (p.PeriodExam.Year + 543).ToString(),
|
||||
ExamIdenNumber = p.ExamIdenNumber == null ? "-" : p.ExamIdenNumber.ToThaiNumber(),
|
||||
PositionName = p.PositionExam == null ? "-" : p.PositionExam.PositionName.ToThaiNumber(),
|
||||
PositionLevelName = p.PositionExam == null ? "-" : p.PositionExam.PositionLevelName.ToThaiNumber(),
|
||||
PeriodExamName = p.PeriodExam == null ? "-" : p.PeriodExam.Name.ToThaiNumber(),
|
||||
PeriodExamRound = p.PeriodExam == null ? "-" : p.PeriodExam.Round.ToString().ToThaiNumber(),
|
||||
PeriodExamYear = p.PeriodExam == null ? "-" : (p.PeriodExam.Year + 543).ToString().ToThaiNumber(),
|
||||
|
||||
FullName = $"{p.PrefixName}{p.FirstName} {p.LastName}",
|
||||
Religion = p.ReligionName == null ? "-" : p.ReligionName,
|
||||
Nationality = p.Nationality == null ? "-" : p.Nationality,
|
||||
DateOfBirth = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.ToThaiFullDate2(),
|
||||
Age = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.CalculateAgeStrV2(0, 0),
|
||||
CitizenId = p.CitizenId == null ? "-" : p.CitizenId,
|
||||
DateOfBirth = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.ToThaiFullDate2().ToThaiNumber(),
|
||||
Age = p.DateOfBirth == null ? "-" : p.DateOfBirth.Value.CalculateAgeStrV2(0, 0).ToThaiNumber(),
|
||||
CitizenId = p.CitizenId == null ? "-" : p.CitizenId.ToThaiNumber(),
|
||||
|
||||
EducationLevelExamName = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLevelExamName,
|
||||
EducationLevelExamName = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLevelExamName.ToThaiNumber(),
|
||||
EducationName = p.Educations.FirstOrDefault() == null ? null : (p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาตรี" || p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาโท" || p.Educations.FirstOrDefault().EducationLevelExamName == "ปริญญาเอก" ? p.Educations.FirstOrDefault().EducationName : null),
|
||||
EducationMajor = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationMajor,
|
||||
EducationMajor = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationMajor.ToThaiNumber(),
|
||||
EducationLocation = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLocation,
|
||||
EducationEndDate = p.Educations.FirstOrDefault() == null || p.Educations.FirstOrDefault().EducationEndDate == null ? "-" : p.Educations.FirstOrDefault().EducationEndDate.Value.ToThaiFullDate2(),
|
||||
EducationScores = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationScores,
|
||||
EducationEndDate = p.Educations.FirstOrDefault() == null || p.Educations.FirstOrDefault().EducationEndDate == null ? "-" : p.Educations.FirstOrDefault().EducationEndDate.Value.ToThaiFullDate2().ToThaiNumber(),
|
||||
EducationScores = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationScores.ToThaiNumber(),
|
||||
EducationType = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationType,
|
||||
EducationLevelHighName = p.Educations.FirstOrDefault() == null ? "-" : p.Educations.FirstOrDefault().EducationLevelHighName,
|
||||
|
||||
OccupationPositionType = p.OccupationPositionType == "other" ? "ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร" : (p.OccupationPositionType == "temp" ? "ลูกจ้างชั่วคราว" : (p.OccupationPositionType == "prem" ? "ลูกจ้างประจำ" : "-")),
|
||||
OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition,
|
||||
OccupationSalary = p.OccupationSalary == null ? "-" : p.OccupationSalary.ToString(),
|
||||
OccupationSalary = p.OccupationSalary == null ? "-" : p.OccupationSalary.Value.ToString("N0").ToThaiNumber(),
|
||||
OccupationGroup = p.OccupationGroup == null ? "-" : p.OccupationGroup,
|
||||
OccupationPile = p.OccupationPile == null ? "-" : p.OccupationPile,
|
||||
OccupationOrg = p.OccupationOrg == null ? "-" : p.OccupationOrg,
|
||||
OccupationTelephone = p.OccupationTelephone == null ? "-" : p.OccupationTelephone,
|
||||
OccupationTelephone = p.OccupationTelephone == null ? "-" : p.OccupationTelephone.ToThaiNumber(),
|
||||
|
||||
CareersTotal = sb.ToString(),
|
||||
CareersTotal = sb.ToString().ToThaiNumber(),
|
||||
// Careers = p.Careers.Select(y => new
|
||||
// {
|
||||
// Position = y.Position,
|
||||
|
|
@ -129,24 +129,24 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
// RangeDate = y.RangeDate,
|
||||
// }).ToList(),
|
||||
|
||||
RegistAddress = p.RegistAddress == null ? "-" : p.RegistAddress,
|
||||
RegistAddress = p.RegistAddress == null ? "-" : p.RegistAddress.ToThaiNumber(),
|
||||
RegistProvinceName = p.RegistProvinceName == null ? "-" : p.RegistProvinceName,
|
||||
RegistDistrictName = p.RegistDistrictName == null ? "-" : p.RegistDistrictName,
|
||||
RegistSubDistrictName = p.RegistSubDistrictName == null ? "-" : p.RegistSubDistrictName,
|
||||
RegistZipCode = p.RegistZipCode == null ? "-" : p.RegistZipCode,
|
||||
CurrentAddress = p.CurrentAddress == null ? (p.RegistAddress == null ? "-" : p.RegistAddress) : p.CurrentAddress,
|
||||
RegistZipCode = p.RegistZipCode == null ? "-" : p.RegistZipCode.ToThaiNumber(),
|
||||
CurrentAddress = p.CurrentAddress == null ? (p.RegistAddress == null ? "-" : p.RegistAddress.ToThaiNumber()) : p.CurrentAddress.ToThaiNumber(),
|
||||
CurrentProvinceName = p.CurrentProvinceName == null ? (p.RegistProvinceName == null ? "-" : p.RegistProvinceName) : p.CurrentProvinceName,
|
||||
CurrentDistrictName = p.CurrentDistrictName == null ? (p.RegistDistrictName == null ? "-" : p.RegistDistrictName) : p.CurrentDistrictName,
|
||||
CurrentSubDistrictName = p.CurrentSubDistrictName == null ? (p.RegistSubDistrictName == null ? "-" : p.RegistSubDistrictName) : p.CurrentSubDistrictName,
|
||||
CurrentZipCode = p.CurrentZipCode == null ? (p.RegistZipCode == null ? "-" : p.RegistZipCode) : p.CurrentZipCode,
|
||||
Telephone = p.Telephone == null ? "-" : p.Telephone,
|
||||
CurrentZipCode = p.CurrentZipCode == null ? (p.RegistZipCode == null ? "-" : p.RegistZipCode.ToThaiNumber()) : p.CurrentZipCode.ToThaiNumber(),
|
||||
Telephone = p.Telephone == null ? "-" : p.Telephone.ToThaiNumber(),
|
||||
Email = p.Email == null ? "-" : p.Email,
|
||||
|
||||
ContactFullName = $"{p.ContactPrefixName}{p.ContactFirstname} {p.ContactLastname}",
|
||||
ContactRelations = p.ContactRelations == null ? "-" : p.ContactRelations,
|
||||
ContactTel = p.ContactTel == null ? "-" : p.ContactTel,
|
||||
ContactTel = p.ContactTel == null ? "-" : p.ContactTel.ToThaiNumber(),
|
||||
|
||||
RegisterDate = p.RegisterDate == null ? "-" : p.RegisterDate.Value.ToThaiFullDate(),
|
||||
RegisterDate = p.RegisterDate == null ? "-" : p.RegisterDate.Value.ToThaiFullDate().ToThaiNumber(),
|
||||
})
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
|
|
@ -176,10 +176,10 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
Position = item.Position,
|
||||
Type = item.Type,
|
||||
DurationStart = item.DurationStart,
|
||||
DurationEnd = item.DurationEnd,
|
||||
RangeDate = item.RangeDate,
|
||||
Index = retVal,
|
||||
DurationStart = item.DurationStart.ToThaiNumber(),
|
||||
DurationEnd = item.DurationEnd.ToThaiNumber(),
|
||||
RangeDate = item.RangeDate.ToThaiNumber(),
|
||||
Index = retVal.ToString().ToThaiNumber(),
|
||||
};
|
||||
data.Add(_data);
|
||||
retVal++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue