diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 5030485..beabcc5 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -4881,6 +4881,542 @@ namespace rmutr_report.Controllers "integrated_strategic" + ".xlsx"); } } + [SwaggerOperation("สปง301")] + [HttpPost, Route("reports/manage_plan_budget_1/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetBudgetManagePlanReport([FromRoute] string type, [FromBody] manage_plan_budget budgetManagePlan) + { + var workbook = new XLWorkbook(); + var ws = workbook.Worksheets.Add("Sheet1"); + ws.Range("A1:Q1").Merge().Value = "แบบจัดทำแผน/รายงานผลการปฏิบัติงานและการใช้จ่ายงบประมาณ ประจำปีงบประมาณ "+budgetManagePlan.budget_year; + ws.Cell("A1").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("A1").Style.Font.FontSize = 16; + ws.Range("A1:Q1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("A1:Q1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("N2:Q2").Merge().Value = "หน่วย : ล้านบาท (ทศนิยม 4 ตำแหน่ง )"; + ws.Cell("N2").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("N2").Style.Font.FontSize = 16; + ws.Range("N2:Q2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("N2:Q2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + var range = ws.Range("A3:A4"); + range.Merge(); + range.Value = "ยุทธศาสตร์ชาติ - แผนแม่บทภายใต้ยุทธศาสตร์ชาติ - แผนย่อยของแผนแม่บทฯ ยุทธศาสตร์จัดสรร - แผนงาน - เป้าประสงค์เชิงยุทธศาสตร์ เป้าหมายการให้บริการกระทรวง - เป้าหมายการให้บริการหน่วยงาน ผลผลิต/โครงการ - กิจกรรม"; + range.Style.Alignment.WrapText = true; + ws.Row(3).Height = 50; + ws.Row(4).Height = 50; + ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("A3").Style.Font.FontSize = 15; + ws.Range("A3:A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("A3:A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("A3:A4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("A3:A4").Style.Alignment.WrapText = true; + ws.Range("A3:A4").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("B3:B4").Merge().Value = "หน่วยนับ"; + ws.Cell("B3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("B3").Style.Font.FontSize = 15; + ws.Range("B3:B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("B3:B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("B3:B4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("B3:B4").Style.Alignment.WrapText = true; + ws.Range("B3:B4").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("C3:E3").Merge().Value = "รวมทั้งสิ้น"; + ws.Cell("C3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("C3").Style.Font.FontSize = 15; + ws.Range("C3:E3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("C3:E3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("C3:E3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("C3:E3").Style.Alignment.WrapText = true; + ws.Range("C3:E3").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("F3:H3").Merge().Value = "ไตรมาส 1 ( ต.ค.- ธ.ค.)"; + ws.Cell("F3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("F3").Style.Font.FontSize = 15; + ws.Range("F3:H3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("F3:H3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("F3:H3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("F3:H3").Style.Alignment.WrapText = true; + ws.Range("F3:H3").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("I3:K3").Merge().Value = "ไตรมาส 2 ( ม.ค.- มี.ค.)"; + ws.Cell("I3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("I3").Style.Font.FontSize = 15; + ws.Range("I3:K3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("I3:K3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("I3:K3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("I3:K3").Style.Alignment.WrapText = true; + ws.Range("I3:K3").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("L3:N3").Merge().Value = "ไตรมาส 3 ( เม.ย.- มิ.ย.)"; + ws.Cell("L3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("L3").Style.Font.FontSize = 15; + ws.Range("L3:N3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("L3:N3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("L3:N3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("L3:N3").Style.Alignment.WrapText = true; + ws.Range("L3:N3").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Range("O3:Q3").Merge().Value = "ไตรมาส 4 ( ก.ค.- ก.ย.)"; + ws.Cell("O3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Cell("O3").Style.Font.FontSize = 15; + ws.Range("O3:Q3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("O3:Q3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("O3:Q3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("O3:Q3").Style.Alignment.WrapText = true; + ws.Range("O3:Q3").Merge().Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + ws.Cell("C4").Value = "แผน(ขั้น พ.ร.บ.)"; + ws.Cell("D4").Value = "แผน(ขั้น บริหาร)"; + ws.Cell("E4").Value = "ผล"; + ws.Cell("F4").Value = "แผน(ขั้น พ.ร.บ.)"; + ws.Cell("G4").Value = "แผน(ขั้น บริหาร)"; + ws.Cell("H4").Value = "ผล"; + ws.Cell("I4").Value = "แผน(ขั้น พ.ร.บ.)"; + ws.Cell("J4").Value = "แผน(ขั้น บริหาร)"; + ws.Cell("K4").Value = "ผล"; + ws.Cell("L4").Value = "แผน(ขั้น พ.ร.บ.)"; + ws.Cell("M4").Value = "แผน(ขั้น บริหาร)"; + ws.Cell("N4").Value = "ผล"; + ws.Cell("O4").Value = "แผน(ขั้น พ.ร.บ.)"; + ws.Cell("P4").Value = "แผน(ขั้น บริหาร)"; + ws.Cell("Q4").Value = "ผล"; + ws.Range("C4:Q4").Style.Font.SetBold().Font.FontName = "TH SarabunPSK"; + ws.Range("C4:Q4").Style.Font.FontSize = 15; + ws.Range("C4:Q4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range("C4:Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; + ws.Range("C4:Q4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("C4:Q4").Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range("C4:Q4").Style.Alignment.WrapText = true; + ws.Range("C4:Q4").Style.Fill.BackgroundColor = XLColor.FromArgb(217,217,217); + + ws.Range("A3:A4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("B3:B4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range("C3:E3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + + ws.Column(1).Width = 45; + ws.Column(2).Width = 25; + ws.Column(3).Width = 20; + ws.Column(4).Width = 20; + ws.Column(5).Width = 20; + ws.Column(6).Width = 20; + ws.Column(7).Width = 20; + ws.Column(8).Width = 20; + ws.Column(9).Width = 20; + ws.Column(10).Width = 20; + ws.Column(11).Width = 20; + ws.Column(12).Width = 20; + ws.Column(13).Width = 20; + ws.Column(14).Width = 20; + ws.Column(15).Width = 20; + ws.Column(16).Width = 20; + ws.Column(17).Width = 20; + int row = 6; + + if (budgetManagePlan != null) + { + ws.Cell(5, 1).Value ="ผลสัมฤทธิ์และประโยชน์ที่คาดว่าจะได้รับ"; + ws.Cell(5, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(5, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Cell(5, 1).Style.Font.FontName = "TH SarabunPSK"; + ws.Cell(5, 1).Style.Font.FontSize = 14; + ws.Cell(5, 1).Style.Alignment.WrapText = true; + ws.Cell(5, 1).Style.Font.SetUnderline(XLFontUnderlineValues.Single); + ws.Range(ws.Cell(5,1),ws.Cell(5,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(5,1),ws.Cell(5,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + + foreach (var overallIndicatorsDetail in budgetManagePlan.OverallIndicatorsDetails ?? new List()) + { + ws.Cell(row, 1).Value = "ผลสัมฤทธิ์: " + overallIndicatorsDetail.indicators_name; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Cell(row,1).Style.Font.FontName = "TH SarabunPSK"; + ws.Cell(row,1).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + row++; + ws.Cell(row, 1).Value = "ตัวชี้วัดภาพรวม: " + overallIndicatorsDetail.indicators_name; + ws.Cell(row, 2).Value = overallIndicatorsDetail.budget_unit_name; + ws.Cell(row, 3).Value = overallIndicatorsDetail.total_1 ?? 0; + ws.Cell(row, 4).Value = overallIndicatorsDetail.total_2 ?? 0; + ws.Cell(row, 5).Value = overallIndicatorsDetail.total_3 ?? 0; + ws.Cell(row, 6).Value = overallIndicatorsDetail.quarter_1_1 ?? 0; + ws.Cell(row, 7).Value = overallIndicatorsDetail.quarter_1_2 ?? 0; + ws.Cell(row, 8).Value = overallIndicatorsDetail.quarter_1_3 ?? 0; + ws.Cell(row, 9).Value = overallIndicatorsDetail.quarter_2_1 ?? 0; + ws.Cell(row, 10).Value = overallIndicatorsDetail.quarter_2_2 ?? 0; + ws.Cell(row, 11).Value = overallIndicatorsDetail.quarter_2_3 ?? 0; + ws.Cell(row, 12).Value = overallIndicatorsDetail.quarter_3_1 ?? 0; + ws.Cell(row, 13).Value = overallIndicatorsDetail.quarter_3_2 ?? 0; + ws.Cell(row, 14).Value = overallIndicatorsDetail.quarter_3_3 ?? 0; + ws.Cell(row, 15).Value = overallIndicatorsDetail.quarter_4_1 ?? 0; + ws.Cell(row, 16).Value = overallIndicatorsDetail.quarter_4_2 ?? 0; + ws.Cell(row, 17).Value = overallIndicatorsDetail.quarter_4_3 ?? 0; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + } + ws.Cell(row, 1).Value = "รวมเงินงบประมาณทั้งสิ้น"; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.FromArgb(166, 166, 166); + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + ws.Cell(row, 3).Value = budgetManagePlan.total_all_1 ?? 0; + ws.Cell(row, 4).Value = budgetManagePlan.total_all_2 ?? 0; + ws.Cell(row, 5).Value = budgetManagePlan.total_all_3 ?? 0; + ws.Cell(row, 6).Value = budgetManagePlan.quarter_all_1_1 ?? 0; + ws.Cell(row, 7).Value = budgetManagePlan.quarter_all_1_2 ?? 0; + ws.Cell(row, 8).Value = budgetManagePlan.quarter_all_1_3 ?? 0; + ws.Cell(row, 9).Value = budgetManagePlan.quarter_all_2_1 ?? 0; + ws.Cell(row, 10).Value = budgetManagePlan.quarter_all_2_2 ?? 0; + ws.Cell(row, 11).Value = budgetManagePlan.quarter_all_2_3 ?? 0; + ws.Cell(row, 12).Value = budgetManagePlan.quarter_all_3_1 ?? 0; + ws.Cell(row, 13).Value = budgetManagePlan.quarter_all_3_2 ?? 0; + ws.Cell(row, 14).Value = budgetManagePlan.quarter_all_3_3 ?? 0; + ws.Cell(row, 15).Value = budgetManagePlan.quarter_all_4_1 ?? 0; + ws.Cell(row, 16).Value = budgetManagePlan.quarter_all_4_2 ?? 0; + ws.Cell(row, 17).Value = budgetManagePlan.quarter_all_4_3 ?? 0; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.SetBold().Font.FontName= "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + foreach (var outputProject in budgetManagePlan.OutputProjectLists ?? new List()) + { + foreach (var strategyDetail in outputProject.StrategyDetails ?? new List()) //ยุทธศาสตร์ชาติ + { + ws.Cell(row, 1).Value = strategyDetail.strategy_name; + ws.Cell(row, 2).Value = strategyDetail.budget_unit_name; + ws.Cell(row, 3).Value = strategyDetail.total_1?? 0; + ws.Cell(row, 4).Value = strategyDetail.total_2?? 0; + ws.Cell(row, 5).Value = strategyDetail.total_3?? 0; + ws.Cell(row, 6).Value = strategyDetail.quarter_1_1?? 0; + ws.Cell(row, 7).Value = strategyDetail.quarter_1_2?? 0; + ws.Cell(row, 8).Value = strategyDetail.quarter_1_3?? 0; + ws.Cell(row, 9).Value = strategyDetail.quarter_2_1?? 0; + ws.Cell(row, 10).Value = strategyDetail.quarter_2_2?? 0; + ws.Cell(row, 11).Value = strategyDetail.quarter_2_3?? 0; + ws.Cell(row, 12).Value = strategyDetail.quarter_3_1?? 0; + ws.Cell(row, 13).Value = strategyDetail.quarter_3_2?? 0; + ws.Cell(row, 14).Value = strategyDetail.quarter_3_3?? 0; + ws.Cell(row, 15).Value = strategyDetail.quarter_4_1?? 0; + ws.Cell(row, 16).Value = strategyDetail.quarter_4_2?? 0; + ws.Cell(row, 17).Value = strategyDetail.quarter_4_3?? 0; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.FromArgb(220, 230, 241); + + row++; + } + foreach (var strategyDetail in outputProject.AllocationStrategyDetails ?? new List())//ยุทธศาสตร์จัดสรร + { + ws.Cell(row, 1).Value = strategyDetail.allocation_strategy_name; + ws.Cell(row, 2).Value = strategyDetail.budget_unit_name; + ws.Cell(row, 3).Value = strategyDetail.total_1?? 0; + ws.Cell(row, 4).Value = strategyDetail.total_2?? 0; + ws.Cell(row, 5).Value = strategyDetail.total_3?? 0; + ws.Cell(row, 6).Value = strategyDetail.quarter_1_1?? 0; + ws.Cell(row, 7).Value = strategyDetail.quarter_1_2?? 0; + ws.Cell(row, 8).Value = strategyDetail.quarter_1_3?? 0; + ws.Cell(row, 9).Value = strategyDetail.quarter_2_1?? 0; + ws.Cell(row, 10).Value = strategyDetail.quarter_2_2?? 0; + ws.Cell(row, 11).Value = strategyDetail.quarter_2_3?? 0; + ws.Cell(row, 12).Value = strategyDetail.quarter_3_1?? 0; + ws.Cell(row, 13).Value = strategyDetail.quarter_3_2?? 0; + ws.Cell(row, 14).Value = strategyDetail.quarter_3_3?? 0; + ws.Cell(row, 15).Value = strategyDetail.quarter_4_1?? 0; + ws.Cell(row, 16).Value = strategyDetail.quarter_4_2?? 0; + ws.Cell(row, 17).Value = strategyDetail.quarter_4_3?? 0; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.FromArgb(218, 238, 243); + + row++; + } + foreach (var Detail in outputProject.OutputProjectDetails?? new List()) + { + int ActivitiesNo = 1; + int SubActivitiesNo = 1; + ws.Cell(row, 1).Value = Detail.output_project_name; + ws.Cell(row, 2).Value = Detail.budget_unit_name; + ws.Cell(row, 3).Value = Detail.total_1?? 0; + ws.Cell(row, 4).Value = Detail.total_2?? 0; + ws.Cell(row, 5).Value = Detail.total_3?? 0; + ws.Cell(row, 6).Value = Detail.quarter_1_1?? 0; + ws.Cell(row, 7).Value = Detail.quarter_1_2?? 0; + ws.Cell(row, 8).Value = Detail.quarter_1_3?? 0; + ws.Cell(row, 9).Value = Detail.quarter_2_1?? 0; + ws.Cell(row, 10).Value = Detail.quarter_2_2?? 0; + ws.Cell(row, 11).Value = Detail.quarter_2_3?? 0; + ws.Cell(row, 12).Value = Detail.quarter_3_1?? 0; + ws.Cell(row, 13).Value = Detail.quarter_3_2?? 0; + ws.Cell(row, 14).Value = Detail.quarter_3_3?? 0; + ws.Cell(row, 15).Value = Detail.quarter_4_1?? 0; + ws.Cell(row, 16).Value = Detail.quarter_4_2?? 0; + ws.Cell(row, 17).Value = Detail.quarter_4_3?? 0; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + foreach (var indicatorsList in Detail.Indicators_list?? new List())//ตัวชี้วัด + + { + ws.Cell(row, 1).Value = indicatorsList.indicators_list_name; + ws.Cell(row, 2).Value = indicatorsList.budget_unit_name; + ws.Cell(row, 3).Value = indicatorsList.total_1; + ws.Cell(row, 4).Value = indicatorsList.total_2; + ws.Cell(row, 5).Value = indicatorsList.total_3; + ws.Cell(row, 6).Value = indicatorsList.quarter_1_1; + ws.Cell(row, 7).Value = indicatorsList.quarter_1_2; + ws.Cell(row, 8).Value = indicatorsList.quarter_1_3; + ws.Cell(row, 9).Value = indicatorsList.quarter_2_1; + ws.Cell(row, 10).Value = indicatorsList.quarter_2_2; + ws.Cell(row, 11).Value = indicatorsList.quarter_2_3; + ws.Cell(row, 12).Value = indicatorsList.quarter_3_1; + ws.Cell(row, 13).Value = indicatorsList.quarter_3_2; + ws.Cell(row, 14).Value = indicatorsList.quarter_3_3; + ws.Cell(row, 15).Value = indicatorsList.quarter_4_1; + ws.Cell(row, 16).Value = indicatorsList.quarter_4_2; + ws.Cell(row, 17).Value = indicatorsList.quarter_4_3; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + } + ws.Cell(row, 1).Value = "1.แผนการปฎิบัติงาน"; + ws.Cell(row, 1).Style.Font.Bold = true; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.FromArgb(171, 204, 239); + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + row++; + ws.Cell(row, 1).Value = "1.1 ตัวชี้วัด :"; + ws.Cell(row, 1).Style.Font.Bold = true; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.Gainsboro; + row++; + foreach (var indicatorPlan in Detail.IndicatorPlans?? new List())//1.1 ตัวชี้วัด + + { + ws.Cell(row, 1).Value = indicatorPlan.indicator_plan_name; + ws.Cell(row, 2).Value = indicatorPlan.budget_unit_name; + ws.Cell(row, 3).Value = indicatorPlan.total_1; + ws.Cell(row, 4).Value = indicatorPlan.total_2; + ws.Cell(row, 5).Value = indicatorPlan.total_3; + ws.Cell(row, 6).Value = indicatorPlan.quarter_1_1; + ws.Cell(row, 7).Value = indicatorPlan.quarter_1_2; + ws.Cell(row, 8).Value = indicatorPlan.quarter_1_3; + ws.Cell(row, 9).Value = indicatorPlan.quarter_2_1; + ws.Cell(row, 10).Value = indicatorPlan.quarter_2_2; + ws.Cell(row, 11).Value = indicatorPlan.quarter_2_3; + ws.Cell(row, 12).Value = indicatorPlan.quarter_3_1; + ws.Cell(row, 13).Value = indicatorPlan.quarter_3_2; + ws.Cell(row, 14).Value = indicatorPlan.quarter_3_3; + ws.Cell(row, 15).Value = indicatorPlan.quarter_4_1; + ws.Cell(row, 16).Value = indicatorPlan.quarter_4_2; + ws.Cell(row, 17).Value = indicatorPlan.quarter_4_3; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + } + ws.Cell(row, 1).Value = "1.2. กิจกรรมหลัก :"; + ws.Cell(row, 1).Style.Font.Bold = true; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.Gainsboro; + row++; + foreach (var budget in Detail.BudgetActivities?? new List()) //1.2. กิจกรรมหลัก + + { + ws.Cell(row, 1).Value = $"กิจกรรม {ActivitiesNo}: {budget.budget_activitie_name}"; + ws.Cell(row, 1).Style.Font.Bold = true; + ActivitiesNo++; + ws.Cell(row, 2).Value = budget.budget_unit_name; + ws.Cell(row, 3).Value = budget.total_1; + ws.Cell(row, 4).Value = budget.total_2; + ws.Cell(row, 5).Value = budget.total_3; + ws.Cell(row, 6).Value = budget.quarter_1_1; + ws.Cell(row, 7).Value = budget.quarter_1_2; + ws.Cell(row, 8).Value = budget.quarter_1_3; + ws.Cell(row, 9).Value = budget.quarter_2_1; + ws.Cell(row, 10).Value = budget.quarter_2_2; + ws.Cell(row, 11).Value = budget.quarter_2_3; + ws.Cell(row, 12).Value = budget.quarter_3_1; + ws.Cell(row, 13).Value = budget.quarter_3_2; + ws.Cell(row, 14).Value = budget.quarter_3_3; + ws.Cell(row, 15).Value = budget.quarter_4_1; + ws.Cell(row, 16).Value = budget.quarter_4_2; + ws.Cell(row, 17).Value = budget.quarter_4_3; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + + row++; + } + ws.Cell(row, 1).Value = "2.แผนการใช้จ่ายงบประมาณ"; + ws.Cell(row, 1).Style.Font.Bold = true; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.FromArgb(171, 204, 239); + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + row++; + ws.Cell(row, 1).Value = "2.1 งบประมาณ :"; + ws.Cell(row, 1).Style.Font.Bold = true; + ws.Cell(row, 1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center); + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 1), ws.Cell(row, 17)).Style.Fill.BackgroundColor = XLColor.Gainsboro; + row++; + foreach (var budgetSpendingPlan in Detail.BudgetSpendingPlans?? new List()) + { + + + ws.Cell(row, 1).Value = $"{SubActivitiesNo}. {budgetSpendingPlan.budget_spending_plan_name}"; + SubActivitiesNo++; + ws.Cell(row, 2).Value = budgetSpendingPlan.budget_unit_name; + ws.Cell(row, 3).Value = budgetSpendingPlan.total_1; + ws.Cell(row, 4).Value = budgetSpendingPlan.total_2; + ws.Cell(row, 5).Value = budgetSpendingPlan.total_3; + ws.Cell(row, 6).Value = budgetSpendingPlan.quarter_1_1; + ws.Cell(row, 7).Value = budgetSpendingPlan.quarter_1_2; + ws.Cell(row, 8).Value = budgetSpendingPlan.quarter_1_3; + ws.Cell(row, 9).Value = budgetSpendingPlan.quarter_2_1; + ws.Cell(row, 10).Value = budgetSpendingPlan.quarter_2_2; + ws.Cell(row, 11).Value = budgetSpendingPlan.quarter_2_3; + ws.Cell(row, 12).Value = budgetSpendingPlan.quarter_3_1; + ws.Cell(row, 13).Value = budgetSpendingPlan.quarter_3_2; + ws.Cell(row, 14).Value = budgetSpendingPlan.quarter_3_3; + ws.Cell(row, 15).Value = budgetSpendingPlan.quarter_4_1; + ws.Cell(row, 16).Value = budgetSpendingPlan.quarter_4_2; + ws.Cell(row, 17).Value = budgetSpendingPlan.quarter_4_3; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + foreach (var sub in budgetSpendingPlan.SubBudgetSpending?? new List()) + { + ws.Cell(row, 1).Value = sub.sub_budget_spending_plan_name; + ws.Cell(row, 2).Value = sub.budget_unit_name; + ws.Cell(row, 3).Value = sub.total_1; + ws.Cell(row, 4).Value = sub.total_2; + ws.Cell(row, 5).Value = sub.total_3; + ws.Cell(row, 6).Value = sub.quarter_1_1; + ws.Cell(row, 7).Value = sub.quarter_1_2; + ws.Cell(row, 8).Value = sub.quarter_1_3; + ws.Cell(row, 9).Value = sub.quarter_2_1; + ws.Cell(row, 10).Value = sub.quarter_2_2; + ws.Cell(row, 11).Value = sub.quarter_2_3; + ws.Cell(row, 12).Value = sub.quarter_3_1; + ws.Cell(row, 13).Value = sub.quarter_3_2; + ws.Cell(row, 14).Value = sub.quarter_3_3; + ws.Cell(row, 15).Value = sub.quarter_4_1; + ws.Cell(row, 16).Value = sub.quarter_4_2; + ws.Cell(row, 17).Value = sub.quarter_4_3; + ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontName = "TH SarabunPSK"; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Font.FontSize = 14; + ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left; + ws.Range(ws.Cell(row, 3),ws.Cell(row,17)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right; + ws.Range(ws.Cell(row, 2),ws.Cell(row,17)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Alignment.WrapText = true; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row,1),ws.Cell(row,17)).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Range(ws.Cell(row, 3), ws.Cell(row, 17)).Style.NumberFormat.Format = "#,##0"; + row++; + + } + } + } + } + } + using (var stream = new MemoryStream()) + { + workbook.SaveAs(stream); + var content = stream.ToArray(); + return File( + content, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "สงป301" + ".xlsx"); + } + } } } \ No newline at end of file diff --git a/Models/budget/manage_plan_budget.cs b/Models/budget/manage_plan_budget.cs new file mode 100644 index 0000000..b412b9f --- /dev/null +++ b/Models/budget/manage_plan_budget.cs @@ -0,0 +1,326 @@ +using System; +using System.Collections.Generic; + +public class manage_plan_budget +{ + public string budget_year { get; set; } + public decimal? total_all_1 { get; set; } + public decimal? total_all_2 { get; set; } + public decimal? total_all_3 { get; set; } + + public decimal? quarter_all_1_1 { get; set; } + + public decimal? quarter_all_1_2 { get; set; } + + public decimal? quarter_all_1_3 { get; set; } + + public decimal? quarter_all_2_1 { get; set; } + + public decimal? quarter_all_2_2 { get; set; } + + public decimal? quarter_all_2_3 { get; set; } + + public decimal? quarter_all_3_1 { get; set; } + + public decimal? quarter_all_3_2 { get; set; } + + public decimal? quarter_all_3_3 { get; set; } + public decimal? quarter_all_4_1 { get; set; } + public decimal? quarter_all_4_2 { get; set; } + public decimal? quarter_all_4_3 { get; set; } + public List OverallIndicatorsDetails { get; set; } + public List OutputProjectLists { get; set; } + +} + public class overall_indicators_detail + { + public string indicators_name { get; set; } + public int? type { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + } + + + + public class output_project_list + { + public List StrategyDetails { get; set; } + public List AllocationStrategyDetails { get; set; } + public List OutputProjectDetails { get; set; } + + } + public class strategy_detail + { + public string strategy_name { get; set; } + public int? type { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + } + + public class allocation_strategy_detail + { + public string allocation_strategy_name { get; set; } + public int? type { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + } + + public class output_project_detail + { + public string output_project_name { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + public List Indicators_list { get; set; }//ตัวชี้วัด + public List IndicatorPlans { get; set; } //1.แผนการปฎิบัติงาน 1.1 ตัวชี้วัด + public List BudgetActivities { get; set; } //1.2. กิจกรรมหลัก + public List BudgetSpendingPlans { get; set; } //2.แผนการใช้จ่ายงบประมาณ + } + + public class indicators_list + { + public string indicators_list_name { get; set; } + public int? indicators_type { get; set; } //1. ตัวชี้วัดเชิงคุณภาพ 2. ตัวชี้วัดเชิงปริมาณ 3. ตัวชี้วัดเชิงเวลา + + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + } + public class indicator_plan + { + public string indicator_plan_name { get; set; } + public int? indicators_type { get; set; } //1. ตัวชี้วัดเชิงคุณภาพ 2. ตัวชี้วัดเชิงปริมาณ 3. ตัวชี้วัดเชิงเวลา + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + } + + public class budget_activitie + { + public string budget_activitie_name { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + + + } + + public class budget_spending_plan + { + public string budget_spending_plan_name { get; set; } + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { get; set; } + public List SubBudgetSpending { get; set; } + + } + + public class sub_budget_spending_plan + { + public string sub_budget_spending_plan_name { get; set; } + + public string budget_unit_name { get; set; } + public decimal? total_1 { get; set; } + public decimal? total_2 { get; set; } + public decimal? total_3 { get; set; } + + public decimal? quarter_1_1 { get; set; } + + public decimal? quarter_1_2 { get; set; } + + public decimal? quarter_1_3 { get; set; } + + public decimal? quarter_2_1 { get; set; } + + public decimal? quarter_2_2 { get; set; } + + public decimal? quarter_2_3 { get; set; } + + public decimal? quarter_3_1 { get; set; } + + public decimal? quarter_3_2 { get; set; } + + public decimal? quarter_3_3 { get; set; } + public decimal? quarter_4_1 { get; set; } + public decimal? quarter_4_2 { get; set; } + public decimal? quarter_4_3 { 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 d3c409c..806751a 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 eba8e46..83fa6d9 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 c02e72f..d05b1c5 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 19c44ea..0009869 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 ee21ddd..25ab819 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 ee21ddd..25ab819 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.AssemblyInfo.cs b/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs index 17bbffd..0b44c6b 100644 --- a/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs +++ b/obj/Debug/net5.0/rmutr_report.AssemblyInfo.cs @@ -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+5abb0843e4a76829532bd2fee4ce99d379579140")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12da4e1939919124e2fa33e3f0042250bd26b203")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache b/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache index 1591b8f..b3ae789 100644 --- a/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache +++ b/obj/Debug/net5.0/rmutr_report.AssemblyInfoInputs.cache @@ -1 +1 @@ -52e8db3788ecf506c07090a5147c8bca54ca3b6569071f7090aab62573832caf +05ec1291166972c4e81d91c397f63ed5180e8549f12a9f1b81a6e37736a2b6c2 diff --git a/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache b/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache index c8dc2f0..35b630d 100644 --- a/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache +++ b/obj/Debug/net5.0/rmutr_report.RazorTargetAssemblyInfo.cache @@ -1 +1 @@ -9366782ca8670ec554b748dfb699af96890da62fe84a37ad0dedfa8a188a61c7 +3282571f3aaad087370b963afc8333e1479c897b11aab5684c6fc3015052c2b9 diff --git a/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache b/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache index a6fe560..9688daf 100644 --- a/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache +++ b/obj/Debug/net5.0/rmutr_report.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -afa51354446f76983805385c50d950b725c69d494d45a2a50d7b7ccdad211a64 +a7b7f10bca3839a2638abadf64cec27caf0c4a9a7f64c4996f76211882cc5324 diff --git a/obj/Debug/net5.0/rmutr_report.dll b/obj/Debug/net5.0/rmutr_report.dll index d3c409c..806751a 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 eba8e46..83fa6d9 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.AssemblyInfo.cs b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs index 17bbffd..0b44c6b 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs +++ b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfo.cs @@ -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+5abb0843e4a76829532bd2fee4ce99d379579140")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12da4e1939919124e2fa33e3f0042250bd26b203")] [assembly: System.Reflection.AssemblyProductAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyTitleAttribute("rmutr_report")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache index 1591b8f..b3ae789 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.AssemblyInfoInputs.cache @@ -1 +1 @@ -52e8db3788ecf506c07090a5147c8bca54ca3b6569071f7090aab62573832caf +05ec1291166972c4e81d91c397f63ed5180e8549f12a9f1b81a6e37736a2b6c2 diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache b/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache index 301b76b..35b630d 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.RazorTargetAssemblyInfo.cache @@ -1 +1 @@ -395ab626e2d4d33b8f8100e97921c4edb4adf4807825daf60f0b675437247c27 +3282571f3aaad087370b963afc8333e1479c897b11aab5684c6fc3015052c2b9 diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache b/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache index 31ab3d8..14e3131 100644 --- a/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache +++ b/obj/Debug/netcoreapp3.1/rmutr_report.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -c105c231f3ce6711e6210b4ac2e3c37dad34786ee49ff96c064a57f960448e53 +276f566e2dcb3ad7dc3befcaa0d6fe395e1b229e432fcc61d2cbfb171de2197f diff --git a/obj/Debug/netcoreapp3.1/rmutr_report.dll b/obj/Debug/netcoreapp3.1/rmutr_report.dll index c02e72f..d05b1c5 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 19c44ea..0009869 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.model.nuget.info b/obj/rider.project.model.nuget.info index ff39c6d..907f170 100644 --- a/obj/rider.project.model.nuget.info +++ b/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17379588852302958 \ No newline at end of file +17399449009804555 \ No newline at end of file diff --git a/obj/rider.project.restore.info b/obj/rider.project.restore.info index 77f0c95..e4aeed2 100644 --- a/obj/rider.project.restore.info +++ b/obj/rider.project.restore.info @@ -1 +1 @@ -17387528887442742 \ No newline at end of file +17400274795180319 \ No newline at end of file