Merge pull request #1744 from Frappet/task/1728-ออกคำสั่งลาออก
1728-ยกเลิกคำสั่ง
This commit is contained in:
commit
b89f394f1e
2 changed files with 5 additions and 17 deletions
|
|
@ -1741,7 +1741,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel17/{updated.Id}");
|
||||
}
|
||||
updated.Status = "CANCELING";
|
||||
updated.Status = "CANCEL";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3584,7 +3584,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
var updated = await _context.RetirementResigns.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (updated == null)
|
||||
if (updated == null)
|
||||
return Error(GlobalMessages.RetirementResignNotFound, 404);
|
||||
|
||||
var ReasonResign = req.ReasonResign;
|
||||
|
|
@ -3605,8 +3605,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
updated.ReasonResign = !string.IsNullOrEmpty(ReasonResign) ? ReasonResign : updated.ReasonResign;
|
||||
updated.Reason = req.ReasonResign;
|
||||
updated.Remark = !string.IsNullOrEmpty(req.Remark) ? req.Remark : null;
|
||||
updated.SendDate = req.SendDate.HasValue ? req.SendDate : updated.SendDate;
|
||||
updated.ActiveDate = req.ActiveDate.HasValue ? req.ActiveDate : updated.ActiveDate;
|
||||
updated.SendDate = req.SendDate.HasValue ? req.SendDate : updated.SendDate;
|
||||
updated.ActiveDate = req.ActiveDate.HasValue ? req.ActiveDate : updated.ActiveDate;
|
||||
updated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
updated.LastUpdateUserId = UserId ?? "";
|
||||
updated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
|
|||
|
|
@ -1648,18 +1648,6 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
await _context.AddRangeAsync(addList);
|
||||
await _context.SaveChangesAsync();
|
||||
// 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($"{_configuration["API"]}/org/workflow/add-workflow", new
|
||||
// {
|
||||
// refId = retirementResignEmployeeCancel.Id,
|
||||
// sysName = "RETIREMENT_CANCEL_EMP",
|
||||
// posLevelName = retirementResignEmployeeCancel.PositionLevelOld,
|
||||
// posTypeName = retirementResignEmployeeCancel.PositionTypeOld,
|
||||
// });
|
||||
// }
|
||||
updated.IsCancel = true;
|
||||
updated.Status = "CANCELING";
|
||||
}
|
||||
|
|
@ -1671,7 +1659,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _res = await client.DeleteAsync($"{_configuration["API"]}/org/command/tab2Cancel23/{updated.Id}");
|
||||
}
|
||||
updated.Status = "CANCELING";
|
||||
updated.Status = "CANCEL";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue