This commit is contained in:
parent
b478b9eded
commit
b4cc522fef
32 changed files with 413 additions and 412 deletions
|
|
@ -129,12 +129,12 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
var pageSize = req.pageSize <= 0 ? 25 : req.pageSize;
|
||||
var keyword = string.IsNullOrEmpty(req.keyword) ? string.Empty : req.keyword;
|
||||
var status = string.IsNullOrEmpty(req.status) ? string.Empty : req.status;
|
||||
|
||||
|
||||
var data_search = (from x in _context.DisciplineComplaints
|
||||
where x.Title.Contains(keyword) ||
|
||||
(x.Appellant == null ? false : x.Appellant.Contains(keyword))
|
||||
select x).ToList();
|
||||
|
||||
|
||||
if (status.Trim().ToUpper() != "ALL")
|
||||
data_search = data_search.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList();
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var data = query
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
|
|
@ -837,7 +837,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
refId = persons.Select(x => x.PersonId),
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
|
|
@ -364,7 +364,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
{
|
||||
client.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
|
|
@ -404,7 +404,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{id}";
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, _apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
|
|
@ -479,7 +479,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
{
|
||||
client.DefaultRequestHeaders.Authorization =
|
||||
new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var __res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
refId = new List<Guid> { Guid.Parse(id) },
|
||||
|
|
@ -543,7 +543,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{req.ProfileId}";
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
|
|
@ -617,7 +617,7 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var __res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
refId = new List<Guid> { Guid.Parse(req.ProfileId) },
|
||||
|
|
|
|||
|
|
@ -176,74 +176,74 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
InvestigationStatusResult = x.InvestigationStatusResult,
|
||||
});
|
||||
|
||||
bool desc = req.descending ?? false;
|
||||
if (!string.IsNullOrEmpty(req.sortBy))
|
||||
{
|
||||
switch (req.sortBy)
|
||||
{
|
||||
case "title":
|
||||
query = desc ? query.OrderByDescending(x => x.Title)
|
||||
: query.OrderBy(x => x.Title);
|
||||
break;
|
||||
bool desc = req.descending ?? false;
|
||||
if (!string.IsNullOrEmpty(req.sortBy))
|
||||
{
|
||||
switch (req.sortBy)
|
||||
{
|
||||
case "title":
|
||||
query = desc ? query.OrderByDescending(x => x.Title)
|
||||
: query.OrderBy(x => x.Title);
|
||||
break;
|
||||
|
||||
case "respondentType":
|
||||
query = desc ? query.OrderByDescending(x => x.RespondentType)
|
||||
: query.OrderBy(x => x.RespondentType);
|
||||
break;
|
||||
case "respondentType":
|
||||
query = desc ? query.OrderByDescending(x => x.RespondentType)
|
||||
: query.OrderBy(x => x.RespondentType);
|
||||
break;
|
||||
|
||||
case "offenseDetails":
|
||||
query = desc ? query.OrderByDescending(x => x.OffenseDetails)
|
||||
: query.OrderBy(x => x.OffenseDetails);
|
||||
break;
|
||||
case "offenseDetails":
|
||||
query = desc ? query.OrderByDescending(x => x.OffenseDetails)
|
||||
: query.OrderBy(x => x.OffenseDetails);
|
||||
break;
|
||||
|
||||
case "status":
|
||||
query = desc ? query.OrderByDescending(x => x.Status)
|
||||
: query.OrderBy(x => x.Status);
|
||||
break;
|
||||
case "status":
|
||||
query = desc ? query.OrderByDescending(x => x.Status)
|
||||
: query.OrderBy(x => x.Status);
|
||||
break;
|
||||
|
||||
case "investigationDateStart":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDateStart)
|
||||
: query.OrderBy(x => x.InvestigationDateStart);
|
||||
break;
|
||||
case "investigationDateStart":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDateStart)
|
||||
: query.OrderBy(x => x.InvestigationDateStart);
|
||||
break;
|
||||
|
||||
case "investigationDateEnd":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDateEnd)
|
||||
: query.OrderBy(x => x.InvestigationDateEnd);
|
||||
break;
|
||||
case "investigationDateEnd":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDateEnd)
|
||||
: query.OrderBy(x => x.InvestigationDateEnd);
|
||||
break;
|
||||
|
||||
case "dateReceived":
|
||||
query = desc ? query.OrderByDescending(x => x.DateReceived)
|
||||
: query.OrderBy(x => x.DateReceived);
|
||||
break;
|
||||
case "dateReceived":
|
||||
query = desc ? query.OrderByDescending(x => x.DateReceived)
|
||||
: query.OrderBy(x => x.DateReceived);
|
||||
break;
|
||||
|
||||
case "createdAt":
|
||||
query = desc ? query.OrderByDescending(x => x.CreatedAt)
|
||||
: query.OrderBy(x => x.CreatedAt);
|
||||
break;
|
||||
case "createdAt":
|
||||
query = desc ? query.OrderByDescending(x => x.CreatedAt)
|
||||
: query.OrderBy(x => x.CreatedAt);
|
||||
break;
|
||||
|
||||
case "investigationDetail":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDetail)
|
||||
: query.OrderBy(x => x.InvestigationDetail);
|
||||
break;
|
||||
case "investigationDetail":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationDetail)
|
||||
: query.OrderBy(x => x.InvestigationDetail);
|
||||
break;
|
||||
|
||||
case "investigationStatusResult":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationStatusResult)
|
||||
: query.OrderBy(x => x.InvestigationStatusResult);
|
||||
break;
|
||||
case "investigationStatusResult":
|
||||
query = desc ? query.OrderByDescending(x => x.InvestigationStatusResult)
|
||||
: query.OrderBy(x => x.InvestigationStatusResult);
|
||||
break;
|
||||
|
||||
default:
|
||||
query = query.OrderByDescending(x => x.InvestigationDateStart);
|
||||
default:
|
||||
query = query.OrderByDescending(x => x.InvestigationDateStart);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var data = query
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
var data = query
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
return Success(new { data, total = data_search.Count() });
|
||||
}
|
||||
|
||||
|
|
@ -967,7 +967,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
refId = persons.Select(x => x.PersonId),
|
||||
|
|
|
|||
|
|
@ -211,87 +211,87 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
ResultYear = x.ResultYear,//ปีงบประมาณ
|
||||
});
|
||||
|
||||
bool desc = req.descending ?? false;
|
||||
if (!string.IsNullOrEmpty(req.sortBy))
|
||||
{
|
||||
switch (req.sortBy)
|
||||
{
|
||||
case "title":
|
||||
query = desc ? query.OrderByDescending(x => x.Title)
|
||||
: query.OrderBy(x => x.Title);
|
||||
break;
|
||||
bool desc = req.descending ?? false;
|
||||
if (!string.IsNullOrEmpty(req.sortBy))
|
||||
{
|
||||
switch (req.sortBy)
|
||||
{
|
||||
case "title":
|
||||
query = desc ? query.OrderByDescending(x => x.Title)
|
||||
: query.OrderBy(x => x.Title);
|
||||
break;
|
||||
|
||||
case "respondentType":
|
||||
query = desc ? query.OrderByDescending(x => x.RespondentType)
|
||||
: query.OrderBy(x => x.RespondentType);
|
||||
break;
|
||||
case "respondentType":
|
||||
query = desc ? query.OrderByDescending(x => x.RespondentType)
|
||||
: query.OrderBy(x => x.RespondentType);
|
||||
break;
|
||||
|
||||
case "offenseDetails":
|
||||
query = desc ? query.OrderByDescending(x => x.OffenseDetails)
|
||||
: query.OrderBy(x => x.OffenseDetails);
|
||||
break;
|
||||
case "offenseDetails":
|
||||
query = desc ? query.OrderByDescending(x => x.OffenseDetails)
|
||||
: query.OrderBy(x => x.OffenseDetails);
|
||||
break;
|
||||
|
||||
case "disciplinaryFaultLevel":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryFaultLevel)
|
||||
: query.OrderBy(x => x.DisciplinaryFaultLevel);
|
||||
break;
|
||||
case "disciplinaryFaultLevel":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryFaultLevel)
|
||||
: query.OrderBy(x => x.DisciplinaryFaultLevel);
|
||||
break;
|
||||
|
||||
case "disciplinaryCaseFault":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryCaseFault)
|
||||
: query.OrderBy(x => x.DisciplinaryCaseFault);
|
||||
break;
|
||||
case "disciplinaryCaseFault":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryCaseFault)
|
||||
: query.OrderBy(x => x.DisciplinaryCaseFault);
|
||||
break;
|
||||
|
||||
case "status":
|
||||
query = desc ? query.OrderByDescending(x => x.Status)
|
||||
: query.OrderBy(x => x.Status);
|
||||
break;
|
||||
case "status":
|
||||
query = desc ? query.OrderByDescending(x => x.Status)
|
||||
: query.OrderBy(x => x.Status);
|
||||
break;
|
||||
|
||||
case "createdAt":
|
||||
query = desc ? query.OrderByDescending(x => x.CreatedAt)
|
||||
: query.OrderBy(x => x.CreatedAt);
|
||||
break;
|
||||
case "createdAt":
|
||||
query = desc ? query.OrderByDescending(x => x.CreatedAt)
|
||||
: query.OrderBy(x => x.CreatedAt);
|
||||
break;
|
||||
|
||||
case "disciplinaryDateStart":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryDateStart)
|
||||
: query.OrderBy(x => x.DisciplinaryDateStart);
|
||||
break;
|
||||
case "disciplinaryDateStart":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryDateStart)
|
||||
: query.OrderBy(x => x.DisciplinaryDateStart);
|
||||
break;
|
||||
|
||||
case "disciplinaryDateEnd":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryDateEnd)
|
||||
: query.OrderBy(x => x.DisciplinaryDateEnd);
|
||||
break;
|
||||
case "disciplinaryDateEnd":
|
||||
query = desc ? query.OrderByDescending(x => x.DisciplinaryDateEnd)
|
||||
: query.OrderBy(x => x.DisciplinaryDateEnd);
|
||||
break;
|
||||
|
||||
case "resultOc":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultOc)
|
||||
: query.OrderBy(x => x.ResultOc);
|
||||
break;
|
||||
case "resultOc":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultOc)
|
||||
: query.OrderBy(x => x.ResultOc);
|
||||
break;
|
||||
|
||||
case "resultDisciplineType":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultDisciplineType)
|
||||
: query.OrderBy(x => x.ResultDisciplineType);
|
||||
break;
|
||||
case "resultDisciplineType":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultDisciplineType)
|
||||
: query.OrderBy(x => x.ResultDisciplineType);
|
||||
break;
|
||||
|
||||
case "resultTitleType":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultTitleType)
|
||||
: query.OrderBy(x => x.ResultTitleType);
|
||||
break;
|
||||
case "resultTitleType":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultTitleType)
|
||||
: query.OrderBy(x => x.ResultTitleType);
|
||||
break;
|
||||
|
||||
case "resultYear":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultYear)
|
||||
: query.OrderBy(x => x.ResultYear);
|
||||
break;
|
||||
case "resultYear":
|
||||
query = desc ? query.OrderByDescending(x => x.ResultYear)
|
||||
: query.OrderBy(x => x.ResultYear);
|
||||
break;
|
||||
|
||||
default:
|
||||
query = query.OrderByDescending(x => x.CreatedAt);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
query = query.OrderByDescending(x => x.CreatedAt);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var data = query
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
var data = query
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
return Success(new { data, total = data_search.Count() });
|
||||
}
|
||||
|
|
@ -708,7 +708,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new
|
||||
{
|
||||
|
|
@ -755,7 +755,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new
|
||||
{
|
||||
|
|
@ -801,7 +801,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new
|
||||
{
|
||||
|
|
@ -829,7 +829,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new
|
||||
{
|
||||
|
|
@ -875,7 +875,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _req = new HttpRequestMessage(HttpMethod.Post, apiUrlDiscipline);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlDiscipline, new
|
||||
{
|
||||
|
|
@ -949,7 +949,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
.OrderByDescending(x => x.CreatedAt)
|
||||
.ToListAsync();
|
||||
var result = data
|
||||
.Select((x, idx) => new {
|
||||
.Select((x, idx) => new
|
||||
{
|
||||
no = (idx + 1).ToString(),
|
||||
commandSubject = x.commandType,
|
||||
createdAt = x.CreatedAt
|
||||
|
|
@ -1052,7 +1053,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1189,7 +1190,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1404,7 +1405,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1529,7 +1530,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1652,7 +1653,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1775,7 +1776,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -1898,7 +1899,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -2021,7 +2022,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -2144,7 +2145,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -2283,7 +2284,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData,
|
||||
|
|
@ -2337,7 +2338,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
data = resultData1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue