From 72ac6d9cc9919ac5560100370e1b92bba8a9ab73 Mon Sep 17 00:00:00 2001 From: Nakorn Rientrakrunchai Date: Thu, 20 Aug 2020 21:11:56 +0700 Subject: [PATCH] =?UTF-8?q?Change=20Request/Feature=20OP=20=E0=B9=80?= =?UTF-8?q?=E0=B8=A5=E0=B8=82=E0=B8=97=E0=B8=B5=E0=B9=88=203217,=203200,?= =?UTF-8?q?=203216,=203219=20=E0=B8=94=E0=B8=B3=E0=B9=80=E0=B8=99=E0=B8=B4?= =?UTF-8?q?=E0=B8=99=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=81=E0=B8=A5=E0=B9=89?= =?UTF-8?q?=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...@eva_create_evaluation_detail_process.xlsx | Bin 11037 -> 10847 bytes .../eva_create_evaluationService.cs | 4 +- ...ate_evaluation_detail_processInputModel.cs | 2 + ...te_evaluation_detail_processSearchModel.cs | 4 +- ...create_evaluation_detail_processService.cs | 5 +- ...on_detail_processWithSelectionViewModel.cs | 2 + .../eva_evaluation_behavior_processService.cs | 2 +- ...eva_evaluation_behavior_process2Service.cs | 2 +- .../Iexternal_employeeService.cs | 1 + .../external_employeeService.cs | 138 ++++++++++++++++++ ...va_create_evaluation_detail_process.cshtml | 12 +- appsettings.Development.json | 8 +- .../eva_create_evaluation_detail_process.js | 4 +- 13 files changed, 170 insertions(+), 14 deletions(-) diff --git a/EXCEL/eva_create_evaluation_detail@eva_create_evaluation_detail_process.xlsx b/EXCEL/eva_create_evaluation_detail@eva_create_evaluation_detail_process.xlsx index 304c55fb28190080b6e433ba8f8d35221f092727..4d36c655d8aec74a4042f7e7283ce1e8ce335148 100644 GIT binary patch delta 4449 zcmZ8lWmFVe*Pa0ekVZE!F{DHP)ERcmVJJ0U_Dp|zr98Tsw#yNh=j7lpftsA!+*Fj9?kmCL|cGBIYimNDTD z)jZ)7$10&{?}eeixQ#0S<}&| z@L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Item() { - var all_emp = emp.GetListByemployee_type(null, null); + var all_emp = emp.GetAllEmployee(); var i = new eva_create_evaluationWithSelectionViewModel(); i.item_performance_plan_id = (from x in _repository.Context.eva_performance_plan select x).ToList(); diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processInputModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processInputModel.cs index e842238..e5b1c89 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processInputModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processInputModel.cs @@ -42,6 +42,8 @@ namespace TodoAPI2.Models public string search_employee_fullname { get; set; } + public int? employee_id { get; set; } + public string active_mode { get; set; } } } diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processSearchModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processSearchModel.cs index 817d523..780d1d1 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processSearchModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processSearchModel.cs @@ -21,7 +21,9 @@ namespace TodoAPI2.Models public string search_employee_code { get; set; } public string search_employee_fullname { get; set; } - + + public int? employee_id { get; set; } + public string path { get; set; } } } 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 9f347f3..d13a1ad 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 @@ -170,13 +170,15 @@ namespace TodoAPI2.Models item.item_level_score = (from i in _repository.Context.eva_level_score orderby i.min_score select Mapper.Map(i)).ToList(); - + item.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList(); + return item; } public eva_create_evaluation_detail_processWithSelectionViewModel GetBlankItem() { var i = new eva_create_evaluation_detail_processWithSelectionViewModel(); i.item_org_id = ext.GetDepartmentData(); + i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) select x).ToList(); //i.item_level_score = (from j in _repository.Context.eva_level_score // orderby j.min_score // select Mapper.Map(i)).ToList(); @@ -240,6 +242,7 @@ namespace TodoAPI2.Models || (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) ) + && (!model.employee_id.HasValue || m_eva_create_evaluation_detail_process.employee_id == model.employee_id) orderby fk_sort_depResult2.external_code, diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs index bcfcfdb..f287c02 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs @@ -11,6 +11,8 @@ namespace TodoAPI2.Models public List item_level_score { get; set; } + public List item_employee_id { get; set; } + public decimal? create_evaluation_score1 { get; set; } public decimal? create_evaluation_score2 { get; set; } diff --git a/Models/eva_evaluation_behavior_process/eva_evaluation_behavior_processService.cs b/Models/eva_evaluation_behavior_process/eva_evaluation_behavior_processService.cs index 9f3e258..20e8e78 100644 --- a/Models/eva_evaluation_behavior_process/eva_evaluation_behavior_processService.cs +++ b/Models/eva_evaluation_behavior_process/eva_evaluation_behavior_processService.cs @@ -100,7 +100,7 @@ namespace TodoAPI2.Models && (m_eva_evaluation_behavior_process.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue) - orderby m_eva_evaluation_behavior_process.behavior + orderby m_eva_evaluation_behavior_process.behavior_fix select new eva_evaluation_behavior_processViewModel() { id = m_eva_evaluation_behavior_process.id, diff --git a/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs b/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs index f49e850..fff63a2 100644 --- a/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs +++ b/Models/eva_evaluation_behavior_process2/eva_evaluation_behavior_process2Service.cs @@ -97,7 +97,7 @@ namespace TodoAPI2.Models && (m_eva_evaluation_behavior_process2.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue) - orderby m_eva_evaluation_behavior_process2.behavior + orderby m_eva_evaluation_behavior_process2.behavior_fix select new eva_evaluation_behavior_process2ViewModel() { id = m_eva_evaluation_behavior_process2.id, diff --git a/Models/external_employee/Iexternal_employeeService.cs b/Models/external_employee/Iexternal_employeeService.cs index f2bc176..3e56aae 100644 --- a/Models/external_employee/Iexternal_employeeService.cs +++ b/Models/external_employee/Iexternal_employeeService.cs @@ -18,6 +18,7 @@ namespace TodoAPI2.Models external_employeeWithSelectionViewModel GetBlankItem(); employee_leaveViewModel GetLeaveOfEmployee(int employee_id, DateTime? start_date, DateTime? end_date); + List GetAllEmployee(); } } diff --git a/Models/external_employee/external_employeeService.cs b/Models/external_employee/external_employeeService.cs index 165926c..a56df1f 100644 --- a/Models/external_employee/external_employeeService.cs +++ b/Models/external_employee/external_employeeService.cs @@ -202,6 +202,144 @@ order by he.firstname, he.lastname; return result; } + public List GetAllEmployee() + { + var sql = string.Format(@" +select he.employee_id as id, mpn.position_number,he.employee_no,he.position_no, +CONCAT(htm.title_name,' ',he.firstname,' ',he.lastname) as fullname,opd.position_name, +CONCAT(he.firstname,he.lastname) as halfname, +orgdata.id as department_id,orgdata.department_name,orgdata.department_code,he.salary, +he.employee_type_id, het.employee_type_name,opd.position_id as position_id, +u.email as user_email, u.id as user_id,hpl.position_level_name, + +he.position_level_id, +he.position_type_id, +hpl.position_level_id as hpl_position_level_id, +hpt.position_type_id as hpt_position_type_id, +he.position_allowance, +he.other_money, + +hpt.position_type_name,he.packing_date,he.cost_of_living, +(CASE WHEN (SELECT hrm_work_rec.id FROM hrm_working_records as hrm_work_rec + WHERE hrm_work_rec.employee_id = he.employee_id + AND hrm_work_rec.start_date <= now() + AND hrm_work_rec.end_date >= now() + AND hrm_work_rec.deleted_at IS null + LIMIT 1) IS NOT null THEN 'ช่วยปฎิบัติหน้าที่' +ELSE null END) as remark_hrm_work_record, + +org_type_depart.department_degree_id + +from public.hrm_employees as he +left join public.hrm_position_types as hpt on he.position_type_id=hpt.id +left join public.hrm_position_levels as hpl on he.position_level_id = hpl.id +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.{0}DepartmentData{0} as orgdata on orgdata.id = he.department_id +left join public.hrm_employee_types as het on het.id = he.employee_type_id +left join public.users as u on u.employee_id = he.employee_id +left join public.org_type_departments as org_type_depart on orgdata.department_type_id = org_type_depart.id +left join public.org_type_department_colors as org_depart_color on org_type_depart.department_degree_id = org_depart_color.id +where he.deleted_at is null +and hpt.deleted_at is null +and hpl.deleted_at is null +and mpn.deleted_at is null +and opd.deleted_at is null +and htm.deleted_at is null +and orgdata.deleted_at is null +and het.deleted_at is null +and u.deleted_at is null +and org_type_depart.deleted_at is null +and org_depart_color.deleted_at is null +order by he.firstname, he.lastname; +", '"'.ToString()); + var para = db.GetParameterListNpgsql(); + DataTable dt = db.ExecuteDataTableNpgsql(sql, para); + var result = new List(); + foreach (DataRow dr in dt.Rows) + { + var i = new external_employeeViewModel(); + i.id = Convert.ToInt32(dr["id"]); + i.position_number = dr["position_number"].ToString(); + i.position_name = dr["position_name"].ToString(); + i.fullname = dr["fullname"].ToString(); + i.halfname = dr["halfname"].ToString(); + if (dr["employee_type_id"] != DBNull.Value) + { + i.employee_type_id = Convert.ToInt32(dr["employee_type_id"]); + i.employee_type_name = dr["employee_type_name"].ToString(); + } + + if (dr["position_type_id"] != DBNull.Value) + { + i.position_type_id = Convert.ToInt32(dr["position_type_id"]); + i.position_type_name = dr["position_type_name"].ToString(); + i.hpt_position_type_id = Convert.ToInt32(dr["hpt_position_type_id"]); + } + + if (dr["position_id"] != DBNull.Value) + { + i.position_id = Convert.ToInt32(dr["position_id"]); + } + + if (dr["user_id"] != DBNull.Value) + { + i.user_email = dr["user_email"].ToString(); + i.user_id = Convert.ToInt32(dr["user_id"]); + } + if (dr["department_id"] != DBNull.Value) + { + i.department_id = Convert.ToInt32(dr["department_id"]); + i.department_name = dr["department_name"].ToString(); + i.department_code = dr["department_code"].ToString(); + } + if (dr["employee_no"] != DBNull.Value) + { + i.employee_no = dr["employee_no"].ToString(); + } + if (dr["position_level_id"] != DBNull.Value) + { + i.position_level_id = Convert.ToInt32(dr["position_level_id"]); + i.position_level_text = dr["position_level_name"].ToString(); + i.hpl_position_level_id = Convert.ToInt32(dr["hpl_position_level_id"]); + } + i.salary = 0; + if (dr["salary"] != DBNull.Value) + { + i.salary = Convert.ToDecimal(dr["salary"]); + } + i.cost_of_living = 0; + if (dr["cost_of_living"] != DBNull.Value) + { + i.cost_of_living = Convert.ToDecimal(dr["cost_of_living"]); + } + if (dr["position_allowance"] != DBNull.Value) + { + i.position_allowance = Convert.ToDecimal(dr["position_allowance"]); + } + if (dr["other_money"] != DBNull.Value) + { + i.other_money = Convert.ToDecimal(dr["other_money"]); + } + if (dr["packing_date"] != DBNull.Value) + { + i.packing_date = Convert.ToDateTime(dr["packing_date"]); + } + if (dr["department_degree_id"] != DBNull.Value) + { + i.department_degree_id = Convert.ToInt32(dr["department_degree_id"]); + } + if (dr["remark_hrm_work_record"] != DBNull.Value) + { + i.remark_hrm_work_record = dr["remark_hrm_work_record"].ToString(); + } + + result.Add(i); + } + return result; + } + public external_employeeViewModel GetEmployeeForLogin(int? user_id) { var sql = @" diff --git a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process.cshtml b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process.cshtml index 304ac8b..032bf65 100644 --- a/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process.cshtml +++ b/Views/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process.cshtml @@ -26,17 +26,22 @@
-
+
-
+
+ + +
+ + -
+ @@ -77,6 +82,7 @@ eva_create_evaluation_detail_process_InitialForm(); SetupValidationRemark("eva_create_evaluation_detail_process"); $("#s_eva_create_evaluation_detail_process_org_id").select2(); + $("#s_eva_create_evaluation_detail_process_employee_id").select2(); }); } diff --git a/appsettings.Development.json b/appsettings.Development.json index 19b10be..002ec5a 100644 --- a/appsettings.Development.json +++ b/appsettings.Development.json @@ -1,9 +1,9 @@ { "connectionStrings": { - //"mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;", - //"externalDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;" - "mainDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;", - "externalDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;" + "mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;", + "externalDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;" + //"mainDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;", + //"externalDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;" }, "IdentityServer": { "url": "", diff --git a/wwwroot/js/eva_create_evaluation_detail_process/eva_create_evaluation_detail_process.js b/wwwroot/js/eva_create_evaluation_detail_process/eva_create_evaluation_detail_process.js index f50e8e5..84d3c2a 100644 --- a/wwwroot/js/eva_create_evaluation_detail_process/eva_create_evaluation_detail_process.js +++ b/wwwroot/js/eva_create_evaluation_detail_process/eva_create_evaluation_detail_process.js @@ -9,6 +9,7 @@ eva_create_evaluation_detail_processSearchObject.create_evaluation_id = $("#s_ev eva_create_evaluation_detail_processSearchObject.org_id = $("#s_eva_create_evaluation_detail_process_org_id").val(); eva_create_evaluation_detail_processSearchObject.search_employee_code = $("#s_eva_create_evaluation_detail_process_search_employee_code").val(); eva_create_evaluation_detail_processSearchObject.search_employee_fullname = $("#s_eva_create_evaluation_detail_process_search_employee_fullname").val(); +eva_create_evaluation_detail_processSearchObject.employee_id = $("#s_eva_create_evaluation_detail_process_employee_id").val(); eva_create_evaluation_detail_processSearchObject.path = "d"; @@ -20,7 +21,8 @@ $("#s_eva_create_evaluation_detail_process_create_evaluation_id").val(data.creat DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_detail_process_org_id"), data, "id", "external_name", "item_org_id", data.org_id); $("#s_eva_create_evaluation_detail_process_search_employee_code").val(data.search_employee_code); $("#s_eva_create_evaluation_detail_process_search_employee_fullname").val(data.search_employee_fullname); - +DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_detail_process_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id); +console.log(data.item_employee_id); } //================= Form Data Customizaiton =========================================