From e556eeb31422dfab94ce767ff7cef7a384f7b028 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Sun, 7 Jul 2024 10:25:29 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20path=20call=20?= =?UTF-8?q?=E0=B8=9F=E0=B8=A2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/CommandReportRepository.cs | 18 +++++++++--------- .../Reports/ProbationReportRepository.cs | 10 +++++----- .../DisciplineComplaint_AppealController.cs | 4 ++-- .../Controllers/DisciplineResultController.cs | 10 +++++----- BMA.EHR.Discipline.Service/appsettings.json | 2 +- .../Controllers/NotifyController.cs | 4 ++-- .../PlacementAppointmentController.cs | 4 ++-- .../PlacementAppointmentEmployeeController.cs | 4 ++-- .../Controllers/PlacementController.cs | 8 ++++---- .../Controllers/PlacementOfficerController.cs | 6 +++--- .../Controllers/PlacementReceiveController.cs | 6 +++--- .../PlacementRepatriationController.cs | 4 ++-- .../Controllers/PlacementTransferController.cs | 6 +++--- BMA.EHR.Placement.Service/appsettings.json | 2 +- BMA.EHR.Report.Service/appsettings.json | 2 +- .../Controllers/RetirementController.cs | 8 ++++---- .../RetirementDeceasedController.cs | 8 ++++---- .../Controllers/RetirementOtherController.cs | 4 ++-- .../Controllers/RetirementOutController.cs | 4 ++-- .../Controllers/RetirementResignController.cs | 4 ++-- BMA.EHR.Retirement.Service/appsettings.json | 2 +- 21 files changed, 60 insertions(+), 60 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs index d5c395bd..91b008a6 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs @@ -220,9 +220,9 @@ namespace BMA.EHR.Application.Repositories.Commands OldPositionNumber = p.posMasterNoOld == null ? "" : p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = p.root == null ? "" : p.root, @@ -287,11 +287,11 @@ namespace BMA.EHR.Application.Repositories.Commands OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld, OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld, OldPositionNumber = p.posMasterNoOld == null ? "" : - p.nodeOld == "4" ? $"{ p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "3" ? $"{ p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "2" ? $"{ p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "1" ? $"{ p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : - p.nodeOld == "0" ? $"{ p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", + p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : + p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "", OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), NewOc = p.root == null ? "" : p.root, NewPositionName = p.positionName == null ? "" : p.positionName, @@ -1295,7 +1295,7 @@ namespace BMA.EHR.Application.Repositories.Commands } foreach (var d in raw_data) { - var apiUrl = $"{_configuration["API"]}discipline/result/report/find/{d.RefDisciplineId}/{d.RefPlacementProfileId}"; + var apiUrl = $"{_configuration["API"]}/discipline/result/report/find/{d.RefDisciplineId}/{d.RefPlacementProfileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index f7007514..bd584cfd 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -43,7 +43,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region แบบมอบหมายงาน ฯ public async Task GetProbationAssignAsync(Guid assign_id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}assign/probation-assign?assign_id={assign_id}"; + var api_url = $"{_configuration["APIPROBATION"]}/assign/probation-assign?assign_id={assign_id}"; ProbationAssignResponse probation_assign; using (var client = new HttpClient()) { @@ -94,7 +94,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region แบบบันทึกผล (ผู้ดูแล, ผู้บังคับบัญชา) public async Task GetEvaluateRecordAsync(Guid assign_id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}report/form-record?id={assign_id}"; + var api_url = $"{_configuration["APIPROBATION"]}/report/form-record?id={assign_id}"; EvaluateRecordAssignResponse evaluate_record; using (var client = new HttpClient()) { @@ -142,7 +142,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region แบบประเมินผล(ผู้บังคับบัญชา) public async Task GetEvaluateAssignAsync(Guid id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}report/evaluate-commander?id={id}"; + var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-commander?id={id}"; EvaluateAssignResponse evaluate_assign; using (var client = new HttpClient()) { @@ -190,7 +190,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region แบบประเมินผล(คณะกรรมการ) public async Task GetEvaluateChairmanAssignAsync(Guid id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}report/evaluate-chairman?id={id}"; + var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-chairman?id={id}"; EvaluateChairmanAssignResponse evaluate_assign; using (var client = new HttpClient()) { @@ -255,7 +255,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region แบบรายงานการประเมินผล public async Task GetEvaluateResultAssignAsync(Guid id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}evaluate-result?assign_id={id}"; + var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}"; EvaluateResultAssignResponse evaluate_assign; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs index 46e31f30..5fa8e9e1 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs @@ -83,7 +83,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers public async Task> GetDisciplineUser(string status = "ALL", string type = "ALL", int year = 0, int page = 1, int pageSize = 25, string keyword = "") { var id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -225,7 +225,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers public async Task> CreateDiscipline([FromForm] DisciplineComplaint_AppealRequest req) { - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index ade28dd0..d1b07731 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -480,7 +480,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers data.Status = "NEW"; data.CommandTypeId = null; var baseAPI = _configuration["API"]; - var apiUrlDiscipline = $"{baseAPI}org/profile/discipline"; + var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -526,7 +526,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers data.StatusDiscard = "NEW"; data.CommandTypeDiscardId = null; var baseAPI = _configuration["API"]; - var apiUrlDiscipline = $"{baseAPI}org/profile/discipline"; + var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -571,7 +571,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers { data1.IsReport = "NEW"; var baseAPI = _configuration["API"]; - var apiUrlDiscipline = $"{baseAPI}org/profile/discipline"; + var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -597,7 +597,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers if (data2 != null) { data2.IsReport = "NEW"; var baseAPI = _configuration["API"]; - var apiUrlDiscipline = $"{baseAPI}org/profile/discipline"; + var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -641,7 +641,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers if (data != null) { data.Status = "DONE"; var baseAPI = _configuration["API"]; - var apiUrlDiscipline = $"{baseAPI}org/profile/discipline"; + var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Discipline.Service/appsettings.json b/BMA.EHR.Discipline.Service/appsettings.json index 2e16aa69..c4970de1 100644 --- a/BMA.EHR.Discipline.Service/appsettings.json +++ b/BMA.EHR.Discipline.Service/appsettings.json @@ -39,5 +39,5 @@ "Minute": "00" }, "Protocol": "HTTPS", - "API": "https://bma-ehr.frappet.synology.me/api/v1/" + "API": "https://bma-ehr.frappet.synology.me/api/v1" } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Controllers/NotifyController.cs b/BMA.EHR.Placement.Service/Controllers/NotifyController.cs index 5557c3fe..8024c8fc 100644 --- a/BMA.EHR.Placement.Service/Controllers/NotifyController.cs +++ b/BMA.EHR.Placement.Service/Controllers/NotifyController.cs @@ -85,7 +85,7 @@ namespace BMA.EHR.Placement.Service.Controllers // if (profile == null) // return Error(GlobalMessages.DataNotFound); - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -118,7 +118,7 @@ namespace BMA.EHR.Placement.Service.Controllers return Error(GlobalMessages.DataNotFound); - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position/{inbox.CreatedUserId}"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position/{inbox.CreatedUserId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index e17edde6..dbdf1c5e 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -387,7 +387,7 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -492,7 +492,7 @@ namespace BMA.EHR.Placement.Service.Controllers if (uppdated == null) return Error(GlobalMessages.PlacementAppointmentNotFound, 404); - var apiUrl = $"{_configuration["API"]}org/find/all"; + var apiUrl = $"{_configuration["API"]}/org/find/all"; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs index 7f7e9afe..c3cfd000 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs @@ -383,7 +383,7 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileempid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileempid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -488,7 +488,7 @@ namespace BMA.EHR.Placement.Service.Controllers if (uppdated == null) return Error(GlobalMessages.PlacementAppointmentNotFound, 404); - var apiUrl = $"{_configuration["API"]}org/find/all"; + var apiUrl = $"{_configuration["API"]}/org/find/all"; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index b813c321..0a7bc6d6 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -218,7 +218,7 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -581,7 +581,7 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -734,7 +734,7 @@ namespace BMA.EHR.Placement.Service.Controllers // person.PositionSalaryAmount = req.PositionSalaryAmount; // person.RecruitDate = req.ReportingDate; - var apiUrl = $"{_configuration["API"]}org/find/all"; + var apiUrl = $"{_configuration["API"]}/org/find/all"; using (var client = new HttpClient()) { @@ -784,7 +784,7 @@ namespace BMA.EHR.Placement.Service.Controllers person.posLevelId = req.posLevelId; person.posLevelName = req.posLevelName; - // apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{person.profileId}"; + // apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{person.profileId}"; // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index f8596688..87313568 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -72,7 +72,7 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -146,7 +146,7 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet("keycloak")] public async Task> GetListByKeycloak() { - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -343,7 +343,7 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 42eb09e7..4803d54c 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -72,7 +72,7 @@ namespace BMA.EHR.Placement.Service.Controllers // var child2Id = ""; // var child3Id = ""; // var child4Id = ""; - // var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + // var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; // using (var client = new HttpClient()) // { // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -441,7 +441,7 @@ namespace BMA.EHR.Placement.Service.Controllers return Error("ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง", 500); } - var apiUrl = $"{_configuration["API"]}org/profile/citizenid/position/{req.citizenId}"; + var apiUrl = $"{_configuration["API"]}/org/profile/citizenid/position/{req.citizenId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -593,7 +593,7 @@ namespace BMA.EHR.Placement.Service.Controllers if (uppdated == null) return Error(GlobalMessages.PlacementReceiveNotFound, 404); - var apiUrl = $"{_configuration["API"]}org/find/all"; + var apiUrl = $"{_configuration["API"]}/org/find/all"; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs index c2f28130..0496c288 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementRepatriationController.cs @@ -72,7 +72,7 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -224,7 +224,7 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs index 3927d7a9..9d65b179 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs @@ -67,7 +67,7 @@ namespace BMA.EHR.Placement.Service.Controllers [HttpGet("user")] public async Task> GetListByProfile() { - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -143,7 +143,7 @@ namespace BMA.EHR.Placement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -457,7 +457,7 @@ namespace BMA.EHR.Placement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Placement.Service/appsettings.json b/BMA.EHR.Placement.Service/appsettings.json index ce8f3567..623c492c 100644 --- a/BMA.EHR.Placement.Service/appsettings.json +++ b/BMA.EHR.Placement.Service/appsettings.json @@ -36,5 +36,5 @@ "Minute": "00" }, "Protocol": "HTTPS", - "API": "https://bma-ehr.frappet.synology.me/api/v1/" + "API": "https://bma-ehr.frappet.synology.me/api/v1" } \ No newline at end of file diff --git a/BMA.EHR.Report.Service/appsettings.json b/BMA.EHR.Report.Service/appsettings.json index 4e60742a..72ce3939 100644 --- a/BMA.EHR.Report.Service/appsettings.json +++ b/BMA.EHR.Report.Service/appsettings.json @@ -56,6 +56,6 @@ } ] }, - "APIPROBATION": "https://bma-ehr.frappet.synology.me/api/v1/probation/", + "APIPROBATION": "https://bma-ehr.frappet.synology.me/api/v1/probation", "API": "https://bma-ehr.frappet.synology.me/api/v1" } \ No newline at end of file diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs index d628b3d2..8ebbe4f9 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs @@ -352,7 +352,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var profiles = new List(); if (req.Type.Trim().ToUpper().Contains("OFFICER")) { - var apiUrl = $"{_configuration["API"]}org/profile/profileid/retire/{req.Year}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/retire/{req.Year}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -368,7 +368,7 @@ namespace BMA.EHR.Retirement.Service.Controllers } else { - var apiUrl = $"{_configuration["API"]}org/profile-employee/profileid/retire/{req.Year}"; + var apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/retire/{req.Year}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -889,7 +889,7 @@ namespace BMA.EHR.Retirement.Service.Controllers if (retire.Type == "OFFICER") { - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.ProfileId}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}"; using (var client = new HttpClient()) { var data = new RetirementProfile @@ -958,7 +958,7 @@ namespace BMA.EHR.Retirement.Service.Controllers } else { - var apiUrl = $"{_configuration["API"]}org/profile-employee/profileid/position/{req.ProfileId}"; + var apiUrl = $"{_configuration["API"]}/org/profile-employee/profileid/position/{req.ProfileId}"; using (var client = new HttpClient()) { var data = new RetirementProfile diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs index 0b15d4dd..bc54fd38 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs @@ -83,7 +83,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -279,7 +279,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.ProfileId}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -323,7 +323,7 @@ namespace BMA.EHR.Retirement.Service.Controllers //await _context.SaveChangesAsync(); var _baseAPI = _configuration["API"]; - var _apiUrl = $"{_baseAPI}org/profile/leave/{req.ProfileId}"; + var _apiUrl = $"{_baseAPI}/org/profile/leave/{req.ProfileId}"; using (var client = new HttpClient()) { @@ -567,7 +567,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{item.ProfileId}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{item.ProfileId}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 622c895b..62044356 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -72,7 +72,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -304,7 +304,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index 4e7a7241..b31eb49c 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -72,7 +72,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var child2Id = ""; var child3Id = ""; var child4Id = ""; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -265,7 +265,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdateUserId = UserId ?? "", LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/profileid/position/{req.Id}"; + var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.Id}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index d92ab5c6..645b4e52 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -124,7 +124,7 @@ namespace BMA.EHR.Retirement.Service.Controllers [HttpGet("user")] public async Task> GetListByProfile() { - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); @@ -413,7 +413,7 @@ namespace BMA.EHR.Retirement.Service.Controllers LastUpdatedAt = DateTime.Now, }; - var apiUrl = $"{_configuration["API"]}org/profile/keycloak/position"; + var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); diff --git a/BMA.EHR.Retirement.Service/appsettings.json b/BMA.EHR.Retirement.Service/appsettings.json index 666a2028..efe30be5 100644 --- a/BMA.EHR.Retirement.Service/appsettings.json +++ b/BMA.EHR.Retirement.Service/appsettings.json @@ -33,6 +33,6 @@ "BucketName": "bma-recruit" }, "Protocol": "HTTPS", - "API": "https://bma-ehr.frappet.synology.me/api/v1/", + "API": "https://bma-ehr.frappet.synology.me/api/v1", "APIV2": "https://bma-ehr.frappet.synology.me/api/v2" } \ No newline at end of file