แก้ call api node
This commit is contained in:
parent
711431a5b7
commit
55ac7afc1d
1 changed files with 19 additions and 17 deletions
|
|
@ -46,7 +46,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
#region 13 แบบมอบหมายงาน ฯ
|
#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?assign_id={assign_id}";
|
||||||
ProbationAssignResponse probation_assign;
|
ProbationAssignResponse probation_assign;
|
||||||
using (var client = new HttpClient())
|
using (var client = new HttpClient())
|
||||||
{
|
{
|
||||||
|
|
@ -77,8 +77,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
{
|
{
|
||||||
name = string.IsNullOrEmpty(x.name) ? string.Empty : x.name.ToThaiNumber(),
|
name = string.IsNullOrEmpty(x.name) ? string.Empty : x.name.ToThaiNumber(),
|
||||||
level = string.IsNullOrEmpty(x.level) ? string.Empty : x.level.ToThaiNumber(),
|
level = string.IsNullOrEmpty(x.level) ? string.Empty : x.level.ToThaiNumber(),
|
||||||
description = string.IsNullOrEmpty(x.description)
|
description = string.IsNullOrEmpty(x.description)
|
||||||
? string.Empty
|
? string.Empty
|
||||||
: (Regex.Replace(x.description, "<.*?>", string.Empty)).Replace(" ", " ").ToString().ToThaiNumber(),
|
: (Regex.Replace(x.description, "<.*?>", string.Empty)).Replace(" ", " ").ToString().ToThaiNumber(),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
indicator_desc = string.IsNullOrEmpty(x.indicator_desc) ? string.Empty : x.indicator_desc.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(),
|
output_desc = string.IsNullOrEmpty(x.output_desc) ? string.Empty : x.output_desc.ToThaiNumber(),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
return new
|
return new
|
||||||
{
|
{
|
||||||
|
|
@ -148,7 +148,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
var 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
|
var expects = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||||
? new {
|
? new
|
||||||
|
{
|
||||||
col1 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col1 == "/" ? "✓" : string.Empty,
|
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,
|
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,
|
col3 = evaluate_record.data.evaluate.achievements[0].evaluate_expect_level.col3 == "/" ? "✓" : string.Empty,
|
||||||
|
|
@ -365,7 +366,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
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,
|
||||||
Organization= 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(),
|
||||||
|
|
@ -375,7 +376,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
Role = evaluate_record.data.evaluate.role == "mentor" ? "ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ" : "ผู้บังคับบัญชา",
|
Role = evaluate_record.data.evaluate.role == "mentor" ? "ผู้ดูแลการทดลองปฏิบัติหน้าที่ราชการ" : "ผู้บังคับบัญชา",
|
||||||
Expects = expects,
|
Expects = expects,
|
||||||
ExpectDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
ExpectDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||||
? evaluate_record.data.evaluate.achievements[0].evaluate_expect_desc
|
? evaluate_record.data.evaluate.achievements[0].evaluate_expect_desc
|
||||||
: string.Empty,
|
: string.Empty,
|
||||||
Outputs = outputs,
|
Outputs = outputs,
|
||||||
OutputDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
OutputDesc = evaluate_record.data.evaluate != null && evaluate_record.data.evaluate.achievements.Count > 0
|
||||||
|
|
@ -390,7 +391,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
Knows = knows,
|
Knows = knows,
|
||||||
Skills = skills,
|
Skills = skills,
|
||||||
Competencys = competencys,
|
Competencys = competencys,
|
||||||
Learns =learns,
|
Learns = learns,
|
||||||
Applys = applys,
|
Applys = applys,
|
||||||
AchievementOthers = achievementOthers,
|
AchievementOthers = achievementOthers,
|
||||||
Conducts1 = conducts1,
|
Conducts1 = conducts1,
|
||||||
|
|
@ -436,7 +437,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
|
|
||||||
if (evaluate_assign.data != null)
|
if (evaluate_assign.data != null)
|
||||||
{
|
{
|
||||||
var knows = new {
|
var knows = new
|
||||||
|
{
|
||||||
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
col1 = evaluate_assign.data.evaluate.knowledge_level.col1 == "/" ? "✓" : string.Empty,
|
||||||
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
col2 = evaluate_assign.data.evaluate.knowledge_level.col2 == "/" ? "✓" : string.Empty,
|
||||||
col3 = evaluate_assign.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
col3 = evaluate_assign.data.evaluate.knowledge_level.col3 == "/" ? "✓" : string.Empty,
|
||||||
|
|
@ -616,7 +618,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
Orientation = orientation,
|
Orientation = orientation,
|
||||||
SelfLearning = self_learning,
|
SelfLearning = self_learning,
|
||||||
TrainingSeminar = training_seminar,
|
TrainingSeminar = training_seminar,
|
||||||
OtherTraining = other_training
|
OtherTraining = other_training
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -794,7 +796,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
var develop_other_training_score = evaluate_assign.data.evaluate.develop_other_training_score != null
|
var develop_other_training_score = evaluate_assign.data.evaluate.develop_other_training_score != null
|
||||||
? evaluate_assign.data.evaluate.develop_other_training_score.ToThaiNumber()
|
? evaluate_assign.data.evaluate.develop_other_training_score.ToThaiNumber()
|
||||||
: string.Empty;
|
: string.Empty;
|
||||||
var develop_total_score = evaluate_assign.data.evaluate.develop_total_score != null
|
var develop_total_score = evaluate_assign.data.evaluate.develop_total_score != null
|
||||||
? evaluate_assign.data.evaluate.develop_total_score.ToThaiNumber()
|
? evaluate_assign.data.evaluate.develop_total_score.ToThaiNumber()
|
||||||
: string.Empty;
|
: string.Empty;
|
||||||
var develop_orientation_percent = evaluate_assign.data.evaluate.develop_orientation_percent != null
|
var develop_orientation_percent = evaluate_assign.data.evaluate.develop_orientation_percent != null
|
||||||
|
|
@ -902,19 +904,19 @@ namespace BMA.EHR.Application.Repositories.Reports
|
||||||
? "🗹"
|
? "🗹"
|
||||||
: "☐";
|
: "☐";
|
||||||
var passResult1 = evaluate_assign.data.evaluate.pass_result == 1
|
var passResult1 = evaluate_assign.data.evaluate.pass_result == 1
|
||||||
? "🗹 ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป"
|
? "🗹 ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป"
|
||||||
: "☐ ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป";
|
: "☐ ไม่ต่ำกว่ามาตรฐานที่กำหนดเห็น ควรให้รับราชการต่อไป";
|
||||||
var passResult2 = evaluate_assign.data.evaluate.pass_result == 2
|
var passResult2 = evaluate_assign.data.evaluate.pass_result == 2
|
||||||
? "🗹 ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป"
|
? "🗹 ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป"
|
||||||
: "☐ ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป";
|
: "☐ ต่ำกว่ามาตรฐานที่กำหนดเห็นควรให้ออกราชการต่อไป";
|
||||||
var passResult3 = evaluate_assign.data.evaluate.pass_result == 3
|
var passResult3 = evaluate_assign.data.evaluate.pass_result == 3
|
||||||
? $"🗹 เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน"
|
? $"🗹 เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน"
|
||||||
: "☐ เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก.....เดือน";
|
: "☐ เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก.....เดือน";
|
||||||
|
|
||||||
var passResult = evaluate_assign.data.evaluate.pass_result == 1
|
var passResult = evaluate_assign.data.evaluate.pass_result == 1
|
||||||
? "เห็นควรให้รับราชการต่อไป"
|
? "เห็นควรให้รับราชการต่อไป"
|
||||||
: evaluate_assign.data.evaluate.pass_result == 2
|
: evaluate_assign.data.evaluate.pass_result == 2
|
||||||
? "เห็นควรให้ออกจากราชการ"
|
? "เห็นควรให้ออกจากราชการ"
|
||||||
: $"เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน";
|
: $"เห็นควรให้ขยายเวลาทดลองปฏิบัติหน้าที่ราชการต่อไปอีก {expandMonth} เดือน";
|
||||||
|
|
||||||
CultureInfo provider = new CultureInfo("en-US");
|
CultureInfo provider = new CultureInfo("en-US");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue