ปรับปรุง flow การบันทึกและแสดงคะแนนของทุก actor

This commit is contained in:
Nakorn Rientrakrunchai
2020-08-17 16:26:49 +07:00
parent 29b7e1856e
commit c2b65272e6
20 changed files with 1439 additions and 191 deletions

View File

@@ -38,6 +38,8 @@ namespace TodoAPI2.Models
public string target_score5 { get; set; }
public string who_update { get; set; }
public string active_mode { get; set; }
}
}

View File

@@ -104,10 +104,16 @@ namespace TodoAPI2.Models
create_evaluation_detail_id = m_eva_evaluation_behavior_process2.create_evaluation_detail_id,
behavior = m_eva_evaluation_behavior_process2.behavior_fix,
weight = m_eva_evaluation_behavior_process2.weight,
score = m_eva_evaluation_behavior_process2.score,
sumary = m_eva_evaluation_behavior_process2.sumary,
score2 = m_eva_evaluation_behavior_process2.score2,
sumary2 = m_eva_evaluation_behavior_process2.sumary2,
score3 = m_eva_evaluation_behavior_process2.score3,
sumary3 = m_eva_evaluation_behavior_process2.sumary3,
score4 = m_eva_evaluation_behavior_process2.score4,
sumary4 = m_eva_evaluation_behavior_process2.sumary4,
target_score1 = m_eva_evaluation_behavior_process2.target_score1,
target_score2 = m_eva_evaluation_behavior_process2.target_score2,
target_score3 = m_eva_evaluation_behavior_process2.target_score3,
@@ -195,17 +201,36 @@ namespace TodoAPI2.Models
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_supervisor == "Y")
{
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
//if (current_detail.status_supervisor == "Y")
//{
// throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
//}
//existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
//existingEntity.behavior = i.behavior;
existingEntity.weight = i.weight;
//existingEntity.score = i.score;
existingEntity.score2 = i.score2;
existingEntity.sumary2 = i.sumary2;
if (i.who_update == "2")
{
existingEntity.score2 = i.score2;
existingEntity.sumary2 = i.sumary2;
existingEntity.score3 = i.score2;
existingEntity.sumary3 = i.sumary2;
}
else if (i.who_update == "3")
{
existingEntity.score3 = i.score2;
existingEntity.sumary3 = i.sumary2;
existingEntity.score4 = i.score2;
existingEntity.sumary4 = i.sumary2;
}
else if (i.who_update == "4")
{
existingEntity.score4 = i.score2;
existingEntity.sumary4 = i.sumary2;
}
existingEntity.target_score1 = i.target_score1;
existingEntity.target_score2 = i.target_score2;
existingEntity.target_score3 = i.target_score3;

View File

@@ -28,6 +28,14 @@ namespace TodoAPI2.Models
public decimal? sumary2 { get; set; }
public decimal? score3 { get; set; }
public decimal? sumary3 { get; set; }
public decimal? score4 { get; set; }
public decimal? sumary4 { get; set; }
public string target_score1 { get; set; }
public string target_score2 { get; set; }