From a9f0f94392ff31ad906797a032b448b7486b952c Mon Sep 17 00:00:00 2001 From: kamonwan taengsuk Date: Mon, 7 Nov 2022 18:34:41 +0700 Subject: [PATCH] update --- Controllers/HrRegister.Controller.cs | 11 +++- Models/Hrregister/hr_position_manage.cs | 12 +++- wwwroot/reports/hr_position_academic.frx | 74 ++++++++++-------------- 3 files changed, 51 insertions(+), 46 deletions(-) diff --git a/Controllers/HrRegister.Controller.cs b/Controllers/HrRegister.Controller.cs index 978f2ef..2ade78c 100644 --- a/Controllers/HrRegister.Controller.cs +++ b/Controllers/HrRegister.Controller.cs @@ -189,7 +189,16 @@ namespace rmutr_report.Controllers [ApiExplorerSettings(GroupName = "reports")] public IActionResult GetHr2Report([FromRoute] string type, [FromBody] hr_position_manage _hr) { - foreach (var hr in _hr.data) + // var sum = _hr.summary.ToArray(); + // if (sum.GetLength(0)>1) + // { + // _hr.text = "สรุปจำนวน"; + // } + // else if (sum.GetLength(0)<=1) + // { + // _hr.text = ""; + // } + foreach (var hr in _hr.data) { if (hr.position_academic_salary != null) { diff --git a/Models/Hrregister/hr_position_manage.cs b/Models/Hrregister/hr_position_manage.cs index 6ba782c..32cdd9b 100644 --- a/Models/Hrregister/hr_position_manage.cs +++ b/Models/Hrregister/hr_position_manage.cs @@ -11,11 +11,11 @@ namespace rmutr_report.Models.Hrregister public string status { get; set; } public string agency_name_th { get; set; } public List data { get; set; } + public List summary { get; set; } public string total1 { get; set; } public string total2 { get; set; } - public int? professor { get; set; } - public int? associate_rofessor { get; set; } - public int? assistant_professor { get; set; } + public string text { get; set; } + } public class hr_position_manage_detail @@ -36,4 +36,10 @@ namespace rmutr_report.Models.Hrregister public string money1 { get; set; } public string money2 { get; set; } } + + public class hr_count_position + { + public string position_name { get; set; } + public int? count_position { get; set; } + } } \ No newline at end of file diff --git a/wwwroot/reports/hr_position_academic.frx b/wwwroot/reports/hr_position_academic.frx index 5142256..72ae249 100644 --- a/wwwroot/reports/hr_position_academic.frx +++ b/wwwroot/reports/hr_position_academic.frx @@ -1,5 +1,5 @@  - + @@ -7,9 +7,7 @@ - - - + @@ -23,6 +21,10 @@ + + + + @@ -58,8 +60,8 @@ - - + + @@ -82,43 +84,31 @@ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +