เพิ่มลำดับการกดส่งและตีกลับ ข้อตกลงการประเมิน
This commit is contained in:
@@ -74,9 +74,15 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? supervisor2_date { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_self_a { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_self { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_chief_a { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_chief { get; set; }
|
||||
|
||||
@@ -116,6 +122,10 @@ namespace TodoAPI2.Models
|
||||
// existingEntity.status_supervisor2A = model.status_supervisor2A;
|
||||
|
||||
public DateTime? status_self_click_date { get; set; }
|
||||
|
||||
public DateTime? status_self_a_click_date { get; set; }
|
||||
|
||||
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_supervisor1A_click_date { get; set; }
|
||||
|
||||
@@ -121,11 +121,19 @@ namespace TodoAPI2.Models
|
||||
search_employee_code = fk_external_employee.employee_no,
|
||||
search_employee_fullname = fk_external_employee.fullname,
|
||||
status_self = m_eva_create_evaluation_detail_agreement.status_self,
|
||||
status_self_a = m_eva_create_evaluation_detail_agreement.status_self_a,
|
||||
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,
|
||||
|
||||
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_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,
|
||||
|
||||
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record
|
||||
+ GetWorkTimeText(fk_external_employee.packing_date, endDate),
|
||||
|
||||
@@ -226,13 +234,17 @@ namespace TodoAPI2.Models
|
||||
search_employee_code = fk_external_employee.employee_no,
|
||||
search_employee_fullname = fk_external_employee.fullname,
|
||||
status_self = m_eva_create_evaluation_detail_agreement.status_self,
|
||||
status_self_a = m_eva_create_evaluation_detail_agreement.status_self_a,
|
||||
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,
|
||||
|
||||
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_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,
|
||||
|
||||
plan_round_year = checkNull(fk_planResult.theTime) + "/" + checkNull(fk_planResult.fiscal_year),
|
||||
|
||||
@@ -42,8 +42,12 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
public string status_self_a { get; set; }
|
||||
|
||||
public string status_self { get; set; }
|
||||
|
||||
public string status_chief_a { get; set; }
|
||||
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public string status_supervisor { get; set; }
|
||||
@@ -52,7 +56,11 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string plan_round_year { get; set; }
|
||||
|
||||
public DateTime? status_self_a_click_date { get; set; }
|
||||
|
||||
public DateTime? status_self_click_date { get; set; }
|
||||
|
||||
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; }
|
||||
|
||||
@@ -60,7 +68,12 @@ namespace TodoAPI2.Models
|
||||
|
||||
public decimal? score2 { get; set; }
|
||||
|
||||
public string txt_status_self_a { get { return getStatusText(status_self_a) + MyHelper.GetDateStringForReport(status_self_a_click_date); } }
|
||||
|
||||
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date); } }
|
||||
|
||||
public string txt_status_chief_a { get { return getStatusText(status_chief_a) + MyHelper.GetDateStringForReport(status_chief_a_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); } }
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public string status_self_a { get; set; }
|
||||
|
||||
public string status_chief_a { get; set; }
|
||||
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
public string status_supervisor1A { get; set; }
|
||||
|
||||
@@ -175,6 +175,8 @@ namespace TodoAPI2.Models
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
existingEntity.status_self = model.status_self;
|
||||
existingEntity.status_chief = model.status_chief;
|
||||
existingEntity.status_self_a = model.status_self_a;
|
||||
existingEntity.status_chief_a = model.status_chief_a;
|
||||
existingEntity.status_supervisor = model.status_supervisor;
|
||||
existingEntity.status_supervisor1A = model.status_supervisor1A;
|
||||
existingEntity.status_supervisor2A = model.status_supervisor2A;
|
||||
@@ -189,7 +191,35 @@ namespace TodoAPI2.Models
|
||||
string noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}";
|
||||
string noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + existingEntity.id.ToString();
|
||||
|
||||
if (model.status_mode == "next0")
|
||||
|
||||
if (model.status_mode == "nextA")
|
||||
{
|
||||
existingEntity.status_self_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
}
|
||||
else if (model.status_mode == "backB")
|
||||
{
|
||||
existingEntity.status_chief_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
|
||||
existingEntity.status_self_a_click_date = null;
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
}
|
||||
else if (model.status_mode == "nextB")
|
||||
{
|
||||
existingEntity.status_chief_a_click_date = MyHelper.RemoveTimeFromDate(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;
|
||||
}
|
||||
}
|
||||
else if (model.status_mode == "next0")
|
||||
{
|
||||
existingEntity.status_self_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
@@ -293,7 +323,7 @@ values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','A
|
||||
List<NpgsqlParameter> para = new List<NpgsqlParameter>();
|
||||
para.Add(data);
|
||||
|
||||
db.ExecuteNonQueryNpgsql(sql, para);
|
||||
//db.ExecuteNonQueryNpgsql(sql, para);
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_statusInputModel> model)
|
||||
@@ -308,6 +338,8 @@ values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','A
|
||||
existingEntity.create_evaluation_id = i.create_evaluation_id;
|
||||
existingEntity.status_self = i.status_self;
|
||||
existingEntity.status_chief = i.status_chief;
|
||||
existingEntity.status_self_a = i.status_self_a;
|
||||
existingEntity.status_chief_a = i.status_chief_a;
|
||||
existingEntity.status_supervisor = i.status_supervisor;
|
||||
existingEntity.status_supervisor1A = i.status_supervisor1A;
|
||||
existingEntity.status_supervisor2A = i.status_supervisor2A;
|
||||
|
||||
@@ -20,6 +20,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string status_chief { get; set; }
|
||||
|
||||
public string status_self_a { get; set; }
|
||||
|
||||
public string status_chief_a { get; set; }
|
||||
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
public string status_supervisor1A { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user