diff --git a/Controllers/Personnel.Controller.cs b/Controllers/Personnel.Controller.cs index 61c39f1..885cc2f 100644 --- a/Controllers/Personnel.Controller.cs +++ b/Controllers/Personnel.Controller.cs @@ -120,6 +120,177 @@ namespace rmutr_report.Controllers return Ok(); } + [HttpPost, Route("reports/data_line_support/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetDataLineReport([FromRoute] string type, [FromBody] data_line_support data_line_supports) + { + + var data_line_supportss = new List() { data_line_supports }; + Report report = new Report(); + report.Load(_setting.report_path + "data_line_support.frx"); + report.RegisterData(data_line_supportss, "data_line_support"); + report.Prepare(); + + MemoryStream stream = new MemoryStream(); + switch (type) + { + case "pdf": + PDFExport pdf = new PDFExport(); + report.Export(pdf, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/pdf"); + + case "xls": + Excel2007Export excel = new Excel2007Export(); + report.Export(excel, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/vnd.ms-excel"); + break; + case "mht": + MHTExport mht = new MHTExport(); + report.Export(mht, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "multipart/related"); + break; + case "csv": + CSVExport csv = new CSVExport(); + report.Export(csv, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "text/csv"); + break; + } + + return Ok(); + } + [HttpPost, Route("reports/data_line_academic/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetDataLineAcaReport([FromRoute] string type, [FromBody] data_line_academic data_line_academicss) + { + + var _data_line_academics = new List() { data_line_academicss }; + + Report report = new Report(); + report.Load(_setting.report_path + "data_line_academic.frx"); + report.RegisterData(_data_line_academics, "data_line_academic"); + report.Prepare(); + + MemoryStream stream = new MemoryStream(); + switch (type) + { + case "pdf": + PDFExport pdf = new PDFExport(); + report.Export(pdf, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/pdf"); + + case "xls": + Excel2007Export excel = new Excel2007Export(); + report.Export(excel, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/vnd.ms-excel"); + break; + case "mht": + MHTExport mht = new MHTExport(); + report.Export(mht, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "multipart/related"); + break; + case "csv": + CSVExport csv = new CSVExport(); + report.Export(csv, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "text/csv"); + break; + } + + return Ok(); + } + [HttpPost, Route("reports/qualifications_teacher/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetQualificationsTeacherReport([FromRoute] string type, [FromBody] qualifications_teacher qualifications_teachers) + { + + var qualifications_teacherss = new List() { qualifications_teachers }; + + Report report = new Report(); + report.Load(_setting.report_path + "qualifications_teacher.frx"); + report.RegisterData(qualifications_teacherss, "qualifications_teacher"); + report.Prepare(); + + MemoryStream stream = new MemoryStream(); + switch (type) + { + case "pdf": + PDFExport pdf = new PDFExport(); + report.Export(pdf, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/pdf"); + + case "xls": + Excel2007Export excel = new Excel2007Export(); + report.Export(excel, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/vnd.ms-excel"); + break; + case "mht": + MHTExport mht = new MHTExport(); + report.Export(mht, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "multipart/related"); + break; + case "csv": + CSVExport csv = new CSVExport(); + report.Export(csv, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "text/csv"); + break; + } + + return Ok(); + } + [HttpPost, Route("reports/academic_position/{type}")] + [ApiExplorerSettings(GroupName = "reports")] + public IActionResult GetAcademicPositionReport([FromRoute] string type, [FromBody] academic_position _academic_position) + { + + var academic_positions = new List() { _academic_position }; + + Report report = new Report(); + report.Load(_setting.report_path + "academic_position.frx"); + report.RegisterData(academic_positions, "academic_position"); + report.Prepare(); + + MemoryStream stream = new MemoryStream(); + switch (type) + { + case "pdf": + PDFExport pdf = new PDFExport(); + report.Export(pdf, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/pdf"); + + case "xls": + Excel2007Export excel = new Excel2007Export(); + report.Export(excel, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "application/vnd.ms-excel"); + break; + case "mht": + MHTExport mht = new MHTExport(); + report.Export(mht, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "multipart/related"); + break; + case "csv": + CSVExport csv = new CSVExport(); + report.Export(csv, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "text/csv"); + break; + } + + return Ok(); + } } } \ No newline at end of file diff --git a/Models/Hr/academic_position.cs b/Models/Hr/academic_position.cs new file mode 100644 index 0000000..5d2604d --- /dev/null +++ b/Models/Hr/academic_position.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; + +namespace rmutr_report.Models.Hr +{ + public class academic_position + { + public string data_date {get; set; } + public List data { get; set; } + public int? total1_not_two_agency { get; set; } + public int? total2_not_two_agency { get; set; } + public int? total3_not_two_agency { get; set; } + public int? total4_not_two_agency { get; set; } + public int? total5_not_two_agency { get; set; } + public int? total6_not_two_agency { get; set; } + public int? total7_not_two_agency { get; set; } + public int? total8_not_two_agency { get; set; } + public int? total9_not_two_agency { get; set; } + public int? total10_not_two_agency { get; set; } + public int? total11_not_two_agency { get; set; } + public int? total12_not_two_agency { get; set; } + public int? total13_not_two_agency { get; set; } + public int? total14_not_two_agency { get; set; } + public int? total15_not_two_agency { get; set; } + public int? total16_not_two_agency { get; set; } + public int? total17_not_two_agency { get; set; } + public int? total18_not_two_agency { get; set; } + public int? total19_not_two_agency { get; set; } + public int? total20_not_two_agency { get; set; } + public int? total21_not_two_agency { get; set; } + } + + public class academic_positions + { + public string no { get; set; } + public string agency_name { get; set; } + public int? government_officer_professor { get; set; } + public int? government_officer_associate_professor { get; set; } + public int? government_officer_assistant_professor { get; set; } + public int? government_officer_teacher { get; set; } + public int? university_staff_professor { get; set; } + public int? university_staff_associate_professor { get; set; } + public int? university_staff_assistant_professor { get; set; } + public int? university_staff_teacher { get; set; } + public int? temporary_worker_land_professor { get; set; } + public int? temporary_worker_land_associate_professor{ get; set; } + public int? temporary_worker_land_assistant_professor { get; set; } + public int? temporary_worker_land_teacher { get; set; } + public int? temporary_worker_income_professor{ get; set; } + public int? temporary_worker_income_associate_professor { get; set; } + public int? temporary_worker_income_assistant_professor { get; set; } + public int? temporary_worker_income_teacher { get; set; } + public int? total_professor { get; set; } + public int? total_associate_professor { get; set; } + public int? total_assistant_professor { get; set; } + public int? total_teacher { get; set; } + public int? total_all { get; set; } + } +} \ No newline at end of file diff --git a/Models/Hr/data_line_academic.cs b/Models/Hr/data_line_academic.cs new file mode 100644 index 0000000..0fd28cb --- /dev/null +++ b/Models/Hr/data_line_academic.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; + +namespace rmutr_report.Models.Hr +{ + public class data_line_academic + { + public string data_date {get; set; } + public List data { get; set; } + } + public class data_line_academics + { + public string no { get; set; } + public string agency_name { get; set; } + public int? rate { get; set; } + public int? government_officer_totalrate { get; set; } + public int? government_officer_notfree { get; set; } + public int? government_officer_free{ get; set; } + public int? university_staff_totalrate { get; set; } + public int? university_staff_notfree { get; set; } + public int? university_staff_scholarship { get; set; } + public int? university_staff_free { get; set; } + public int? temporary_worker_land_totalrate { get; set; } + public int? temporary_worker_land_notfree { get; set; } + public int? temporary_worker_land_free { get; set; } + public int? temporary_worker_income_totalrate { get; set; } + public int? temporary_worker_income_notfree { get; set; } + public int? temporary_worker_income_free { get; set; } + public int? total_totalrate { get; set; } + public int? total_notfree { get; set; } + public int? total_scholarship { get; set; } + public int? total_free { get; set; } + public string note { get; set; } + } +} \ No newline at end of file diff --git a/Models/Hr/data_line_support.cs b/Models/Hr/data_line_support.cs new file mode 100644 index 0000000..4ce0927 --- /dev/null +++ b/Models/Hr/data_line_support.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; + +namespace rmutr_report.Models.Hr +{ + public class data_line_support + { + public string data_date {get; set; } + public List data { get; set; } + } + + public class data_line_supports + { + public string no { get; set; } + public string agency_name { get; set; } + public int? rate { get; set; } + public int? government_officer_totalrate { get; set; } + public int? government_officer_packing { get; set; } + public int? government_officer_rate { get; set; } + public int? university_staff_totalrate{ get; set; } + public int? university_staff_packing { get; set; } + public int? university_staff_rate { get; set; } + public int? government_employee_totalrate{ get; set; } + public int? government_employee_packing { get; set; } + public int? government_employee_rate { get; set; } + public int? permanent_employee_totalrate{ get; set; } + public int? permanent_employee_support_packing { get; set; } + public int? permanent_employee_support_rate { get; set; } + public int? permanent_employee_field_packing { get; set; } + public int? permanent_employee_field_rate { get; set; } + public int? temporary_worker_income_totalrate { get; set; } + public int? temporary_worker_income_support_packing { get; set; } + public int? temporary_worker_income_support_rate { get; set; } + public int? temporary_worker_income_field_packing { get; set; } + public int? temporary_worker_income_field_rate { get; set; } + public int? total_personnel_totalrate { get; set; } + public int? total_personnel_support_packing { get; set; } + public int? total_personnel_support_rate { get; set; } + public int? total_personnel_field_packing { get; set; } + public int? total_personnel_field_rate { get; set; } + public string status { get; set; } + } +} \ No newline at end of file diff --git a/Models/Hr/qualifications_teacher.cs b/Models/Hr/qualifications_teacher.cs new file mode 100644 index 0000000..d7d9884 --- /dev/null +++ b/Models/Hr/qualifications_teacher.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; + +namespace rmutr_report.Models.Hr +{ + public class qualifications_teacher + { + public string data_date {get; set; } + public List data { get; set; } + public int? total1_not_two_agency { get; set; } + public int? total2_not_two_agency { get; set; } + public int? total3_not_two_agency { get; set; } + public int? total4_not_two_agency { get; set; } + public int? total5_not_two_agency { get; set; } + public int? total6_not_two_agency { get; set; } + public int? total7_not_two_agency { get; set; } + public int? total8_not_two_agency { get; set; } + public int? total9_not_two_agency { get; set; } + public int? total10_not_two_agency { get; set; } + public int? total11_not_two_agency { get; set; } + public int? total12_not_two_agency { get; set; } + public int? total13_not_two_agency { get; set; } + public int? total14_not_two_agency { get; set; } + public int? total15_not_two_agency { get; set; } + public int? total16_not_two_agency { get; set; } + + } + + public class qualifications_teachers + { + public string no { get; set; } + public string agency_name { get; set; } + public int? government_officer_dr { get; set; } + public int? government_officer_master{ get; set; } + public int? government_officer_bachelor { get; set; } + public int? university_staff_dr { get; set; } + public int? university_staff_master { get; set; } + public int? university_staff_bachelor { get; set; } + public int? temporary_worker_land_dr { get; set; } + public int? temporary_worker_land_master{ get; set; } + public int? temporary_worker_land_bachelor { get; set; } + public int? temporary_worker_income_dr { get; set; } + public int? temporary_worker_income_master { get; set; } + public int? temporary_worker_income_bachelor { get; set; } + public int? total_dr { get; set; } + public int? total_master { get; set; } + public int? total_bachelor { get; set; } + public int? total_all { get; set; } + } +} \ No newline at end of file diff --git a/wwwroot/reports/academic_position.frx b/wwwroot/reports/academic_position.frx new file mode 100644 index 0000000..c499331 --- /dev/null +++ b/wwwroot/reports/academic_position.frx @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwroot/reports/data_line_academic.frx b/wwwroot/reports/data_line_academic.frx new file mode 100644 index 0000000..c687875 --- /dev/null +++ b/wwwroot/reports/data_line_academic.frx @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwroot/reports/data_line_support.frx b/wwwroot/reports/data_line_support.frx new file mode 100644 index 0000000..e9f823f --- /dev/null +++ b/wwwroot/reports/data_line_support.frx @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwroot/reports/man_power.frx b/wwwroot/reports/man_power.frx index f53a429..430d342 100644 --- a/wwwroot/reports/man_power.frx +++ b/wwwroot/reports/man_power.frx @@ -1,5 +1,5 @@  - + @@ -68,7 +68,7 @@ - + @@ -195,8 +195,8 @@ - - + + @@ -228,7 +228,7 @@ - + @@ -264,7 +264,7 @@ - + diff --git a/wwwroot/reports/qualifications_teacher.frx b/wwwroot/reports/qualifications_teacher.frx new file mode 100644 index 0000000..fed8d64 --- /dev/null +++ b/wwwroot/reports/qualifications_teacher.frx @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +