This commit is contained in:
kittapath 2025-10-11 19:49:30 +07:00
parent 52f3d6e786
commit ff547470b2

View file

@ -313,7 +313,7 @@ namespace BMA.EHR.Recruit.Service.Services
var placementProfile = new PlacementProfile
{
Placement = placement,
PositionCandidate = positionNameWithoutLevel,
PositionCandidate = positionNameWithoutLevel ?? "",
PositionType = posLevelObject?.posTypes?.posLevelName ?? "",
PositionLevel = posLevelName ?? "",
Prefix = candidate.Prefix ?? "",
@ -328,13 +328,13 @@ namespace BMA.EHR.Recruit.Service.Services
CitizenId = candidate.CitizenId ?? "",
CitizenProvinceId = provincesCache.FirstOrDefault(x => x.name == candidate.CitizenCardIssuer)?.Id,
CitizenDate = candidate.CitizenCardExpireDate,
Telephone = firstAddress?.Telephone,
MobilePhone = firstAddress?.Mobile,
RegistAddress = registAddress,
Telephone = firstAddress?.Telephone ?? "",
MobilePhone = firstAddress?.Mobile ?? "",
RegistAddress = registAddress ?? "",
RegistProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province)?.Id,
RegistDistrictId = districtsCache.FirstOrDefault(x => x.name == firstAddress?.Amphur)?.Id,
RegistSubDistrictId = subDistrictsCache.FirstOrDefault(x => x.name == firstAddress?.District)?.Id,
RegistZipCode = firstAddress?.ZipCode,
RegistZipCode = firstAddress?.ZipCode ?? "",
RegistSame = false,
CurrentAddress = currentAddress,
CurrentProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province1)?.Id,
@ -343,8 +343,8 @@ namespace BMA.EHR.Recruit.Service.Services
CurrentZipCode = firstAddress?.ZipCode1,
Marry = candidate.Marry?.Contains("สมรส") ?? false,
OccupationPositionType = "other",
OccupationTelephone = firstOccupation?.Telephone,
OccupationPosition = firstOccupation?.Position,
OccupationTelephone = firstOccupation?.Telephone ?? "",
OccupationPosition = firstOccupation?.Position ?? "",
PointTotalA = recruitScore.FullA, // non-nullable int
PointA = recruitScore.SumA, // non-nullable double
PointTotalB = recruitScore.FullB ?? 0, // nullable int?
@ -367,34 +367,34 @@ namespace BMA.EHR.Recruit.Service.Services
LastUpdateUserId = UserId ?? "",
LastUpdateFullName = FullName ?? "",
IsOfficer = isOfficer,
profileId = org?.result?.profileId,
profileId = org?.result?.profileId ?? "",
IsOld = org?.result != null,
AmountOld = org?.result?.amount,
nodeOld = org?.result?.node,
nodeIdOld = org?.result?.nodeId,
posmasterIdOld = org?.result?.posmasterId,
rootOld = org?.result?.root,
rootIdOld = org?.result?.rootId,
rootShortNameOld = org?.result?.rootShortName,
child1Old = org?.result?.child1,
child1IdOld = org?.result?.child1Id,
child1ShortNameOld = org?.result?.child1ShortName,
child2Old = org?.result?.child2,
child2IdOld = org?.result?.child2Id,
child2ShortNameOld = org?.result?.child2ShortName,
child3Old = org?.result?.child3,
child3IdOld = org?.result?.child3Id,
child3ShortNameOld = org?.result?.child3ShortName,
child4Old = org?.result?.child4,
child4IdOld = org?.result?.child4Id,
child4ShortNameOld = org?.result?.child4ShortName,
orgRevisionIdOld = org?.result?.orgRevisionId,
posMasterNoOld = org?.result?.posMasterNo,
positionNameOld = org?.result?.position,
posTypeIdOld = org?.result?.posTypeId,
posTypeNameOld = org?.result?.posTypeName,
posLevelIdOld = org?.result?.posLevelId,
posLevelNameOld = org?.result?.posLevelName,
nodeOld = org?.result?.node ?? "",
nodeIdOld = org?.result?.nodeId ?? "",
posmasterIdOld = org?.result?.posmasterId ?? "",
rootOld = org?.result?.root ?? "",
rootIdOld = org?.result?.rootId ?? "",
rootShortNameOld = org?.result?.rootShortName ?? "",
child1Old = org?.result?.child1 ?? "",
child1IdOld = org?.result?.child1Id ?? "",
child1ShortNameOld = org?.result?.child1ShortName ?? "",
child2Old = org?.result?.child2 ?? "",
child2IdOld = org?.result?.child2Id ?? "",
child2ShortNameOld = org?.result?.child2ShortName ?? "",
child3Old = org?.result?.child3 ?? "",
child3IdOld = org?.result?.child3Id ?? "",
child3ShortNameOld = org?.result?.child3ShortName ?? "",
child4Old = org?.result?.child4 ?? "",
child4IdOld = org?.result?.child4Id ?? "",
child4ShortNameOld = org?.result?.child4ShortName ?? "",
orgRevisionIdOld = org?.result?.orgRevisionId ?? "",
posMasterNoOld = org?.result?.posMasterNo ?? "",
positionNameOld = org?.result?.position ?? "",
posTypeIdOld = org?.result?.posTypeId ?? "",
posTypeNameOld = org?.result?.posTypeName ?? "",
posLevelIdOld = org?.result?.posLevelId ?? "",
posLevelNameOld = org?.result?.posLevelName ?? "",
};
placementProfiles.Add(placementProfile);
@ -403,10 +403,10 @@ namespace BMA.EHR.Recruit.Service.Services
PlacementProfile = placementProfile,
EducationLevelId = educationLevelsCache.FirstOrDefault(x => x.name == firstEducation?.HighDegree)?.Id,
EducationLevelName = educationLevelsCache.FirstOrDefault(x => x.name == firstEducation?.HighDegree)?.name,
Field = firstEducation?.Major,
Gpa = firstEducation?.GPA.ToString(),
Institute = firstEducation?.University,
Degree = firstEducation?.Degree,
Field = firstEducation?.Major ?? "",
Gpa = firstEducation == null || firstEducation?.GPA == null ? "" : firstEducation.GPA.ToString(),
Institute = firstEducation?.University ?? "",
Degree = firstEducation?.Degree ?? "",
FinishDate = firstEducation?.BachelorDate,
IsDate = true,
CreatedAt = DateTime.Now,
@ -421,10 +421,10 @@ namespace BMA.EHR.Recruit.Service.Services
var placementCertificate = new PlacementCertificate
{
PlacementProfile = placementProfile,
CertificateNo = firstCertificate?.CertificateNo,
CertificateNo = firstCertificate?.CertificateNo ?? "",
IssueDate = firstCertificate?.IssueDate,
ExpireDate = firstCertificate?.ExpiredDate,
CertificateType = firstCertificate?.Description,
CertificateType = firstCertificate?.Description ?? "",
CreatedAt = DateTime.Now,
CreatedUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,