Merge branch 'develop' into adiDev
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
AdisakKanthawilang 2025-01-13 10:06:47 +07:00
commit 322d4218bc
4 changed files with 20 additions and 13 deletions

View file

@ -46,7 +46,7 @@ namespace BMA.EHR.Application.Repositories.Reports
#region 13
public async Task<object> 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())
{
@ -91,21 +91,24 @@ 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("&nbsp;", " ").ToString().ToThaiNumber(),
}).ToList();
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
{
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,6 +127,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,

View file

@ -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 List<EvaluateExpectLevel> evaluate_expect_level { get; set; }
// public string evaluate_output_desc { get; set; }
public List<EvaluateOutputLevel> evaluate_output_level { get; set; }
}
public class EvaluateExpectLevel

View file

@ -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;
}

View file

@ -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,