ปรับปรุง 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

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

View File

@@ -106,10 +106,16 @@ namespace TodoAPI2.Models
weight = m_eva_evaluation_achievement_process2.weight,
thefile = m_eva_evaluation_achievement_process2.thefile,
thefileDisplay = m_eva_evaluation_achievement_process2.thefileDisplay,
score = m_eva_evaluation_achievement_process2.score,
sumary = m_eva_evaluation_achievement_process2.sumary,
score2 = m_eva_evaluation_achievement_process2.score2,
sumary2 = m_eva_evaluation_achievement_process2.sumary2,
score3 = m_eva_evaluation_achievement_process2.score3,
sumary3 = m_eva_evaluation_achievement_process2.sumary3,
score4 = m_eva_evaluation_achievement_process2.score4,
sumary4 = m_eva_evaluation_achievement_process2.sumary4,
target_score1 = m_eva_evaluation_achievement_process2.target_score1,
target_score2 = m_eva_evaluation_achievement_process2.target_score2,
target_score3 = m_eva_evaluation_achievement_process2.target_score3,
@@ -220,10 +226,10 @@ 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("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
//}
if (existingEntity != null)
{
@@ -249,8 +255,27 @@ namespace TodoAPI2.Models
}
//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

@@ -39,6 +39,12 @@ namespace TodoAPI2.Models
public decimal? score2 { get; set; }
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; }