ปรับ condition generate file รายงานเกษียณ
This commit is contained in:
parent
4e7f3f6ff4
commit
86cd829c0e
1 changed files with 4 additions and 4 deletions
|
|
@ -54,12 +54,12 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
switch (retire.GetType().GetProperty("Type").GetValue(retire))
|
||||
{
|
||||
case "OFFICER":
|
||||
if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "ADD")
|
||||
if (string.IsNullOrEmpty(retire.GetType().GetProperty("TypeReport").GetValue(retire)))
|
||||
{
|
||||
reportfile = $"31-ประกาศเกษียณข้าราชการ-1.trdp";
|
||||
returnfile = $"ประกาศเกษียณข้าราชการ.{exportType}";
|
||||
}
|
||||
else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "EDIT")
|
||||
else if (retire.GetType().GetProperty("TypeReport").GetValue(retire) == "ADD" || retire.GetType().GetProperty("TypeReport").GetValue(retire) == "EDIT")
|
||||
{
|
||||
reportfile = $"31-ประกาศเกษียณข้าราชการ-2.trdp";
|
||||
returnfile = $"แก้ไขประกาศเกษียณข้าราชการ.{exportType}";
|
||||
|
|
@ -71,7 +71,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
return Error(retire.GetType().GetProperty("TypeReport").ToString());
|
||||
return Error(retire.GetType().GetProperty("TypeReport").GetValue(retire));
|
||||
}
|
||||
break;
|
||||
case "EMPLOYEE":
|
||||
|
|
@ -79,7 +79,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
returnfile = $"ประกาศเกษียณลูกจ้าง.{exportType}";
|
||||
break;
|
||||
default:
|
||||
return BadRequest(retire);
|
||||
return Error(retire.GetType().GetProperty("Type").GetValue(retire));
|
||||
}
|
||||
|
||||
var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", reportfile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue