diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
index 0b3c6dbb..4a747124 100644
--- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
+++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
@@ -1764,6 +1764,76 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
return Success();
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-23
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("employee/report")]
+ public async Task> 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();
+ }
+
+ ///
+ /// เอกสารแนบท้าย C-PM-23
+ ///
+ /// Record Id ของคำสั่ง
+ /// pdf, docx หรือ xlsx
+ ///
+ /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("employee/report/attachment")]
+ [AllowAnonymous]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status401Unauthorized)]
+ [ProducesResponseType(StatusCodes.Status500InternalServerError)]
+ public async Task> 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;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-23
///
@@ -1810,7 +1880,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
}
///
- /// ส่งรายชื่อออกคำสั่ง C-PM-23
+ /// ส่งรายชื่อออกคำสั่ง C-PM-41
///
///
///
@@ -1833,7 +1903,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
}
///
- /// เอกสารแนบท้าย C-PM-23
+ /// เอกสารแนบท้าย C-PM-41
///
/// Record Id ของคำสั่ง
/// pdf, docx หรือ xlsx
@@ -1860,15 +1930,15 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
Seq = "",
CitizenId = "",
FullName = "",
- Organization = p.OrganizationPositionOld ?? "",
PositionName = p.PositionOld ?? "",
- PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld.ToThaiNumber(),
- PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld.ToThaiNumber(),
+ Organization = p.OrganizationPositionOld ?? "",
+ PositionLevel = p.PositionLevelOld ?? "",
+ PositionType = p.PositionTypeOld ?? "",
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(),
- RetireDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiFullDate3().ToThaiNumber(),
- //CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
- CommandYear = ""
+ Remark = p.Reason ?? "",
+ RemarkHorizontal = p.RemarkHorizontal,
})
.ToListAsync();
return Success(report_data);
@@ -1880,7 +1950,7 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
}
///
- /// ออกคำสั่ง C-PM-23
+ /// ออกคำสั่ง C-PM-41
///
///
///