fix ระบบทะเบียนประวัติผู้พ้นจากราชการ ลูกจ้างประจำฯ >>ระบบแสดง Null กรณีส่งมาระบบอื่น ๆ #1404

This commit is contained in:
Bright 2025-04-21 13:24:47 +07:00
parent 5c215b9213
commit 1552225e9c

View file

@ -348,7 +348,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
LastUpdateUserId = UserId ?? "",
LastUpdatedAt = DateTime.Now,
};
var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}";
var apiUrl = string.Empty;
if (req.profileType.Trim().ToUpper() == "EMPLOYEE")
{
apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/position/{req.Id}";
}
else
{
apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}";
}
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));