ยกเลิกลาออก ยิงกลับไปที่ command เปลี่ยนเป็น cancel
Some checks failed
release-dev / release-dev (push) Failing after 11s
Some checks failed
release-dev / release-dev (push) Failing after 11s
This commit is contained in:
parent
77eaca72b3
commit
081260a83b
2 changed files with 34 additions and 34 deletions
|
|
@ -3077,23 +3077,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
// var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave";
|
||||
// using (var client = new HttpClient())
|
||||
// {
|
||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
// client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
// var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
// {
|
||||
// data = resultData,
|
||||
// });
|
||||
// var _result = await _res.Content.ReadAsStringAsync();
|
||||
// if (_res.IsSuccessStatusCode)
|
||||
// {
|
||||
data.ForEach(profile => profile.Status = "DONE");
|
||||
data.ForEach(profile => profile.RetirementResign.Status = "CANCEL");
|
||||
await _context.SaveChangesAsync();
|
||||
// }
|
||||
// }
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
commandId = resultData.Select(x => x.commandId).ToList(),
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
if (_res.IsSuccessStatusCode)
|
||||
{
|
||||
data.ForEach(profile => profile.Status = "DONE");
|
||||
data.ForEach(profile => profile.RetirementResign.Status = "CANCEL");
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2573,23 +2573,23 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
// var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-employee-leave";
|
||||
// using (var client = new HttpClient())
|
||||
// {
|
||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
// client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
// var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
// {
|
||||
// data = resultData,
|
||||
// });
|
||||
// var _result = await _res.Content.ReadAsStringAsync();
|
||||
// if (_res.IsSuccessStatusCode)
|
||||
// {
|
||||
data.ForEach(profile => profile.Status = "DONE");
|
||||
data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL");
|
||||
await _context.SaveChangesAsync();
|
||||
// }
|
||||
// }
|
||||
var apiUrlOrg = $"{baseAPIOrg}/org/command/cancel-resign";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.PostAsJsonAsync(apiUrlOrg, new
|
||||
{
|
||||
commandId = resultData.Select(x => x.commandId).ToList(),
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
if (_res.IsSuccessStatusCode)
|
||||
{
|
||||
data.ForEach(profile => profile.Status = "DONE");
|
||||
data.ForEach(profile => profile.RetirementResignEmployee.Status = "CANCEL");
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue