แนบท้ายคำสั่ง (1, 2, 3, 4, 17, 21, 22, 23, 24 )
This commit is contained in:
parent
def2b8f7fe
commit
6591679d79
1 changed files with 180 additions and 36 deletions
|
|
@ -122,14 +122,33 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType01AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"01-คำสั่งบรรจุและแต่งตั้งผู้สอบแข่งขันได้-2.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -241,14 +260,33 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType02AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -360,14 +398,32 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType03AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"03-คำสั่งแต่งตั้งผู้สอบแข่งขัน.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -479,14 +535,33 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType03AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"04-คำสั่งย้ายผู้สอบแข่งขัน.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -1958,14 +2033,34 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
|
||||
var data = await _commandReportRepository.GetCommandType17AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"34-คำสั่งอนุญาตให้ข้าราชการลาออกจากราชการ-5.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -2255,6 +2350,8 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//var recvId = raw_data.Receivers.Select(x => x.RefPlacementProfileId).ToList();
|
||||
//var positionList = string.Empty;
|
||||
|
||||
//GetCommandType21AttachmentAsync
|
||||
var receiver = await _commandReportRepository.GetCommandType21AttachmentAsync(commandId);
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
|
|
@ -2270,9 +2367,18 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
AuthorizedUserFullName = raw_data.AuthorizedUserFullName,
|
||||
AuthorizedPosition = raw_data.AuthorizedPosition,
|
||||
Subject = $"เรื่อง {raw_data.CommandSubject}",
|
||||
employee = receiver,
|
||||
};
|
||||
|
||||
|
||||
return command;
|
||||
//return new
|
||||
//{
|
||||
// CommandNo = command.CommandNo,
|
||||
// CommandYear = command.CommandYear,
|
||||
// IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
// CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
// data = data,
|
||||
//};
|
||||
//var receiver = await _commandReportRepository.GetCommandType21AttachmentAsync(commandId);
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"20-คำสั่งแต่งตั้งลูกจ้างชั่วคราวเป็นลูกจ้างประจำ-2.trdp");
|
||||
|
|
@ -2387,14 +2493,32 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType22AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน)-แนบท้าย.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -2449,7 +2573,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
|
||||
//var recvId = raw_data.Receivers.Select(x => x.RefPlacementProfileId).ToList();
|
||||
//var positionList = string.Empty;
|
||||
|
||||
var receiver = await _commandReportRepository.GetCommandType23AttachmentAsync(commandId);
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
|
|
@ -2465,6 +2589,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
AuthorizedUserFullName = raw_data.AuthorizedUserFullName,
|
||||
AuthorizedPosition = raw_data.AuthorizedPosition,
|
||||
Subject = $"เรื่อง {raw_data.CommandSubject}",
|
||||
employee = receiver
|
||||
};
|
||||
|
||||
return command;
|
||||
|
|
@ -2584,14 +2709,33 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var command = await _repository.GetByIdAsync(commandId);
|
||||
if (command == null)
|
||||
//var command = await _repository.GetByIdAsync(commandId);
|
||||
//if (command == null)
|
||||
//{
|
||||
// throw new Exception(GlobalMessages.CommandNotFound);
|
||||
//}
|
||||
var raw_data = await _repository.GetByIdAsync(commandId);
|
||||
if (raw_data == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
}
|
||||
|
||||
var command = new
|
||||
{
|
||||
CommandNo = raw_data.CommandNo.ToThaiNumber(),
|
||||
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
IssuerOrganizationName = raw_data.IssuerOrganizationName,
|
||||
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
|
||||
};
|
||||
var data = await _commandReportRepository.GetCommandType24AttachmentAsync(commandId);
|
||||
return data;
|
||||
return new
|
||||
{
|
||||
CommandNo = command.CommandNo,
|
||||
CommandYear = command.CommandYear,
|
||||
IssuerOrganizationName = command.IssuerOrganizationName,
|
||||
CommandExcecuteDate = command.CommandExcecuteDate,
|
||||
data = data,
|
||||
};
|
||||
|
||||
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"คำสั่งแต่งตั้งลูกจ้างประจำ(ย้าย)-แนบท้าย.trdp");
|
||||
|
||||
//ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -2839,7 +2983,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-01",
|
||||
template = "C-PM-01-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -2940,7 +3084,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-02",
|
||||
template = "C-PM-02-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -3036,7 +3180,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-03",
|
||||
template = "C-PM-03-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -3132,7 +3276,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-04",
|
||||
template = "C-PM-04-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -4206,7 +4350,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-17",
|
||||
template = "C-PM-17-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -4533,7 +4677,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-22",
|
||||
template = "C-PM-22-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
@ -4679,7 +4823,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
|
||||
var data = new
|
||||
{
|
||||
template = "C-PM-24",
|
||||
template = "C-PM-24-attachment",
|
||||
reportName = "docx-report",
|
||||
data = contentData
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue