This commit is contained in:
@@ -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