แก้ปีพ้นราชการ
This commit is contained in:
parent
788055d358
commit
f4ba77a30d
2 changed files with 9 additions and 3 deletions
|
|
@ -522,8 +522,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("report/{commandTypeId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req, Guid commandTypeId)
|
||||
[HttpPost("report")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] PlacementProfileRequest req)
|
||||
{
|
||||
foreach (var item in req.Id)
|
||||
{
|
||||
|
|
@ -533,7 +533,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (uppdated == null)
|
||||
continue;
|
||||
|
||||
uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId);
|
||||
// uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId);
|
||||
uppdated.Status = "REPORT";
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
|
|
|
|||
|
|
@ -310,6 +310,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
{
|
||||
if (!req.Type.Trim().ToUpper().Contains("EMPLOYEE") && !req.Type.Trim().ToUpper().Contains("OFFICER"))
|
||||
return Error("ประเภทพ้นราชการไม่ถูกต้อง");
|
||||
if (req.Year == 0)
|
||||
{
|
||||
req.Year = DateTime.Now.Year;
|
||||
if (req.Year > 2500)
|
||||
req.Year = req.Year - 543;
|
||||
}
|
||||
|
||||
var round = 1;
|
||||
var retire = await _context.RetirementPeriods
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue