Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2024-07-08 09:18:21 +07:00
commit aaa180e217
22 changed files with 75 additions and 62 deletions

View file

@ -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 ", ""));

View file

@ -7487,6 +7487,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7603,6 +7605,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7719,6 +7723,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7834,6 +7840,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -7950,6 +7958,8 @@ namespace BMA.EHR.Application.Repositories.Commands
{
PersonId = x.RefPlacementProfileId,
Id = x.RefDisciplineId,
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
});
var baseAPI = _configuration["API"];
@ -9158,14 +9168,14 @@ namespace BMA.EHR.Application.Repositories.Commands
var raw = JsonConvert.DeserializeObject<dynamic>(apiResult.Result);
if (raw != null)
{
if(raw.result!.rootId != null && raw.result!.root != null)
if (raw.result!.rootId != null && raw.result!.root != null)
{
ret.Add(new KeyValueItemResponse
{
Id = raw.result!.rootId ?? null,
Name = raw.result!.root ?? null,
});
}
}
}
}
// var rootOcId = await GetRootOcIdAsync(UserOrganizationId);

View file

@ -43,7 +43,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region
public async Task<object> 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<object> 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<object> 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<object> 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<object> 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())
{

View file

@ -83,7 +83,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
public async Task<ActionResult<ResponseObject>> 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<ActionResult<ResponseObject>> 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 ", ""));

View file

@ -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 ", ""));

View file

@ -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"
}

View file

@ -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 ", ""));

View file

@ -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())
{

View file

@ -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())
{

View file

@ -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 ", ""));
@ -1176,6 +1176,9 @@ namespace BMA.EHR.Placement.Service.Controllers
profile.nodeId = null;
profile.posmasterId = null;
profile.positionId = null;
profile.Draft = false;
profile.typeCommand = null;
profile.PlacementStatus = "UN-CONTAIN";
_context.SaveChanges();
return Success();

View file

@ -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<ActionResult<ResponseObject>> 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 ", ""));

View file

@ -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())
{

View file

@ -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 ", ""));

View file

@ -67,7 +67,7 @@ namespace BMA.EHR.Placement.Service.Controllers
[HttpGet("user")]
public async Task<ActionResult<ResponseObject>> 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 ", ""));

View file

@ -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"
}

View file

@ -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"
}

View file

@ -352,7 +352,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
var profiles = new List<OrgRequestArrayData>();
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

View file

@ -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 ", ""));

View file

@ -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 ", ""));

View file

@ -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 ", ""));

View file

@ -124,7 +124,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
[HttpGet("user")]
public async Task<ActionResult<ResponseObject>> 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 ", ""));

View file

@ -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"
}