ยกเลิกลา

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

View file

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