diff --git a/Controllers/GovernmentBudget.Controller.cs b/Controllers/GovernmentBudget.Controller.cs index cdd0003..8925a0a 100644 --- a/Controllers/GovernmentBudget.Controller.cs +++ b/Controllers/GovernmentBudget.Controller.cs @@ -62,7 +62,7 @@ namespace rmutr_report.Controllers return Ok(); } - [SwaggerOperation("การจัดสรรงบประมาณแผ่นดิน พื้นฐาน+ยุทธศาตร์")] + [SwaggerOperation("การจัดสรรงบประมาณแผ่นดินรวมทุกแผนงาน, แผนงานบุคลากร, พื้นฐาน+ยุทธศาตร์")] [HttpPost, Route("reports/budget_government_allocate/{type}")] // (พื้นฐาน+ยุทธศาตร์) [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetInStrAllocateReport([FromRoute] string type, diff --git a/Controllers/Personnel.Controller.cs b/Controllers/Personnel.Controller.cs index a0c5bd9..85c44fd 100644 --- a/Controllers/Personnel.Controller.cs +++ b/Controllers/Personnel.Controller.cs @@ -27,7 +27,7 @@ namespace rmutr_report.Controllers { this._setting = setting; } - + [SwaggerOperation("ข้อมูลจำนวนบุคลากร")] [HttpPost, Route("reports/personnel_summary/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetHrReport([FromRoute] string type, [FromBody] personnel_summary personnel_summarys) @@ -84,7 +84,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("จำนวนบุคลากร สายวิชาการ และ สายสนับสนุน")] [HttpPost, Route("reports/man_power/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetManReport([FromRoute] string type, [FromBody] List man_powers) @@ -128,7 +128,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("จำนวนบุคลากร สายสนับสนุน")] [HttpPost, Route("reports/data_line_support/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetDataLineReport([FromRoute] string type, [FromBody] data_line_support data_line_supports) @@ -172,7 +172,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("จำนวนบุคลากร สายวิชาการ จำแนกตามอัตรา มีคนครอง และอัตราว่าง")] [HttpPost, Route("reports/data_line_academic/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetDataLineAcaReport([FromRoute] string type, @@ -217,7 +217,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("จำนวนบุคลากร สายวิชาการ จำแนกตามอัตรา มีคนครอง และอัตราว่าง")] [HttpPost, Route("reports/qualifications_teacher/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetQualificationsTeacherReport([FromRoute] string type, @@ -262,7 +262,7 @@ namespace rmutr_report.Controllers return Ok(); } - +[SwaggerOperation("จำนวนบุคลากร สายวิชาการ ตามตำแหน่งทางวิชาการ")] [HttpPost, Route("reports/academic_position/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetAcademicPositionReport([FromRoute] string type, @@ -307,7 +307,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("หนังสือแจ้งผลการเลื่อนค่าตอบแทนพนักงานราชการ")] [HttpPost, Route("reports/postponement_compensation/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPostponementCompensationReport([FromRoute] string type, @@ -494,7 +494,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("พนักงานราชการ")] [HttpPost, Route("reports/personnel_salary_government_employee/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPersonSalaryReport([FromRoute] string type, @@ -1012,7 +1012,7 @@ namespace rmutr_report.Controllers } } - + [SwaggerOperation("ข้าราชการ")] [HttpPost, Route("reports/personnel_salary_government/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPersonSalaryGovernmentReport([FromRoute] string type, @@ -2105,7 +2105,7 @@ namespace rmutr_report.Controllers } } - + [SwaggerOperation("ลูกจ้างประจํา")] [HttpPost, Route("reports/personnel_salary_permanent/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPersonSalaryReport([FromRoute] string type, @@ -2796,7 +2796,7 @@ namespace rmutr_report.Controllers "personnel_permanent_" + date + ".xlsx"); } } - +[SwaggerOperation("ลูกจ้างชั่วคราว")] [HttpPost, Route("reports/personnel_salary_temporary/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetTemporaryReport([FromRoute] string type, @@ -3236,7 +3236,7 @@ namespace rmutr_report.Controllers "personnel_temporary_" + date + ".xlsx"); } } - + [SwaggerOperation("พนักงานมหาวิทยาลัย")] [HttpPost, Route("reports/personnel_salary_university/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPersonSalaryUniversityReport([FromRoute] string type, @@ -4130,7 +4130,7 @@ namespace rmutr_report.Controllers } } - + [SwaggerOperation("ค่าตอบแทนพนักงานราชการ")] [HttpPost, Route("reports/set_personnel_budget/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSetPersonBudgetReport([FromRoute] string type, @@ -4808,7 +4808,7 @@ namespace rmutr_report.Controllers "personnel_" + date + ".xlsx"); } } - + [SwaggerOperation("การตั้งงบประมาณค่าใช้จ่ายบุคลากร")] [HttpPost, Route("reports/personnel_expense_budget/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSetPersonExBudgetReport([FromRoute] string type, @@ -6214,7 +6214,7 @@ namespace rmutr_report.Controllers "personnel_expense_budget" + date + ".xlsx"); } } - + [SwaggerOperation("บุคลากร งบประมาณแผ่นดิน")] [HttpPost, Route("reports/national_budget/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetNationalBudgetReport([FromRoute] string type, @@ -6479,7 +6479,7 @@ namespace rmutr_report.Controllers "national_budget_" + date + ".xlsx"); } } - + [SwaggerOperation("งบประมาณ MTEF")] [HttpPost, Route("reports/mtef_personnel/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetMtefReport([FromRoute] string type, @@ -6862,7 +6862,7 @@ namespace rmutr_report.Controllers "mtef_personnel_" + date + ".xlsx"); } } - + [SwaggerOperation("ข้อมูลการตั้งงบประมาณค่าใช้จ่ายบุคลากร")] [HttpPost, Route("reports/set_personnel_budget_university/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSetPersonUniBudgetReport([FromRoute] string type, @@ -8817,7 +8817,7 @@ namespace rmutr_report.Controllers "set_personnel_budget_university_" + date + ".xlsx"); } } - + [SwaggerOperation("การตั้งงบประมาณค่าใช้จ่ายบุคลากร ของลูกจ้างประจำ")] [HttpPost, Route("reports/set_personnel_budget_permanent/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSetPersonPermanentReport([FromRoute] string type, @@ -9482,7 +9482,7 @@ namespace rmutr_report.Controllers "set_personnel_budget_permanent_" + date + ".xlsx"); } } - + [SwaggerOperation("รายละเอียดข้อเสนอวงเงิน, สรุปข้อเสนอวงเงิน")] [HttpPost, Route("reports/budget_expenditure_proposal/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetPersonDetailReport([FromRoute] string type, diff --git a/Controllers/PersonnelReportController.cs b/Controllers/PersonnelReportController.cs index 7f4cc15..eb31fd5 100644 --- a/Controllers/PersonnelReportController.cs +++ b/Controllers/PersonnelReportController.cs @@ -11,7 +11,7 @@ using Swashbuckle.AspNetCore.Annotations; namespace rmutr_report.Controllers { - [SwaggerTag("สำหรับรายงาน HR")] + [SwaggerTag("สำหรับรายงานบุคลากร")] public class PersonnelReport : Controller { readonly Setting _setting; diff --git a/Controllers/Summary.Controller.cs b/Controllers/Summary.Controller.cs index 95a5da9..80c0189 100644 --- a/Controllers/Summary.Controller.cs +++ b/Controllers/Summary.Controller.cs @@ -25,7 +25,7 @@ namespace rmutr_report.Controllers { this._setting = setting; } - + [SwaggerOperation("สรุปแผนความต้องการ รายการครุภัณฑ์")] [HttpPost, Route("reports/summary_of_equipment/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSum1Report([FromRoute] string type, @@ -298,7 +298,7 @@ namespace rmutr_report.Controllers // } return Ok(); } - + [SwaggerOperation("สรุปแผนความต้องการ รายการครุภัณฑ์ 5 ปี")] [HttpPost, Route("reports/summary_of_equipment_five_year/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetEquipmentReport([FromRoute] string type, @@ -859,7 +859,7 @@ namespace rmutr_report.Controllers } } - + [SwaggerOperation("รายละเอียดคำชี้แจงค่าครุภัณฑ์")] [HttpPost, Route("reports/statement_of_equipment/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetStEquipmentReport([FromRoute] string type, @@ -950,7 +950,7 @@ namespace rmutr_report.Controllers return Ok(); } - + [SwaggerOperation("สรุปแผนความต้องการรายการก่อสร้างอาคารหรือสิ่งก่อสร้าง")] [HttpPost, Route("reports/summary_building_construction/{type}")] [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetSum2Report([FromRoute] string type, @@ -1584,5 +1584,50 @@ namespace rmutr_report.Controllers } } } + [SwaggerOperation("สรุปงบลงทุน")] + [HttpPost, Route("reports/investment_budget_summary/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetInvestmentReport([FromRoute] string type, + [FromBody] investment_budget_summary investmentBudget) + { + foreach (var detail in investmentBudget.data) + { + if (detail.topic_type==1) + { + detail.row_no = null; + } + if (detail.topic_type==3) + { + detail.row_no = null; + } + } + var investmentBudgetSummaries = new List() { investmentBudget }; + Report report = new Report(); + report.Load(_setting.report_path + "investment_budget_summary.frx"); + report.RegisterData(investmentBudgetSummaries, "investment_budget_summary"); + report.Prepare(); + + MemoryStream stream = new MemoryStream(); + switch (type) + { + case "pdf": + PDFExport pdf = new PDFExport(); + report.Export(pdf, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/pdf"); + + case "xls": + case "xlsx": + Excel2007Export excel = new Excel2007Export(); + report.Export(excel, stream); + stream.Seek(0, SeekOrigin.Begin); + return File( + stream, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "investment_budget_summary" + ".xlsx"); + } + + return Ok(); + } } } \ No newline at end of file diff --git a/Models/budget/investment_budget_summary.cs b/Models/budget/investment_budget_summary.cs new file mode 100644 index 0000000..fac9700 --- /dev/null +++ b/Models/budget/investment_budget_summary.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; + +namespace rmutr_report.Models +{ + public class investment_budget_summary + { + public string budget_year { get; set; } + // public decimal? total_request_count_item { get; set; } + // public decimal? total_request_amount { get; set; } + // public decimal? total_offer_count_item { get; set; } + // public decimal? total_offer_amount { get; set; } + public List data { get; set; } + } + + public class investment_budget_summary_detail + { + public int? topic_type { get; set; } + public string row_no { get; set; } + public string topic { get; set; } + public decimal? request_count_item { get; set; } + public decimal? request_amount { get; set; } + public decimal? offer_count_item { get; set; } + public decimal? offer_amount { get; set; } + } +} \ No newline at end of file diff --git a/bin/Debug/net5.0/rmutr_report.dll b/bin/Debug/net5.0/rmutr_report.dll index 2f1cbf5..3bcdf81 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 21ed46b..a2dca01 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 57b7df9..2849bbe 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 2e6728f..75b945f 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 fc757f2..2b3ed1a 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 fc757f2..2b3ed1a 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.csproj.CoreCompileInputs.cache b/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache index 80294ef..3d7201c 100644 --- a/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache +++ b/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -880859379cd997a9162e3f5a8bf1827cf99cdc7d +99ef312a48329e42fc9ff666e8db622340dcdeb7 diff --git a/obj/Debug/net5.0/rmutr_report.dll b/obj/Debug/net5.0/rmutr_report.dll index 2f1cbf5..3bcdf81 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 21ed46b..a2dca01 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.csproj.CoreCompileInputs.cache b/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache index 68c9149..37aa4be 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -8a21b47cb8ccf1667e9a1e072a5dd8d9abbe5dc0 +51192c87ebcc0d859fc33a38799a58739bd69342 diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.dll b/obj/Debug/netcoreapp3.1/rmutr_report.dll index 57b7df9..2849bbe 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 2e6728f..75b945f 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 e0f66d6..6e28b58 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -16920967126989349 \ No newline at end of file +16921620219163155 \ No newline at end of file diff --git a/wwwroot/reports/budget_summary_report.frx b/wwwroot/reports/budget_summary_report.frx index 462392a..11cbf06 100644 --- a/wwwroot/reports/budget_summary_report.frx +++ b/wwwroot/reports/budget_summary_report.frx @@ -1,5 +1,5 @@  - + @@ -365,8 +365,8 @@ - - + + @@ -2706,9 +2706,9 @@ - + - + @@ -2748,8 +2748,8 @@ - - + + @@ -2794,7 +2794,7 @@ - + @@ -2815,113 +2815,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wwwroot/reports/investment_budget_summary.frx b/wwwroot/reports/investment_budget_summary.frx new file mode 100644 index 0000000..88a47d1 --- /dev/null +++ b/wwwroot/reports/investment_budget_summary.frx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +