This commit is contained in:
@@ -525,7 +525,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 10;
|
||||
ws.Cell("C4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("C4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
|
||||
@@ -27,7 +27,39 @@ namespace rmutr_report.Controllers
|
||||
public IActionResult GetEBudgetingReport([FromRoute] string type, [FromBody] summary_invest summaryInvest)
|
||||
{
|
||||
var summaryInvests = new List<summary_invest>() { summaryInvest };
|
||||
foreach (var summaryInvestYear in summaryInvest.years)
|
||||
{
|
||||
foreach (var plan in summaryInvestYear.plans)
|
||||
{
|
||||
if (plan.total_budget<=10)
|
||||
{
|
||||
plan.total_budget = plan.unit_price;
|
||||
}
|
||||
foreach (var project in plan.projects)
|
||||
{
|
||||
if (project.total_budget<=10)
|
||||
{
|
||||
project.total_budget = project.unit_price;
|
||||
}
|
||||
foreach (var faculty in project.facultys)
|
||||
{
|
||||
if (faculty.total_budget<=10)
|
||||
{
|
||||
faculty.total_budget = faculty.unit_price;
|
||||
}
|
||||
foreach (var assetList in faculty.asset_lists)
|
||||
{
|
||||
if (assetList.total<=10)
|
||||
{
|
||||
assetList.total = assetList.unit_price;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Report report = new Report();
|
||||
report.Load(_setting.report_path + "summary_invest.frx");
|
||||
report.RegisterData(summaryInvests, "summary_invest");
|
||||
|
||||
Reference in New Issue
Block a user