From 8d1bc4cc34e5b4e31a8c3b5ed2768d9e7f8e6b39 Mon Sep 17 00:00:00 2001 From: "LAPTOP-KB8JC2K2\\acer" Date: Sun, 11 Apr 2021 12:27:33 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B8=E0=B8=87=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=88?= =?UTF-8?q?=E0=B8=B1=E0=B8=94=E0=B8=A5=E0=B8=B3=E0=B8=94=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=A5=E0=B8=B3?= =?UTF-8?q?=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B8=AD=E0=B8=B1=E0=B8=95=E0=B9=82?= =?UTF-8?q?=E0=B8=99=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eva_create_evaluation_detailService.cs | 10 ++++++++-- .../eva_evaluation_operating_agreementService.cs | 14 ++++++++++++++ .../eva_limit_frame_employeeService.cs | 5 +++++ .../eva_create_evaluation_detail_firstdoc_d.cshtml | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Models/eva_create_evaluation_detail/eva_create_evaluation_detailService.cs b/Models/eva_create_evaluation_detail/eva_create_evaluation_detailService.cs index 581379e..a8ae210 100644 --- a/Models/eva_create_evaluation_detail/eva_create_evaluation_detailService.cs +++ b/Models/eva_create_evaluation_detail/eva_create_evaluation_detailService.cs @@ -130,7 +130,8 @@ namespace TodoAPI2.Models into external_linkageResult25 from fk_external_linkageResult25 in external_linkageResult25.DefaultIfEmpty() - join sort_dep in ext.GetSortingDep() on fk_external_linkageResult2.department_id equals sort_dep.id + join sort_dep in ext.GetSortingDep() on + (m_eva_create_evaluation_detail.help_org_id.HasValue ? m_eva_create_evaluation_detail.help_org_id : fk_external_linkageResult2.department_id) equals sort_dep.id into sort_depResult2 from fk_sort_depResult2 in sort_depResult2.DefaultIfEmpty() @@ -138,11 +139,16 @@ namespace TodoAPI2.Models into external_linkageResult46 from fk_external_linkageResult46 in external_linkageResult46.DefaultIfEmpty() + join fk_external_linkage99 in ext.GetDepartmentData() on (m_eva_create_evaluation_detail.help_org_id.HasValue ? m_eva_create_evaluation_detail.help_org_id : fk_external_linkageResult2.department_id) equals fk_external_linkage99.id + into external_linkageResult99 + from fk_external_linkageResult99 in external_linkageResult99.DefaultIfEmpty() + where 1 == 1 && (m_eva_create_evaluation_detail.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue) orderby fk_sort_depResult2.external_code, + (m_eva_create_evaluation_detail.help_org_id.HasValue ? 1 : 0), //fk_external_linkageResult2.department_degree_id, //fk_external_linkageResult2.department_code, fk_external_linkageResult2.hpt_position_type_id, @@ -211,7 +217,7 @@ namespace TodoAPI2.Models status_supervisor1A_click_date = m_eva_create_evaluation_detail.status_supervisor1A_click_date, status_supervisor2A_click_date = m_eva_create_evaluation_detail.status_supervisor2A_click_date, - department_name = fk_external_linkageResult2.department_name, + department_name = fk_external_linkageResult99.external_name, help_org_id_external_linkage_external_name = fk_external_linkageResult46.external_name, isActive = m_eva_create_evaluation_detail.isActive, diff --git a/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementService.cs b/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementService.cs index 41959bf..f4363a5 100644 --- a/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementService.cs +++ b/Models/eva_evaluation_operating_agreement/eva_evaluation_operating_agreementService.cs @@ -157,6 +157,20 @@ namespace TodoAPI2.Models var entity = GetEntity(model); entity.id = GetNewPrimaryKey(); + if (!model.mission_no.HasValue) + { + var max_mission = (from i in _repository.Context.eva_evaluation_operating_agreement + where i.create_evaluation_detail_id == model.create_evaluation_detail_id + select i.mission_no).Max(); + if (max_mission.HasValue) + { + entity.mission_no = max_mission + 1; + } + else + { + entity.mission_no = 1; + } + } entity.SetAutoField(_repository.Context); diff --git a/Models/eva_limit_frame_employee/eva_limit_frame_employeeService.cs b/Models/eva_limit_frame_employee/eva_limit_frame_employeeService.cs index 795cd7d..1a32bed 100644 --- a/Models/eva_limit_frame_employee/eva_limit_frame_employeeService.cs +++ b/Models/eva_limit_frame_employee/eva_limit_frame_employeeService.cs @@ -132,6 +132,11 @@ namespace TodoAPI2.Models into external_linkageResult11 from fk_external_linkageResult11 in external_linkageResult11.DefaultIfEmpty() + join sort_dep in ext.GetSortingDep() on + (m_eva_limit_frame_employee.help_org_id.HasValue ? m_eva_limit_frame_employee.help_org_id : fk_external_linkageResult2.department_id) equals sort_dep.id + into sort_depResult2 + from fk_sort_depResult2 in sort_depResult2.DefaultIfEmpty() + where 1 == 1 && (!model.frame_group_guid.HasValue || m_eva_limit_frame_employee.frame_group_guid == model.frame_group_guid) diff --git a/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml b/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml index f3f31a2..93d67e8 100644 --- a/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml +++ b/Views/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d.cshtml @@ -48,7 +48,7 @@
- +