Bug Fixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2025-02-05 17:55:31 +07:00
parent 5abb0843e4
commit a49490890e
13 changed files with 92 additions and 45 deletions

View File

@@ -27,43 +27,69 @@ 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)
if (summaryInvest.total_budget != summaryInvest.unit_price)
{
summaryInvest.total_budget = summaryInvest.unit_price;
}
foreach (var summaryInvestYear in summaryInvest.years)
{
if (summaryInvestYear.total_budget != summaryInvestYear.unit_price)
{
summaryInvestYear.total_budget = summaryInvestYear.unit_price;
}
foreach (var plan in summaryInvestYear.plans)
{
if (plan.total_budget != plan.unit_price)
{
plan.total_budget = plan.unit_price;
}
foreach (var project in plan.projects)
{
if (project.total_budget != project.unit_price)
{
foreach (var plan in summaryInvestYear.plans)
project.total_budget = project.unit_price;
}
foreach (var faculty in project.facultys)
{
if (faculty.total_budget != faculty.unit_price)
{
if (plan.total_budget<=10)
faculty.total_budget = faculty.unit_price;
}
foreach (var assetList in faculty.asset_lists)
{
if (assetList.total != assetList.unit_price)
{
plan.total_budget = plan.unit_price;
assetList.total = assetList.unit_price;
}
foreach (var project in plan.projects)
if (assetList.total == null && assetList.amount == 1)
{
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;
}
if (assetList.total==null&&assetList.amount==1)
{
assetList.total = assetList.unit_price;
}
}
}
assetList.total = assetList.unit_price;
}
if (assetList.amount > 1)
{
assetList.total = assetList.unit_price * assetList.amount;
}
}
// foreach (var constructList in faculty.construct_lists)
// {
// if (constructList.total != constructList.unit_price)
// {
// constructList.total = constructList.unit_price;
// }
// if (constructList.total == null && constructList.amount == 1)
// {
// constructList.total = constructList.unit_price;
// }
// if (constructList.amount > 1)
// {
// constructList.total = constructList.unit_price * constructList.amount;
// }
// }
}
}
}
}
Report report = new Report();
report.Load(_setting.report_path + "summary_invest.frx");
report.RegisterData(summaryInvests, "summary_invest");
@@ -101,10 +127,22 @@ namespace rmutr_report.Controllers
var summaryInvests = new List<summary_invest_v2>() { summaryInvest };
if (summaryInvest != null)
{
if (summaryInvest.total_budget != summaryInvest.unit_price)
{
summaryInvest.total_budget = summaryInvest.unit_price;
}
foreach (var summaryInvestYear in summaryInvest.years)
{
if (summaryInvestYear.total_budget != summaryInvestYear.unit_price)
{
summaryInvestYear.total_budget = summaryInvestYear.unit_price;
}
foreach (var plan in summaryInvestYear.plans)
{
if (plan.total_budget != plan.unit_price)
{
plan.total_budget = plan.unit_price;
}
foreach (var assetList in plan.asset_lists)
{
string formattedSeller = assetList.seller.Replace("<br>", " ");
@@ -128,10 +166,19 @@ namespace rmutr_report.Controllers
formattedFile = formattedFile.Trim();
assetList.file2 = formattedFile;
//Console.WriteLine("seller output: " + formattedSeller);
//Console.WriteLine("file output: " + formattedFile);
}
if (assetList.total != assetList.unit_price)
{
assetList.total = assetList.unit_price;
}
if (assetList.total == null && assetList.amount == 1)
{
assetList.total = assetList.unit_price;
}
if (assetList.amount > 1)
{
assetList.total = assetList.unit_price * assetList.amount;
}
}
}
}
}

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a4f0e95eaab3a2fdfc849b0360aca819504bede")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5abb0843e4a76829532bd2fee4ce99d379579140")]
[assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
e563ea69829e73d4ba56ee977869e67c6b68c3d5c86c9a065ecf6a266aae8031
52e8db3788ecf506c07090a5147c8bca54ca3b6569071f7090aab62573832caf

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+91cff19bff1260866d947163111eb8dd29ad5077")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5abb0843e4a76829532bd2fee4ce99d379579140")]
[assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
0acb8f26062a50e497e3d20f8ebbaf2a2401ca261db2b8a593f3d5291aef38be
52e8db3788ecf506c07090a5147c8bca54ca3b6569071f7090aab62573832caf

View File

@@ -1 +1 @@
9366782ca8670ec554b748dfb699af96890da62fe84a37ad0dedfa8a188a61c7
395ab626e2d4d33b8f8100e97921c4edb4adf4807825daf60f0b675437247c27

View File

@@ -1 +1 @@
17379510230109028
17379588852302958

View File

@@ -1 +1 @@
17379510230109028
17387528887442742

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="09/14/2021 15:20:39" ReportInfo.Modified="08/29/2024 13:13:08" ReportInfo.CreatorVersion="2021.1.0.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="09/14/2021 15:20:39" ReportInfo.Modified="02/05/2025 17:53:41" ReportInfo.CreatorVersion="2021.1.0.0">
<Dictionary>
<BusinessObjectDataSource Name="summary_invest" ReferenceName="summary_invest" DataType="null" Enabled="true">
<Column Name="unit_price" DataType="System.Decimal"/>
@@ -160,7 +160,7 @@
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="143.73" Width="3024" Height="47.25" DataSource="years">
<DataBand Name="Data1" Top="141.19" Width="3024" Height="47.25" DataSource="years">
<TableObject Name="Table25" Width="3024" Height="47.25" Border.Lines="All">
<TableColumn Name="Column305" Width="207.9"/>
<TableColumn Name="Column306" Width="529.2"/>
@@ -191,7 +191,7 @@
<TableCell Name="Cell377" Border.Lines="All" Fill.Color="248, 201, 190" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt, style=Bold"/>
</TableRow>
</TableObject>
<DataBand Name="Data2" Top="202.41" Width="3024" Height="47.25" DataSource="plans">
<DataBand Name="Data2" Top="197.33" Width="3024" Height="47.25" DataSource="plans">
<TableObject Name="Table26" Width="3024" Height="47.25" Border.Lines="All">
<TableColumn Name="Column318" Width="207.9"/>
<TableColumn Name="Column319" Width="529.2"/>
@@ -222,7 +222,7 @@
<TableCell Name="Cell390" Border.Lines="All" Fill.Color="255, 255, 217" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt, style=Bold"/>
</TableRow>
</TableObject>
<DataBand Name="Data3" Top="261.09" Width="3024" Height="47.25" DataSource="asset_lists">
<DataBand Name="Data3" Top="253.47" Width="3024" Height="47.25" DataSource="asset_lists">
<TableObject Name="Table27" Width="3024" Height="47.25" Border.Lines="All">
<TableColumn Name="Column331" Width="207.9"/>
<TableColumn Name="Column332" Width="529.2"/>
@@ -245,7 +245,7 @@
<TableCell Name="Cell395" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.unit_name]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell396" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.amount]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell397" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.unit_price]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell398" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.total_budget]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell398" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.total]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell399" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.seller2]" AutoShrink="FontSize" AutoShrinkMinSize="9" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell400" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.file2]" AutoShrink="FontSize" AutoShrinkMinSize="9" HorzAlign="Right" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TableCell Name="Cell401" Border.Lines="All" Text="[summary_invest.years.plans.asset_lists.petitioner_full_name]" AutoShrink="FontSize" AutoShrinkMinSize="10" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/>