apiจัดสรร
This commit is contained in:
parent
0aa0aedba9
commit
15931fbaca
27 changed files with 64051 additions and 120 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Domain.Common;
|
||||
using BMA.EHR.Domain.Extensions;
|
||||
using BMA.EHR.Domain.Models.HR;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Retirement;
|
||||
using BMA.EHR.Domain.Shared;
|
||||
|
|
@ -247,6 +248,22 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
if (_doc != null)
|
||||
retirementDeceased.Document = _doc;
|
||||
}
|
||||
await _context.ProfileSalaries.AddAsync(new ProfileSalary
|
||||
{
|
||||
Date = req.Date,
|
||||
SalaryRef = req.Number,
|
||||
CommandNo = "-",
|
||||
SalaryClass = "-",
|
||||
PosNoEmployee = "-",
|
||||
CommandTypeName = "-",
|
||||
Profile = profile,
|
||||
CreatedUserId = FullName ?? "",
|
||||
CreatedFullName = UserId ?? "System Administrator",
|
||||
CreatedAt = DateTime.Now,
|
||||
LastUpdateFullName = FullName ?? "System Administrator",
|
||||
LastUpdateUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
});
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
|
|
|
|||
|
|
@ -560,6 +560,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
FutureWork = p.FutureWork,
|
||||
FutureWorkReason = p.FutureWorkReason,
|
||||
Suggestion = p.Suggestion,
|
||||
AppointDate = p.AppointDate,
|
||||
LastUpdatedAt = p.LastUpdatedAt,
|
||||
CreatedAt = p.CreatedAt,
|
||||
})
|
||||
|
|
@ -591,6 +592,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
data.FutureWork,
|
||||
data.FutureWorkReason,
|
||||
data.Suggestion,
|
||||
data.AppointDate,
|
||||
data.LastUpdatedAt,
|
||||
data.CreatedAt,
|
||||
};
|
||||
|
|
@ -717,5 +719,32 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// แก้ไขกําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก
|
||||
/// </summary>
|
||||
/// <param name="id">Id กําหนดวันนัดหมายเพื่อทําการสัมภาษณ์การลาออก</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("questionnaire/appoint/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateAppointQuestion([FromBody] RetirementQuestionAppointRequest req, Guid id)
|
||||
{
|
||||
var uppdated = await _context.RetirementQuestions.AsQueryable()
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (uppdated == null)
|
||||
return Error(GlobalMessages.RetirementQuestionNotFound);
|
||||
|
||||
uppdated.AppointDate = req.AppointDate;
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BMA.EHR.Retirement.Service.Requests
|
||||
{
|
||||
public class RetirementQuestionAppointRequest
|
||||
{
|
||||
public DateTime AppointDate { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue