From dba085d55a509e964489281a8fd15fa2ef916c09 Mon Sep 17 00:00:00 2001 From: kittapath Date: Sat, 11 Jan 2025 10:57:59 +0700 Subject: [PATCH 1/5] edit report probation --- .../Repositories/Reports/ProbationReportRepository.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 102c256d..8f552434 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -124,6 +124,8 @@ namespace BMA.EHR.Application.Repositories.Reports Knowledges = knowledges, Competencys = competencys, Outputs = outputs, + 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, From 825fbf6a2d33499faa8a29a52b1dad8a6f58de91 Mon Sep 17 00:00:00 2001 From: kittapath Date: Sat, 11 Jan 2025 12:25:12 +0700 Subject: [PATCH 2/5] no message --- BMA.EHR.Placement.Service/Controllers/PlacementController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index dd75b93a..29139434 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -445,8 +445,8 @@ namespace BMA.EHR.Placement.Service.Controllers Education = x.PlacementEducations.Select(p => new { Id = p.Id, - EducationLevel = p.EducationLevelId, - EducationLevelId = p.EducationLevelName, + EducationLevel = p.EducationLevelName, + EducationLevelId = p.EducationLevelId, Institute = p.Institute, Degree = p.Degree, Field = p.Field, From d1b3160847535f7bc9fc1ca5a73a3b15b1c53964 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Sat, 11 Jan 2025 12:46:39 +0700 Subject: [PATCH 3/5] fixing report probation --- .../Repositories/Reports/ProbationReportRepository.cs | 2 +- .../Responses/EvaluateRecordAssignResponse.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 102c256d..b9f9b6ce 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -46,7 +46,7 @@ namespace BMA.EHR.Application.Repositories.Reports #region 13 แบบมอบหมายงาน ฯ public async Task GetProbationAssignAsync(Guid assign_id, string token) { - var api_url = $"{_configuration["APIPROBATION"]}/assign?assign_id={assign_id}"; + var api_url = $"{_configuration["APIPROBATION"]}/assign?assign_id={assign_id}&isReport=true"; ProbationAssignResponse probation_assign; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs b/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs index e0a8d017..f3fa9e9d 100644 --- a/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs +++ b/BMA.EHR.Application/Responses/EvaluateRecordAssignResponse.cs @@ -95,10 +95,10 @@ namespace BMA.EHR.Application.Responses public class Achievement { - public string evaluate_expect_desc { get; set; } - public EvaluateExpectLevel evaluate_expect_level { get; set; } - public string evaluate_output_desc { get; set; } - public EvaluateOutputLevel evaluate_output_level { get; set; } + // public string evaluate_expect_desc { get; set; } + public EvaluateExpectLevel? evaluate_expect_level { get; set; } + // public string evaluate_output_desc { get; set; } + public EvaluateOutputLevel? evaluate_output_level { get; set; } } public class EvaluateExpectLevel From d9dd45338e4357c5d32e1a19d2baee5331f06a46 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Sat, 11 Jan 2025 13:42:03 +0700 Subject: [PATCH 4/5] 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; } From 3ee1da6a1220e39572e539f833e24057890930e8 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Sat, 11 Jan 2025 15:42:22 +0700 Subject: [PATCH 5/5] fixing number to thai --- .../Repositories/Reports/ProbationReportRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 39f41650..acf4aa37 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -100,7 +100,7 @@ namespace BMA.EHR.Application.Repositories.Reports var laws = probation_assign.result.laws.Where(x => x.selected == true).Select((x, Index) => new { - title = string.IsNullOrEmpty(x.description) ? string.Empty : $"{Index + 1}. {x.description.ToThaiNumber()}", + title = string.IsNullOrEmpty(x.description) ? string.Empty : $"{(Index + 1).ToString().ToThaiNumber()}. {x.description.ToThaiNumber()}", }).ToList(); return new