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