ปรับปรุงหน้าจอ ประวัติการแก้ไข
This commit is contained in:
@@ -162,7 +162,7 @@ namespace TodoAPI2.Models
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
private void add_history(DateTime? dt, string action, int? action_user_id, int? detail_id)
|
||||
private void add_history(DateTime? dt, string action, int? action_user_id, int? detail_id, int? group)
|
||||
{
|
||||
int? newkey = 0;
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace TodoAPI2.Models
|
||||
n.action_dt = dt;
|
||||
n.action_emp_id = action_user_id;
|
||||
n.evaluation_detail_id = detail_id;
|
||||
n.history_group = group;
|
||||
_repository.Context.Add(n);
|
||||
}
|
||||
|
||||
@@ -225,7 +226,7 @@ namespace TodoAPI2.Models
|
||||
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);
|
||||
add_history(DateTime.Now, "ส่งข้อตกลงการประเมิน", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "backB")
|
||||
{
|
||||
@@ -234,7 +235,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = existingEntity.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);
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "nextB")
|
||||
{
|
||||
@@ -248,7 +249,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
}
|
||||
need_noti = false;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id);
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "next0")
|
||||
{
|
||||
@@ -260,7 +261,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id2 = owner_eva_employee_id;
|
||||
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
|
||||
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ส่งแบบประเมิน", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ส่งแบบประเมิน", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next1")
|
||||
{
|
||||
@@ -279,9 +280,9 @@ namespace TodoAPI2.Models
|
||||
existingEntity.status_chief_click_date = DateTime.Now;
|
||||
existingEntity.status_self_click_date = null;
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_message = "แบบประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ โดยผู้ประเมิน", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ โดยผู้ประเมิน", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next2")
|
||||
{
|
||||
@@ -291,7 +292,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id2 = owner_eva_employee_id;
|
||||
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
|
||||
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ผู้ประเมินสูงสุด อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้ประเมินสูงสุด อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back2")
|
||||
{
|
||||
@@ -300,7 +301,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมิน ถูกตีกลับ โดยผู้ประเมินสูงสุด", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมิน ถูกตีกลับ โดยผู้ประเมินสูงสุด", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next3")
|
||||
{
|
||||
@@ -310,7 +311,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id2 = owner_eva_employee_id;
|
||||
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
|
||||
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back3")
|
||||
{
|
||||
@@ -319,7 +320,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next4")
|
||||
{
|
||||
@@ -328,7 +329,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id2 = owner_eva_employee_id;
|
||||
noti_message2 = "แบบประเมินของ {0} ได้รับการประเมินเรียบร้อยแล้ว";
|
||||
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด) อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด) อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back4")
|
||||
{
|
||||
@@ -337,7 +338,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.supervisor1_id;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
|
||||
if (need_noti)
|
||||
|
||||
Reference in New Issue
Block a user