From 52a3d00a65585f6ddac4c9f3fc4de90d4d722a22 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 20 Dec 2024 11:10:24 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B8=A5=E0=B8=B9=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=A7=E0=B8=B4=E0=B8=99?= =?UTF-8?q?=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineResultController.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index ecbb2e6a..ac0cbc1e 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -827,6 +827,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -924,6 +927,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1094,6 +1100,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1207,6 +1216,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1318,6 +1330,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1429,6 +1444,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1540,6 +1558,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1651,6 +1672,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1762,6 +1786,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -1888,6 +1915,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers }).ToList(); var baseAPIOrg = _configuration["API"]; var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline"; + if(data.profileType =="EMPLOYEE"){ + apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave-discipline"; + } using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));