From cb9742c51447a4cdb181c850c82f435cb964a2ea Mon Sep 17 00:00:00 2001 From: kamonwan taengsuk Date: Mon, 12 Dec 2022 13:06:21 +0700 Subject: [PATCH] add field --- Controllers/Personnel.Controller.cs | 39 +++++++++++++++---- Models/Hr/postponement_compensation.cs | 10 +++-- wwwroot/reports/postponement_compensation.frx | 14 ++++--- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/Controllers/Personnel.Controller.cs b/Controllers/Personnel.Controller.cs index 48d526c..18f5593 100644 --- a/Controllers/Personnel.Controller.cs +++ b/Controllers/Personnel.Controller.cs @@ -129,7 +129,7 @@ namespace rmutr_report.Controllers [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}; + var data_line_supportss = new List() {data_line_supports}; Report report = new Report(); report.Load(_setting.report_path + "data_line_support.frx"); @@ -309,32 +309,53 @@ namespace rmutr_report.Controllers public IActionResult GetPostponementCompensationReport([FromRoute] string type, [FromBody] postponement_compensation postponement_compensations) { - - string NumberText1 = postponement_compensations.data_date; + if (postponement_compensations.get_promoted == true) + { + postponement_compensations.check_get_promoted = "/"; + postponement_compensations.reason = ""; + } + + if (postponement_compensations.get_promoted == false) + { + postponement_compensations.check_get_promoted = ""; + + } + + if (postponement_compensations.not_get_promoted == true) + { + postponement_compensations.check_not_get_promoted = "/"; + } + + if (postponement_compensations.not_get_promoted == false) + { + postponement_compensations.check_not_get_promoted = ""; + } + + string NumberText1 = postponement_compensations.data_date; var str1 = NumberText1.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') .Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘') .Replace('9', '๙'); postponement_compensations.data_date = str1; - string NumberText2 = postponement_compensations.start_date; + string NumberText2 = postponement_compensations.start_date; var str2 = NumberText2.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') .Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘') .Replace('9', '๙'); postponement_compensations.start_date = str2; - string NumberText3 = postponement_compensations.end_date; + string NumberText3 = postponement_compensations.end_date; var str3 = NumberText3.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') .Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘') .Replace('9', '๙'); postponement_compensations.end_date = str3; - string NumberText4 = postponement_compensations.base_calculation_date; + string NumberText4 = postponement_compensations.base_calculation_date; var str4 = NumberText4.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') .Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘') .Replace('9', '๙'); postponement_compensations.base_calculation_date = str4; - string NumberText5 = postponement_compensations.director_date; + string NumberText5 = postponement_compensations.director_date; var str5 = NumberText5.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') .Replace('4', '๔').Replace('5', '๕').Replace('6', '๖').Replace('7', '๗').Replace('8', '๘') @@ -368,6 +389,7 @@ namespace rmutr_report.Controllers postponement_compensations.money1 = str; } } + if (data.compensation_slide != null) { string NumberText = data.compensation_slide.ToString(); @@ -394,6 +416,7 @@ namespace rmutr_report.Controllers postponement_compensations.money2 = str; } } + if (data.compensation_receive != null) { string NumberText = data.compensation_receive.ToString(); @@ -420,6 +443,7 @@ namespace rmutr_report.Controllers postponement_compensations.money3 = str; } } + string NumberText6 = data.percentage.ToString(); var str6 = NumberText6.Replace('0', '๐').Replace('1', '๑').Replace('2', '๒').Replace('3', '๓') @@ -427,6 +451,7 @@ namespace rmutr_report.Controllers .Replace('9', '๙'); postponement_compensations.percentage = str6; } + var _postponement_compensations = new List() {postponement_compensations}; Report report = new Report(); diff --git a/Models/Hr/postponement_compensation.cs b/Models/Hr/postponement_compensation.cs index 3108ec1..52d26e8 100644 --- a/Models/Hr/postponement_compensation.cs +++ b/Models/Hr/postponement_compensation.cs @@ -11,16 +11,18 @@ namespace rmutr_report.Models.Hr public string position_name { get; set; } public string work_group { get; set; } public string agency_name { get; set; } - // public bool? get_promoted { get; set; } - // public bool? not_get_promoted { get; set; } + public bool? get_promoted { get; set; } + public bool? not_get_promoted { get; set; } + public string reason { get; set; } + public string image_signature { get; set; } public string director_display_name { get; set; } public string director_position_name { get; set; } public string director_position_level_name { get; set; } public string director_date { get; set; } public string base_calculation_date { get; set; } public List data { get; set; } - /*public string check_get_promoted { get; set; } - public string check_not_get_promoted { get; set; }*/ + public string check_get_promoted { get; set; } + public string check_not_get_promoted { get; set; } public string money1 { get; set; } public string money2 { get; set; } public string money3 { get; set; } diff --git a/wwwroot/reports/postponement_compensation.frx b/wwwroot/reports/postponement_compensation.frx index 16464f6..967b99c 100644 --- a/wwwroot/reports/postponement_compensation.frx +++ b/wwwroot/reports/postponement_compensation.frx @@ -1,5 +1,5 @@  - + @@ -10,7 +10,7 @@ - + @@ -19,6 +19,9 @@ + + + @@ -55,7 +58,7 @@ - + @@ -77,13 +80,12 @@ - + - @@ -91,6 +93,8 @@ + +