Fix ข้อมูลที่อยู่ไม่อัปเดตในระบบทะเบียนประวัติ issue #1619
Some checks failed
release-dev / release-dev (push) Failing after 10s

This commit is contained in:
Bright 2025-07-15 18:31:40 +07:00
parent 6d90951000
commit 6b73a0aa47

View file

@ -1756,16 +1756,16 @@ namespace BMA.EHR.Placement.Service.Controllers
relationship = p.Relationship == null ? string.Empty : p.Relationship,
religion = p.Religion == null ? string.Empty : p.Religion,
bloodGroup = string.Empty,
registrationAddress = p.RegistAddress == null ? string.Empty : p.RegistAddress,
registrationAddress = string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress,
registrationProvinceId = p.RegistProvinceId ?? null,
registrationDistrictId = p.RegistDistrictId ?? null,
registrationSubDistrictId = p.RegistSubDistrictId ?? null,
registrationZipCode = p.RegistZipCode == null ? string.Empty : p.RegistZipCode,
currentAddress = p.CurrentAddress == null ? string.Empty : p.CurrentAddress,
registrationZipCode = p.RegistZipCode == null ? null : p.RegistZipCode,
currentAddress = string.IsNullOrWhiteSpace(p.CurrentAddress) ? string.Empty : p.CurrentAddress,
currentProvinceId = p.CurrentProvinceId ?? null,
currentDistrictId = p.CurrentDistrictId ?? null,
currentSubDistrictId = p.CurrentSubDistrictId ?? null,
currentZipCode = p.CurrentZipCode == null ? string.Empty : p.CurrentZipCode,
currentZipCode = p.CurrentZipCode == null ? null : p.CurrentZipCode,
amount = r.amount,
amountSpecial = r.amountSpecial,
},
@ -2107,16 +2107,20 @@ namespace BMA.EHR.Placement.Service.Controllers
relationship = p.Relationship == null ? string.Empty : p.Relationship,
religion = p.Religion == null ? string.Empty : p.Religion,
bloodGroup = p.BloodGroup,
registrationAddress = p.RegistAddress == null ? string.Empty : p.RegistAddress,
registrationProvinceId = p.RegistProvinceId,
registrationDistrictId = p.RegistDistrictId,
registrationSubDistrictId = p.RegistSubDistrictId,
registrationZipCode = p.RegistZipCode == null ? string.Empty : p.RegistZipCode,
currentAddress = p.CurrentAddress == null ? string.Empty : p.CurrentAddress,
currentProvinceId = p.CurrentProvinceId,
currentDistrictId = p.CurrentDistrictId,
currentSubDistrictId = p.CurrentSubDistrictId,
currentZipCode = p.CurrentZipCode == null ? string.Empty : p.CurrentZipCode,
registrationAddress = string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress,
registrationProvinceId = p.RegistProvinceId ?? null,
registrationDistrictId = p.RegistDistrictId ?? null,
registrationSubDistrictId = p.RegistSubDistrictId ?? null,
registrationZipCode = p.RegistZipCode == null ? null : p.RegistZipCode,
currentAddress = p.RegistSame == true
? (string.IsNullOrWhiteSpace(p.RegistAddress) ? string.Empty : p.RegistAddress)
: (string.IsNullOrWhiteSpace(p.CurrentAddress) ? string.Empty : p.CurrentAddress),
currentProvinceId = p.RegistSame == true ? p.RegistProvinceId : p.CurrentProvinceId,
currentDistrictId = p.RegistSame == true ? p.RegistDistrictId : p.CurrentDistrictId,
currentSubDistrictId = p.RegistSame == true ? p.RegistSubDistrictId : p.CurrentSubDistrictId,
currentZipCode = p.RegistSame == true
? p.RegistZipCode == null ? null : p.RegistZipCode
: p.CurrentZipCode == null ? null : p.CurrentZipCode,
amount = r.amount,
amountSpecial = r.amountSpecial,
objectRefId = p.ProfileImg != null && p.ProfileImg?.ObjectRefId != null ? p.ProfileImg?.ObjectRefId.ToString("D") : null,