Merge branch 'develop' into work

This commit is contained in:
Kittapath 2023-09-15 00:10:18 +07:00
commit 6a08791d00
14 changed files with 106 additions and 79 deletions

View file

@ -1,22 +1,10 @@
using BMA.EHR.Domain.Common;
using BMA.EHR.Domain.Extensions;
using BMA.EHR.Domain.Shared;
using BMA.EHR.Application.Repositories.Reports;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
using Swashbuckle.AspNetCore.Annotations;
using DocumentFormat.OpenXml.Drawing;
using Telerik.Reporting;
using Telerik.Reporting.Processing;
using System.IO;
using Newtonsoft.Json;
using BMA.EHR.Application.Responses;
using static BMA.EHR.Application.Responses.EvaluateRecordAssignResponse;
using static BMA.EHR.Application.Responses.ProbationAssignResponse;
using DocumentFormat.OpenXml.Drawing.Charts;
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Wordprocessing;
namespace BMA.EHR.Report.Service.Controllers
{
@ -819,7 +807,7 @@ namespace BMA.EHR.Report.Service.Controllers
Check_Moral2Level2 = moral2.col2,
Check_Moral2Level3 = moral2.col3,
Check_Moral2Level4 = moral2.col4,
Check_Moral2Level5 = moral2.col4,
Check_Moral2Level5 = moral2.col5,
Check_Moral3Level1 = moral3.col1,
Check_Moral3Level2 = moral3.col2,
Check_Moral3Level3 = moral3.col3,
@ -1033,7 +1021,7 @@ namespace BMA.EHR.Report.Service.Controllers
Check_Moral2Level2 = moral2.col2,
Check_Moral2Level3 = moral2.col3,
Check_Moral2Level4 = moral2.col4,
Check_Moral2Level5 = moral2.col4,
Check_Moral2Level5 = moral2.col5,
Check_Moral3Level1 = moral3.col1,
Check_Moral3Level2 = moral3.col2,
Check_Moral3Level3 = moral3.col3,
@ -1091,6 +1079,7 @@ namespace BMA.EHR.Report.Service.Controllers
develop_other_training_percent = evaluate.develop_other_training_percent,
develop_total_percent = evaluate.develop_total_percent,
develop_result = evaluate.develop_result,
evaluate_result = evaluate.evaluate_result,
});
var tblEvaluateAssign1 = (Telerik.Reporting.Table)report.Items["detailSection1"].Items["table2"];
@ -1101,7 +1090,7 @@ namespace BMA.EHR.Report.Service.Controllers
tblEvaluateAssign3.DataSource = _Evaluate;
var tblEvaluateAssign4 = (Telerik.Reporting.Table)report2.Items["detailSection1"].Items["table3"];
tblEvaluateAssign4.DataSource = _Evaluate;
report2.DataSource = _Evaluate;
var reportBook = new ReportBook();
reportBook.Reports.Add(report);
reportBook.Reports.Add(report2);

View file

@ -42,14 +42,10 @@ namespace BMA.EHR.Report.Service.Controllers
public async Task<ActionResult<ResponseObject>> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf")
{
var retire = await _service.GetProfileRetirementdAsync(Id);
if (retire == null)
if (retire != null)
{
return NotFound();
}
else
{
var reportfile = "";
var returnfile = "";
var reportfile = string.Empty;
var returnfile = string.Empty;
exportType = exportType.Trim();
switch (retire.GetType().GetProperty("Type").GetValue(retire))
{
@ -89,9 +85,10 @@ namespace BMA.EHR.Report.Service.Controllers
{
report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
}
//Add Parameter
report.ReportParameters["Year"].Value = retire.GetType().GetProperty("Year").GetValue(retire);
report.ReportParameters["Total"].Value = retire.GetType().GetProperty("Total").GetValue(retire);
report.DataSource = retire;
////Add Parameter
//report.ReportParameters["Year"].Value = retire.GetType().GetProperty("Year").GetValue(retire);
//report.ReportParameters["Total"].Value = retire.GetType().GetProperty("Total").GetValue(retire);
var _profileList = new List<dynamic>();
@ -123,6 +120,10 @@ namespace BMA.EHR.Report.Service.Controllers
var content = result.DocumentBytes;
return File(content, $"application/{exportType}", returnfile);
}
else
{
return NotFound();
}
}
#endregion
}

View file

@ -26,10 +26,10 @@
}
},
"MinIO": {
"Endpoint": "https://s3.frappet.com/",
"Endpoint": "https://s3cluster.frappet.com/",
"AccessKey": "frappet",
"SecretKey": "P@ssw0rd",
"BucketName": "bma-recruit"
"SecretKey": "FPTadmin2357",
"BucketName": "bma-ehr-fpt"
},
"Protocol": "HTTPS",
"telerikReporting": {