Merge branch 'develop' into working

This commit is contained in:
Suphonchai Phoonsawat 2023-08-27 08:24:48 +07:00
commit c19ec30337
14 changed files with 31 additions and 28 deletions

View file

@ -25,7 +25,7 @@ namespace BMA.EHR.Report.Service.Controllers
private readonly IWebHostEnvironment _hostingEnvironment;
private readonly IConfiguration _configuration;
private readonly ProbationReportRepository _repository;
//private readonly ProbationReportRepository _repository;
private readonly GenericReportGenerator _reportGenerator;
@ -33,12 +33,12 @@ namespace BMA.EHR.Report.Service.Controllers
#region " Constuctor and Destructor "
public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration, ProbationReportRepository repository, GenericReportGenerator reportGenerator)
public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration,/* ProbationReportRepository repository*/ GenericReportGenerator reportGenerator)
{
_hostingEnvironment = hostingEnvironment;
_configuration = configuration;
_repository = repository;
//_repository = repository;
_reportGenerator = reportGenerator;
}
@ -95,7 +95,7 @@ namespace BMA.EHR.Report.Service.Controllers
case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
}
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"13-แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ-2.trdp");//
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"13-แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ.trdp");
var contentData = _reportGenerator.GenerateReport(rptFile, exportType);
return File(contentData, mimeType, $"probation.{exportType.Trim().ToLower()}");

View file

@ -28,9 +28,9 @@ namespace BMA.EHR.Report.Service.Controllers
_configuration = configuration;
}
#region
#region 31- & 32-
/// <summary>
/// รายงานหน้าประกาศเกษียณ
/// 31-ประกาศเกษียณข้าราชการ & 32-ประกาศเกษียณลูกจ้างประจำ
/// </summary>
/// <param name="Id">Id ของรอบเกษียณ</param>
/// <param name="exportType">pdf, docx หรือ xlsx</param>
@ -76,7 +76,7 @@ namespace BMA.EHR.Report.Service.Controllers
break;
case "EMPLOYEE":
reportfile = $"32-ประกาศเกษียณลูกจ้างประจำ.trdp";
returnfile = $"ประกาศเกษียณลูกจ้าง";
returnfile = $"ประกาศเกษียณลูกจ้าง.{exportType}";
break;
default:
return BadRequest(retire);
@ -126,4 +126,4 @@ namespace BMA.EHR.Report.Service.Controllers
}
#endregion
}
}
}