This commit is contained in:
kamonwan taengsuk
2023-07-07 22:29:28 +07:00
parent 2bdfb659c9
commit 58f276f475
6 changed files with 351 additions and 94 deletions

View File

@@ -8013,8 +8013,12 @@ namespace rmutr_report.Controllers
row++;
}
}
if (detail.is_header == true)
foreach (var detail2 in personnel.set_personnel_budget_university_details_2)
{
if (detail2.is_header == true)
{
ws.Cell(row + 1, 1).Value = "ส่วนที่ 2 เงินเพิ่มอื่นที่จ่ายควบกับเงินเดือน";
ws.Cell(row + 1, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
@@ -8278,20 +8282,20 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin;
}
if (detail.topic_type == 4)
if (detail2.topic_type == 1)
{
ws.Cell(row + 5, 2).Value = "รวมทั้งสิ้น";
ws.Cell(row + 5, 5).Value = detail.request_budget_rate;
ws.Cell(row + 5, 6).Value = detail.request_budget_budget;
ws.Cell(row + 5, 7).Value = detail.offer_budget_rate;
ws.Cell(row + 5, 8).Value = detail.offer_budget_budget;
ws.Cell(row + 5, 9).Value = detail.mtef_1_rate;
ws.Cell(row + 5, 10).Value = detail.mtef_1_budget;
ws.Cell(row + 5, 11).Value = detail.mtef_2_rate;
ws.Cell(row + 5, 12).Value = detail.mtef_2_budget;
ws.Cell(row + 5, 13).Value = detail.mtef_3_rate;
ws.Cell(row + 5, 14).Value = detail.mtef_3_budget;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail.remark;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Merge().Value = "รวมทั้งสิ้น";
ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row + 5, 9).Value = detail2.mtef_rate_1;
ws.Cell(row + 5, 10).Value = detail2.mtef_budget_1;
ws.Cell(row + 5, 11).Value = detail2.mtef_rate_2;
ws.Cell(row + 5, 12).Value = detail2.mtef_budget_2;
ws.Cell(row + 5, 13).Value = detail2.mtef_rate_3;
ws.Cell(row + 5, 14).Value = detail2.mtef_budget_3;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
//ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -8336,22 +8340,147 @@ namespace rmutr_report.Controllers
ws.Cell(row + 5, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
row++;
}
ws.Cell(row + 6, 1).Value = "หมายเหตุ : " + detail.remark;
ws.Cell(row + 6, 1).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 6, 1).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 6, 1), ws.Cell(row + 6, 19)).Style.Alignment.WrapText = true;
ws.Cell(row + 6, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 6, 1).Style.Font.SetBold().Font.FontSize = 16;
}
foreach (var detail2 in personnel.set_personnel_budget_university_details_2)
{
if (detail2.is_header == true)
if (detail2.topic_type == 2)
{
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Merge().Value = detail2.topic;
ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row + 5, 9).Value = detail2.mtef_rate_1;
ws.Cell(row + 5, 10).Value = detail2.mtef_budget_1;
ws.Cell(row + 5, 11).Value = detail2.mtef_rate_2;
ws.Cell(row + 5, 12).Value = detail2.mtef_budget_2;
ws.Cell(row + 5, 13).Value = detail2.mtef_rate_3;
ws.Cell(row + 5, 14).Value = detail2.mtef_budget_3;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
//ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.BottomBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
row++;
}
if (detail2.topic_type == 3)
{
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Merge().Value = detail2.topic;
ws.Cell(row + 5, 5).Value = detail2.request_rate;
ws.Cell(row + 5, 6).Value = detail2.request_budget;
ws.Cell(row + 5, 7).Value = detail2.offer_rate;
ws.Cell(row + 5, 8).Value = detail2.offer_budget;
ws.Cell(row + 5, 9).Value = detail2.mtef_rate_1;
ws.Cell(row + 5, 10).Value = detail2.mtef_budget_1;
ws.Cell(row + 5, 11).Value = detail2.mtef_rate_2;
ws.Cell(row + 5, 12).Value = detail2.mtef_budget_2;
ws.Cell(row + 5, 13).Value = detail2.mtef_rate_3;
ws.Cell(row + 5, 14).Value = detail2.mtef_budget_3;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Value = detail2.remark;
ws.Cell(row + 5, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Cell(row + 5, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Border.BottomBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Cell(row + 5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 8).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 12).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row + 5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 15), ws.Cell(row + 5, 19)).Merge().Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 5, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 5, 5), ws.Cell(row + 5, 14)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 5, 2), ws.Cell(row + 5, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 5, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 8).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 12).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 5, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
row++;
}
}
foreach (var detail3 in personnel.set_personnel_budget_university_details_3)
{
if (detail3.is_header == true)
{
ws.Cell(row + 6, 1).Value = "หมายเหตุ : "; //+ detail2.remark;
ws.Cell(row + 6, 1).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 6, 1).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
//ws.Range(ws.Cell(row + 6, 1), ws.Cell(row + 6, 19)).Style.Alignment.WrapText = true;
ws.Cell(row + 6, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 6, 1).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row + 8, 1), ws.Cell(row + 10, 4)).Merge().Value = "รายการ";
ws.Range(ws.Cell(row + 8, 1), ws.Cell(row + 10, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
@@ -8447,12 +8576,13 @@ namespace rmutr_report.Controllers
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 10, 9), ws.Cell(row + 10, 10)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
//
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Merge().Value = "แผนการใช้จ่ายประจำปี 2566";
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Merge().Value =
"แผนการใช้จ่ายประจำปี 2566";
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 8, 11), ws.Cell(row + 8, 16)).Style.Font.SetBold().Font.FontSize = 16;
@@ -8466,11 +8596,11 @@ namespace rmutr_report.Controllers
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 9, 11), ws.Cell(row + 9, 12)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Merge().Value = "แผนบุคลากรภาครัฐ";
@@ -8478,11 +8608,11 @@ namespace rmutr_report.Controllers
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 9, 13), ws.Cell(row + 9, 14)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Merge().Value = "ร้อยละ";
@@ -8492,9 +8622,9 @@ namespace rmutr_report.Controllers
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 9, 15), ws.Cell(row + 9, 16)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Merge().Value = "'(4)";
@@ -8502,11 +8632,11 @@ namespace rmutr_report.Controllers
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 10, 11), ws.Cell(row + 10, 12)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Merge().Value = "'(5)";
@@ -8515,49 +8645,149 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 10, 13), ws.Cell(row + 10, 14)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Merge().Value = "'(6) = (5)/(4)*100";
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Fill.BackgroundColor =
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row + 10, 15), ws.Cell(row + 10, 16)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Merge().Value = "เปรียบเทียบสัดส่วนการตั้ง งปม. ปี 2566 (แผนบุคลากรภาครัฐ) กับ แผนการใช้จ่ายเงินประจำปี 2565";
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Merge().Value = "คำชี้แจง(ถ้ามี)";
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 8, 1), ws.Cell(row + 10, 24)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Merge().Value =
"เปรียบเทียบสัดส่วนการตั้ง งปม. ปี 2566 (แผนบุคลากรภาครัฐ) กับ แผนการใช้จ่ายเงินประจำปี 2565";
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Fill.BackgroundColor =
XLColor.FromArgb(214, 220, 228);
ws.Range(ws.Cell(row + 8, 17), ws.Cell(row + 10, 18)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Merge().Value = "คำชี้แจง(ถ้ามี)";
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Fill.BackgroundColor =
XLColor.FromArgb(172, 185, 202);
ws.Range(ws.Cell(row + 8, 19), ws.Cell(row + 10, 24)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 8, 1), ws.Cell(row + 10, 24)).Style.Alignment.WrapText = true;
}
if (detail3.topic_type == 1)
{
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Merge().Value = detail3.topic;
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 6)).Merge().Value = detail3.year_1_annual_spending_plan_all;
ws.Range(ws.Cell(row + 11, 7), ws.Cell(row + 11, 8)).Merge().Value = detail3.year_1_annual_spending_plan_public_sector;
ws.Range(ws.Cell(row + 11, 9), ws.Cell(row + 11, 10)).Merge().Value = detail3.year_1_annual_spending_plan_percent;
ws.Range(ws.Cell(row + 11, 11), ws.Cell(row + 11, 12)).Merge().Value = detail3.year_2_annual_spending_plan_all;
ws.Range(ws.Cell(row + 11, 13), ws.Cell(row + 11, 14)).Merge().Value= detail3.year_2_annual_spending_plan_public_sector;
ws.Range(ws.Cell(row + 11, 15), ws.Cell(row + 11, 16)).Merge().Value = detail3.year_2_annual_spending_plan_percent;
ws.Range(ws.Cell(row + 11, 17), ws.Cell(row + 11, 18)).Merge().Value= detail3.compare_proportions;
ws.Range(ws.Cell(row + 11, 19), ws.Cell(row + 11, 24)).Merge().Value = detail3.remark;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.BottomBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 7), ws.Cell(row + 11, 8)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 9), ws.Cell(row + 11, 10)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 11), ws.Cell(row + 11, 12)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 13), ws.Cell(row + 11, 14)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 15), ws.Cell(row + 11, 16)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 17), ws.Cell(row + 11, 18)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 19), ws.Cell(row + 11, 24)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 17)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 11, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
row++;
}
if (detail3.topic_type == 2)
{
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Merge().Value = "รวม";
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 6)).Merge().Value = detail3.year_1_annual_spending_plan_all;
ws.Range(ws.Cell(row + 11, 7), ws.Cell(row + 11, 8)).Merge().Value = detail3.year_1_annual_spending_plan_public_sector;
ws.Range(ws.Cell(row + 11, 9), ws.Cell(row + 11, 10)).Merge().Value = detail3.year_1_annual_spending_plan_percent;
ws.Range(ws.Cell(row + 11, 11), ws.Cell(row + 11, 12)).Merge().Value = detail3.year_2_annual_spending_plan_all;
ws.Range(ws.Cell(row + 11, 13), ws.Cell(row + 11, 14)).Merge().Value= detail3.year_2_annual_spending_plan_public_sector;
ws.Range(ws.Cell(row + 11, 15), ws.Cell(row + 11, 16)).Merge().Value = detail3.year_2_annual_spending_plan_percent;
ws.Range(ws.Cell(row + 11, 17), ws.Cell(row + 11, 18)).Merge().Value= detail3.compare_proportions;
ws.Range(ws.Cell(row + 11, 19), ws.Cell(row + 11, 24)).Merge().Value = detail3.remark;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.BottomBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 7), ws.Cell(row + 11, 8)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 9), ws.Cell(row + 11, 10)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 11), ws.Cell(row + 11, 12)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 13), ws.Cell(row + 11, 14)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 15), ws.Cell(row + 11, 16)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 17), ws.Cell(row + 11, 18)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 19), ws.Cell(row + 11, 24)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row, 19)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row + 11, 5), ws.Cell(row + 11, 17)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row + 11, 1), ws.Cell(row + 11, 4)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row + 11, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 17).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row + 11, 19).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
}
ws.Cell(row + 12, 1).Value = "หมายเหตุ : ตามหลักเกณฑ์ฯ การจัดสรรงบประมาณค่าใช้จ่ายบุคลากรขององค์การมหาชน ให้กำหนดกรอบวงเงินรวมสำหรับค่าใช้จ่ายบุคลากรไว้ไม่เกิน ร้อยละ 30 ของแผนการใช้จ่ายเงินประจำปี (ยกเว้น หน่วยงานที่มีมติ ครม. อนุมัติให้ตั้งเกินร้อยละ 30 ได้)";
ws.Cell(row + 12, 1).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Cell(row + 12, 1).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
//ws.Range(ws.Cell(row + 12, 1), ws.Cell(row + 12, 24)).Style.Alignment.WrapText = true;
ws.Cell(row + 12, 1).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row + 12, 1).Style.Font.FontSize = 16;
}
}

View File

@@ -7,7 +7,7 @@ namespace rmutr_report.Models.Personnel
{
public class set_personnel_budget_university //คำขอแผน พนักงานมหาลัย
{
[Key] public Guid? set_personnel_budget_university_uid { get; set; }
[Key] public Guid? set_personnel_budget_university_uid { get; set; }
// public Guid? academic_year_uid { get; set; }
public string academic_year_name_th { get; set; }
@@ -70,12 +70,14 @@ namespace rmutr_report.Models.Personnel
public DateTime? version { get; set; }
public List<t_set_personnel_budget_university_detail> set_personnel_budget_university_details { get; set; }
public List<t_set_personnel_budget_university_detail_2> set_personnel_budget_university_details_2 { get; set; }
public List<t_set_personnel_budget_university_detail_3> set_personnel_budget_university_details_3 { get; set; }
}
public class t_set_personnel_budget_university_detail
{
[Key] public Guid? set_personnel_budget_university_detail_uid { get; set; }
[Key] public Guid? set_personnel_budget_university_detail_uid { get; set; }
public Guid? set_personnel_budget_university_uid { get; set; }
public string topic { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? act_rate { get; set; }
@@ -127,10 +129,8 @@ namespace rmutr_report.Models.Personnel
public string remark { get; set; }
//----
public int? row { get; set; }
public bool? is_header { get; set; } //หัวตารางส่วน 2
public int? topic_type { get; set; }
public int? topic_type { get; set; }
public int? row { get; set; }
}
@@ -140,26 +140,53 @@ namespace rmutr_report.Models.Personnel
[Key] public Guid? set_personnel_budget_university_detail_2_uid { get; set; }
public Guid? set_personnel_budget_university_uid { get; set; }
public string topic { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? plan_1_all_department { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? plan_1_government_personnel { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? request_rate { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? request_budget { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? plan_1_percent { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_rate { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_budget { get; set; }
//
[Column(TypeName = "decimal(18,4)")] public decimal? plan_2_all_department { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? plan_2_government_personnel { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_rate_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_budget_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? plan_2_percent { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_rate_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_budget_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_rate_3 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_budget_3 { get; set; }
public string remark { get; set; }
public int? topic_type { get; set; }
//----
public int? row { get; set; }
public bool? is_header { get; set; } //หัวตารางส่วน 2
}
public class t_set_personnel_budget_university_detail_3
{
[Key] public Guid? set_personnel_budget_university_detail_2_uid { get; set; }
public Guid? set_personnel_budget_university_uid { get; set; }
public string topic { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_1_annual_spending_plan_all { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_1_annual_spending_plan_public_sector { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_1_annual_spending_plan_percent { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_2_annual_spending_plan_all { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_2_annual_spending_plan_public_sector { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? year_2_annual_spending_plan_percent { get; set; }
//
[Column(TypeName = "decimal(18,4)")] public decimal? compare_proportions { get; set; }
public string remark { get; set; }
public int? topic_type { get; set; }
//----
public int? row { get; set; }
public int? row { get; set; }
public bool? is_header { get; set; } //หัวตารางส่วน 3
public int? topic_type { get; set; }
}
}