Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop
# Conflicts: # BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
This commit is contained in:
commit
569f0f7fd9
1 changed files with 79 additions and 9 deletions
|
|
@ -1764,6 +1764,76 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
||||||
return Success();
|
return Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ส่งรายชื่อออกคำสั่ง C-PM-23
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200"></response>
|
||||||
|
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPost("employee/report")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportEmployee([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.RetirementResigns
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.Status = "REPORT";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// เอกสารแนบท้าย C-PM-23
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">Record Id ของคำสั่ง</param>
|
||||||
|
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPost("employee/report/attachment")]
|
||||||
|
[AllowAnonymous]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportEmployeeAttachment([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var report_data = await _context.RetirementResigns
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Select(p => new
|
||||||
|
{
|
||||||
|
//Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||||
|
//CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||||
|
//FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||||
|
Seq = "",
|
||||||
|
CitizenId = "",
|
||||||
|
FullName = "",
|
||||||
|
Organization = p.OrganizationPositionOld ?? "",
|
||||||
|
PositionName = p.PositionOld ?? "",
|
||||||
|
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld.ToThaiNumber(),
|
||||||
|
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld.ToThaiNumber(),
|
||||||
|
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||||
|
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||||
|
RetireDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||||
|
//CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||||
|
CommandYear = ""
|
||||||
|
})
|
||||||
|
.ToListAsync();
|
||||||
|
return Success(report_data);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-23
|
/// ออกคำสั่ง C-PM-23
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -1810,7 +1880,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ส่งรายชื่อออกคำสั่ง C-PM-23
|
/// ส่งรายชื่อออกคำสั่ง C-PM-41
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <response code="200"></response>
|
/// <response code="200"></response>
|
||||||
|
|
@ -1833,7 +1903,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// เอกสารแนบท้าย C-PM-23
|
/// เอกสารแนบท้าย C-PM-41
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Record Id ของคำสั่ง</param>
|
/// <param name="id">Record Id ของคำสั่ง</param>
|
||||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||||
|
|
@ -1860,15 +1930,15 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
||||||
Seq = "",
|
Seq = "",
|
||||||
CitizenId = "",
|
CitizenId = "",
|
||||||
FullName = "",
|
FullName = "",
|
||||||
Organization = p.OrganizationPositionOld ?? "",
|
|
||||||
PositionName = p.PositionOld ?? "",
|
PositionName = p.PositionOld ?? "",
|
||||||
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld.ToThaiNumber(),
|
Organization = p.OrganizationPositionOld ?? "",
|
||||||
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld.ToThaiNumber(),
|
PositionLevel = p.PositionLevelOld ?? "",
|
||||||
|
PositionType = p.PositionTypeOld ?? "",
|
||||||
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||||
|
ActiveDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||||
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||||
RetireDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
Remark = p.Reason ?? "",
|
||||||
//CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
RemarkHorizontal = p.RemarkHorizontal,
|
||||||
CommandYear = ""
|
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
return Success(report_data);
|
return Success(report_data);
|
||||||
|
|
@ -1880,7 +1950,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-23
|
/// ออกคำสั่ง C-PM-41
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <response code="200"></response>
|
/// <response code="200"></response>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue