bug fixed
This commit is contained in:
@@ -18,9 +18,9 @@ using Swashbuckle.AspNetCore.Annotations;
|
||||
namespace rmutr_report.Controllers
|
||||
{
|
||||
[SwaggerTag("สำหรับรายงาน_budget")]
|
||||
public class Budget: Controller
|
||||
public class Budget : Controller
|
||||
{
|
||||
readonly Setting _setting;
|
||||
readonly Setting _setting;
|
||||
|
||||
public Budget(Setting setting)
|
||||
{
|
||||
@@ -33,18 +33,18 @@ namespace rmutr_report.Controllers
|
||||
{
|
||||
foreach (var x in budget_reports)
|
||||
{
|
||||
int sum1 = budget_reports.Sum(g => int.Parse(g.salaya));
|
||||
x.sum1 = sum1;
|
||||
int sum2 = budget_reports.Sum(g => int.Parse(g.bophitphimuk));
|
||||
x.sum2 = sum2;
|
||||
int sum3 = budget_reports.Sum(g => int.Parse(g.pohchang));
|
||||
x.sum3 = sum3;
|
||||
int sum4 = budget_reports.Sum(g => int.Parse(g.klai_kangwon));
|
||||
x.sum4 = sum4;
|
||||
int sum5 = budget_reports.Sum(g => int.Parse(g.total));
|
||||
x.sum5 = sum5;
|
||||
|
||||
int sum1 = budget_reports.Sum(g => int.Parse(g.salaya));
|
||||
x.sum1 = sum1;
|
||||
int sum2 = budget_reports.Sum(g => int.Parse(g.bophitphimuk));
|
||||
x.sum2 = sum2;
|
||||
int sum3 = budget_reports.Sum(g => int.Parse(g.pohchang));
|
||||
x.sum3 = sum3;
|
||||
int sum4 = budget_reports.Sum(g => int.Parse(g.klai_kangwon));
|
||||
x.sum4 = sum4;
|
||||
int sum5 = budget_reports.Sum(g => int.Parse(g.total));
|
||||
x.sum5 = sum5;
|
||||
}
|
||||
|
||||
Report report = new Report();
|
||||
report.Load(_setting.report_path + "budget_report.frx");
|
||||
report.RegisterData(budget_reports, "budget_report");
|
||||
@@ -81,9 +81,11 @@ namespace rmutr_report.Controllers
|
||||
|
||||
return Ok();
|
||||
}
|
||||
[HttpPost, Route("reports/budget_summary_report/{type}")]
|
||||
|
||||
[HttpPost, Route("reports/budget_summary_report/{type}")]
|
||||
[ApiExplorerSettings(GroupName = "reports")]
|
||||
public IActionResult GetSumReport([FromRoute] string type, [FromBody] budget_summary_report budget_summary_reports)
|
||||
public IActionResult GetSumReport([FromRoute] string type,
|
||||
[FromBody] budget_summary_report budget_summary_reports)
|
||||
{
|
||||
var _budget_summary_report = new List<budget_summary_report>() { budget_summary_reports };
|
||||
var s1 = budget_summary_reports.summary.Sum(d => d.budget_1);
|
||||
@@ -95,10 +97,9 @@ namespace rmutr_report.Controllers
|
||||
{
|
||||
var s6 = s1 + s2 + s3 + s4 + s5;
|
||||
budget_summary_reports.total_budget = s6;
|
||||
|
||||
}
|
||||
|
||||
if (s1!=null || s2!=null||s3 !=null|| s4!= null|| s5!=null)
|
||||
if (s1 != null || s2 != null || s3 != null || s4 != null || s5 != null)
|
||||
{
|
||||
budget_summary_reports.budget_1 = s1;
|
||||
budget_summary_reports.budget_2 = s2;
|
||||
@@ -107,38 +108,37 @@ namespace rmutr_report.Controllers
|
||||
budget_summary_reports.budget_5 = s5;
|
||||
//budget_summary_reports.total_budget = s6;
|
||||
}
|
||||
if (s1==null)
|
||||
|
||||
if (s1 == null)
|
||||
{
|
||||
budget_summary_reports.budget_1 = null;
|
||||
|
||||
}
|
||||
if (s2==null)
|
||||
|
||||
if (s2 == null)
|
||||
{
|
||||
budget_summary_reports.budget_2 = null;
|
||||
|
||||
}
|
||||
if (s3==null)
|
||||
|
||||
if (s3 == null)
|
||||
{
|
||||
budget_summary_reports.budget_3 = null;
|
||||
|
||||
}
|
||||
if (s4==null)
|
||||
|
||||
if (s4 == null)
|
||||
{
|
||||
budget_summary_reports.budget_4 = null;
|
||||
|
||||
}
|
||||
if (s5==null)
|
||||
|
||||
if (s5 == null)
|
||||
{
|
||||
budget_summary_reports.budget_5 = null;
|
||||
|
||||
}
|
||||
|
||||
foreach (var budget in budget_summary_reports.summary)
|
||||
{
|
||||
if (budget.budget_1 != null || budget.budget_2 != null || budget.budget_3 != null ||
|
||||
budget.budget_4 != null || budget.budget_5 != null)
|
||||
{
|
||||
|
||||
|
||||
budget.total_budget = budget.budget_1 + budget.budget_2 + budget.budget_3 + budget.budget_4 +
|
||||
budget.budget_5;
|
||||
}
|
||||
@@ -146,11 +146,10 @@ namespace rmutr_report.Controllers
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (budget_summary_reports.durable_articles_1 != null)
|
||||
{
|
||||
|
||||
foreach (var bDetail in budget_summary_reports.durable_articles_1)
|
||||
{
|
||||
if (bDetail.color == 1)
|
||||
@@ -208,6 +207,7 @@ namespace rmutr_report.Controllers
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Report report = new Report();
|
||||
report.Load(_setting.report_path + "budget_summary_report.frx");
|
||||
report.RegisterData(_budget_summary_report, "budget_summary_report");
|
||||
@@ -222,7 +222,8 @@ namespace rmutr_report.Controllers
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
return File(stream, "application/pdf");
|
||||
|
||||
case "xls":case "xlsx":
|
||||
case "xls":
|
||||
case "xlsx":
|
||||
Excel2007Export excel = new Excel2007Export();
|
||||
report.Export(excel, stream);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
@@ -244,6 +245,7 @@ namespace rmutr_report.Controllers
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[HttpPost, Route("reports/summary_project_budget_proposals/{type}")]
|
||||
[ApiExplorerSettings(GroupName = "reports")]
|
||||
public IActionResult GetSumPReport([FromRoute] string type, [FromBody] summary_project_budget_proposals eleven)
|
||||
@@ -263,6 +265,7 @@ namespace rmutr_report.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ele = new List<summary_project_budget_proposals>() { eleven };
|
||||
|
||||
Report report = new Report();
|
||||
@@ -291,7 +294,6 @@ namespace rmutr_report.Controllers
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
date + ".xlsx");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return Ok();
|
||||
@@ -324,7 +326,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("F2").Style.Font.FontSize = 16;
|
||||
ws.Cell("F2").Style.Font.Bold = true;
|
||||
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
|
||||
ws.Column(1).Width = 30;
|
||||
ws.Column(2).Width = 10;
|
||||
@@ -343,46 +345,46 @@ namespace rmutr_report.Controllers
|
||||
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("A3:A5").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("A3:A5").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("B3:F3").Merge().Value = "งบประมาณ "+personnel.academic_year_name_th+" (เบื้องต้น)";
|
||||
ws.Range("B3:F3").Merge().Value = "งบประมาณ " + personnel.academic_year_name_th + " (เบื้องต้น)";
|
||||
ws.Range("B3:F3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Range("B3:F3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("B3:F3").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("B3:F3").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("B3:F3").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("B3:F3").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("B3:F3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("B4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " วิทย์";
|
||||
ws.Cell("B4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " วิทย์";
|
||||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("B4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("B4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("C4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " สังคม";
|
||||
ws.Cell("C4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " สังคม";
|
||||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("C4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("C4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("D4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " บริการวิชาการ";
|
||||
ws.Cell("D4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " บริการวิชาการ";
|
||||
ws.Cell("D4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("D4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("D4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("D4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("D4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("D4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("E4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " ทำนุบำรุง";
|
||||
ws.Cell("E4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " ทำนุบำรุง";
|
||||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("E4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("F4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("F4").Value = "งบประมาณปี " + personnel.academic_year_name_th.Substring(2, 2);
|
||||
ws.Cell("F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
@@ -390,7 +392,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("F4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("B4:F4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(4, 2), ws.Cell(4, 6)).Style.Alignment.WrapText = true;
|
||||
ws.Cell(5, 2).Value = personnel.science;
|
||||
@@ -403,7 +405,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(5, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Font.FontName = "TH SarabunPSK";
|
||||
@@ -428,14 +430,16 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(204,153,255);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(204, 153, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -460,7 +464,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -473,9 +478,11 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,204,153);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(255, 204, 153);
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
@@ -491,7 +498,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -506,6 +514,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
@@ -521,14 +530,16 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,204,204);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(255, 204, 204);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -538,7 +549,8 @@ namespace rmutr_report.Controllers
|
||||
|
||||
row++;
|
||||
}
|
||||
if (detail.topic_type == 5)
|
||||
|
||||
if (detail.topic_type == 5)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.science;
|
||||
@@ -553,14 +565,16 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,255,204);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(255, 255, 204);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -573,18 +587,38 @@ namespace rmutr_report.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
using (var stream1 = new MemoryStream())
|
||||
var _national_budget = new List<national_budget>() { personnel };
|
||||
Report report = new Report();
|
||||
//report.Load();
|
||||
report.RegisterData(_national_budget, "national_budget");
|
||||
report.Prepare();
|
||||
MemoryStream stream = new MemoryStream();
|
||||
|
||||
if (type == "pdf")
|
||||
{
|
||||
workbook.SaveAs(stream1);
|
||||
var content = stream1.ToArray();
|
||||
|
||||
workbook.SaveAs(stream);
|
||||
var content = stream.ToArray();
|
||||
stream.Position = 0;
|
||||
// Set the content type and return the PDF file
|
||||
return File(content, "application/pdf", "converted.pdf");
|
||||
}
|
||||
|
||||
if (type == "xlsx")
|
||||
{
|
||||
workbook.SaveAs(stream);
|
||||
var content = stream.ToArray();
|
||||
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
return File(
|
||||
content,
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"basic_plan_" + date + ".xlsx");
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
[HttpPost, Route("reports/integration_strategic_plan/{type}")]
|
||||
|
||||
[HttpPost, Route("reports/integration_strategic_plan/{type}")]
|
||||
[ApiExplorerSettings(GroupName = "reports")]
|
||||
public IActionResult GetInStrPlanReport([FromRoute] string type,
|
||||
[FromBody] integration_strategic_plan personnel)
|
||||
@@ -598,7 +632,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("A1").Style.Font.FontSize = 16;
|
||||
ws.Cell("A1").Style.Font.Bold = true;
|
||||
|
||||
ws.Cell("A2").Value = personnel.agency_name_th;
|
||||
ws.Cell("A2").Value = personnel.agency_name_th;
|
||||
ws.Cell("A2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell("A2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("A2").Style.Font.FontName = "TH SarabunPSK";
|
||||
@@ -611,7 +645,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("K2").Style.Font.FontSize = 16;
|
||||
ws.Cell("K2").Style.Font.Bold = true;
|
||||
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
|
||||
ws.Column(1).Width = 30;
|
||||
ws.Column(2).Width = 15;
|
||||
@@ -634,96 +668,105 @@ namespace rmutr_report.Controllers
|
||||
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("A3:A5").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("A3:A5").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("B3:G3").Merge().Value = "งบประมาณ "+personnel.academic_year_name_th+" (เบื้องต้น)";
|
||||
ws.Range("B3:G3").Merge().Value = "งบประมาณ " + personnel.academic_year_name_th + " (เบื้องต้น)";
|
||||
ws.Range("B3:G3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Range("B3:G3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("B3:G3").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("B3:G3").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("B3:G3").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("B3:G3").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("B3:G3").Style.Border.TopBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("B3").Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("H3:K3").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("B4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการ พัฒนาและส่งเสริมเศรษฐกิจฐานราก";
|
||||
ws.Range("H3:K3").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("B4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการ พัฒนาและส่งเสริมเศรษฐกิจฐานราก";
|
||||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("B4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("B4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("C4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการ สร้างรายได้ จากการท่องเที่ยว";
|
||||
ws.Cell("C4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการ สร้างรายได้ จากการท่องเที่ยว";
|
||||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("C4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("C4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("D4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนบูรณาการพัฒนาด้านคมนาคมและระบบโลจิสติกส์";
|
||||
ws.Cell("D4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนบูรณาการพัฒนาด้านคมนาคมและระบบโลจิสติกส์";
|
||||
ws.Cell("D4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("D4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("D4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("D4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("D4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("D4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("E4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนบูรณาการ พัฒนาภาค (ภาคกลาง)";
|
||||
ws.Cell("E4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนบูรณาการ พัฒนาภาค (ภาคกลาง)";
|
||||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("E4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("E4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("F4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการพัฒนาอุตสาหกรรมและบริการแห่งอนาคต";
|
||||
ws.Cell("F4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการพัฒนาอุตสาหกรรมและบริการแห่งอนาคต";
|
||||
ws.Cell("F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("F4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("F4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("G4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์พัฒนาเศรษฐกิจและสังคมดิจิทัล";
|
||||
ws.Cell("G4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์พัฒนาเศรษฐกิจและสังคมดิจิทัล";
|
||||
ws.Cell("G4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("G4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("G4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("G4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("G4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("G4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("G4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("G4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("H4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์ (โครงการสำคัญ)";
|
||||
ws.Cell("H4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์ (โครงการสำคัญ)";
|
||||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("H4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("H4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("H4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("H4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("I4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์ฯโครงการพัฒนาและผลิตกำลังคนของประเทศฯ Thailand 4.0";
|
||||
ws.Cell("I4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์ฯโครงการพัฒนาและผลิตกำลังคนของประเทศฯ Thailand 4.0";
|
||||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("I4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("I4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("I4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("J4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์การพัฒนาผู้ประกอบการ และวิสาหกิจ ขนาดกลางและขนาดย่อมสู่สากล (SME)";
|
||||
ws.Cell("I4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("J4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์การพัฒนาผู้ประกอบการ และวิสาหกิจ ขนาดกลางและขนาดย่อมสู่สากล (SME)";
|
||||
ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("J4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("J4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("J4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("J4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("J4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("J4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("K4").Value = "งบประมาณ ปี "+personnel.academic_year_name_th.Substring(2,2);
|
||||
ws.Cell("K4").Value = "งบประมาณ ปี " + personnel.academic_year_name_th.Substring(2, 2);
|
||||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("K4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("K4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("K4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("K4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("H3:K3").Style.Border.TopBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("K3").Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
@@ -748,7 +791,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(5, 9).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 11)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 11)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 11)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 11)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 11)).Style.Font.FontName = "TH SarabunPSK";
|
||||
@@ -778,7 +821,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 11)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -791,7 +835,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 9).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 10).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 11).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Fill.BackgroundColor = XLColor.FromArgb(204,153,255);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(204, 153, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -808,7 +853,7 @@ namespace rmutr_report.Controllers
|
||||
|
||||
if (detail.topic_type == 2) //ชื่อแผน
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.plan_1;
|
||||
ws.Cell(row, 3).Value = detail.plan_2;
|
||||
ws.Cell(row, 4).Value = detail.plan_3;
|
||||
@@ -826,7 +871,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 11)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -853,9 +899,10 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 3) //ชื่อโครงการ
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.plan_1;
|
||||
ws.Cell(row, 3).Value = detail.plan_2;
|
||||
ws.Cell(row, 4).Value = detail.plan_3;
|
||||
@@ -873,7 +920,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 11)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -900,9 +948,10 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 4) //ชื่อกิจกรรม
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.plan_1;
|
||||
ws.Cell(row, 3).Value = detail.plan_2;
|
||||
ws.Cell(row, 4).Value = detail.plan_3;
|
||||
@@ -920,7 +969,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 11)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 11)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -947,7 +997,6 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 11).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -962,14 +1011,15 @@ namespace rmutr_report.Controllers
|
||||
"integration_strategic_plan_" + date + ".xlsx");
|
||||
}
|
||||
}
|
||||
[HttpPost, Route("reports/basic_plan_all/{type}")]
|
||||
|
||||
[HttpPost, Route("reports/basic_plan_all/{type}")]
|
||||
[ApiExplorerSettings(GroupName = "reports")]
|
||||
public IActionResult GetBasicPlanAllReport([FromRoute] string type,
|
||||
[FromBody] integration_strategic_plan personnel)
|
||||
{
|
||||
var workbook = new XLWorkbook();
|
||||
var ws = workbook.Worksheets.Add("รวมทุกแผน");
|
||||
ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. " + personnel.academic_year_name_th+" (เบื้องต้น)";
|
||||
ws.Cell("A1").Value = "งบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. " + personnel.academic_year_name_th + " (เบื้องต้น)";
|
||||
ws.Cell("A1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell("A1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
|
||||
@@ -989,7 +1039,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell("O2").Style.Font.FontSize = 16;
|
||||
ws.Cell("O2").Style.Font.Bold = true;
|
||||
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
//ws.Cell("K12").Style.NumberFormat.Format = "#,##0.0000";
|
||||
|
||||
ws.Column(1).Width = 30;
|
||||
ws.Column(2).Width = 10;
|
||||
@@ -1017,124 +1067,133 @@ namespace rmutr_report.Controllers
|
||||
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("A3:A5").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("A3:A5").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("B3:O3").Merge().Value = "งบประมาณ "+personnel.academic_year_name_th+" (เบื้องต้น)";
|
||||
ws.Range("B3:O3").Merge().Value = "งบประมาณ " + personnel.academic_year_name_th + " (เบื้องต้น)";
|
||||
ws.Range("B3:O3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Range("B3:O3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("B3:O3").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range("B3:O3").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Range("B3:O3").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range("B3:O3").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("B3:O3").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("B4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " วิทย์";
|
||||
ws.Cell("B4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " วิทย์";
|
||||
ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("B4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("B4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("B4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("B4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("B4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("C4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " สังคม";
|
||||
ws.Cell("C4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " สังคม";
|
||||
ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("C4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("C4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("C4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("C4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("C4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("D4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " บริการวิชาการ";
|
||||
ws.Cell("D4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " บริการวิชาการ";
|
||||
ws.Cell("D4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("D4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("D4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("D4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("D4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("D4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("D4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("E4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " ทำนุบำรุง";
|
||||
ws.Cell("E4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) + " ทำนุบำรุง";
|
||||
ws.Cell("E4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("E4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("E4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("E4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("E4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("E4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("E4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("F4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการ พัฒนาและส่งเสริมเศรษฐกิจฐานราก";
|
||||
ws.Cell("F4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการ พัฒนาและส่งเสริมเศรษฐกิจฐานราก";
|
||||
ws.Cell("F4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("F4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("F4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("F4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("F4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("G4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการ สร้างรายได้ จากการท่องเที่ยว";
|
||||
ws.Cell("G4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการ สร้างรายได้ จากการท่องเที่ยว";
|
||||
ws.Cell("G4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("G4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("G4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("G4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("G4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("G4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("G4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("G4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("H4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนบูรณาการพัฒนาด้านคมนาคมและระบบโลจิสติกส์";
|
||||
ws.Cell("H4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนบูรณาการพัฒนาด้านคมนาคมและระบบโลจิสติกส์";
|
||||
ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("H4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("H4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("H4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("H4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("I4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนบูรณาการ พัฒนาภาค (ภาคกลาง)";
|
||||
ws.Cell("I4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนบูรณาการ พัฒนาภาค (ภาคกลาง)";
|
||||
ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("I4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("I4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("I4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("I4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("J4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานบูรณาการพัฒนาอุตสาหกรรมและบริการแห่งอนาคต";
|
||||
ws.Cell("J4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานบูรณาการพัฒนาอุตสาหกรรมและบริการแห่งอนาคต";
|
||||
ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("J4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("J4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("J4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("J4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("K4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์พัฒนาเศรษฐกิจและสังคมดิจิทัล";
|
||||
ws.Cell("J4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("K4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์พัฒนาเศรษฐกิจและสังคมดิจิทัล";
|
||||
ws.Cell("K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("K4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("K4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("K4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("K4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("K4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("L4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์ (โครงการสำคัญ)";
|
||||
ws.Cell("K4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("L4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์ (โครงการสำคัญ)";
|
||||
ws.Cell("L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("L4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("L4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("L4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("L4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("L4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("L4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("L4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("M4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์ฯโครงการพัฒนาและผลิตกำลังคนของประเทศฯ Thailand 4.0";
|
||||
ws.Cell("M4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์ฯโครงการพัฒนาและผลิตกำลังคนของประเทศฯ Thailand 4.0";
|
||||
ws.Cell("M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("M4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("M4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("M4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("M4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("M4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("M4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("N4").Value = " ปี "+personnel.academic_year_name_th.Substring(2,2) + " แผนงานยุทธศาสตร์การพัฒนาผู้ประกอบการ และวิสาหกิจ ขนาดกลางและขนาดย่อมสู่สากล (SME)";
|
||||
ws.Cell("M4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("N4").Value = " ปี " + personnel.academic_year_name_th.Substring(2, 2) +
|
||||
" แผนงานยุทธศาสตร์การพัฒนาผู้ประกอบการ และวิสาหกิจ ขนาดกลางและขนาดย่อมสู่สากล (SME)";
|
||||
ws.Cell("N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("N4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("N4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("N4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("N4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("N4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("N4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("N4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("O4").Value = "งบประมาณ ปี "+personnel.academic_year_name_th.Substring(2,2);
|
||||
ws.Cell("O4").Value = "งบประมาณ ปี " + personnel.academic_year_name_th.Substring(2, 2);
|
||||
ws.Cell("O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell("O4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell("O4").Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("O4").Style.Font.SetBold().Font.FontSize = 14;
|
||||
ws.Cell("O4").Style.Alignment.WrapText = true;
|
||||
ws.Cell("O4").Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Cell("O4").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell("O4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("B4:O4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range("B4:O4").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -1167,7 +1226,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(5, 13).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,153,204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 15)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 15)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(5, 2), ws.Cell(5, 15)).Style.Font.FontName = "TH SarabunPSK";
|
||||
@@ -1201,7 +1260,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 15)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -1217,7 +1277,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(204,153,255);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(204, 153, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -1260,7 +1321,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 15)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -1276,7 +1338,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(153,204,255);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(153, 204, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -1294,9 +1357,10 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 3)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.science;
|
||||
ws.Cell(row, 3).Value = detail.society;
|
||||
ws.Cell(row, 4).Value = detail.academic_service;
|
||||
@@ -1318,7 +1382,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 15)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -1352,6 +1417,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
|
||||
if (detail.topic_type == 4)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
@@ -1376,7 +1442,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 15)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -1392,7 +1459,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,204,153);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(255, 204, 153);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
@@ -1410,9 +1478,10 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
row++;
|
||||
}
|
||||
if (detail.topic_type == 5)
|
||||
|
||||
if (detail.topic_type == 5)
|
||||
{
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 1).Value = detail.topic;
|
||||
ws.Cell(row, 2).Value = detail.science;
|
||||
ws.Cell(row, 3).Value = detail.society;
|
||||
ws.Cell(row, 4).Value = detail.academic_service;
|
||||
@@ -1434,7 +1503,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Alignment.Vertical =
|
||||
XLAlignmentVerticalValues.Center;
|
||||
ws.Range(ws.Cell(row, 2), ws.Cell(row, 15)).Style.NumberFormat.SetFormat("#,#");
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Border.OutsideBorder =
|
||||
XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
|
||||
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
@@ -1450,7 +1520,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 13).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 14).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Cell(row, 15).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor = XLColor.FromArgb(255,255,204);
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 15)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(255, 255, 204);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
|
||||
@@ -30,22 +30,21 @@ namespace rmutr_report.Controllers
|
||||
[FromBody] durable_articles_three durable_articles_threes)
|
||||
{
|
||||
//Console.WriteLine(durable_articles_threes.specification_data[0].data_detail[0].data_detail2);
|
||||
var a1 = durable_articles_threes.data.Where(d => d.amount == d.amount)
|
||||
.Sum(o => o.amount);
|
||||
if (a1!=null)
|
||||
{
|
||||
durable_articles_threes.total_amount = a1;
|
||||
// var a1 = durable_articles_threes.data.Sum(o => o.amount);
|
||||
// if (durable_articles_threes.data!=null)
|
||||
// {
|
||||
// durable_articles_threes.total_amount = a1;
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
int a = 1;
|
||||
foreach (var q in durable_articles_threes.quotation)
|
||||
{
|
||||
|
||||
string t = "ใบเสนอราคาบริษัทที่ " + a++ +" ";
|
||||
q.company = t + q.company;
|
||||
//a++;
|
||||
}
|
||||
// int a = 1;
|
||||
// foreach (var q in durable_articles_threes.quotation)
|
||||
// {
|
||||
//
|
||||
// string t = "ใบเสนอราคาบริษัทที่ " + a++ +" ";
|
||||
// q.company = t + q.company;
|
||||
// //a++;
|
||||
// }
|
||||
|
||||
|
||||
var _durable_articles_three = new List<durable_articles_three>() {durable_articles_threes};
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
16862103655496088
|
||||
16877752303044313
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/01/2023 13:13:10" ReportInfo.Modified="04/10/2023 21:44:16" ReportInfo.CreatorVersion="2021.1.0.0">
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/01/2023 13:13:10" ReportInfo.Modified="06/27/2023 13:40:41" ReportInfo.CreatorVersion="2021.1.0.0">
|
||||
<Dictionary>
|
||||
<BusinessObjectDataSource Name="durable_articles_three" ReferenceName="durable_articles_three" DataType="null" Enabled="true">
|
||||
<Column Name="budget_year" DataType="System.String"/>
|
||||
@@ -135,8 +135,8 @@
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
</ReportTitleBand>
|
||||
<DataBand Name="Data1" Top="202.94" Width="831.6">
|
||||
<DataBand Name="Data2" Top="207.44" Width="831.6" Height="47.25" DataSource="data">
|
||||
<DataBand Name="Data1" Top="206.96" Width="831.6">
|
||||
<DataBand Name="Data2" Top="215.47" Width="831.6" Height="47.25" DataSource="data">
|
||||
<TableObject Name="Table2" Width="831.6" Height="47.25">
|
||||
<TableColumn Name="Column5" Width="406.35"/>
|
||||
<TableColumn Name="Column6" Width="132.3"/>
|
||||
@@ -149,7 +149,7 @@
|
||||
<TableCell Name="Cell8" Border.Lines="All" Text="[durable_articles_three.data.amount]" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" Font="TH SarabunPSK, 14pt"/>
|
||||
</TableRow>
|
||||
</TableObject>
|
||||
<DataFooterBand Name="DataFooter1" Top="259.18" Width="831.6" Height="28.35">
|
||||
<DataFooterBand Name="DataFooter1" Top="271.23" Width="831.6" Height="28.35">
|
||||
<TableObject Name="Table3" Width="831.6" Height="28.35">
|
||||
<TableColumn Name="Column9" Width="406.35"/>
|
||||
<TableColumn Name="Column10" Width="132.3"/>
|
||||
@@ -165,7 +165,7 @@
|
||||
</DataFooterBand>
|
||||
</DataBand>
|
||||
</DataBand>
|
||||
<ReportSummaryBand Name="ReportSummary1" Top="292.03" Width="831.6" Height="623.7">
|
||||
<ReportSummaryBand Name="ReportSummary1" Top="308.09" Width="831.6" Height="623.7">
|
||||
<TextObject Name="Text65" Top="340.2" Width="510.3" Height="28.35" Text="6. เหตุผลความจำเป็น" Font="TH SarabunPSK, 16pt, style=Bold"/>
|
||||
<TextObject Name="Text66" Top="368.55" Width="831.6" Height="255.15" CanGrow="true" CanShrink="true" CanBreak="false" Text="[durable_articles_three.necessity_reason]" AutoWidth="true" WordWrap="false" Font="TH SarabunPSK, 16pt"/>
|
||||
<TextObject Name="Text64" Left="28.35" Top="311.85" Width="831.6" Height="28.35" Text="[durable_articles_three.strategy]" Font="TH SarabunPSK, 16pt"/>
|
||||
|
||||
Reference in New Issue
Block a user