diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 5c8a7a6..6b5fd0d 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -145,6 +145,66 @@ namespace rmutr_report.Controllers } } + if (budget_summary_reports.durable_articles_1 != null) + { + + foreach (var bDetail in budget_summary_reports.durable_articles_1) + { + if (bDetail.color == 1) + { + budget_summary_reports.list = bDetail.list; + budget_summary_reports.total_amount = bDetail.total_amount; + } + + // if (bDetail.color == 2) + // { + // budget_summary_reports.list = bDetail.list; + // budget_summary_reports.total_amount = bDetail.total_amount; + // } + // foreach (var bDetail2 in bDetail.durable_articles_2) + // { + // if (bDetail2.color == 3) + // { + // budget_summary_reports.list = bDetail2.list; + // budget_summary_reports.total_amount = bDetail2.total_amount; + // } + // foreach (var bDetail3 in bDetail2.durable_articles_3) + // { + // if (bDetail3.color == 4) + // { + // budget_summary_reports.list = bDetail3.list; + // budget_summary_reports.total_amount = bDetail3.total_amount; + // } + // foreach (var bDetail4 in bDetail3.durable_articles_4) + // { + // if (bDetail4.color == 5) + // { + // budget_summary_reports.list = bDetail4.list; + // budget_summary_reports.total_amount = bDetail4.total_amount; + // } + // } + // } + // } + } + } + + if (budget_summary_reports.building_1 != null) + { + foreach (var bDetail in budget_summary_reports.building_1) + { + if (bDetail.color == 1) + { + budget_summary_reports.list1 = bDetail.list; + budget_summary_reports.total_amount1 = bDetail.total_amount; + } + + // if (bDetail.color == 2) + // { + // budget_summary_reports.list1 = bDetail.list; + // budget_summary_reports.total_amount1 = bDetail.total_amount; + // } + } + } Report report = new Report(); report.Load(_setting.report_path + "budget_summary_report.frx"); report.RegisterData(_budget_summary_report, "budget_summary_report"); diff --git a/Models/budget/budget_summary_report.cs b/Models/budget/budget_summary_report.cs index 9287ffe..1993ba3 100644 --- a/Models/budget/budget_summary_report.cs +++ b/Models/budget/budget_summary_report.cs @@ -6,7 +6,7 @@ namespace rmutr_report.Models { public string budget_year { get; set; } public string agency_name_th { get; set; } - public Listsummary{ get; set; } + public List summary { get; set; } public decimal? budget_1 { get; set; } public decimal? budget_2 { get; set; } public decimal? budget_3 { get; set; } @@ -16,49 +16,68 @@ namespace rmutr_report.Models public string product { get; set; } public string set_request_year { get; set; } public List group_header { get; set; } + public string durable_articles_year { get; set; } + //public string durable_articles_product { get; set; } public decimal? durable_articles_budget { get; set; } - public Listdurable_articles{ get; set; } + + public List durable_articles_1 { get; set; } + //public List receive_data { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } //public List durable_articles_header1 { get; set; } public string building_year { get; set; } + //public string building_product { get; set; } - public decimal? building_budget{ get; set; } + public decimal? building_budget { get; set; } + //public List building_header_1 { get; set; } - public Listbuilding{ get; set; } + public List building_1 { get; set; } + public string list1 { get; set; } + public decimal? total_amount1 { get; set; } public string research_support_year { get; set; } - public decimal? research_support_budget{ get; set; } + + public decimal? research_support_budget { get; set; } + //public string research_support_product { get; set; } - public Listresearch_support{ get; set; } - public string subsidy_service_year { get; set; } - public decimal? subsidy_service_budget{ get; set; } - public Listsubsidy_service{ get; set; } - public string subsidy_science_year { get; set; } - public decimal? subsidy_science_budget { get; set; } - public Listsubsidy_science{ get; set; } - public string subsidy_society_year { get; set; } - public decimal? subsidy_society_budget { get; set; } - public Listsubsidy_society{ get; set; } - public string subsidy_arts_culture_year { get; set; } - public decimal? subsidy_arts_culture_budget { get; set; } - public Listsubsidy_arts_culture{ get; set; } - public string thailand_year { get; set; } - public decimal? thailand_budget { get; set; } - public Listthailand{ get; set; } - public string subsidy_budget_project_year { get; set; } - public decimal? subsidy_budget_project_budget { get; set; } - public Listsubsidy_budget_project{ get; set; } - // public string integrated_plan_name { get; set; } - public string integrated_plan_year { get; set; } - public decimal? integrated_plan_budget { get; set; } + public List research_support { get; set; } + public string subsidy_service_year { get; set; } + public decimal? subsidy_service_budget { get; set; } + public List subsidy_service { get; set; } + public string subsidy_science_year { get; set; } + public decimal? subsidy_science_budget { get; set; } + public List subsidy_science { get; set; } + public string subsidy_society_year { get; set; } + public decimal? subsidy_society_budget { get; set; } + public List subsidy_society { get; set; } + public string subsidy_arts_culture_year { get; set; } + public decimal? subsidy_arts_culture_budget { get; set; } + public List subsidy_arts_culture { get; set; } + public string thailand_year { get; set; } + public decimal? thailand_budget { get; set; } + public List thailand { get; set; } + public string subsidy_budget_project_year { get; set; } + public decimal? subsidy_budget_project_budget { get; set; } + + public List subsidy_budget_project { get; set; } + + // public string integrated_plan_name { get; set; } + public string integrated_plan_year { get; set; } + + public decimal? integrated_plan_budget { get; set; } + //public List integrated_plan_header { get; set; } //public string strategic_plan_name { get; set; } - public string strategic_plan_year { get; set; } - public decimal? strategic_plan_budget { get; set; } + public string strategic_plan_year { get; set; } + + public decimal? strategic_plan_budget { get; set; } + //public List strategic_plan_header { get; set; } - public Listintegrated_plan{ get; set; } - public Liststrategic_plan{ get; set; } + public List integrated_plan { get; set; } + public List strategic_plan { get; set; } } + public class group_headers2 { public string list_1 { get; set; } @@ -67,9 +86,8 @@ namespace rmutr_report.Models public string list_3 { get; set; } public decimal? budget_amount { get; set; } public decimal? total_amount_1 { get; set; } - public decimal? total_amount_2 { get; set; } + public decimal? total_amount_2 { get; set; } public List header { get; set; } - } public class expenditure_budget_proposal2 @@ -78,8 +96,6 @@ namespace rmutr_report.Models public string header { get; set; } public decimal? budget_amount { get; set; } public List data_proposals { get; set; } - - } public class expenditure_budget_proposals2 @@ -95,8 +111,6 @@ namespace rmutr_report.Models public string quantity_unit { get; set; } public decimal? budget_amount { get; set; } public List data_sub_proposals { get; set; } - - } public class expenditure_budget_proposals3 @@ -112,6 +126,7 @@ namespace rmutr_report.Models public string quantity_unit { get; set; } public decimal? budget_amount { get; set; } } + public class budget_summary_report_detail { public string product { get; set; } @@ -121,7 +136,6 @@ namespace rmutr_report.Models public decimal? budget_4 { get; set; } public decimal? budget_5 { get; set; } public decimal? total_budget { get; set; } - } public class operating_expenses_details @@ -151,12 +165,47 @@ namespace rmutr_report.Models // public Listdurable_articles{ get; set; } // // } + // public class receives_data + // { + // public int? color { get; set; } + // public string list { get; set; } + // public decimal? total_amount { get; set; } + // } public class durable_articles_detail { - public string color { get; set; } - public string rowno { get; set; } + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public List durable_articles_2 { get; set; } + } + public class durable_articles_detail1 + { + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public List durable_articles_3 { get; set; } + } + + public class durable_articles_detail2 + { + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public List durable_articles_4 { get; set; } + } + + public class durable_articles_detail3 + { + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public List durable_articles_detail { get; set; } + } + + public class durable_articles_detail4 + { public string list { get; set; } public string unit { get; set; } public string unit_amount { get; set; } @@ -169,7 +218,8 @@ namespace rmutr_report.Models public string type_1 { get; set; } public string type_2 { get; set; } public string type_3 { get; set; } - public string remark { get; set; } + public string remark { get; set; } + //public List durable_articles_detail { get; set; } } // public class building_headers1 @@ -191,21 +241,90 @@ namespace rmutr_report.Models // // } - public class building_headers2_detail + public class building_headers { - public string color { get; set; } + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public Listbuilding_2{ get; set; } + + } + public class building_headers2{ + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + public Listbuilding_3{ get; set; } + + } + + public class building_headers3 + { + public int? color { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + //public Listbuilding_4{ get; set; } + public Listdata_1{ get; set; } + public Listdata_2{ get; set; } + public Listdata_3{ get; set; } + } + + // public class building_headers4 + // { + // public int? color { get; set; } + // public string list { get; set; } + // public decimal? total_amount { get; set; } + // public Listdata_1{ get; set; } + // public Listdata_2{ get; set; } + // public Listdata_3{ get; set; } + // + // } + + public class building_headers4_detail1 + { + + public string list { get; set; } + public decimal? total_amount { get; set; } +public Listdata_1_detail { get; set; } + } + + public class data_1_details + { + + public string rowno { get; set; } + public string list { get; set; } + public decimal? total_amount { get; set; } + + } + + public class building_headers4_detail2 + { + public string list { get; set; } + public decimal? total_amount { get; set; } + public Listdata_2_detail { get; set; } + } + + public class building_headers4_detail3 + { + public string list { get; set; } + public decimal? total_amount { get; set; } + public Listdata_3_detail { get; set; } + } + + public class data_3_details + { + public int? color { get; set; } public string rowno { get; set; } public string list { get; set; } public string unit { get; set; } public string unit_amount { get; set; } public decimal? unit_price { get; set; } public decimal? total_amount { get; set; } - public string boq { get; set; } - public string pic { get; set; } - public string remark { get; set; } - + public string boq { get; set; } + public string pic { get; set; } + public string remark { get; set; } } - public class subsidy_service_headers_detail + + public class subsidy_service_headers_detail { public string color { get; set; } public string rowno { get; set; } @@ -217,8 +336,7 @@ namespace rmutr_report.Models public decimal? amount_5 { get; set; } public decimal? amount_6 { get; set; } public decimal? amount_7 { get; set; } - public string remark { get; set; } - + public string remark { get; set; } } // public class subsidy_science_headers @@ -238,7 +356,6 @@ namespace rmutr_report.Models public string unit { get; set; } public decimal? unit_amount { get; set; } public decimal? amount { get; set; } - public string remark { get; set; } - + public string remark { get; set; } } } \ No newline at end of file diff --git a/wwwroot/reports/budget_summary_report.frx b/wwwroot/reports/budget_summary_report.frx index 25f52dc..576dd0c 100644 --- a/wwwroot/reports/budget_summary_report.frx +++ b/wwwroot/reports/budget_summary_report.frx @@ -1,5 +1,5 @@  - + @@ -61,37 +61,96 @@ - - - + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -262,8 +321,8 @@ - - + + @@ -365,8 +424,8 @@ - - + + @@ -419,7 +478,7 @@ - + @@ -446,7 +505,7 @@ - + @@ -473,7 +532,7 @@ - + @@ -506,8 +565,8 @@ - - + + @@ -578,62 +637,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + @@ -643,14 +894,10 @@ - - - - - + - + @@ -660,92 +907,320 @@ - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -804,61 +1279,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + - + - - - - + - + - - - - + - + - - - - + - + - - - - + - + @@ -867,38 +1457,320 @@ - - - - + - + - - - - + - + - - - - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1939,8 +2811,8 @@ - - + +