From d9dd45338e4357c5d32e1a19d2baee5331f06a46 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Sat, 11 Jan 2025 13:42:03 +0700 Subject: [PATCH] fixing field --- .../Reports/ProbationReportRepository.cs | 15 +++++++++------ .../Responses/EvaluateRecordAssignResponse.cs | 4 ++-- .../Responses/ProbationAssignResponse.cs | 4 +++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 2b185fea..39f41650 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -91,9 +91,11 @@ namespace BMA.EHR.Application.Repositories.Reports var skills = probation_assign.result.skills.Select(x => new { - id = string.IsNullOrEmpty(x.id.ToString()) ? string.Empty : x.id.ToString().ToThaiNumber(), - title = string.IsNullOrEmpty(x.title) ? string.Empty : x.title.ToThaiNumber(), - description = string.IsNullOrEmpty(x.description) ? string.Empty : x.description.ToThaiNumber(), + name = string.IsNullOrEmpty(x.title) ? string.Empty : x.title.ToThaiNumber(), + level = string.IsNullOrEmpty(x.level) ? string.Empty : x.level.ToThaiNumber(), + description = string.IsNullOrEmpty(x.description) + ? string.Empty + : (Regex.Replace(x.description, "<.*?>", string.Empty)).Replace(" ", " ").ToString().ToThaiNumber(), }).ToList(); var laws = probation_assign.result.laws.Where(x => x.selected == true).Select((x, Index) => new @@ -105,7 +107,8 @@ namespace BMA.EHR.Application.Repositories.Reports { Name = string.IsNullOrEmpty(probation_assign.result.profile.name) ? "-" : probation_assign.result.profile.name, Position = string.IsNullOrEmpty(probation_assign.result.profile.Position) ? "-" : probation_assign.result.profile.Position, - PositionLevel = string.IsNullOrEmpty(probation_assign.result.profile.PositionLevelName) ? "-" : probation_assign.result.profile.PositionLevelName, + PositionLevel = string.IsNullOrEmpty(probation_assign.result.profile.positionLevelName) ? "-" : probation_assign.result.profile.positionLevelName, + PositionAndLevel = string.IsNullOrEmpty(probation_assign.result.profile.PositionAndLevel) ? "-" : probation_assign.result.profile.PositionAndLevel, Department = string.IsNullOrEmpty(probation_assign.result.profile.Department) ? "-" : probation_assign.result.profile.Department, OrganizationOrganization = string.IsNullOrEmpty(probation_assign.result.profile.OrganizationOrganization) ? "-" : probation_assign.result.profile.OrganizationOrganization, Oc = string.IsNullOrEmpty(probation_assign.result.profile.Oc) ? "-" : probation_assign.result.profile.Oc, @@ -124,8 +127,8 @@ namespace BMA.EHR.Application.Repositories.Reports Knowledges = knowledges, Competencys = competencys, Outputs = outputs, - Skills=skills, - Laws=laws, + Skills = skills, + Laws = laws, OtherDesc = string.IsNullOrEmpty(probation_assign.result.assign.other_desc) ? "-" : probation_assign.result.assign.other_desc, Other4Desc = string.IsNullOrEmpty(probation_assign.result.assign.other4_desc) ? "-" : probation_assign.result.assign.other4_desc, Other5No1Desc = string.IsNullOrEmpty(probation_assign.result.assign.other5_no1_desc) ? "-" : probation_assign.result.assign.other5_no1_desc, diff --git a/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs b/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs index f3fa9e9d..0feb741c 100644 --- a/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs +++ b/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs @@ -96,9 +96,9 @@ namespace BMA.EHR.Application.Responses public class Achievement { // public string evaluate_expect_desc { get; set; } - public EvaluateExpectLevel? evaluate_expect_level { get; set; } + public List evaluate_expect_level { get; set; } // public string evaluate_output_desc { get; set; } - public EvaluateOutputLevel? evaluate_output_level { get; set; } + public List evaluate_output_level { get; set; } } public class EvaluateExpectLevel diff --git a/BMA.EHR.Application/Responses/ProbationAssignResponse.cs b/BMA.EHR.Application/Responses/ProbationAssignResponse.cs index 1a5a0e15..6497aa7a 100644 --- a/BMA.EHR.Application/Responses/ProbationAssignResponse.cs +++ b/BMA.EHR.Application/Responses/ProbationAssignResponse.cs @@ -30,7 +30,8 @@ public string Position { get; set; } = string.Empty; public string Department { get; set; } = string.Empty; public string Oc { get; set; } = string.Empty; - public string PositionLevelName { get; set; } = string.Empty; + public string positionLevelName { get; set; } = string.Empty; + public string PositionAndLevel { get; set; } = string.Empty; } public class Assign @@ -78,6 +79,7 @@ public class Skill { public int id { get; set; } + public string level { get; set; } = string.Empty; public string title { get; set; } = string.Empty; public string description { get; set; } = string.Empty; }