แก้ไข OP 3243, 3244
This commit is contained in:
@@ -183,6 +183,10 @@ namespace TodoAPI2.Models
|
||||
into eva_create_evaluationResult10
|
||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
||||
|
||||
join fk_plan in _repository.Context.eva_performance_plan on fk_eva_create_evaluationResult10.performance_plan_id equals fk_plan.id
|
||||
into planResult
|
||||
from fk_planResult in planResult.DefaultIfEmpty()
|
||||
|
||||
where 1==1
|
||||
&& (m_eva_create_evaluation_detail_agreement.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
&& (fk_external_employee.department_id == model.org_id || !model.org_id.HasValue)
|
||||
@@ -217,6 +221,8 @@ namespace TodoAPI2.Models
|
||||
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,
|
||||
|
||||
plan_round_year = checkNull(fk_planResult.theTime) + "/" + checkNull(fk_planResult.fiscal_year),
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_agreement.isActive,
|
||||
Created = m_eva_create_evaluation_detail_agreement.created,
|
||||
Updated = m_eva_create_evaluation_detail_agreement.updated
|
||||
@@ -226,6 +232,15 @@ namespace TodoAPI2.Models
|
||||
return data;
|
||||
}
|
||||
|
||||
private string checkNull(object i)
|
||||
{
|
||||
if (i != null)
|
||||
{
|
||||
return i.ToString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string remark_hrm_work_record { get; set; }
|
||||
|
||||
public string plan_round_year { 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; }
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace TodoAPI2.Models
|
||||
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id, string path)
|
||||
{
|
||||
var allemp = emp.GetListByemployee_type(null, null);
|
||||
var all_org_id = from i in ext.GetAllChildInDep(model.org_id) select i.external_id;
|
||||
var all_org_id = from i in ext.GetAllChildInDep(model.org_id) select i.external_id;
|
||||
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_process in _repository.Context.eva_create_evaluation_detail
|
||||
@@ -230,6 +230,10 @@ namespace TodoAPI2.Models
|
||||
into eva_create_evaluationResult10
|
||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
||||
|
||||
join fk_plan in _repository.Context.eva_performance_plan on fk_eva_create_evaluationResult10.performance_plan_id equals fk_plan.id
|
||||
into planResult
|
||||
from fk_planResult in planResult.DefaultIfEmpty()
|
||||
|
||||
where 1 == 1
|
||||
&& (m_eva_create_evaluation_detail_process.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
&& (all_org_id.Contains(fk_external_employee.department_id) || !model.org_id.HasValue)
|
||||
@@ -298,6 +302,8 @@ namespace TodoAPI2.Models
|
||||
status_supervisor1A_click_date = m_eva_create_evaluation_detail_process.status_supervisor1A_click_date,
|
||||
status_supervisor2A_click_date = m_eva_create_evaluation_detail_process.status_supervisor2A_click_date,
|
||||
|
||||
plan_round_year = checkNull(fk_planResult.theTime)+"/"+checkNull(fk_planResult.fiscal_year),
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_process.isActive,
|
||||
Created = m_eva_create_evaluation_detail_process.created,
|
||||
Updated = m_eva_create_evaluation_detail_process.updated
|
||||
@@ -307,6 +313,15 @@ namespace TodoAPI2.Models
|
||||
return data;
|
||||
}
|
||||
|
||||
private string checkNull(object i)
|
||||
{
|
||||
if (i != null)
|
||||
{
|
||||
return i.ToString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private string getRoleCode(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string path)
|
||||
{
|
||||
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && path == "d2") return "2";
|
||||
|
||||
@@ -61,6 +61,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string remark_hrm_work_record { get; set; }
|
||||
|
||||
public string plan_round_year { 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; }
|
||||
|
||||
Reference in New Issue
Block a user