undo แบบฟอร์มสรุปรายจ่าย v1
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2023-08-29 14:55:51 +07:00
parent c29c95b2e6
commit 0d68171be0
12 changed files with 161 additions and 161 deletions
+160 -160
View File
@@ -2482,166 +2482,166 @@ namespace rmutr_report.Controllers
return Ok(); return Ok();
} }
// [SwaggerOperation("แผนงานบุคลากรภาครัฐ")] [SwaggerOperation("แบบฟอร์มสรุปรายจ่าย v1")]
// [HttpPost, Route("reports/budget_expenditure_report_from_revenue/{type}")] [HttpPost, Route("reports/budget_expenditure_report_from_revenue/{type}")]
// [ApiExplorerSettings(GroupName = "reports")] [ApiExplorerSettings(GroupName = "reports")]
// public IActionResult GetBudgetExpenditureRevenueReport([FromRoute] string type, public IActionResult GetBudgetExpenditureRevenueReport([FromRoute] string type,
// [FromBody] budget_expenditure_report_from_revenue budget) [FromBody] budget_expenditure_report_from_revenue budget)
// { {
// int no = 1; int no = 1;
//
// var b = budget.budgets.ToArray(); var b = budget.budgets.ToArray();
// foreach (var bb in b) foreach (var bb in b)
// { {
// bb.personnel_list_s = new List<personnel_list> { bb.personnel_lists }; bb.personnel_list_s = new List<personnel_list> { bb.personnel_lists };
// foreach (var detail in bb.personnel_list_s) foreach (var detail in bb.personnel_list_s)
// { {
// foreach (var detail2 in detail.budget_personnel_lists) foreach (var detail2 in detail.budget_personnel_lists)
// { {
// if (detail2.rate != null) if (detail2.rate != null)
// { {
// detail2.text1 = "อัตรา"; detail2.text1 = "อัตรา";
// } }
//
// var cperson = detail.budget_personnel_lists.Count(); var cperson = detail.budget_personnel_lists.Count();
//
// if (cperson == 1) if (cperson == 1)
// { {
// detail.budget_personnel_lists[0].topic = "งบบุคลากร"; detail.budget_personnel_lists[0].topic = "งบบุคลากร";
// } }
//
// foreach (var detail3 in detail2.budget_personnel_lists_2) foreach (var detail3 in detail2.budget_personnel_lists_2)
// { {
// if (detail3.rate != null) if (detail3.rate != null)
// { {
// detail3.text1 = "อัตรา"; detail3.text1 = "อัตรา";
// } }
//
// int no2 = 1; int no2 = 1;
//
// if (detail3.topic != null) if (detail3.topic != null)
// { {
// detail3.row_no = no; detail3.row_no = no;
// no++; no++;
// } }
//
// foreach (var detail4 in detail3.budget_rates) foreach (var detail4 in detail3.budget_rates)
// { {
// if (detail4.rate != null) if (detail4.rate != null)
// { {
// detail4.text1 = "อัตรา"; detail4.text1 = "อัตรา";
// } }
//
// int no3 = 1; int no3 = 1;
// if (detail4.topic != null) if (detail4.topic != null)
// { {
// detail4.row_no = no2; detail4.row_no = no2;
// no2++; no2++;
// } }
//
// foreach (var detail5 in detail4.details) foreach (var detail5 in detail4.details)
// { {
// int no4 = 1; int no4 = 1;
// if (detail5.rate != null) if (detail5.rate != null)
// { {
// detail5.text1 = "อัตรา"; detail5.text1 = "อัตรา";
// } }
//
// if (detail5.position_level != null) if (detail5.position_level != null)
// { {
// detail5.row_no = no3; detail5.row_no = no3;
// no3++; no3++;
// } }
//
// if (detail5.details2 != null) if (detail5.details2 != null)
// { {
// foreach (var detail6 in detail5.details2) foreach (var detail6 in detail5.details2)
// { {
// if (detail6.topic != null) if (detail6.topic != null)
// { {
// detail6.row_no = no4; detail6.row_no = no4;
// no4++; no4++;
// detail6.text1 = "บาท"; detail6.text1 = "บาท";
// } }
// } }
// } }
//
// if (detail5.details2.Any()) if (detail5.details2.Any())
// { {
// if (detail5.details2==null) if (detail5.details2==null)
// { {
// foreach (var detail6 in detail5.details2) foreach (var detail6 in detail5.details2)
// { {
// detail6.topic = null; detail6.topic = null;
// detail6.total = null; detail6.total = null;
// detail6.row_no = null; detail6.row_no = null;
// detail6.text1 = null; detail6.text1 = null;
// } }
// } }
// } }
// else else
// { {
// detail5.details2.Add(new details2() detail5.details2.Add(new details2()
// { {
// topic = "", total = 999999999 topic = "", total = 999999999
// }); });
// } }
// } }
// } }
// } }
//
//
// if (cperson == 2) if (cperson == 2)
// { {
// detail.budget_personnel_lists[0].topic = "งบบุคลากร"; detail.budget_personnel_lists[0].topic = "งบบุคลากร";
// detail.budget_personnel_lists[1].topic = "งบดําเนินงาน"; detail.budget_personnel_lists[1].topic = "งบดําเนินงาน";
// detail.budget_personnel_lists[1].text1 = null; detail.budget_personnel_lists[1].text1 = null;
// detail.budget_personnel_lists[1].budget_personnel_lists_2[0].text1 = null; detail.budget_personnel_lists[1].budget_personnel_lists_2[0].text1 = null;
// detail.budget_personnel_lists[1].budget_personnel_lists_2[0].row_no = null; detail.budget_personnel_lists[1].budget_personnel_lists_2[0].row_no = null;
// detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0]
// .row_no = null; .row_no = null;
// detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0]
// .text1 = null; .text1 = null;
// detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0] detail.budget_personnel_lists[1].budget_personnel_lists_2[0].budget_rates[0]
// .details[0].text1 = null; .details[0].text1 = null;
// } }
// } }
// } }
// } }
//
//
// var budgetExpenditure = new List<budget_expenditure_report_from_revenue>() { budget }; var budgetExpenditure = new List<budget_expenditure_report_from_revenue>() { budget };
//
// Report report = new Report(); Report report = new Report();
// report.Load(_setting.report_path + "budget_expenditure_report_from_revenue.frx"); report.Load(_setting.report_path + "budget_expenditure_report_from_revenue.frx");
// report.RegisterData(budgetExpenditure, "budget_expenditure_report_from_revenue"); report.RegisterData(budgetExpenditure, "budget_expenditure_report_from_revenue");
// report.Prepare(); report.Prepare();
//
// MemoryStream stream = new MemoryStream(); MemoryStream stream = new MemoryStream();
// switch (type) switch (type)
// { {
// case "pdf": case "pdf":
// PDFExport pdf = new PDFExport(); PDFExport pdf = new PDFExport();
// report.Export(pdf, stream); report.Export(pdf, stream);
// stream.Seek(0, SeekOrigin.Begin); stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "application/pdf"); return File(stream, "application/pdf");
//
// case "xls": case "xls":
// case "xlsx": case "xlsx":
// Excel2007Export excel = new Excel2007Export(); Excel2007Export excel = new Excel2007Export();
// report.Export(excel, stream); report.Export(excel, stream);
// stream.Seek(0, SeekOrigin.Begin); stream.Seek(0, SeekOrigin.Begin);
// //return File(stream, "application/vnd.ms-excel"); //return File(stream, "application/vnd.ms-excel");
// string date = DateTime.Now.ToString("yyyyMMddHHmmss"); string date = DateTime.Now.ToString("yyyyMMddHHmmss");
// return File( return File(
// stream, stream,
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
// "budgetExpenditure_" + date + ".xlsx"); "budgetExpenditure_" + date + ".xlsx");
// } }
//
// return Ok(); return Ok();
// } }
[SwaggerOperation("แบบฟอร์มสรุปรายจ่าย")] [SwaggerOperation("แบบฟอร์มสรุปรายจ่าย v2")]
[HttpPost, Route("reports/budget_expenditure_report_from_revenue_v2/{type}")] [HttpPost, Route("reports/budget_expenditure_report_from_revenue_v2/{type}")]
[ApiExplorerSettings(GroupName = "reports")] [ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetBudgetExpenditureRevenueReport([FromRoute] string type, public IActionResult GetBudgetExpenditureRevenueReport([FromRoute] string type,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
16932907245525519 16932956257079832