Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop
This commit is contained in:
commit
b67c666f81
6 changed files with 1665 additions and 900 deletions
|
|
@ -9,6 +9,9 @@ using System.Net.Http.Headers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using System.Linq;
|
||||||
|
using static BMA.EHR.Application.Responses.ProbationAssignResponse;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace BMA.EHR.Application.Repositories.Reports
|
namespace BMA.EHR.Application.Repositories.Reports
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +43,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
#region " Methods "
|
#region " Methods "
|
||||||
|
|
||||||
#region แบบมอบหมายงาน ฯ
|
#region 13 แบบมอบหมายงาน ฯ
|
||||||
public async Task<object> GetProbationAssignAsync(Guid assign_id, string token)
|
public async Task<object> GetProbationAssignAsync(Guid assign_id, string token)
|
||||||
{
|
{
|
||||||
var api_url = $"{_configuration["APIPROBATION"]}/assign/probation-assign?assign_id={assign_id}";
|
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)
|
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
|
return new
|
||||||
{
|
{
|
||||||
Name = string.IsNullOrEmpty(probation_assign.data.profile.name) ? string.Empty : probation_assign.data.profile.name,
|
Name = string.IsNullOrEmpty(probation_assign.data.profile.name) ? "-" : probation_assign.data.profile.name,
|
||||||
Position = string.IsNullOrEmpty(probation_assign.data.profile.Position) ? string.Empty : probation_assign.data.profile.Position,
|
Position = string.IsNullOrEmpty(probation_assign.data.profile.Position) ? "-" : probation_assign.data.profile.Position,
|
||||||
Department = string.IsNullOrEmpty(probation_assign.data.profile.Department) ? string.Empty : probation_assign.data.profile.Department,
|
Department = string.IsNullOrEmpty(probation_assign.data.profile.Department) ? "-" : probation_assign.data.profile.Department,
|
||||||
OrganizationOrganization = string.IsNullOrEmpty(probation_assign.data.profile.OrganizationOrganization) ? string.Empty : probation_assign.data.profile.OrganizationOrganization,
|
OrganizationOrganization = string.IsNullOrEmpty(probation_assign.data.profile.OrganizationOrganization) ? "-" : probation_assign.data.profile.OrganizationOrganization,
|
||||||
Oc = string.IsNullOrEmpty(probation_assign.data.profile.Oc) ? string.Empty : probation_assign.data.profile.Oc,
|
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(),
|
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(),
|
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,
|
NameMentor1 = probation_assign.data.mentors.Count > 0 ? 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(),
|
DateMentor1 = probation_assign.data.mentors.Count > 0 ? 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,
|
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 : string.Empty,
|
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() : "วันที่ เดือน พ.ศ.",
|
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,
|
PositionMentor2 = probation_assign.data.mentors.Count > 1 ? probation_assign.data.mentors[1].Position : "-",
|
||||||
NameCommander = string.IsNullOrEmpty(probation_assign.data.commander.name) ? string.Empty : probation_assign.data.commander.name,
|
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(),
|
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,
|
PositionCommander = string.IsNullOrEmpty(probation_assign.data.commander.Position) ? "-" : probation_assign.data.commander.Position,
|
||||||
Jobs = probation_assign.data.jobs.ToList(),
|
Jobs = jobs,
|
||||||
Knowledge = probation_assign.data.knowledges.ToList(),
|
Knowledges = knowledges,
|
||||||
Competency = probation_assign.data.competencys.ToList(),
|
Competencys = competencys,
|
||||||
Outputs = probation_assign.data.outputs.ToList(),
|
Outputs = outputs,
|
||||||
OtherDesc = string.IsNullOrEmpty(probation_assign.data.assign.other_desc) ? string.Empty : probation_assign.data.assign.other_desc,
|
OtherDesc = string.IsNullOrEmpty(probation_assign.data.assign.other_desc) ? "-" : probation_assign.data.assign.other_desc,
|
||||||
Other4Desc = string.IsNullOrEmpty(probation_assign.data.assign.other4_desc) ? string.Empty : probation_assign.data.assign.other4_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) ? string.Empty : probation_assign.data.assign.other5_no1_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) ? string.Empty : probation_assign.data.assign.other5_no2_desc,
|
Other5No2Desc = string.IsNullOrEmpty(probation_assign.data.assign.other5_no2_desc) ? "-" : probation_assign.data.assign.other5_no2_desc,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -91,8 +125,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region แบบบันทึกผล (ผู้ดูแล, ผู้บังคับบัญชา)
|
#region 14 - 15 แบบบันทึกผล (ผู้ดูแล และ ผู้บังคับบัญชา)
|
||||||
public async Task<object> GetEvaluateRecordAsync(Guid assign_id, string token)
|
public async Task<object> GetEvaluateRecord14_15Async(Guid assign_id, string token)
|
||||||
{
|
{
|
||||||
var api_url = $"{_configuration["APIPROBATION"]}/report/form-record?id={assign_id}";
|
var api_url = $"{_configuration["APIPROBATION"]}/report/form-record?id={assign_id}";
|
||||||
EvaluateRecordAssignResponse evaluate_record;
|
EvaluateRecordAssignResponse evaluate_record;
|
||||||
|
|
@ -106,29 +140,274 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
if (evaluate_record.data != null)
|
if (evaluate_record.data != null)
|
||||||
{
|
{
|
||||||
evaluate_record.data.evaluate.orientation = evaluate_record.data.evaluate.orientation == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
var orientation = evaluate_record.data.evaluate.orientation == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||||
evaluate_record.data.evaluate.self_learning = evaluate_record.data.evaluate.self_learning == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
var self_learning = evaluate_record.data.evaluate.self_learning == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||||
evaluate_record.data.evaluate.training_seminar = evaluate_record.data.evaluate.training_seminar == "1" ? "(/) ดำเนินการแล้ว ( ) ยังไม่ได้ดำเนินการ" : "( ) ดำเนินการแล้ว (/) ยังไม่ได้ดำเนินการ";
|
var training_seminar = evaluate_record.data.evaluate.training_seminar == "1" ? "🗹 ดำเนินการแล้ว ☐ ยังไม่ได้ดำเนินการ" : "☐ ดำเนินการแล้ว 🗹 ยังไม่ได้ดำเนินการ";
|
||||||
evaluate_record.data.evaluate.other_training = evaluate_record.data.evaluate.other_training == "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
|
return new
|
||||||
{
|
{
|
||||||
DirectorName = string.IsNullOrEmpty(evaluate_record.data.director.name) ? string.Empty : evaluate_record.data.director.name,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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(),
|
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(),
|
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(),
|
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(),
|
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(),
|
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" ? "ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ" : "ผู้บังคับบัญชา",
|
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
|
else
|
||||||
|
|
@ -139,7 +418,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region แบบประเมินผล(ผู้บังคับบัญชา)
|
#region 16 แบบประเมินผล (ผู้บังคับบัญชา)
|
||||||
public async Task<object> GetEvaluateAssignAsync(Guid id, string token)
|
public async Task<object> GetEvaluateAssignAsync(Guid id, string token)
|
||||||
{
|
{
|
||||||
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-commander?id={id}";
|
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)
|
if (evaluate_assign.data != null)
|
||||||
{
|
{
|
||||||
evaluate_assign.data.evaluate.orientation = evaluate_assign.data.evaluate.orientation == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
var knows = new {
|
||||||
evaluate_assign.data.evaluate.self_learning = evaluate_assign.data.evaluate.self_learning == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.training_seminar = evaluate_assign.data.evaluate.training_seminar == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.other_training = evaluate_assign.data.evaluate.other_training == "1" ? "[/] ดำเนินการแล้ว [ ] ยังไม่ได้ดำเนินการ" : "[ ] ดำเนินการแล้ว [/] ยังไม่ได้ดำเนินการ";
|
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
|
return new
|
||||||
{
|
{
|
||||||
No = string.IsNullOrEmpty(evaluate_assign.data.evaluate.no.ToString()) ? string.Empty : evaluate_assign.data.evaluate.no.ToString().ToThaiNumber(),
|
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(),
|
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(),
|
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,
|
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,
|
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,
|
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,
|
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(),
|
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(),
|
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,
|
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,
|
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,
|
BehaviorStrengthDesc = evaluate_assign.data.evaluate.behavior_strength_desc,
|
||||||
BehaviorImproveDesc = evaluate_assign.data.evaluate.behavior_improve_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
|
else
|
||||||
|
|
@ -187,7 +624,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region แบบประเมินผล(คณะกรรมการ)
|
#region 17 แบบประเมินผล (คณะกรรมการ)
|
||||||
public async Task<object> GetEvaluateChairmanAssignAsync(Guid id, string token)
|
public async Task<object> GetEvaluateChairmanAssignAsync(Guid id, string token)
|
||||||
{
|
{
|
||||||
var api_url = $"{_configuration["APIPROBATION"]}/report/evaluate-chairman?id={id}";
|
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)
|
if (evaluate_assign.data != null)
|
||||||
{
|
{
|
||||||
evaluate_assign.data.evaluate.achievement_score = evaluate_assign.data.evaluate.achievement_score.ToThaiNumber();
|
var knowledge_level = new
|
||||||
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();
|
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.achievement_percent = evaluate_assign.data.evaluate.achievement_percent.ToThaiNumber();
|
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.behavior_percent = evaluate_assign.data.evaluate.behavior_percent.ToThaiNumber();
|
col3 = evaluate_assign.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.sum_percent = evaluate_assign.data.evaluate.sum_percent.ToThaiNumber();
|
col4 = evaluate_assign.data.evaluate.knowledge_level.col4 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_orientation_score = evaluate_assign.data.evaluate.develop_orientation_score.ToThaiNumber();
|
col5 = evaluate_assign.data.evaluate.knowledge_level.col5 == "/" ? "✓" : string.Empty,
|
||||||
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();
|
var apply_level = new
|
||||||
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();
|
col1 = evaluate_assign.data.evaluate.apply_level.col1 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_orientation_percent = evaluate_assign.data.evaluate.develop_orientation_percent.ToThaiNumber();
|
col2 = evaluate_assign.data.evaluate.apply_level.col2 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_self_learning_percent = evaluate_assign.data.evaluate.develop_self_learning_percent.ToThaiNumber();
|
col3 = evaluate_assign.data.evaluate.apply_level.col3 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_training_seminar_percent = evaluate_assign.data.evaluate.develop_training_seminar_percent.ToThaiNumber();
|
col4 = evaluate_assign.data.evaluate.apply_level.col4 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_other_training_percent = evaluate_assign.data.evaluate.develop_other_training_percent.ToThaiNumber();
|
col5 = evaluate_assign.data.evaluate.apply_level.col5 == "/" ? "✓" : string.Empty,
|
||||||
evaluate_assign.data.evaluate.develop_total_percent = evaluate_assign.data.evaluate.develop_total_percent.ToThaiNumber();
|
};
|
||||||
|
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
|
return new
|
||||||
{
|
{
|
||||||
No = string.IsNullOrEmpty(evaluate_assign.data.evaluate.no.ToString()) ? string.Empty : evaluate_assign.data.evaluate.no.ToString().ToThaiNumber(),
|
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(),
|
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(),
|
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,
|
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,
|
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,
|
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,
|
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(),
|
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(),
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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(),
|
Director2Dated = string.IsNullOrEmpty(evaluate_assign.data.evaluate.director2_dated.ToString()) ? "-" : evaluate_assign.data.evaluate.director2_dated.ToThaiFullDate().ToString().ToThaiNumber(),
|
||||||
|
|
||||||
Evaluate = evaluate_assign.data.evaluate,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -252,7 +874,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region แบบรายงานการประเมินผล
|
#region 18 แบบรายงานการประเมินผล (สำหรับประธาน และ กรณีขยายเวลา)
|
||||||
public async Task<object> GetEvaluateResultAssignAsync(Guid id, string token)
|
public async Task<object> GetEvaluateResultAssignAsync(Guid id, string token)
|
||||||
{
|
{
|
||||||
var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}";
|
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)
|
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
|
return new
|
||||||
{
|
{
|
||||||
EvaluateDateStart = 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(),
|
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,
|
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,
|
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,
|
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,
|
Reason = 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,
|
ExpandMonth = expandMonth,
|
||||||
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(),
|
|
||||||
ChairmanName = string.IsNullOrEmpty(evaluate_assign.data.chairman.name) ? string.Empty : evaluate_assign.data.chairman.name,
|
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,
|
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,
|
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,
|
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,
|
Name = evaluate_assign.data.experimentee.name,
|
||||||
RoundNo = evaluate_assign.data.assign.round_no.ToString().ToThaiNumber(),
|
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(),
|
DateStart = evaluate_assign.data.assign.date_start != string.Empty ? dateStart_ : "-",
|
||||||
DateFinish = string.IsNullOrEmpty(evaluate_assign.data.assign.date_finish.ToString()) ? "วันที่ เดือน พ.ศ." : DateTime.Parse(evaluate_assign.data.assign.date_finish).ToThaiFullDate().ToString().ToThaiNumber(),
|
DateFinish = evaluate_assign.data.assign.date_finish != string.Empty ? dateFinish_ : "-",
|
||||||
|
Develop1 = developComplete1,
|
||||||
|
Develop2 = developComplete2,
|
||||||
|
PassResult1 = passResult1,
|
||||||
|
PassResult2 = passResult2,
|
||||||
|
PassResult3 = passResult3,
|
||||||
|
PassResult = passResult,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
// string FirstName = string.IsNullOrEmpty(data.FirstName.ToString()) ? string.Empty : data.FirstName.ToString();
|
// string FirstName = string.IsNullOrEmpty(data.FirstName.ToString()) ? string.Empty : data.FirstName.ToString();
|
||||||
// string LastName = string.IsNullOrEmpty(data.LastName.ToString()) ? string.Empty : data.LastName.ToString();
|
// string LastName = string.IsNullOrEmpty(data.LastName.ToString()) ? string.Empty : data.LastName.ToString();
|
||||||
// string FullName = $"{Prefix} {FirstName} {LastName}";
|
// string FullName = $"{Prefix} {FirstName} {LastName}";
|
||||||
string Date = string.IsNullOrEmpty(data.Date.ToString()) ? "วันที่ - เดือน - พ.ศ. -" : DateTime.Parse(data.Date.ToString()).ToThaiFullDate().ToString().ToThaiNumber();
|
string Date = string.IsNullOrEmpty(data.Date.ToString()) ? "-" : DateTime.Parse(data.Date.ToString()).ToThaiFullDate().ToString().ToThaiNumber();
|
||||||
string CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate().ToString().ToThaiNumber();
|
string CurrentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).ToThaiFullDate().ToString().ToThaiNumber();
|
||||||
return new
|
return new
|
||||||
{
|
{
|
||||||
|
|
@ -282,8 +282,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
data.posMasterNo,
|
data.posMasterNo,
|
||||||
data.posLevelName,
|
data.posLevelName,
|
||||||
data.posTypeName,
|
data.posTypeName,
|
||||||
data.Number,
|
Number = data.Number != null ? data.Number.ToThaiNumber() : "-",
|
||||||
data.Location,
|
Location = data.Location != null ? data.Location.ToThaiNumber() : "-",
|
||||||
data.Reason,
|
data.Reason,
|
||||||
Position = data.position,
|
Position = data.position,
|
||||||
};
|
};
|
||||||
|
|
@ -334,8 +334,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
return new
|
return new
|
||||||
{
|
{
|
||||||
Oc = oc,
|
Oc = oc,
|
||||||
Number = $"กท /{data.CreatedAt.Year.ToThaiYear()}",
|
Number = $"กท /{(data.CreatedAt.Year.ToThaiYear()).ToString().ToThaiNumber()}",
|
||||||
Date = data.CreatedAt.ToThaiFullDate().ToString().ToThaiNumber(),
|
Date = data.CreatedAt.ToThaiFullDate2().ToString().ToThaiNumber(),
|
||||||
Subject = "ข้าราชการถึงแก่กรรม",
|
Subject = "ข้าราชการถึงแก่กรรม",
|
||||||
Send = "หัวหน้าสำนักงาน ก.ก.",
|
Send = "หัวหน้าสำนักงาน ก.ก.",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,8 @@
|
||||||
public class Competency
|
public class Competency
|
||||||
{
|
{
|
||||||
public string id { get; set; } = string.Empty;
|
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;
|
public string description { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,8 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var head = await _repository.GetHeadRetirementDeceasedAsync(id);
|
var head = await _repository.GetHeadRetirementDeceasedAsync(id);
|
||||||
var data = await _repository.GetRetirementDeceasedAsync(id);
|
var detail = await _repository.GetRetirementDeceasedAsync(id);
|
||||||
if (data != null || head != null)
|
if (detail != null && head != null)
|
||||||
{
|
{
|
||||||
var mergeData = new
|
var mergeData = new
|
||||||
{
|
{
|
||||||
|
|
@ -83,13 +83,13 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
Date = head.GetType().GetProperty("Date").GetValue(head),
|
Date = head.GetType().GetProperty("Date").GetValue(head),
|
||||||
Subject = head.GetType().GetProperty("Subject").GetValue(head),
|
Subject = head.GetType().GetProperty("Subject").GetValue(head),
|
||||||
Send = head.GetType().GetProperty("Send").GetValue(head),
|
Send = head.GetType().GetProperty("Send").GetValue(head),
|
||||||
FullName = data.GetType().GetProperty("FullName").GetValue(data),
|
FullName = detail.GetType().GetProperty("FullName").GetValue(detail),
|
||||||
Position = data.GetType().GetProperty("Position").GetValue(data),
|
Position = detail.GetType().GetProperty("Position").GetValue(detail),
|
||||||
Reason = data.GetType().GetProperty("Reason").GetValue(data),
|
Reason = detail.GetType().GetProperty("Reason").GetValue(detail),
|
||||||
DeceasedDate = data.GetType().GetProperty("Date").GetValue(data),
|
DeceasedDate = detail.GetType().GetProperty("Date").GetValue(detail),
|
||||||
CurrentDate = data.GetType().GetProperty("CurrentDate").GetValue(data),
|
CurrentDate = detail.GetType().GetProperty("CurrentDate").GetValue(detail),
|
||||||
DeceasedNumber = data.GetType().GetProperty("Number").GetValue(data),
|
DeceasedNumber = detail.GetType().GetProperty("Number").GetValue(detail),
|
||||||
Location = data.GetType().GetProperty("Location").GetValue(data),
|
Location = detail.GetType().GetProperty("Location").GetValue(detail),
|
||||||
};
|
};
|
||||||
var mimeType = "";
|
var mimeType = "";
|
||||||
switch (exportType.Trim().ToLower())
|
switch (exportType.Trim().ToLower())
|
||||||
|
|
@ -99,22 +99,29 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
|
case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"36-บันทึกเวียนแจ้งการถึงแก่กรรม.trdp");
|
//var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"36-บันทึกเวียนแจ้งการถึงแก่กรรม.trdp");
|
||||||
ReportPackager reportPacker = new ReportPackager();
|
//ReportPackager reportPacker = new ReportPackager();
|
||||||
Telerik.Reporting.Report? report = null;
|
//Telerik.Reporting.Report? report = null;
|
||||||
using (var sourceStream = System.IO.File.OpenRead(rptFile))
|
//using (var sourceStream = System.IO.File.OpenRead(rptFile))
|
||||||
|
//{
|
||||||
|
// report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
|
||||||
|
//}
|
||||||
|
//report.DataSource = mergeData;
|
||||||
|
//System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||||
|
//InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||||
|
//{
|
||||||
|
// ReportDocument = report,
|
||||||
|
//};
|
||||||
|
//ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||||
|
//RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
||||||
|
//return File(result.DocumentBytes, mimeType, $"รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม.{exportType.Trim().ToLower()}");
|
||||||
|
var data = new
|
||||||
{
|
{
|
||||||
report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
|
template = "deceased",
|
||||||
}
|
reportName = "docx-report",
|
||||||
report.DataSource = mergeData;
|
data = mergeData
|
||||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
|
||||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
|
||||||
{
|
|
||||||
ReportDocument = report,
|
|
||||||
};
|
};
|
||||||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
return Success(data);
|
||||||
RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
|
||||||
return File(result.DocumentBytes, mimeType, $"รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม.{exportType.Trim().ToLower()}");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -57,12 +57,11 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
[HttpGet("33/{exportType}/{id}")]
|
[HttpGet("33/{exportType}/{id}")]
|
||||||
public async Task<ActionResult<ResponseObject>> GetResign33ConvertReportAsync(string id= "08dbca15-bb57-4b2e-8435-69116599421b", string exportType = "pdf")
|
public async Task<ActionResult<ResponseObject>> GetResign33ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Guid ids = Guid.Parse(id);
|
var resign = await _service.GetResignByUser(id);
|
||||||
var resign = await _service.GetResignByUser(ids);
|
|
||||||
if (resign == null)
|
if (resign == null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
|
|
@ -75,37 +74,43 @@ namespace BMA.EHR.Report.Service.Controllers
|
||||||
}
|
}
|
||||||
//var FullName = resign.GetType().GetProperty("FirstName").GetValue(resign);
|
//var FullName = resign.GetType().GetProperty("FirstName").GetValue(resign);
|
||||||
|
|
||||||
var rptFile1 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"33-แบบฟอร์มหนังสือขอลาออกจากราชการ-1.trdp");
|
//var rptFile1 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"33-แบบฟอร์มหนังสือขอลาออกจากราชการ-1.trdp");
|
||||||
var rptFile2 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"33-แบบฟอร์มหนังสือขอลาออกจากราชการ-2.trdp");
|
//var rptFile2 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"33-แบบฟอร์มหนังสือขอลาออกจากราชการ-2.trdp");
|
||||||
|
|
||||||
ReportPackager reportPacker = new ReportPackager();
|
//ReportPackager reportPacker = new ReportPackager();
|
||||||
Telerik.Reporting.Report? report1 = null;
|
//Telerik.Reporting.Report? report1 = null;
|
||||||
Telerik.Reporting.Report? report2 = null;
|
//Telerik.Reporting.Report? report2 = null;
|
||||||
|
|
||||||
using (var sourceStream1 = System.IO.File.OpenRead(rptFile1))
|
//using (var sourceStream1 = System.IO.File.OpenRead(rptFile1))
|
||||||
using (var sourceStream2 = System.IO.File.OpenRead(rptFile2))
|
//using (var sourceStream2 = System.IO.File.OpenRead(rptFile2))
|
||||||
|
|
||||||
|
//{
|
||||||
|
// report1 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream1);
|
||||||
|
// report2 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream2);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//report1.DataSource = resign;
|
||||||
|
|
||||||
|
//var reportBook = new ReportBook();
|
||||||
|
//reportBook.Reports.Add(report1);
|
||||||
|
//reportBook.Reports.Add(report2);
|
||||||
|
|
||||||
|
//System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||||
|
//InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||||
|
//{
|
||||||
|
// ReportDocument = reportBook,
|
||||||
|
//};
|
||||||
|
|
||||||
|
//ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||||
|
//RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
||||||
|
//return File(result.DocumentBytes, mimeType, $"แบบฟอร์มหนังสือขอลาออกจากราชการ.{exportType.Trim().ToLower()}");
|
||||||
|
var data = new
|
||||||
{
|
{
|
||||||
report1 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream1);
|
template = "resign",
|
||||||
report2 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream2);
|
reportName = "docx-report",
|
||||||
}
|
data = resign
|
||||||
|
|
||||||
report1.DataSource = resign;
|
|
||||||
|
|
||||||
var reportBook = new ReportBook();
|
|
||||||
reportBook.Reports.Add(report1);
|
|
||||||
reportBook.Reports.Add(report2);
|
|
||||||
|
|
||||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
|
||||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
|
||||||
{
|
|
||||||
ReportDocument = reportBook,
|
|
||||||
};
|
};
|
||||||
|
return Success(data);
|
||||||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
|
||||||
RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
|
||||||
return File(result.DocumentBytes, mimeType, $"แบบฟอร์มหนังสือขอลาออกจากราชการ.{exportType.Trim().ToLower()}");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue