Add flow agreement
This commit is contained in:
@@ -91,6 +91,9 @@ namespace TodoAPI2.Models
|
||||
[MaxLength(1)]
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_supervisor_a { get; set; }
|
||||
|
||||
public int? supervisor1A { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
@@ -130,6 +133,7 @@ namespace TodoAPI2.Models
|
||||
public DateTime? status_chief_a_click_date { get; set; }
|
||||
public DateTime? status_chief_click_date { get; set; }
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
public DateTime? status_supervisor_a_click_date { get; set; }
|
||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace TodoAPI2.Models
|
||||
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
||||
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
||||
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
||||
status_supervisor_a = null,
|
||||
|
||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||
|
||||
@@ -136,6 +137,7 @@ namespace TodoAPI2.Models
|
||||
status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date,
|
||||
status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date,
|
||||
status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date,
|
||||
status_supervisor_a_click_date = null,
|
||||
|
||||
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record
|
||||
+ GetWorkTimeText(fk_external_employee.packing_date, endDate),
|
||||
|
||||
@@ -52,6 +52,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
public string status_supervisor_a { get; set; }
|
||||
|
||||
public string remark_hrm_work_record { get; set; }
|
||||
|
||||
public string plan_round_year { get; set; }
|
||||
@@ -63,6 +65,7 @@ namespace TodoAPI2.Models
|
||||
public DateTime? status_chief_a_click_date { get; set; }
|
||||
public DateTime? status_chief_click_date { get; set; }
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
public DateTime? status_supervisor_a_click_date { get; set; }
|
||||
|
||||
public decimal? score1 { get; set; }
|
||||
|
||||
@@ -77,6 +80,8 @@ namespace TodoAPI2.Models
|
||||
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date) + " " + MyHelper.GetTimeStringFromDate(status_chief_click_date) + getHistoryLink(status_chief); } }
|
||||
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_click_date) + getHistoryLink(status_supervisor); } }
|
||||
|
||||
public string txt_status_supervisor_a { get { return getStatusText(status_supervisor_a) + MyHelper.GetDateStringForReport(status_supervisor_a_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_a_click_date) + getHistoryLink(status_supervisor_a); } }
|
||||
|
||||
public string role_desc { get; set; }
|
||||
|
||||
public string role_code { get; set; }
|
||||
|
||||
@@ -240,16 +240,26 @@ namespace TodoAPI2.Models
|
||||
else if (model.status_mode == "nextB")
|
||||
{
|
||||
existingEntity.status_chief_a_click_date = DateTime.Now;
|
||||
if (current_eva.employee_id == existingEntity.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
{
|
||||
noti_to_employee_id = current_eva.supervisor1_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
}
|
||||
need_noti = false;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id, 1);
|
||||
existingEntity.status_supervisor_a_click_date = null;
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ส่งข้อตกลงการประเมิน", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "backC")
|
||||
{
|
||||
existingEntity.status_supervisor_a_click_date = DateTime.Now;
|
||||
existingEntity.status_chief_a_click_date = null;
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "nextC")
|
||||
{
|
||||
existingEntity.status_supervisor_a_click_date = DateTime.Now;
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", current_eva.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "next0")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user