diff --git a/Controllers/project_principle_rationale.Controller.cs b/Controllers/project_principle_rationale.Controller.cs index bd9384a..fe833b4 100644 --- a/Controllers/project_principle_rationale.Controller.cs +++ b/Controllers/project_principle_rationale.Controller.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using ClosedXML.Excel; using FastReport; using FastReport.Export.Csv; @@ -65,6 +66,21 @@ namespace rmutr_report.Controllers } } + if (project.sixteenths != null) + { + foreach (var sixteenthData in project.sixteenths) + { + var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya); + var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk); + var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang); + var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon); + sixteenthData.salaya_total = sum1; + sixteenthData.bophitphimuk_total = sum2; + sixteenthData.pohchang_total = sum3; + sixteenthData.klai_kangwon_total = sum4; + } + } + if (project.eighteenth != null) { foreach (var v in project.eighteenth) @@ -248,6 +264,21 @@ namespace rmutr_report.Controllers } } + if (project.sixteenths != null) + { + foreach (var sixteenthData in project.sixteenths) + { + var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya); + var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk); + var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang); + var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon); + sixteenthData.salaya_total = sum1; + sixteenthData.bophitphimuk_total = sum2; + sixteenthData.pohchang_total = sum3; + sixteenthData.klai_kangwon_total = sum4; + } + } + if (project.eighteenth != null) { foreach (var v in project.eighteenth) diff --git a/Models/budget/project_principle_rationale.cs b/Models/budget/project_principle_rationale.cs index eaa5cc8..c2e9d9b 100644 --- a/Models/budget/project_principle_rationale.cs +++ b/Models/budget/project_principle_rationale.cs @@ -46,6 +46,7 @@ namespace rmutr_report.Models public int? total_board { get; set; } //ข้อ 16 ผลรวมคณะกรรมการ public List sixteenth { get; set; } //ข้อ 16 public List sixteenths { get; set; } //ข้อ 16 detail ตาราง + public List seventeenth { get; set; } //ข้อ 17 public int? count_day { get; set; } //ข้อ 18 public string text3 { get; set; } //ข้อ 18 @@ -132,60 +133,65 @@ namespace rmutr_report.Models { public string activity_table { get; set; } public List sixteenths2 { get; set; } + public decimal? salaya_total { get; set; } + public decimal? bophitphimuk_total { get; set; } + public decimal? pohchang_total { get; set; } + public decimal? klai_kangwon_total { get; set; } } public class sixteenth_data_details { - public decimal? salaya_executive { get; set; } - public decimal? bophitphimuk_executive { get; set; } - public decimal? pohchang_executive { get; set; } - public decimal? klai_kangwon_executive { get; set; } - public decimal? salaya_teacher { get; set; } - public decimal? bophitphimuk_teacher { get; set; } - public decimal? pohchang_teacher { get; set; } - public decimal? klai_kangwon_teacher { get; set; } - public decimal? salaya_officer { get; set; } - public decimal? bophitphimuk_officer { get; set; } - public decimal? pohchang_officer { get; set; } - public decimal? klai_kangwon_officer { get; set; } - public decimal? salaya_internal_student { get; set; } - public decimal? bophitphimuk_internal_student { get; set; } - public decimal? pohchang_internal_student { get; set; } - public decimal? klai_kangwon_internal_student { get; set; } - public decimal? salaya_external_student{ get; set; } - public decimal? bophitphimuk_external_student { get; set; } - public decimal? pohchang_external_student { get; set; } - public decimal? klai_kangwon_external_student { get; set; } - public decimal? salaya_person { get; set; } - public decimal? bophitphimuk_person { get; set; } - public decimal? pohchang_person{ get; set; } - public decimal? klai_kangwon_person { get; set; } - public decimal? salaya_lecturer { get; set; } - public decimal? bophitphimuk_lecturer { get; set; } - public decimal? pohchang_lecturer { get; set; } - public decimal? klai_kangwon_lecturer{ get; set; } + public string target_group { get; set; } + public decimal? salaya { get; set; } + public decimal? bophitphimuk{ get; set; } + public decimal? pohchang{ get; set; } + public decimal? klai_kangwon{ get; set; } + // public decimal? salaya_teacher { get; set; } + // public decimal? bophitphimuk_teacher { get; set; } + // public decimal? pohchang_teacher { get; set; } + // public decimal? klai_kangwon_teacher { get; set; } + // public decimal? salaya_officer { get; set; } + // public decimal? bophitphimuk_officer { get; set; } + // public decimal? pohchang_officer { get; set; } + // public decimal? klai_kangwon_officer { get; set; } + // public decimal? salaya_internal_student { get; set; } + // public decimal? bophitphimuk_internal_student { get; set; } + // public decimal? pohchang_internal_student { get; set; } + // public decimal? klai_kangwon_internal_student { get; set; } + // public decimal? salaya_external_student{ get; set; } + // public decimal? bophitphimuk_external_student { get; set; } + // public decimal? pohchang_external_student { get; set; } + // public decimal? klai_kangwon_external_student { get; set; } + // public decimal? salaya_person { get; set; } + // public decimal? bophitphimuk_person { get; set; } + // public decimal? pohchang_person{ get; set; } + // public decimal? klai_kangwon_person { get; set; } + // public decimal? salaya_lecturer { get; set; } + // public decimal? bophitphimuk_lecturer { get; set; } + // public decimal? pohchang_lecturer { get; set; } + // public decimal? klai_kangwon_lecturer{ get; set; } - public decimal? salaya_board { get; set; } - public decimal? bophitphimuk_board { get; set; } - public decimal? pohchang_board { get; set; } - public decimal? klai_kangwon_board { get; set; } + // public decimal? salaya_board { get; set; } + // public decimal? bophitphimuk_board { get; set; } + // public decimal? pohchang_board { get; set; } + // public decimal? klai_kangwon_board { get; set; } + // + // public decimal? salaya_driver { get; set; } + // public decimal? bophitphimuk_driver { get; set; } + // public decimal? pohchang_driver { get; set; } + // public decimal? klai_kangwon_driver{ get; set; } + // + // public decimal? salaya_other { get; set; } + // public decimal? bophitphimuk_other { get; set; } + // public decimal? pohchang_other { get; set; } + // public decimal? klai_kangwon_other { get; set; } - public decimal? salaya_driver { get; set; } - public decimal? bophitphimuk_driver { get; set; } - public decimal? pohchang_driver { get; set; } - public decimal? klai_kangwon_driver{ get; set; } - - public decimal? salaya_other { get; set; } - public decimal? bophitphimuk_other { get; set; } - public decimal? pohchang_other { get; set; } - public decimal? klai_kangwon_other { get; set; } - - public decimal? salaya_total { get; set; } - public decimal? bophitphimuk_total { get; set; } - public decimal? pohchang_total { get; set; } - public decimal? klai_kangwon_total { get; set; } + // public decimal? salaya_total { get; set; } + // public decimal? bophitphimuk_total { get; set; } + // public decimal? pohchang_total { get; set; } + // public decimal? klai_kangwon_total { get; set; } } public class seventeenth_data diff --git a/bin/Debug/net5.0/rmutr_report.dll b/bin/Debug/net5.0/rmutr_report.dll index e69671c..69c8195 100644 Binary files a/bin/Debug/net5.0/rmutr_report.dll and b/bin/Debug/net5.0/rmutr_report.dll differ diff --git a/bin/Debug/net5.0/rmutr_report.pdb b/bin/Debug/net5.0/rmutr_report.pdb index cf0ac3a..09f224f 100644 Binary files a/bin/Debug/net5.0/rmutr_report.pdb and b/bin/Debug/net5.0/rmutr_report.pdb differ diff --git a/bin/Debug/netcoreapp3.1/rmutr_report.dll b/bin/Debug/netcoreapp3.1/rmutr_report.dll index 3508ec4..3659cf6 100644 Binary files a/bin/Debug/netcoreapp3.1/rmutr_report.dll and b/bin/Debug/netcoreapp3.1/rmutr_report.dll differ diff --git a/bin/Debug/netcoreapp3.1/rmutr_report.pdb b/bin/Debug/netcoreapp3.1/rmutr_report.pdb index b148c61..ac624e9 100644 Binary files a/bin/Debug/netcoreapp3.1/rmutr_report.pdb and b/bin/Debug/netcoreapp3.1/rmutr_report.pdb differ diff --git a/obj/Debug/net5.0/ref/rmutr_report.dll b/obj/Debug/net5.0/ref/rmutr_report.dll index a088871..a90123e 100644 Binary files a/obj/Debug/net5.0/ref/rmutr_report.dll and b/obj/Debug/net5.0/ref/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/refint/rmutr_report.dll b/obj/Debug/net5.0/refint/rmutr_report.dll index a088871..a90123e 100644 Binary files a/obj/Debug/net5.0/refint/rmutr_report.dll and b/obj/Debug/net5.0/refint/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/rmutr_report.dll b/obj/Debug/net5.0/rmutr_report.dll index e69671c..69c8195 100644 Binary files a/obj/Debug/net5.0/rmutr_report.dll and b/obj/Debug/net5.0/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/rmutr_report.pdb b/obj/Debug/net5.0/rmutr_report.pdb index cf0ac3a..09f224f 100644 Binary files a/obj/Debug/net5.0/rmutr_report.pdb and b/obj/Debug/net5.0/rmutr_report.pdb differ diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.dll b/obj/Debug/netcoreapp3.1/rmutr_report.dll index 3508ec4..3659cf6 100644 Binary files a/obj/Debug/netcoreapp3.1/rmutr_report.dll and b/obj/Debug/netcoreapp3.1/rmutr_report.dll differ diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.pdb b/obj/Debug/netcoreapp3.1/rmutr_report.pdb index b148c61..ac624e9 100644 Binary files a/obj/Debug/netcoreapp3.1/rmutr_report.pdb and b/obj/Debug/netcoreapp3.1/rmutr_report.pdb differ diff --git a/obj/rider.project.restore.info b/obj/rider.project.restore.info index a89fe91..bedbff5 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -16932956257079832 \ No newline at end of file +16933908491121003 \ No newline at end of file diff --git a/wwwroot/reports/project_principle_rationale.frx b/wwwroot/reports/project_principle_rationale.frx index 12f0b48..a51d610 100644 --- a/wwwroot/reports/project_principle_rationale.frx +++ b/wwwroot/reports/project_principle_rationale.frx @@ -1,5 +1,5 @@  - + @@ -68,51 +68,16 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -466,102 +431,48 @@ - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + @@ -572,11 +483,11 @@ - + - + - + @@ -585,11 +496,11 @@ - + - + @@ -597,14 +508,14 @@ - - + + - + - + @@ -628,7 +539,7 @@ - + @@ -643,14 +554,14 @@ - + - + - + @@ -674,7 +585,7 @@ - + @@ -691,9 +602,9 @@ - + - + @@ -715,7 +626,7 @@ - + @@ -732,9 +643,9 @@ - + - + @@ -756,7 +667,7 @@ - + @@ -773,7 +684,7 @@ - + @@ -788,7 +699,7 @@ - + diff --git a/wwwroot/reports/project_principle_rationale_no_activity.frx b/wwwroot/reports/project_principle_rationale_no_activity.frx index 5eb6387..ebf7903 100644 --- a/wwwroot/reports/project_principle_rationale_no_activity.frx +++ b/wwwroot/reports/project_principle_rationale_no_activity.frx @@ -1,5 +1,5 @@  - + @@ -63,56 +63,18 @@ - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -423,7 +385,7 @@ - + @@ -438,102 +400,48 @@ - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + @@ -544,10 +452,10 @@ - + - - + + @@ -556,15 +464,15 @@ - + - - - + + + - + @@ -588,7 +496,7 @@ - + @@ -603,14 +511,14 @@ - + - + - + @@ -634,7 +542,7 @@ - + @@ -651,9 +559,9 @@ - + - + @@ -675,7 +583,7 @@ - + @@ -692,9 +600,9 @@ - + - + @@ -716,7 +624,7 @@ - + @@ -733,7 +641,7 @@ - + @@ -748,7 +656,7 @@ - +