รวม code ที่แก้ไขทั้งหมดในทุกจุด
This commit is contained in:
@@ -213,6 +213,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||
|
||||
status_self_click_date = m_eva_create_evaluation_detail_agreement.status_self_click_date,
|
||||
status_chief_click_date = m_eva_create_evaluation_detail_agreement.status_chief_click_date,
|
||||
status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date,
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_agreement.isActive,
|
||||
Created = m_eva_create_evaluation_detail_agreement.created,
|
||||
Updated = m_eva_create_evaluation_detail_agreement.updated
|
||||
|
||||
@@ -50,5 +50,29 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string remark_hrm_work_record { get; set; }
|
||||
|
||||
public DateTime? status_self_click_date { get; set; }
|
||||
public DateTime? status_chief_click_date { get; set; }
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
|
||||
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date); } }
|
||||
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date); } }
|
||||
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } }
|
||||
|
||||
private string getStatusText(string s)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
{
|
||||
if (s == "Y")
|
||||
{
|
||||
return "ส่งแบบประเมินแล้ว <br/>";
|
||||
}
|
||||
else if (s == "N")
|
||||
{
|
||||
return "ตีกลับ <br/>";
|
||||
}
|
||||
}
|
||||
return " ";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -79,11 +79,11 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
if(s=="Y")
|
||||
{
|
||||
return "ส่งแบบประเมินแล้ว ";
|
||||
return "ส่งแบบประเมินแล้ว <br/>";
|
||||
}
|
||||
else if (s == "N")
|
||||
{
|
||||
return "ตีกลับ ";
|
||||
return "ตีกลับ <br/>";
|
||||
}
|
||||
}
|
||||
return " ";
|
||||
|
||||
@@ -73,7 +73,6 @@ namespace TodoAPI2.Models
|
||||
var i = new eva_create_evaluation_detail_review01WithSelectionViewModel();
|
||||
i.item_supervisor1_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.supervisor1A = model.supervisor1A;
|
||||
existingEntity.supervisor1A_result = model.supervisor1A_result;
|
||||
existingEntity.supervisor1A_remark = model.supervisor1A_remark;
|
||||
existingEntity.supervisor1A_date = model.supervisor1A_date;
|
||||
existingEntity.supervisor1A_date = DateTime.Now;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.supervisor2A = model.supervisor2A;
|
||||
existingEntity.supervisor2A_result = model.supervisor2A_result;
|
||||
existingEntity.supervisor2A_remark = model.supervisor2A_remark;
|
||||
existingEntity.supervisor2A_date = model.supervisor2A_date;
|
||||
existingEntity.supervisor2A_date = DateTime.Now;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
|
||||
@@ -164,6 +164,14 @@ namespace TodoAPI2.Models
|
||||
existingEntity.score_chief = model.score_chief;
|
||||
existingEntity.level_score_chief = model.level_score_chief;
|
||||
|
||||
existingEntity.total_summary_supervisor = model.total_summary_chief;
|
||||
existingEntity.Final_summary_supervisor = model.Final_summary_chief;
|
||||
existingEntity.total_summary_competency_supervisor = model.total_summary_competency_chief;
|
||||
existingEntity.Final_summary_competency_supervisor = model.Final_summary_competency_chief;
|
||||
existingEntity.achievement_supervisor = model.achievement_chief;
|
||||
existingEntity.competency_supervisor = model.competency_chief;
|
||||
existingEntity.score_supervisor = model.score_chief;
|
||||
existingEntity.level_score_supervisor = model.level_score_chief;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
|
||||
@@ -219,17 +219,20 @@ namespace TodoAPI2.Models
|
||||
existingEntity.score = i.score;
|
||||
existingEntity.sumary = i.sumary;
|
||||
|
||||
if(current_eva.employee_id == current_detail.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
{
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
}
|
||||
//if(current_eva.employee_id == current_detail.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
//{
|
||||
// existingEntity.score2 = i.score;
|
||||
// existingEntity.sumary2 = i.sumary;
|
||||
//}
|
||||
//else // เป็นคนละคน (แต่ดึงค่า default ไปใส่ให้)
|
||||
//{
|
||||
// existingEntity.score2 = i.score;
|
||||
// existingEntity.sumary2 = i.sumary;
|
||||
//}
|
||||
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
|
||||
existingEntity.target_score1 = i.target_score1;
|
||||
existingEntity.target_score2 = i.target_score2;
|
||||
existingEntity.target_score3 = i.target_score3;
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
id = m_eva_evaluation_behavior_process.id,
|
||||
create_evaluation_detail_id = m_eva_evaluation_behavior_process.create_evaluation_detail_id,
|
||||
behavior = m_eva_evaluation_behavior_process.behavior,
|
||||
behavior = m_eva_evaluation_behavior_process.behavior_fix,
|
||||
weight = m_eva_evaluation_behavior_process.weight,
|
||||
score = m_eva_evaluation_behavior_process.score,
|
||||
sumary = m_eva_evaluation_behavior_process.sumary,
|
||||
@@ -212,17 +212,20 @@ namespace TodoAPI2.Models
|
||||
existingEntity.score = i.score;
|
||||
existingEntity.sumary = i.sumary;
|
||||
|
||||
if (current_eva.employee_id == current_detail.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
{
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
}
|
||||
//if (current_eva.employee_id == current_detail.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
//{
|
||||
// existingEntity.score2 = i.score;
|
||||
// existingEntity.sumary2 = i.sumary;
|
||||
//}
|
||||
//else // เป็นคนละคน (แต่ดึงค่า default ไปใส่ให้)
|
||||
//{
|
||||
// existingEntity.score2 = i.score;
|
||||
// existingEntity.sumary2 = i.sumary;
|
||||
//}
|
||||
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
|
||||
existingEntity.target_score1 = i.target_score1;
|
||||
existingEntity.target_score2 = i.target_score2;
|
||||
existingEntity.target_score3 = i.target_score3;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
id = m_eva_evaluation_behavior_process2.id,
|
||||
create_evaluation_detail_id = m_eva_evaluation_behavior_process2.create_evaluation_detail_id,
|
||||
behavior = m_eva_evaluation_behavior_process2.behavior,
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user