This commit is contained in:
parent
be45cf58b8
commit
777f4d0930
2 changed files with 40 additions and 40 deletions
|
|
@ -3076,26 +3076,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else
|
else
|
||||||
//{
|
{
|
||||||
// var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
||||||
// using (var client = new HttpClient())
|
using (var client = new HttpClient())
|
||||||
// {
|
{
|
||||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
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
|
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||||
// {
|
{
|
||||||
// commandId = resultData.Select(x => x.commandId).ToList(),
|
commandId = resultData.Select(x => x.commandId).ToList(),
|
||||||
// });
|
});
|
||||||
// var _result = await _res.Content.ReadAsStringAsync();
|
var _result = await _res.Content.ReadAsStringAsync();
|
||||||
// if (_res.IsSuccessStatusCode)
|
if (_res.IsSuccessStatusCode)
|
||||||
// {
|
{
|
||||||
// data.ForEach(profile => profile.Status = "DONE");
|
data.ForEach(profile => profile.Status = "DONE");
|
||||||
// data.ForEach(profile => profile.RetirementResign.Status = "CANCEL");
|
data.ForEach(profile => profile.RetirementResign.Status = "CANCEL");
|
||||||
// await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2572,26 +2572,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else
|
else
|
||||||
//{
|
{
|
||||||
// var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
||||||
// using (var client = new HttpClient())
|
using (var client = new HttpClient())
|
||||||
// {
|
{
|
||||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
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
|
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||||
// {
|
{
|
||||||
// commandId = resultData.Select(x => x.commandId).ToList(),
|
commandId = resultData.Select(x => x.commandId).ToList(),
|
||||||
// });
|
});
|
||||||
// var _result = await _res.Content.ReadAsStringAsync();
|
var _result = await _res.Content.ReadAsStringAsync();
|
||||||
// if (_res.IsSuccessStatusCode)
|
if (_res.IsSuccessStatusCode)
|
||||||
// {
|
{
|
||||||
// data.ForEach(profile => profile.Status = "DONE");
|
data.ForEach(profile => profile.Status = "DONE");
|
||||||
// data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL");
|
data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL");
|
||||||
// await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue