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0=B8=82=E0=B8=B6=E0=B9=89=E0=B8=99=E0=B9=84=E0=B8=9B/?= =?UTF-8?q?=E0=B9=80=E0=B8=AB=E0=B8=99=E0=B8=B7=E0=B8=AD=E0=B9=84=E0=B8=9B?= =?UTF-8?q?=E0=B8=AD=E0=B8=B5=E0=B8=81=E0=B8=82=E0=B8=B1=E0=B9=89=E0=B8=99?= =?UTF-8?q?=20=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=B8=E0=B9=81=E0=B8=9A=E0=B8=9A=E0=B8=82=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B9=83=E0=B8=84=E0=B8=A3=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=A1?= =?UTF-8?q?=E0=B8=B1=E0=B8=99=E0=B9=84=E0=B8=94=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...reate_evaluation_detail_firstdocService.cs | 18 +++++----- ...create_evaluation_detail_processService.cs | 33 ++++++++++--------- .../external_employeeService.cs | 2 +- ..._create_evaluation_detail_process_d.cshtml | 2 +- ...create_evaluation_detail_process_d2.cshtml | 2 +- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs index f98ab71..475a73e 100644 --- a/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs +++ b/Models/eva_create_evaluation_detail_firstdoc/eva_create_evaluation_detail_firstdocService.cs @@ -143,9 +143,9 @@ namespace TodoAPI2.Models role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_agreement.chief, m_eva_create_evaluation_detail_agreement.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, + m_eva_create_evaluation_detail_agreement.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_agreement.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_agreement.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_agreement.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, m_eva_create_evaluation_detail_agreement.employee_id, m_eva_create_evaluation_detail_agreement.status_self_a, m_eva_create_evaluation_detail_agreement.status_chief_a @@ -326,9 +326,9 @@ namespace TodoAPI2.Models role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_agreement.chief, m_eva_create_evaluation_detail_agreement.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, + m_eva_create_evaluation_detail_agreement.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_agreement.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_agreement.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_agreement.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, m_eva_create_evaluation_detail_agreement.employee_id, m_eva_create_evaluation_detail_agreement.status_self_a, m_eva_create_evaluation_detail_agreement.status_chief_a), @@ -336,9 +336,9 @@ namespace TodoAPI2.Models role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_agreement.chief, m_eva_create_evaluation_detail_agreement.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, + m_eva_create_evaluation_detail_agreement.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_agreement.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_agreement.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_agreement.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_agreement.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, m_eva_create_evaluation_detail_agreement.employee_id, m_eva_create_evaluation_detail_agreement.status_self_a, m_eva_create_evaluation_detail_agreement.status_chief_a), diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs index d5faef1..6a3a797 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs @@ -164,15 +164,17 @@ namespace TodoAPI2.Models role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_process.chief, m_eva_create_evaluation_detail_process.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, path), + m_eva_create_evaluation_detail_process.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, + path), role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief, m_eva_create_evaluation_detail_process.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, path), + m_eva_create_evaluation_detail_process.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, + path), remark_hrm_work_record = fk_external_employee.remark_hrm_work_record + GetWorkTimeText(fk_external_employee.packing_date, end_date), @@ -274,9 +276,9 @@ namespace TodoAPI2.Models && emp_id.HasValue && ( (m_eva_create_evaluation_detail_process.chief.HasValue && emp_id == m_eva_create_evaluation_detail_process.chief) - || (fk_eva_create_evaluationResult10.employee_id.HasValue && emp_id == fk_eva_create_evaluationResult10.employee_id) - || (fk_eva_create_evaluationResult10.supervisor1_id.HasValue && emp_id == fk_eva_create_evaluationResult10.supervisor1_id) - || (fk_eva_create_evaluationResult10.supervisor2_id.HasValue && emp_id == fk_eva_create_evaluationResult10.supervisor2_id) + || (((m_eva_create_evaluation_detail_process.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id)).HasValue && emp_id == (m_eva_create_evaluation_detail_process.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id)) + || ((m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id).HasValue && emp_id == (m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id)) + || ((m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id).HasValue && emp_id == (m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id)) ) && (!model.employee_id.HasValue || m_eva_create_evaluation_detail_process.employee_id == model.employee_id) @@ -316,17 +318,18 @@ namespace TodoAPI2.Models role_code = getRoleCodeSearch(emp_id, m_eva_create_evaluation_detail_process.chief, m_eva_create_evaluation_detail_process.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, + m_eva_create_evaluation_detail_process.eva_employee_id.HasValue? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_process.supervisor1_id.HasValue? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, m_eva_create_evaluation_detail_process.status_chief ), role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief, m_eva_create_evaluation_detail_process.chief, - fk_eva_create_evaluationResult10.employee_id, - fk_eva_create_evaluationResult10.supervisor1_id, - fk_eva_create_evaluationResult10.supervisor2_id, path), + m_eva_create_evaluation_detail_process.eva_employee_id.HasValue ? m_eva_create_evaluation_detail_process.eva_employee_id : fk_eva_create_evaluationResult10.employee_id, + m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id, + m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id, + path), status_self_click_date = m_eva_create_evaluation_detail_process.status_self_click_date, status_chief_click_date = m_eva_create_evaluation_detail_process.status_chief_click_date, diff --git a/Models/external_employee/external_employeeService.cs b/Models/external_employee/external_employeeService.cs index 5219c26..69e88b2 100644 --- a/Models/external_employee/external_employeeService.cs +++ b/Models/external_employee/external_employeeService.cs @@ -262,7 +262,7 @@ left join public.mpp_position_numbers as mpn on he.position_no = mpn.id left join public.org_position_datas as opd on opd.position_id = mpn.position_id left join public.hrm_title_masters as htm on htm.id = he.prefix_card_name left join public.users as u on u.employee_id = he.employee_id -where he.workingstatus = 'สถานะปฏิบัติงาน' and he.deleted_at is null and mpn.deleted_at is null +where he.deleted_at is null and mpn.deleted_at is null and opd.deleted_at is null --and htm.deleted_at is null and u.id=@user_id; "; diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml index 82a40d3..e44a197 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d.cshtml @@ -142,7 +142,7 @@
- +
diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml index f5d4d09..f6c724b 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2.cshtml @@ -141,7 +141,7 @@
- +