ปรับ Report Probation
This commit is contained in:
parent
c802ab718f
commit
197f8f7150
3 changed files with 1596 additions and 843 deletions
|
|
@ -9,6 +9,9 @@ using System.Net.Http.Headers;
|
|||
using Newtonsoft.Json;
|
||||
using System.Globalization;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Linq;
|
||||
using static BMA.EHR.Application.Responses.ProbationAssignResponse;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories.Reports
|
||||
{
|
||||
|
|
@ -40,7 +43,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
#region " Methods "
|
||||
|
||||
#region แบบมอบหมายงาน ฯ
|
||||
#region 13 แบบมอบหมายงาน ฯ
|
||||
public async Task<object> GetProbationAssignAsync(Guid assign_id, string token)
|
||||
{
|
||||
var api_url = $"{_configuration["APIPROBATION"]}/assign/probation-assign?assign_id={assign_id}";
|
||||
|
|
@ -55,32 +58,63 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
if (probation_assign.data != null)
|
||||
{
|
||||
var jobs = probation_assign.data.jobs.Select(x => new
|
||||
{
|
||||
id = string.IsNullOrEmpty(x.id.ToString()) ? string.Empty : x.id.ToString().ToThaiNumber(),
|
||||
activity_desc = string.IsNullOrEmpty(x.activity_desc) ? string.Empty : x.activity_desc.ToThaiNumber(),
|
||||
goal_desc = string.IsNullOrEmpty(x.goal_desc) ? string.Empty : x.goal_desc.ToThaiNumber(),
|
||||
}).ToList();
|
||||
|
||||
var knowledges = probation_assign.data.knowledges.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(),
|
||||
}).ToList();
|
||||
|
||||
var competencys = probation_assign.data.competencys.Select(x => new
|
||||
{
|
||||
name = string.IsNullOrEmpty(x.name) ? string.Empty : x.name.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 outputs = probation_assign.data.outputs.Select(x => new
|
||||
{
|
||||
id = string.IsNullOrEmpty(x.id.ToString()) ? string.Empty : x.id.ToString().ToThaiNumber(),
|
||||
indicator_desc = string.IsNullOrEmpty(x.indicator_desc) ? string.Empty : x.indicator_desc.ToThaiNumber(),
|
||||
output_desc = string.IsNullOrEmpty(x.output_desc) ? string.Empty : x.output_desc.ToThaiNumber(),
|
||||
}).ToList();
|
||||
|
||||
|
||||
return new
|
||||
{
|
||||
Name = string.IsNullOrEmpty(probation_assign.data.profile.name) ? string.Empty : probation_assign.data.profile.name,
|
||||
Position = string.IsNullOrEmpty(probation_assign.data.profile.Position) ? string.Empty : probation_assign.data.profile.Position,
|
||||
Department = string.IsNullOrEmpty(probation_assign.data.profile.Department) ? string.Empty : probation_assign.data.profile.Department,
|
||||
OrganizationOrganization = string.IsNullOrEmpty(probation_assign.data.profile.OrganizationOrganization) ? string.Empty : probation_assign.data.profile.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(probation_assign.data.profile.Oc) ? string.Empty : probation_assign.data.profile.Oc,
|
||||
DateStart = string.IsNullOrEmpty(probation_assign.data.assign.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : probation_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(probation_assign.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : probation_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
NameMentor1 = string.IsNullOrEmpty(probation_assign.data.mentors[0].name) ? string.Empty : probation_assign.data.mentors[0].name,
|
||||
DateMentor1 = string.IsNullOrEmpty(probation_assign.data.mentors[0].dated.ToString()) ? "วันที่ เดือน พ.ศ." : probation_assign.data.mentors[0].dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
PositionMentor1 = string.IsNullOrEmpty(probation_assign.data.mentors[0].Position) ? string.Empty : probation_assign.data.mentors[0].Position,
|
||||
NameMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].name : string.Empty,
|
||||
DateMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].dated.ToThaiFullDate().ToString().ToThaiNumber() : "วันที่ เดือน พ.ศ.",
|
||||
PositionMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].Position : string.Empty,
|
||||
NameCommander = string.IsNullOrEmpty(probation_assign.data.commander.name) ? string.Empty : probation_assign.data.commander.name,
|
||||
DateCommander = string.IsNullOrEmpty(probation_assign.data.commander.dated.ToString()) ? "วันที่ เดือน พ.ศ." : probation_assign.data.commander.dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
PositionCommander = string.IsNullOrEmpty(probation_assign.data.commander.Position) ? string.Empty : probation_assign.data.commander.Position,
|
||||
Jobs = probation_assign.data.jobs.ToList(),
|
||||
Knowledge = probation_assign.data.knowledges.ToList(),
|
||||
Competency = probation_assign.data.competencys.ToList(),
|
||||
Outputs = probation_assign.data.outputs.ToList(),
|
||||
OtherDesc = string.IsNullOrEmpty(probation_assign.data.assign.other_desc) ? string.Empty : probation_assign.data.assign.other_desc,
|
||||
Other4Desc = string.IsNullOrEmpty(probation_assign.data.assign.other4_desc) ? string.Empty : probation_assign.data.assign.other4_desc,
|
||||
Other5No1Desc = string.IsNullOrEmpty(probation_assign.data.assign.other5_no1_desc) ? string.Empty : probation_assign.data.assign.other5_no1_desc,
|
||||
Other5No2Desc = string.IsNullOrEmpty(probation_assign.data.assign.other5_no2_desc) ? string.Empty : probation_assign.data.assign.other5_no2_desc,
|
||||
Name = string.IsNullOrEmpty(probation_assign.data.profile.name) ? "-" : probation_assign.data.profile.name,
|
||||
Position = string.IsNullOrEmpty(probation_assign.data.profile.Position) ? "-" : probation_assign.data.profile.Position,
|
||||
Department = string.IsNullOrEmpty(probation_assign.data.profile.Department) ? "-" : probation_assign.data.profile.Department,
|
||||
OrganizationOrganization = string.IsNullOrEmpty(probation_assign.data.profile.OrganizationOrganization) ? "-" : probation_assign.data.profile.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(probation_assign.data.profile.Oc) ? "-" : probation_assign.data.profile.Oc,
|
||||
DateStart = string.IsNullOrEmpty(probation_assign.data.assign.date_start.ToString()) ? "-" : probation_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(probation_assign.data.assign.date_finish.ToString()) ? "-" : probation_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
NameMentor1 = probation_assign.data.mentors.Count > 0 ? probation_assign.data.mentors[0].name : "-",
|
||||
DateMentor1 = probation_assign.data.mentors.Count > 0 ? probation_assign.data.mentors[0].dated.ToThaiFullDate().ToString().ToThaiNumber() : "-",
|
||||
PositionMentor1 = probation_assign.data.mentors.Count > 0 ? probation_assign.data.mentors[0].Position : "-",
|
||||
NameMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].name : "-",
|
||||
DateMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].dated.ToThaiFullDate().ToString().ToThaiNumber() : "-",
|
||||
PositionMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].Position : "-",
|
||||
NameCommander = string.IsNullOrEmpty(probation_assign.data.commander.name) ? "-" : probation_assign.data.commander.name,
|
||||
DateCommander = string.IsNullOrEmpty(probation_assign.data.commander.dated.ToString()) ? "-" : probation_assign.data.commander.dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
PositionCommander = string.IsNullOrEmpty(probation_assign.data.commander.Position) ? "-" : probation_assign.data.commander.Position,
|
||||
Jobs = jobs,
|
||||
Knowledges = knowledges,
|
||||
Competencys = competencys,
|
||||
Outputs = outputs,
|
||||
OtherDesc = string.IsNullOrEmpty(probation_assign.data.assign.other_desc) ? "-" : probation_assign.data.assign.other_desc,
|
||||
Other4Desc = string.IsNullOrEmpty(probation_assign.data.assign.other4_desc) ? "-" : probation_assign.data.assign.other4_desc,
|
||||
Other5No1Desc = string.IsNullOrEmpty(probation_assign.data.assign.other5_no1_desc) ? "-" : probation_assign.data.assign.other5_no1_desc,
|
||||
Other5No2Desc = string.IsNullOrEmpty(probation_assign.data.assign.other5_no2_desc) ? "-" : probation_assign.data.assign.other5_no2_desc,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -91,8 +125,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region แบบบันทึกผล (ผู้ดูแล, ผู้บังคับบัญชา)
|
||||
public async Task<object> GetEvaluateRecordAsync(Guid assign_id, string token)
|
||||
#region 14 - 15 แบบบันทึกผล (ผู้ดูแล และ ผู้บังคับบัญชา)
|
||||
public async Task<object> GetEvaluateRecord14_15Async(Guid assign_id, string token)
|
||||
{
|
||||
var api_url = $"{_configuration["APIPROBATION"]}/report/form-record?id={assign_id}";
|
||||
EvaluateRecordAssignResponse evaluate_record;
|
||||
|
|
@ -106,29 +140,274 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
if (evaluate_record.data != null)
|
||||
{
|
||||
evaluate_record.data.evaluate.orientation = evaluate_record.data.evaluate.orientation == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
||||
evaluate_record.data.evaluate.self_learning = evaluate_record.data.evaluate.self_learning == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
||||
evaluate_record.data.evaluate.training_seminar = evaluate_record.data.evaluate.training_seminar == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
||||
evaluate_record.data.evaluate.other_training = evaluate_record.data.evaluate.other_training == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
||||
var orientation = evaluate_record.data.evaluate.orientation == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var self_learning = evaluate_record.data.evaluate.self_learning == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var training_seminar = evaluate_record.data.evaluate.training_seminar == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var other_training = evaluate_record.data.evaluate.other_training == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
|
||||
var expects = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||
? new {
|
||||
col1 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var outputs = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.achievements[0].evaluate_output_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.achievements[0].evaluate_output_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.achievements[0].evaluate_output_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.achievements[0].evaluate_output_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.achievements[0].evaluate_output_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var knows = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.knowledge_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.knowledge_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var skills = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.skill_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.skill_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.skill_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.skill_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.skill_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var competencys = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.competency_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.competency_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.competency_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.competency_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.competency_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var learns = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.learn_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.learn_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.learn_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.learn_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.learn_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var applys = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.apply_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.apply_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.apply_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.apply_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.apply_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var achievementOthers = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.achievement_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.achievement_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.achievement_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.achievement_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.achievement_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var conducts1 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.conduct1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.conduct1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.conduct1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.conduct1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.conduct1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var conducts2 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.conduct2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.conduct2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.conduct2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.conduct2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.conduct2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var conducts3 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.conduct3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.conduct3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.conduct3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.conduct3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.conduct3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var conducts4 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.conduct4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.conduct4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.conduct4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.conduct4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.conduct4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var morals1 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.moral1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.moral1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.moral1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.moral1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.moral1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var morals2 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.moral2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.moral2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.moral2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.moral2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.moral2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var morals3 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.moral3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.moral3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.moral3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.moral3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.moral3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var disciplines1 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.discipline1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.discipline1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.discipline1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.discipline1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.discipline1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var disciplines2 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.discipline2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.discipline2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.discipline2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.discipline2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.discipline2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var disciplines3 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.discipline3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.discipline3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.discipline3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.discipline3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.discipline3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var disciplines4 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.discipline4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.discipline4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.discipline4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.discipline4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.discipline4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
var disciplines5 = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.discipline5_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.discipline5_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.discipline5_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.discipline5_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.discipline5_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
|
||||
var behaviorOthers = evaluate_record.data.evaluate != null
|
||||
? new
|
||||
{
|
||||
col1 = evaluate_record.data.evaluate.behavior_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_record.data.evaluate.behavior_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_record.data.evaluate.behavior_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_record.data.evaluate.behavior_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_record.data.evaluate.behavior_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
}
|
||||
: null;
|
||||
return new
|
||||
{
|
||||
DirectorName = string.IsNullOrEmpty(evaluate_record.data.director.name) ? string.Empty : evaluate_record.data.director.name,
|
||||
DirectorPosition = string.IsNullOrEmpty(evaluate_record.data.director.Position) ? string.Empty : evaluate_record.data.director.Position,
|
||||
DirectorDated = string.IsNullOrEmpty(evaluate_record.data.evaluate.sign_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_record.data.evaluate.sign_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DirectorDated = string.IsNullOrEmpty(evaluate_record.data.evaluate.sign_dated.ToString()) ? "-" : evaluate_record.data.evaluate.sign_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Name = string.IsNullOrEmpty(evaluate_record.data.experimentee.name) ? string.Empty : evaluate_record.data.experimentee.name,
|
||||
Position = string.IsNullOrEmpty(evaluate_record.data.experimentee.Position) ? string.Empty : evaluate_record.data.experimentee.Position,
|
||||
Department = string.IsNullOrEmpty(evaluate_record.data.experimentee.Department) ? string.Empty : evaluate_record.data.experimentee.Department,
|
||||
Organizationorganization = string.IsNullOrEmpty(evaluate_record.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_record.data.experimentee.OrganizationOrganization,
|
||||
Organization= string.IsNullOrEmpty(evaluate_record.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_record.data.experimentee.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(evaluate_record.data.experimentee.Oc) ? string.Empty : evaluate_record.data.experimentee.Oc,
|
||||
DateStart = string.IsNullOrEmpty(evaluate_record.data.assign.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_record.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_record.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_record.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateStart = string.IsNullOrEmpty(evaluate_record.data.assign.date_start.ToString()) ? "-" : evaluate_record.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_record.data.assign.date_finish.ToString()) ? "-" : evaluate_record.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
No = evaluate_record.data.evaluate.no = string.IsNullOrEmpty(evaluate_record.data.evaluate.no) ? string.Empty : evaluate_record.data.evaluate.no.ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_record.data.evaluate.date_start.ToString()) ? string.Empty : evaluate_record.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_record.data.evaluate.date_finish.ToString()) ? string.Empty : evaluate_record.data.evaluate.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Achievements = evaluate_record.data.evaluate.achievements,
|
||||
Role = evaluate_record.data.evaluate.role == "mentor" ? "ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ" : "ผู้บังคับบัญชา",
|
||||
Evaluate = evaluate_record.data.evaluate,
|
||||
Expects = expects,
|
||||
ExpectDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||
? evaluate_record.data.evaluate.achievements[0].evaluate_expect_desc
|
||||
: string.Empty,
|
||||
Outputs = outputs,
|
||||
OutputDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||
? evaluate_record.data.evaluate.achievements[0].evaluate_output_desc
|
||||
: string.Empty,
|
||||
AchievementOtherDesc = evaluate_record.data.evaluate.achievement_other_desc,
|
||||
AchievementStrengthDesc = evaluate_record.data.evaluate.achievement_strength_desc,
|
||||
AchievementImproveDesc = evaluate_record.data.evaluate.achievement_improve_desc,
|
||||
BehaviorOtherDesc = evaluate_record.data.evaluate.behavior_other_desc,
|
||||
BehaviorStrengthDesc = evaluate_record.data.evaluate.behavior_strength_desc,
|
||||
BehaviorImproveDesc = evaluate_record.data.evaluate.behavior_improve_desc,
|
||||
Knows = knows,
|
||||
Skills = skills,
|
||||
Competencys = competencys,
|
||||
Learns =learns,
|
||||
Applys = applys,
|
||||
AchievementOthers = achievementOthers,
|
||||
Conducts1 = conducts1,
|
||||
Conducts2 = conducts2,
|
||||
Conducts3 = conducts3,
|
||||
Conducts4 = conducts4,
|
||||
Morals1 = morals1,
|
||||
Morals2 = morals2,
|
||||
Morals3 = morals3,
|
||||
Disciplines1 = disciplines1,
|
||||
Disciplines2 = disciplines2,
|
||||
Disciplines3 = disciplines3,
|
||||
Disciplines4 = disciplines4,
|
||||
Disciplines5 = disciplines5,
|
||||
BehaviorOthers = behaviorOthers,
|
||||
Orientation = orientation,
|
||||
SelfLearning = self_learning,
|
||||
TrainingSeminar = training_seminar,
|
||||
OtherTraining = other_training,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -139,7 +418,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region แบบประเมินผล(ผู้บังคับบัญชา)
|
||||
#region 16 แบบประเมินผล (ผู้บังคับบัญชา)
|
||||
public async Task<object> GetEvaluateAssignAsync(Guid id, string token)
|
||||
{
|
||||
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-commander?id={id}";
|
||||
|
|
@ -154,29 +433,187 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
if (evaluate_assign.data != null)
|
||||
{
|
||||
evaluate_assign.data.evaluate.orientation = evaluate_assign.data.evaluate.orientation == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
||||
evaluate_assign.data.evaluate.self_learning = evaluate_assign.data.evaluate.self_learning == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
||||
evaluate_assign.data.evaluate.training_seminar = evaluate_assign.data.evaluate.training_seminar == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
||||
evaluate_assign.data.evaluate.other_training = evaluate_assign.data.evaluate.other_training == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
||||
var knows = new {
|
||||
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.knowledge_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.knowledge_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var skills = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.skill_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.skill_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.skill_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.skill_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.skill_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var competencys = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.competency_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.competency_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.competency_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.competency_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.competency_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var learns = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.learn_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.learn_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.learn_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.learn_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.learn_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var applys = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.apply_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.apply_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.apply_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.apply_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.apply_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var success = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.success_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.success_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.success_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.success_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.success_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var achievementOthers = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.achievement_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.achievement_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.achievement_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.achievement_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.achievement_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
|
||||
var conducts = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.conduct1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.conduct1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.conduct1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.conduct1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.conduct1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.conduct2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.conduct2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.conduct2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.conduct2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.conduct2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.conduct3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.conduct3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.conduct3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.conduct3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.conduct3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_4 = evaluate_assign.data.evaluate.conduct4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_4 = evaluate_assign.data.evaluate.conduct4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_4 = evaluate_assign.data.evaluate.conduct4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_4 = evaluate_assign.data.evaluate.conduct4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_4 = evaluate_assign.data.evaluate.conduct4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var morals = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.moral1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.moral1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.moral1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.moral1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.moral1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.moral2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.moral2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.moral2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.moral2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.moral2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.moral3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.moral3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.moral3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.moral3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.moral3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var disciplines = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.discipline1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.discipline1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.discipline1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.discipline1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.discipline1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.discipline2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.discipline2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.discipline2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.discipline2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.discipline2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.discipline3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.discipline3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.discipline3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.discipline3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.discipline3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_4 = evaluate_assign.data.evaluate.discipline4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_4 = evaluate_assign.data.evaluate.discipline4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_4 = evaluate_assign.data.evaluate.discipline4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_4 = evaluate_assign.data.evaluate.discipline4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_4 = evaluate_assign.data.evaluate.discipline4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_5 = evaluate_assign.data.evaluate.discipline5_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_5 = evaluate_assign.data.evaluate.discipline5_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_5 = evaluate_assign.data.evaluate.discipline5_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_5 = evaluate_assign.data.evaluate.discipline5_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_5 = evaluate_assign.data.evaluate.discipline5_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var behaviorOthers = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.behavior_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.behavior_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.behavior_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.behavior_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.behavior_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
|
||||
var orientation = evaluate_assign.data.evaluate.orientation = evaluate_assign.data.evaluate.orientation == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var self_learning = evaluate_assign.data.evaluate.self_learning = evaluate_assign.data.evaluate.self_learning == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var training_seminar = evaluate_assign.data.evaluate.training_seminar = evaluate_assign.data.evaluate.training_seminar == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
var other_training = evaluate_assign.data.evaluate.other_training = evaluate_assign.data.evaluate.other_training == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||
return new
|
||||
{
|
||||
No = string.IsNullOrEmpty(evaluate_assign.data.evaluate.no.ToString()) ? string.Empty : evaluate_assign.data.evaluate.no.ToString().ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "-" : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_finish.ToString()) ? "-" : evaluate_assign.data.evaluate.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Name = string.IsNullOrEmpty(evaluate_assign.data.experimentee.name) ? string.Empty : evaluate_assign.data.experimentee.name,
|
||||
Position = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Position) ? string.Empty : evaluate_assign.data.experimentee.Position,
|
||||
Department = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Department) ? string.Empty : evaluate_assign.data.experimentee.Department,
|
||||
OrganizationOrganization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Organization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Oc) ? string.Empty : evaluate_assign.data.experimentee.Oc,
|
||||
DateStart = string.IsNullOrEmpty(evaluate_assign.data.assign.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateStart = string.IsNullOrEmpty(evaluate_assign.data.assign.date_start.ToString()) ? "-" : evaluate_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "-" : evaluate_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
CommanderName = string.IsNullOrEmpty(evaluate_assign.data.commander.name) ? string.Empty : evaluate_assign.data.commander.name,
|
||||
CommanderPosition = string.IsNullOrEmpty(evaluate_assign.data.commander.Position) ? string.Empty : evaluate_assign.data.commander.Position,
|
||||
CommanderDated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.sign_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.sign_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
CommanderDated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.sign_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.sign_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
BehaviorStrengthDesc = evaluate_assign.data.evaluate.behavior_strength_desc,
|
||||
BehaviorImproveDesc = evaluate_assign.data.evaluate.behavior_improve_desc,
|
||||
Evaluate = evaluate_assign.data.evaluate,
|
||||
|
||||
Knows = knows,
|
||||
Skills = skills,
|
||||
Competencys = competencys,
|
||||
Learns = learns,
|
||||
Applys = applys,
|
||||
Success = success,
|
||||
AchievementOthers = achievementOthers,
|
||||
AchievementOtherDesc = evaluate_assign.data.evaluate.achievement_other_desc,
|
||||
Conducts = conducts,
|
||||
Morals = morals,
|
||||
Disciplines = disciplines,
|
||||
BehaviorOthers = behaviorOthers,
|
||||
BehaviorOtherDesc = evaluate_assign.data.evaluate.behavior_other_desc,
|
||||
Orientation = orientation,
|
||||
SelfLearning = self_learning,
|
||||
TrainingSeminar = training_seminar,
|
||||
OtherTraining = other_training
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -187,7 +624,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region แบบประเมินผล(คณะกรรมการ)
|
||||
#region 17 แบบประเมินผล (คณะกรรมการ)
|
||||
public async Task<object> GetEvaluateChairmanAssignAsync(Guid id, string token)
|
||||
{
|
||||
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-chairman?id={id}";
|
||||
|
|
@ -202,46 +639,231 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
if (evaluate_assign.data != null)
|
||||
{
|
||||
evaluate_assign.data.evaluate.achievement_score = evaluate_assign.data.evaluate.achievement_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.behavior_score = evaluate_assign.data.evaluate.behavior_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.sum_score = evaluate_assign.data.evaluate.sum_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.achievement_percent = evaluate_assign.data.evaluate.achievement_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.behavior_percent = evaluate_assign.data.evaluate.behavior_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.sum_percent = evaluate_assign.data.evaluate.sum_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_orientation_score = evaluate_assign.data.evaluate.develop_orientation_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_self_learning_score = evaluate_assign.data.evaluate.develop_self_learning_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_training_seminar_score = evaluate_assign.data.evaluate.develop_training_seminar_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_other_training_score = evaluate_assign.data.evaluate.develop_other_training_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_total_score = evaluate_assign.data.evaluate.develop_total_score.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_orientation_percent = evaluate_assign.data.evaluate.develop_orientation_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_self_learning_percent = evaluate_assign.data.evaluate.develop_self_learning_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_training_seminar_percent = evaluate_assign.data.evaluate.develop_training_seminar_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_other_training_percent = evaluate_assign.data.evaluate.develop_other_training_percent.ToThaiNumber();
|
||||
evaluate_assign.data.evaluate.develop_total_percent = evaluate_assign.data.evaluate.develop_total_percent.ToThaiNumber();
|
||||
var knowledge_level = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.knowledge_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.knowledge_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var apply_level = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.apply_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.apply_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.apply_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.apply_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.apply_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var success_level = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.success_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.success_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.success_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.success_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.success_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var achievement_other_level = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.achievement_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.achievement_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.achievement_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.achievement_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.achievement_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
|
||||
var conduct_level = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.conduct1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.conduct1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.conduct1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.conduct1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.conduct1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.conduct2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.conduct2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.conduct2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.conduct2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.conduct2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.conduct3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.conduct3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.conduct3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.conduct3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.conduct3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_4 = evaluate_assign.data.evaluate.conduct4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_4 = evaluate_assign.data.evaluate.conduct4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_4 = evaluate_assign.data.evaluate.conduct4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_4 = evaluate_assign.data.evaluate.conduct4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_4 = evaluate_assign.data.evaluate.conduct4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
|
||||
var moral_level = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.moral1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.moral1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.moral1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.moral1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.moral1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.moral2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.moral2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.moral2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.moral2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.moral2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.moral3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.moral3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.moral3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.moral3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.moral3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
|
||||
var discipline_level = new
|
||||
{
|
||||
col1_1 = evaluate_assign.data.evaluate.discipline1_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_1 = evaluate_assign.data.evaluate.discipline1_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_1 = evaluate_assign.data.evaluate.discipline1_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_1 = evaluate_assign.data.evaluate.discipline1_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_1 = evaluate_assign.data.evaluate.discipline1_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_2 = evaluate_assign.data.evaluate.discipline2_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_2 = evaluate_assign.data.evaluate.discipline2_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_2 = evaluate_assign.data.evaluate.discipline2_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_2 = evaluate_assign.data.evaluate.discipline2_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_2 = evaluate_assign.data.evaluate.discipline2_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_3 = evaluate_assign.data.evaluate.discipline3_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_3 = evaluate_assign.data.evaluate.discipline3_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_3 = evaluate_assign.data.evaluate.discipline3_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_3 = evaluate_assign.data.evaluate.discipline3_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_3 = evaluate_assign.data.evaluate.discipline3_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_4 = evaluate_assign.data.evaluate.discipline4_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_4 = evaluate_assign.data.evaluate.discipline4_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_4 = evaluate_assign.data.evaluate.discipline4_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_4 = evaluate_assign.data.evaluate.discipline4_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_4 = evaluate_assign.data.evaluate.discipline4_level.col5 == "/" ? "✓" : string.Empty,
|
||||
|
||||
col1_5 = evaluate_assign.data.evaluate.discipline5_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2_5 = evaluate_assign.data.evaluate.discipline5_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3_5 = evaluate_assign.data.evaluate.discipline5_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4_5 = evaluate_assign.data.evaluate.discipline5_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5_5 = evaluate_assign.data.evaluate.discipline5_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var behavior_other_level = new
|
||||
{
|
||||
col1 = evaluate_assign.data.evaluate.behavior_other_level.col1 == "/" ? "✓" : string.Empty,
|
||||
col2 = evaluate_assign.data.evaluate.behavior_other_level.col2 == "/" ? "✓" : string.Empty,
|
||||
col3 = evaluate_assign.data.evaluate.behavior_other_level.col3 == "/" ? "✓" : string.Empty,
|
||||
col4 = evaluate_assign.data.evaluate.behavior_other_level.col4 == "/" ? "✓" : string.Empty,
|
||||
col5 = evaluate_assign.data.evaluate.behavior_other_level.col5 == "/" ? "✓" : string.Empty,
|
||||
};
|
||||
var achievement_score = evaluate_assign.data.evaluate.achievement_score != null
|
||||
? evaluate_assign.data.evaluate.achievement_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var behavior_score = evaluate_assign.data.evaluate.behavior_score != null
|
||||
? evaluate_assign.data.evaluate.behavior_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var sum_score = evaluate_assign.data.evaluate.sum_score != null
|
||||
? evaluate_assign.data.evaluate.sum_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var achievement_percent = evaluate_assign.data.evaluate.achievement_percent != null
|
||||
? evaluate_assign.data.evaluate.achievement_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var behavior_percent = evaluate_assign.data.evaluate.behavior_percent != null
|
||||
? evaluate_assign.data.evaluate.behavior_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var sum_percent = evaluate_assign.data.evaluate.sum_percent != null
|
||||
? evaluate_assign.data.evaluate.sum_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_orientation_score = evaluate_assign.data.evaluate.develop_orientation_score != null
|
||||
? evaluate_assign.data.evaluate.develop_orientation_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_self_learning_score = evaluate_assign.data.evaluate.develop_self_learning_score != null
|
||||
? evaluate_assign.data.evaluate.develop_self_learning_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_training_seminar_score = evaluate_assign.data.evaluate.develop_training_seminar_score != null
|
||||
? evaluate_assign.data.evaluate.develop_training_seminar_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_other_training_score = evaluate_assign.data.evaluate.develop_other_training_score != null
|
||||
? evaluate_assign.data.evaluate.develop_other_training_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_total_score = evaluate_assign.data.evaluate.develop_total_score != null
|
||||
? evaluate_assign.data.evaluate.develop_total_score.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_orientation_percent = evaluate_assign.data.evaluate.develop_orientation_percent != null
|
||||
? evaluate_assign.data.evaluate.develop_orientation_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_self_learning_percent = evaluate_assign.data.evaluate.develop_self_learning_percent != null
|
||||
? evaluate_assign.data.evaluate.develop_self_learning_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_training_seminar_percent = evaluate_assign.data.evaluate.develop_training_seminar_percent != null
|
||||
? evaluate_assign.data.evaluate.develop_training_seminar_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_other_training_percent = evaluate_assign.data.evaluate.develop_other_training_percent != null
|
||||
? evaluate_assign.data.evaluate.develop_other_training_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
var develop_total_percent = evaluate_assign.data.evaluate.develop_total_percent != null
|
||||
? evaluate_assign.data.evaluate.develop_total_percent.ToThaiNumber()
|
||||
: string.Empty;
|
||||
|
||||
return new
|
||||
{
|
||||
No = string.IsNullOrEmpty(evaluate_assign.data.evaluate.no.ToString()) ? string.Empty : evaluate_assign.data.evaluate.no.ToString().ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "-" : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_finish.ToString()) ? "-" : evaluate_assign.data.evaluate.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Name = string.IsNullOrEmpty(evaluate_assign.data.experimentee.name) ? string.Empty : evaluate_assign.data.experimentee.name,
|
||||
Position = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Position) ? string.Empty : evaluate_assign.data.experimentee.Position,
|
||||
Department = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Department) ? string.Empty : evaluate_assign.data.experimentee.Department,
|
||||
OrganizationOrganization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Organization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Oc) ? string.Empty : evaluate_assign.data.experimentee.Oc,
|
||||
DateStart = string.IsNullOrEmpty(evaluate_assign.data.assign.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateStart = string.IsNullOrEmpty(evaluate_assign.data.assign.date_start.ToString()) ? "-" : evaluate_assign.data.assign.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "-" : evaluate_assign.data.assign.date_finish.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Knows = knowledge_level,
|
||||
Applys = apply_level,
|
||||
Success = success_level,
|
||||
AchievementOthers = achievement_other_level,
|
||||
AchievementOtherDesc = evaluate_assign.data.evaluate.achievement_other_desc,
|
||||
Conducts = conduct_level,
|
||||
Morals = moral_level,
|
||||
Disciplines = discipline_level,
|
||||
BehaviorOthers = behavior_other_level,
|
||||
BehaviorOtherDesc = evaluate_assign.data.evaluate.behavior_other_desc,
|
||||
AchievementScore = achievement_score,
|
||||
BehaviorScore = behavior_score,
|
||||
SumScore = sum_score,
|
||||
AchievementPercent = achievement_percent,
|
||||
BehaviorPercent = behavior_percent,
|
||||
SumPercent = sum_percent,
|
||||
AchievementResult1 = evaluate_assign.data.evaluate.achievement_result == 1 ? "✓" : string.Empty,
|
||||
AchievementResult2 = evaluate_assign.data.evaluate.achievement_result == 1 ? string.Empty : "✓",
|
||||
BehaviorResult1 = evaluate_assign.data.evaluate.behavior_result == 1 ? "✓" : string.Empty,
|
||||
BehaviorResult2 = evaluate_assign.data.evaluate.behavior_result == 1 ? string.Empty : "✓",
|
||||
DevelopOrientationScore = develop_orientation_score,
|
||||
DevelopSelfLearningScore = develop_self_learning_score,
|
||||
DevelopTrainingSeminarScore = develop_training_seminar_score,
|
||||
DevelopOtherTrainingScore = develop_other_training_score,
|
||||
DevelopTotalScore = develop_total_score,
|
||||
DevelopOrientationPercent = develop_orientation_percent,
|
||||
DevelopSelfLearningPercent = develop_self_learning_percent,
|
||||
DevelopTrainingSeminarPercent = develop_training_seminar_percent,
|
||||
DevelopOtherTrainingPercent = develop_other_training_percent,
|
||||
DevelopTotalPercent = develop_total_percent,
|
||||
DevelopResult1 = evaluate_assign.data.evaluate.develop_result == 1 ? "✓" : string.Empty,
|
||||
DevelopResult2 = evaluate_assign.data.evaluate.develop_result == 0 ? "✓" : string.Empty,
|
||||
EvaluateResult1 = evaluate_assign.data.evaluate.evaluate_result == 1 ? "🗹" : "☐",
|
||||
EvaluateResult2 = evaluate_assign.data.evaluate.evaluate_result == 1 ? "☐" : "🗹",
|
||||
ChairmanName = string.IsNullOrEmpty(evaluate_assign.data.chairman.name) ? string.Empty : evaluate_assign.data.chairman.name,
|
||||
ChairmanPosition = string.IsNullOrEmpty(evaluate_assign.data.chairman.Position) ? string.Empty : evaluate_assign.data.chairman.Position,
|
||||
ChairmanDated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.chairman_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.chairman_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
ChairmanDated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.chairman_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.chairman_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Director1Name = string.IsNullOrEmpty(evaluate_assign.data.director1.name) ? string.Empty : evaluate_assign.data.director1.name,
|
||||
Director1Position = string.IsNullOrEmpty(evaluate_assign.data.director1.Position) ? string.Empty : evaluate_assign.data.director1.Position,
|
||||
Director1Dated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director1_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.director1_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Director1Dated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director1_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.director1_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Director2Name = string.IsNullOrEmpty(evaluate_assign.data.director2.name) ? string.Empty : evaluate_assign.data.director2.name,
|
||||
Director2Position = string.IsNullOrEmpty(evaluate_assign.data.director2.Position) ? string.Empty : evaluate_assign.data.director2.Position,
|
||||
Director2Dated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director2_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.director2_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
|
||||
Evaluate = evaluate_assign.data.evaluate,
|
||||
Director2Dated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director2_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.director2_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -252,7 +874,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region แบบรายงานการประเมินผล
|
||||
#region 18 แบบรายงานการประเมินผล (สำหรับประธาน และ กรณีขยายเวลา)
|
||||
public async Task<object> GetEvaluateResultAssignAsync(Guid id, string token)
|
||||
{
|
||||
var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}";
|
||||
|
|
@ -267,29 +889,64 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
if (evaluate_assign.data != null)
|
||||
{
|
||||
var expandMonth = string.IsNullOrEmpty(evaluate_assign.data.evaluate.expand_month.ToString()) ? string.Empty : evaluate_assign.data.evaluate.expand_month.ToString().ToThaiNumber();
|
||||
var developComplete1 = evaluate_assign.data.evaluate.develop_complete == 1
|
||||
? "🗹"
|
||||
: "☐";
|
||||
var developComplete2 = evaluate_assign.data.evaluate.develop_complete == 0
|
||||
? "🗹"
|
||||
: "☐";
|
||||
var passResult1 = evaluate_assign.data.evaluate.pass_result == 1
|
||||
? "🗹 ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป"
|
||||
: "☐ ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป";
|
||||
var passResult2 = evaluate_assign.data.evaluate.pass_result == 2
|
||||
? "🗹 ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป"
|
||||
: "☐ ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป";
|
||||
var passResult3 = evaluate_assign.data.evaluate.pass_result == 3
|
||||
? $"🗹 เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน"
|
||||
: "☐ เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก.....เดือน";
|
||||
|
||||
var passResult = evaluate_assign.data.evaluate.pass_result == 1
|
||||
? "เห็นควรให้รับราชการต่อไป"
|
||||
: evaluate_assign.data.evaluate.pass_result == 2
|
||||
? "เห็นควรให้ออกจากราชการ"
|
||||
: $"เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน";
|
||||
|
||||
CultureInfo provider = new CultureInfo("en-US");
|
||||
DateTime date_start = DateTime.MinValue, date_finish = DateTime.MinValue;
|
||||
if (evaluate_assign.data.assign.date_start != string.Empty && evaluate_assign.data.assign.date_finish != string.Empty)
|
||||
{
|
||||
date_start = DateTime.Parse(evaluate_assign.data.assign.date_start, provider);
|
||||
date_finish = DateTime.Parse(evaluate_assign.data.assign.date_finish, provider);
|
||||
}
|
||||
var dateStart_ = date_start.ToThaiFullDate().ToString().ToThaiNumber();
|
||||
var dateFinish_ = date_finish.ToThaiFullDate().ToString().ToThaiNumber();
|
||||
return new
|
||||
{
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateStart = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "-" : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
EvaluateDateFinish = string.IsNullOrEmpty(evaluate_assign.data.evaluate.date_start.ToString()) ? "-" : evaluate_assign.data.evaluate.date_start.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Position = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Position) ? string.Empty : evaluate_assign.data.experimentee.Position,
|
||||
Department = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Department) ? string.Empty : evaluate_assign.data.experimentee.Department,
|
||||
OrganizationOrganization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Organization = string.IsNullOrEmpty(evaluate_assign.data.experimentee.OrganizationOrganization) ? string.Empty : evaluate_assign.data.experimentee.OrganizationOrganization,
|
||||
Oc = string.IsNullOrEmpty(evaluate_assign.data.experimentee.Oc) ? string.Empty : evaluate_assign.data.experimentee.Oc,
|
||||
Reson = string.IsNullOrEmpty(evaluate_assign.data.evaluate.reson) ? string.Empty : evaluate_assign.data.evaluate.reson,
|
||||
DevelopComplete = string.IsNullOrEmpty(evaluate_assign.data.evaluate.develop_complete.ToString()) ? 0 : evaluate_assign.data.evaluate.develop_complete,
|
||||
PassResult = string.IsNullOrEmpty(evaluate_assign.data.evaluate.pass_result.ToString()) ? 0 : evaluate_assign.data.evaluate.pass_result,
|
||||
ExpandMonth = string.IsNullOrEmpty(evaluate_assign.data.evaluate.expand_month.ToString()) ? string.Empty : evaluate_assign.data.evaluate.expand_month.ToString().ToThaiNumber(),
|
||||
Reason = string.IsNullOrEmpty(evaluate_assign.data.evaluate.reson) ? string.Empty : evaluate_assign.data.evaluate.reson,
|
||||
ExpandMonth = expandMonth,
|
||||
ChairmanName = string.IsNullOrEmpty(evaluate_assign.data.chairman.name) ? string.Empty : evaluate_assign.data.chairman.name,
|
||||
ChairmanPosition = string.IsNullOrEmpty(evaluate_assign.data.chairman.Position) ? string.Empty : evaluate_assign.data.chairman.Position,
|
||||
ChairmanDate = string.IsNullOrEmpty(evaluate_assign.data.evaluate.chairman_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.chairman_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
ChairmanDate = string.IsNullOrEmpty(evaluate_assign.data.evaluate.chairman_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.chairman_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
CommanderName = string.IsNullOrEmpty(evaluate_assign.data.commander.name) ? string.Empty : evaluate_assign.data.commander.name,
|
||||
CommanderPosition = string.IsNullOrEmpty(evaluate_assign.data.commander.Position) ? string.Empty : evaluate_assign.data.commander.Position,
|
||||
CommanderDate = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director1_dated.ToString()) ? "วันที่ เดือน พ.ศ." : evaluate_assign.data.evaluate.director1_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
CommanderDate = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director1_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.director1_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
Name = evaluate_assign.data.experimentee.name,
|
||||
RoundNo = evaluate_assign.data.assign.round_no.ToString().ToThaiNumber(),
|
||||
DateStart = string.IsNullOrEmpty(evaluate_assign.data.assign.date_start.ToString()) ? "วันที่ เดือน พ.ศ." : DateTime.Parse(evaluate_assign.data.assign.date_start).ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : DateTime.Parse(evaluate_assign.data.assign.date_finish).ToThaiFullDate().ToString().ToThaiNumber(),
|
||||
|
||||
DateStart = evaluate_assign.data.assign.date_start != string.Empty ? dateStart_ : "-",
|
||||
DateFinish = evaluate_assign.data.assign.date_finish != string.Empty ? dateFinish_ : "-",
|
||||
Develop1 = developComplete1,
|
||||
Develop2 = developComplete2,
|
||||
PassResult1 = passResult1,
|
||||
PassResult2 = passResult2,
|
||||
PassResult3 = passResult3,
|
||||
PassResult = passResult,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@
|
|||
public class Competency
|
||||
{
|
||||
public string id { get; set; } = string.Empty;
|
||||
public string title { get; set; } = string.Empty;
|
||||
public string name { get; set; } = string.Empty;
|
||||
public string level { get; set; } = string.Empty;
|
||||
public string description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue