no message
This commit is contained in:
parent
1c7b3b1c6c
commit
edd5bfe0c2
9 changed files with 126 additions and 224 deletions
|
|
@ -658,7 +658,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
{
|
||||
var placementProfiles = await _context.RetirementOthers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
// .Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "WAITTING");
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -691,26 +691,21 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
orderby r.Sequence
|
||||
select new
|
||||
{
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
No = r.Sequence.ToString().ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.rootOld == null ? "" : p.rootOld,
|
||||
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
OldOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
|
||||
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = p.rootOld == null ? "" : p.rootOld,
|
||||
NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
LeaveDate = "",
|
||||
NewOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
|
||||
NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
}).ToList();
|
||||
|
|
@ -813,7 +808,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
{
|
||||
var placementProfiles = await _context.RetirementOthers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
// .Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "WAITTING");
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -846,27 +841,22 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
orderby r.Sequence
|
||||
select new
|
||||
{
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
No = r.Sequence.ToString().ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.rootOld == null ? "" : p.rootOld,
|
||||
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
Education = p.EducationOld == null ? "-" : p.EducationOld,
|
||||
OldOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
|
||||
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = p.rootOld == null ? "" : p.rootOld,
|
||||
NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
LeaveDate = "",
|
||||
MilitaryDate = p.MilitaryDate == null ? "" : p.MilitaryDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
|
||||
NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
MilitaryDate = p.MilitaryDate == null ? "" : p.MilitaryDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Reason = p.Reason == null ? "-" : p.Reason,
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
}).ToList();
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
{
|
||||
var placementProfiles = await _context.RetirementResigns
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
// .Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
|
|
@ -1810,54 +1810,6 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
|
|||
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] ReportAttachmentRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var report_data = (from p in _context.RetirementResigns
|
||||
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
|
||||
.ToList()
|
||||
join r in req.refIds
|
||||
on p.Id.ToString() equals r.refId
|
||||
orderby r.Sequence
|
||||
select new
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
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.CommandYear.ToThaiYear().ToString().ToThaiNumber(),
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
}).ToList();
|
||||
return Success(report_data);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ออกคำสั่ง C-PM-23 คำสั่งให้ลูกจ้างออกจากราชการ
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue