ปรับปรุงรายงานแบบประเมิน และแก้ไข bug จากผล unit test
This commit is contained in:
@@ -174,15 +174,66 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
|
||||
existingEntity.total_summary_supervisor = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor = model.competency_supervisor;
|
||||
existingEntity.score_supervisor = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor = model.level_score_supervisor;
|
||||
//existingEntity.total_summary_supervisor = model.total_summary_supervisor;
|
||||
//existingEntity.Final_summary_supervisor = model.Final_summary_supervisor;
|
||||
//existingEntity.total_summary_competency_supervisor = model.total_summary_competency_supervisor;
|
||||
//existingEntity.Final_summary_competency_supervisor = model.Final_summary_competency_supervisor;
|
||||
//existingEntity.achievement_supervisor = model.achievement_supervisor;
|
||||
//existingEntity.competency_supervisor = model.competency_supervisor;
|
||||
//existingEntity.score_supervisor = model.score_supervisor;
|
||||
//existingEntity.level_score_supervisor = model.level_score_supervisor;
|
||||
|
||||
if (model.who_update == "2")
|
||||
{
|
||||
existingEntity.total_summary_supervisor = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor = model.competency_supervisor;
|
||||
existingEntity.score_supervisor = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor = model.level_score_supervisor;
|
||||
|
||||
existingEntity.total_summary_supervisor1A = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor1A = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor1A = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor1A = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor1A = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor1A = model.competency_supervisor;
|
||||
existingEntity.score_supervisor1A = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor1A = model.level_score_supervisor;
|
||||
}
|
||||
else if (model.who_update == "3")
|
||||
{
|
||||
existingEntity.total_summary_supervisor1A = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor1A = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor1A = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor1A = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor1A = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor1A = model.competency_supervisor;
|
||||
existingEntity.score_supervisor1A = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor1A = model.level_score_supervisor;
|
||||
|
||||
existingEntity.total_summary_supervisor2A = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor2A = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor2A = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor2A = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor2A = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor2A = model.competency_supervisor;
|
||||
existingEntity.score_supervisor2A = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor2A = model.level_score_supervisor;
|
||||
}
|
||||
else if (model.who_update == "4")
|
||||
{
|
||||
existingEntity.total_summary_supervisor2A = model.total_summary_supervisor;
|
||||
existingEntity.Final_summary_supervisor2A = model.Final_summary_supervisor;
|
||||
existingEntity.total_summary_competency_supervisor2A = model.total_summary_competency_supervisor;
|
||||
existingEntity.Final_summary_competency_supervisor2A = model.Final_summary_competency_supervisor;
|
||||
existingEntity.achievement_supervisor2A = model.achievement_supervisor;
|
||||
existingEntity.competency_supervisor2A = model.competency_supervisor;
|
||||
existingEntity.score_supervisor2A = model.score_supervisor;
|
||||
existingEntity.level_score_supervisor2A = model.level_score_supervisor;
|
||||
}
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
|
||||
Reference in New Issue
Block a user