Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop
This commit is contained in:
commit
ae1cccb600
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();
|
||||
|
|
@ -1959,14 +2034,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();
|
||||
|
|
@ -2256,6 +2351,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(),
|
||||
|
|
@ -2271,9 +2368,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");
|
||||
|
|
@ -2388,14 +2494,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();
|
||||
|
|
@ -2450,7 +2574,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(),
|
||||
|
|
@ -2466,6 +2590,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
AuthorizedUserFullName = raw_data.AuthorizedUserFullName,
|
||||
AuthorizedPosition = raw_data.AuthorizedPosition,
|
||||
Subject = $"เรื่อง {raw_data.CommandSubject}",
|
||||
employee = receiver
|
||||
};
|
||||
|
||||
return command;
|
||||
|
|
@ -2585,14 +2710,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();
|
||||
|
|
@ -2840,7 +2984,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
|
||||
};
|
||||
|
|
@ -2941,7 +3085,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
|
||||
};
|
||||
|
|
@ -3037,7 +3181,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
|
||||
};
|
||||
|
|
@ -3133,7 +3277,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
|
||||
};
|
||||
|
|
@ -4207,7 +4351,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
|
||||
};
|
||||
|
|
@ -4534,7 +4678,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
|
||||
};
|
||||
|
|
@ -4680,7 +4824,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