ยกเลิกลา

This commit is contained in:
moss 2025-04-03 16:49:40 +07:00
parent 7716a6fd02
commit 337bff8853
2 changed files with 6 additions and 4 deletions

View file

@ -1246,13 +1246,15 @@ namespace BMA.EHR.Retirement.Service.Controllers
}
updated.IsCancel = true;
}
else
else if (updated.Status == "REPORT")
{
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.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
Console.WriteLine(_res);
Console.WriteLine($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
}
}
updated.Status = "CANCEL";
@ -2251,7 +2253,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
positionExecutive = "",
positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld,
isLeave = true,
isLeave = p.IsCancel == true ? false : true,
leaveReason = "ออกจากราชการ",
dateLeave = r.commandDateAffect,
commandId = r.commandId,

View file

@ -1152,7 +1152,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
}
updated.IsCancel = true;
}
else
else if (updated.Status == "REPORT")
{
using (var client = new HttpClient())
{
@ -1691,7 +1691,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
mouthSalaryAmount = r.mouthSalaryAmount,
positionType = p.PositionTypeOld,
positionLevel = p.PositionLevelOld,
isLeave = true,
isLeave = p.IsCancel == true ? false : true,
leaveReason = "ออกจากราชการ",
dateLeave = r.commandDateAffect,
commandId = r.commandId,