แก้ไข OP 3243, 3244
This commit is contained in:
@@ -183,6 +183,10 @@ namespace TodoAPI2.Models
|
|||||||
into eva_create_evaluationResult10
|
into eva_create_evaluationResult10
|
||||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
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
|
where 1==1
|
||||||
&& (m_eva_create_evaluation_detail_agreement.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
&& (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)
|
&& (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_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,
|
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,
|
isActive = m_eva_create_evaluation_detail_agreement.isActive,
|
||||||
Created = m_eva_create_evaluation_detail_agreement.created,
|
Created = m_eva_create_evaluation_detail_agreement.created,
|
||||||
Updated = m_eva_create_evaluation_detail_agreement.updated
|
Updated = m_eva_create_evaluation_detail_agreement.updated
|
||||||
@@ -226,6 +232,15 @@ namespace TodoAPI2.Models
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string checkNull(object i)
|
||||||
|
{
|
||||||
|
if (i != null)
|
||||||
|
{
|
||||||
|
return i.ToString();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string remark_hrm_work_record { get; set; }
|
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_self_click_date { get; set; }
|
||||||
public DateTime? status_chief_click_date { get; set; }
|
public DateTime? status_chief_click_date { get; set; }
|
||||||
public DateTime? status_supervisor_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)
|
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 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 = (
|
var data = (
|
||||||
from m_eva_create_evaluation_detail_process in _repository.Context.eva_create_evaluation_detail
|
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
|
into eva_create_evaluationResult10
|
||||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
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
|
where 1 == 1
|
||||||
&& (m_eva_create_evaluation_detail_process.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
&& (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)
|
&& (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_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,
|
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,
|
isActive = m_eva_create_evaluation_detail_process.isActive,
|
||||||
Created = m_eva_create_evaluation_detail_process.created,
|
Created = m_eva_create_evaluation_detail_process.created,
|
||||||
Updated = m_eva_create_evaluation_detail_process.updated
|
Updated = m_eva_create_evaluation_detail_process.updated
|
||||||
@@ -307,6 +313,15 @@ namespace TodoAPI2.Models
|
|||||||
return data;
|
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)
|
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";
|
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 remark_hrm_work_record { get; set; }
|
||||||
|
|
||||||
|
public string plan_round_year { get; set; }
|
||||||
|
|
||||||
public DateTime? status_self_click_date { get; set; }
|
public DateTime? status_self_click_date { get; set; }
|
||||||
public DateTime? status_chief_click_date { get; set; }
|
public DateTime? status_chief_click_date { get; set; }
|
||||||
public DateTime? status_supervisor_click_date { get; set; }
|
public DateTime? status_supervisor_click_date { get; set; }
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>เครื่องมือ</th>
|
<th>เครื่องมือ</th>
|
||||||
|
<th><label>รอบการประเมิน</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_agreement_employee_code'>รหัสพนักงาน</label></th>
|
<th><label id='h_eva_create_evaluation_detail_agreement_employee_code'>รหัสพนักงาน</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_agreement_employee_fullname'>ชื่อ-สกุล</label></th>
|
<th><label id='h_eva_create_evaluation_detail_agreement_employee_fullname'>ชื่อ-สกุล</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_agreement_employee_position'>ตำแหน่ง</label></th>
|
<th><label id='h_eva_create_evaluation_detail_agreement_employee_position'>ตำแหน่ง</label></th>
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>เครื่องมือ</th>
|
<th>เครื่องมือ</th>
|
||||||
|
<th><label>รอบการประเมิน</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_process_employee_code'>รหัสพนักงาน</label></th>
|
<th><label id='h_eva_create_evaluation_detail_process_employee_code'>รหัสพนักงาน</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_process_employee_fullname'>ชื่อ-สกุล</label></th>
|
<th><label id='h_eva_create_evaluation_detail_process_employee_fullname'>ชื่อ-สกุล</label></th>
|
||||||
<th><label id='h_eva_create_evaluation_detail_process_employee_position'>ตำแหน่ง</label></th>
|
<th><label id='h_eva_create_evaluation_detail_process_employee_position'>ตำแหน่ง</label></th>
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ console.log(result);
|
|||||||
"columns": [
|
"columns": [
|
||||||
{ "data": "id" },
|
{ "data": "id" },
|
||||||
|
|
||||||
|
{ "data": "plan_round_year" },
|
||||||
{ "data": "employee_code" },
|
{ "data": "employee_code" },
|
||||||
{ "data": "employee_fullname" },
|
{ "data": "employee_fullname" },
|
||||||
{ "data": "employee_position" },
|
{ "data": "employee_position" },
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
|
|||||||
var eva_create_evaluation_detail_processTableV;
|
var eva_create_evaluation_detail_processTableV;
|
||||||
|
|
||||||
var eva_create_evaluation_detail_process_setupTable = function (result) {
|
var eva_create_evaluation_detail_process_setupTable = function (result) {
|
||||||
var groupColumn = 5;
|
var groupColumn = 6;
|
||||||
|
|
||||||
tmp = '"';
|
tmp = '"';
|
||||||
eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({
|
eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({
|
||||||
@@ -191,6 +191,7 @@ var eva_create_evaluation_detail_process_setupTable = function (result) {
|
|||||||
"columns": [
|
"columns": [
|
||||||
{ "data": "id" },
|
{ "data": "id" },
|
||||||
|
|
||||||
|
{ "data": "plan_round_year" },
|
||||||
{ "data": "employee_code" },
|
{ "data": "employee_code" },
|
||||||
{ "data": "employee_fullname" },
|
{ "data": "employee_fullname" },
|
||||||
{ "data": "employee_position" },
|
{ "data": "employee_position" },
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ function CheckValidValueachievement(){
|
|||||||
var i = $(this).find("#rowCount").text();
|
var i = $(this).find("#rowCount").text();
|
||||||
var score = $("#eva_evaluation_achievement_process_score_" + i).val();
|
var score = $("#eva_evaluation_achievement_process_score_" + i).val();
|
||||||
if(score > 5) $("#eva_evaluation_achievement_process_score_" + i).val("");
|
if(score > 5) $("#eva_evaluation_achievement_process_score_" + i).val("");
|
||||||
if(score < 1) $("#eva_evaluation_achievement_process_score_" + i).val(1);
|
if(score < 1) $("#eva_evaluation_achievement_process_score_" + i).val("");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ function CheckValidValueachievement(){
|
|||||||
var i = $(this).find("#rowCount").text();
|
var i = $(this).find("#rowCount").text();
|
||||||
var score = $("#eva_evaluation_achievement_process2_score2_" + i).val();
|
var score = $("#eva_evaluation_achievement_process2_score2_" + i).val();
|
||||||
if(score > 5) $("#eva_evaluation_achievement_process2_score2_" + i).val("");
|
if(score > 5) $("#eva_evaluation_achievement_process2_score2_" + i).val("");
|
||||||
if(score < 1) $("#eva_evaluation_achievement_process2_score2_" + i).val(1);
|
if(score < 1) $("#eva_evaluation_achievement_process2_score2_" + i).val("");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ function CheckValidValuebehavior(){
|
|||||||
var i = $(this).find("#rowCount").text();
|
var i = $(this).find("#rowCount").text();
|
||||||
var score = $("#eva_evaluation_behavior_process_score_" + i).val();
|
var score = $("#eva_evaluation_behavior_process_score_" + i).val();
|
||||||
if(score > 5) $("#eva_evaluation_behavior_process_score_" + i).val("");
|
if(score > 5) $("#eva_evaluation_behavior_process_score_" + i).val("");
|
||||||
if(score < 1) $("#eva_evaluation_behavior_process_score_" + i).val(1);
|
if(score < 1) $("#eva_evaluation_behavior_process_score_" + i).val("");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ function CheckValidValuebehavior(){
|
|||||||
var i = $(this).find("#rowCount").text();
|
var i = $(this).find("#rowCount").text();
|
||||||
var score = $("#eva_evaluation_behavior_process2_score2_" + i).val();
|
var score = $("#eva_evaluation_behavior_process2_score2_" + i).val();
|
||||||
if(score > 5) $("#eva_evaluation_behavior_process2_score2_" + i).val("");
|
if(score > 5) $("#eva_evaluation_behavior_process2_score2_" + i).val("");
|
||||||
if(score < 1) $("#eva_evaluation_behavior_process2_score2_" + i).val(1);
|
if(score < 1) $("#eva_evaluation_behavior_process2_score2_" + i).val("");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user