ส่ง code แก้ไข OP Change Request 18 ข้อ

This commit is contained in:
Nakorn Rientrakrunchai
2020-05-24 00:33:22 +07:00
parent 017a29c136
commit eea05beb69
81 changed files with 1047 additions and 312 deletions

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -304,7 +304,7 @@ namespace TodoAPI2.Controllers
catch (Exception ex)
{
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
return StatusCode(500, $"Exception while delete {id.ToString()}. {ex.Message}");
return StatusCode(500, $"ไม่สามารถลบข้อมูลได้ เพราะข้อมูลถูกใช้ในส่วนงานอื่น");
}
}

View File

@@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Logging;
using TTSW.Controllers;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
using TodoAPI2.Models;
using System.Data;
using Microsoft.Extensions.Configuration;
using System.IO;
using System.Net;
namespace TodoAPI2.Controllers
{
//[Authorize]
[Produces("application/json")]
[Route("api/rep_leave_total_02")]
public class rep_leave_total_02Controller : BaseController
{
#region Private Variables
private ILogger<rep_leave_total_02Controller> _logger;
private Irep_leave_total_02Service _repository;
private IConfiguration Configuration { get; set; }
#endregion
#region Properties
#endregion
/// <summary>
/// Default constructure for dependency injection
/// </summary>
/// <param name="repository"></param>
/// <param name="configuration"></param>
/// <param name="logger"></param>
public rep_leave_total_02Controller(ILogger<rep_leave_total_02Controller> logger, Irep_leave_total_02Service repository, IConfiguration configuration)
{
_logger = logger;
_repository = repository;
Configuration = configuration;
}
/// <summary>
/// Get Blank Item
/// </summary>
/// <remarks>
/// </remarks>
/// <returns>Return a blank item</returns>
/// <response code="200">Returns the item</response>
/// <response code="500">Error Occurred</response>
[HttpGet("GetBlankItem")]
[ProducesResponseType(typeof(rep_leave_total_02WithSelectionViewModel), 200)]
[ProducesResponseType(400)]
[ProducesResponseType(500)]
//[ValidateAntiForgeryToken]
public IActionResult GetBlankItem()
{
try
{
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
var result = _repository.GetBlankItem();
return Ok(result);
}
catch (Exception ex)
{
_logger.LogCritical($"Exception in IActionResult GetBlankItem.", ex);
return StatusCode(500, $"{ex.Message}");
}
}
/// <summary>
/// Download Report
/// </summary>
/// <remarks>
/// </remarks>
/// <returns>Return list of items by specifced keyword</returns>
/// <response code="200">Returns the item</response>
/// <response code="500">Error Occurred</response>
[HttpGet("rep_leave_total_02_report")]
[ProducesResponseType(typeof(FileStreamResult), 200)]
[ProducesResponseType(400)]
[ProducesResponseType(500)]
//[ValidateAntiForgeryToken]
public IActionResult rep_leave_total_02_report(rep_leave_total_02ReportRequestModel model)
{
try
{
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
var httpclient = new WebClient();
var env_mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
var env_reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
var env_username = Environment.GetEnvironmentVariable("JasperReportServer_username");
var env_password = Environment.GetEnvironmentVariable("JasperReportServer_password");
string mainurl = !string.IsNullOrEmpty(env_mainurl) ? env_mainurl : Configuration["JasperReportServer:MainURL"];
string reportsite = !string.IsNullOrEmpty(env_reportsite) ? env_reportsite : Configuration["JasperReportServer:reportsite"];
string username = !string.IsNullOrEmpty(env_username) ? env_username : Configuration["JasperReportServer:username"];
string password = !string.IsNullOrEmpty(env_password) ? env_password : Configuration["JasperReportServer:password"];
string url = $"{mainurl}{reportsite}/rep_leave_total_02.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
var data = httpclient.DownloadData(url);
var stream = new MemoryStream(data);
return File(stream, model.contentType);
}
catch (Exception ex)
{
_logger.LogCritical($"Exception while GetReport.", ex);
return StatusCode(500, $"{ex.Message}");
}
}
}
}

Binary file not shown.

View File

@@ -110,7 +110,16 @@ namespace TodoAPI2.Models
&& (m_eva_adjust_postponement_detail_normal_02.adjust_postponement_id == model.adjust_postponement_id || !model.adjust_postponement_id.HasValue)
&& fk_create_detailResult.employee_id == m_eva_adjust_postponement_detail_normal_02.employee_id
orderby fk_external_linkageResult2.department_name, fk_external_linkageResult2.fullname
orderby
// 1. ให้แสดงรายชื่อพนักงานตามลำดับก่อน-หลัง ของประเภทหน่วยงานที่กำหนดให้กับหน่วยงาน (ตรวจสอบจากฟิลด์ลำดับที่ของประเภทหน่วยงาน(department_degree_id) จากน้อยไปมาก)
fk_external_linkageResult2.department_degree_id,
// กรณีที่มีรายชื่อหน่วยงานที่อยู่ระดับเดียวกันมากกว่า 1 หน่วยงาน ให้จัดเรียงข้อมูลตามลำดับประเภทหน่วยงานก่อน และตามด้วยลำดับที่ของหน่วยงาน จากตารางกำหนดหน่วยงาน ฟิลด์ ลำดับ(department_code) จากน้อยไปมาก
// 2. แสดงรายชื่อพนักงานที่อยู่ในหน่วยงานย่อยตามโครงสร้างองค์กรและจัดเรียงหน่วยงานย่อยโดยจัดเรียงตามลำดับ(department_code) จากน้อยไปมาก โดยจัดกลุ่มแสดงรายชื่อพนักงานเป็นหน่วยงาน
fk_external_linkageResult2.department_code,
// 3.การแสดงรายชื่อพนักงานในแต่ละหน่วยงาน ให้ระบบจัดเรียงรายชื่อพนักงานตามระดับตำแหน่ง โดยเรียงจากน้อยไปมาก ตรวจสอบลำดับระดับตำแหน่ง ได้จาก ฟิลด์ “ลำดับ” (position_level_id)
fk_external_linkageResult2.position_level_id,
// 4. กรณีที่ ในหน่วยนั้นๆ มีระดับตำแหน่งเหมือนกันมากกว่า 1 คน ให้ระบบจัดเรียงรายชื่อพนักงานตามรหัสพนักงานตรวจได้จากฟิลด์ “รหัสพนักงาน”( employee_no) จากน้อยไปมาก
fk_external_linkageResult2.employee_no
select new eva_adjust_postponement_detail_normal_02ViewModel()
{
id = m_eva_adjust_postponement_detail_normal_02.id,

View File

@@ -114,7 +114,10 @@ namespace TodoAPI2.Models
&& (m_eva_adjust_postponement_detail_quota_02.adjust_postponement_quota_id == model.adjust_postponement_quota_id || !model.adjust_postponement_quota_id.HasValue)
&& (fk_create_detailResult.employee_id == m_eva_adjust_postponement_detail_quota_02.employee_id || fk_create_detailResult == null)
orderby fk_external_linkageResult2.department_name, fk_external_linkageResult2.fullname
orderby fk_external_linkageResult2.department_degree_id,
fk_external_linkageResult2.department_code,
fk_external_linkageResult2.position_level_id,
fk_external_linkageResult2.employee_no
select new eva_adjust_postponement_detail_quota_02ViewModel()
{
id = m_eva_adjust_postponement_detail_quota_02.id,

View File

@@ -144,7 +144,7 @@ namespace TodoAPI2.Models
supervisor1_id = m_eva_create_evaluation.supervisor1_id,
supervisor2_id = m_eva_create_evaluation.supervisor2_id,
performance_plan_id_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.fiscal_year,
performance_plan_id_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.display_text,
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
evaluation_group_id_eva_evaluation_group_code = fk_eva_evaluation_groupResult5.code,
evaluation_group_id_eva_evaluation_group_name = fk_eva_evaluation_groupResult5.thegroup,

View File

@@ -28,7 +28,7 @@ namespace TodoAPI2.Models
public int? supervisor2_id { get; set; }
public int? performance_plan_id_eva_performance_plan_fiscal_year { get; set; }
public string performance_plan_id_eva_performance_plan_fiscal_year { get; set; }
public string employee_id_external_linkage_external_name { get; set; }
public string evaluation_group_id_eva_evaluation_group_code { get; set; }
@@ -42,9 +42,7 @@ namespace TodoAPI2.Models
{
string y = "";
if (performance_plan_id_eva_performance_plan_fiscal_year.HasValue) y = performance_plan_id_eva_performance_plan_fiscal_year.ToString();
return evaluation_group_id_eva_evaluation_group_name + " ปี " +y;
return evaluation_group_id_eva_evaluation_group_name + " " + performance_plan_id_eva_performance_plan_fiscal_year;
}
}
}

View File

@@ -114,12 +114,11 @@ namespace TodoAPI2.Models
join fk_external_linkage25 in ext.GetAgreeDisagree() on m_eva_create_evaluation_detail.supervisor2_result equals fk_external_linkage25.external_code
into external_linkageResult25
from fk_external_linkageResult25 in external_linkageResult25.DefaultIfEmpty()
where 1 ==1
&& (m_eva_create_evaluation_detail.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
orderby m_eva_create_evaluation_detail.created descending
orderby fk_external_linkageResult2.department_code, fk_external_linkageResult2.position_level_id
select new eva_create_evaluation_detailViewModel()
{
id = m_eva_create_evaluation_detail.id,
@@ -165,6 +164,13 @@ namespace TodoAPI2.Models
position_level_text = fk_external_linkageResult2.position_level_text,
position_type_text = fk_external_linkageResult2.position_type_name,
employee_no = fk_external_linkageResult2.employee_no,
position_number = fk_external_linkageResult2.position_number,
position_name = fk_external_linkageResult2.position_name,
remark = null,
department_name = fk_external_linkageResult2.department_name,
isActive = m_eva_create_evaluation_detail.isActive,
Created = m_eva_create_evaluation_detail.created,
Updated = m_eva_create_evaluation_detail.updated

View File

@@ -89,5 +89,13 @@ namespace TodoAPI2.Models
public string position_type_text { get; set; }
public string position_level_text { get; set; }
public string employee_no { get; set; }
public string position_number { get; set; }
public string position_name { get; set; }
public string remark { get; set; }
public string department_name { get; set; }
}
}

View File

@@ -82,7 +82,7 @@ namespace TodoAPI2.Models
select new eva_create_evaluation_detail_agreementWithSelectionViewModel()
{
id = m_eva_create_evaluation_detail_agreement.id,
evaluation_round = fk_eva_create_evaluationResult10.eva_performance_plan.theTime.ToString(),
evaluation_round = fk_eva_create_evaluationResult10.eva_performance_plan.display_text,
employee_code = fk_external_employee.employee_no,
employee_fullname = fk_external_employee.fullname,
employee_position = fk_external_employee.position_name,
@@ -101,6 +101,8 @@ namespace TodoAPI2.Models
org_id_external_linkage_external_name = fk_external_employee.department_name,
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record,
isActive = m_eva_create_evaluation_detail_agreement.isActive,
Created = m_eva_create_evaluation_detail_agreement.created,
Updated = m_eva_create_evaluation_detail_agreement.updated

View File

@@ -48,5 +48,7 @@ namespace TodoAPI2.Models
public string status_supervisor { get; set; }
public string remark_hrm_work_record { get; set; }
}
}

View File

@@ -81,7 +81,7 @@ namespace TodoAPI2.Models
select new eva_create_evaluation_detail_processWithSelectionViewModel()
{
id = m_eva_create_evaluation_detail_process.id,
evaluation_round = fk_eva_create_evaluationResult10.eva_performance_plan.theTime.ToString(),
evaluation_round = fk_eva_create_evaluationResult10.eva_performance_plan.display_text,
employee_code = fk_external_employee.employee_no,
employee_fullname = fk_external_employee.fullname,
employee_position = fk_external_employee.position_name,
@@ -120,6 +120,8 @@ namespace TodoAPI2.Models
fk_eva_create_evaluationResult10.supervisor1_id,
fk_eva_create_evaluationResult10.supervisor2_id),
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record,
isActive = m_eva_create_evaluation_detail_process.isActive,
Created = m_eva_create_evaluation_detail_process.created,
Updated = m_eva_create_evaluation_detail_process.updated
@@ -188,7 +190,10 @@ namespace TodoAPI2.Models
|| (fk_eva_create_evaluationResult10.supervisor2_id.HasValue && emp_id == fk_eva_create_evaluationResult10.supervisor2_id)
)
orderby m_eva_create_evaluation_detail_process.created descending
orderby fk_external_employee.department_degree_id,
fk_external_employee.department_code,
fk_external_employee.position_level_id,
fk_external_employee.employee_no
select new eva_create_evaluation_detail_processViewModel()
{
id = m_eva_create_evaluation_detail_process.id,

View File

@@ -58,6 +58,8 @@ namespace TodoAPI2.Models
public string role_desc { get; set; }
public string role_code { get; set; }
public string remark_hrm_work_record { get; set; }
}
}

View File

@@ -92,37 +92,10 @@ namespace TodoAPI2.Models
public List<eva_evaluation_group_detailViewModel> GetListByevaluation_group_id(Guid? evaluation_group_id)
{
var data = (
from m_eva_evaluation_group_detail in _repository.Context.eva_evaluation_group_detail
eva_evaluation_group_detailSearchModel model = new eva_evaluation_group_detailSearchModel();
model.evaluation_group_id = evaluation_group_id;
join fk_eva_evaluation_group1 in _repository.Context.eva_evaluation_group on m_eva_evaluation_group_detail.evaluation_group_id equals fk_eva_evaluation_group1.id
into eva_evaluation_groupResult1
from fk_eva_evaluation_groupResult1 in eva_evaluation_groupResult1.DefaultIfEmpty()
join fk_external_employee in external_employee.GetListByemployee_type(null, null) on m_eva_evaluation_group_detail.employee_id equals fk_external_employee.id
into external_employeeResult
from fk_external_employeeResult in external_employeeResult.DefaultIfEmpty()
where m_eva_evaluation_group_detail.evaluation_group_id == evaluation_group_id || !evaluation_group_id.HasValue
orderby m_eva_evaluation_group_detail.created descending
select new eva_evaluation_group_detailViewModel()
{
id = m_eva_evaluation_group_detail.id,
evaluation_group_id = m_eva_evaluation_group_detail.evaluation_group_id,
employee_id = m_eva_evaluation_group_detail.employee_id,
evaluation_group_id_eva_evaluation_group_code = fk_eva_evaluation_groupResult1.code,
position_number = fk_external_employeeResult.position_number,
position_name = fk_external_employeeResult.position_name,
fullname = fk_external_employeeResult.fullname,
isActive = m_eva_evaluation_group_detail.isActive,
Created = m_eva_evaluation_group_detail.created,
Updated = m_eva_evaluation_group_detail.updated
}
).ToList();
var data = GetListBySearch(model);
return data;
}
@@ -143,8 +116,11 @@ namespace TodoAPI2.Models
where 1==1
&& (m_eva_evaluation_group_detail.evaluation_group_id == model.evaluation_group_id || !model.evaluation_group_id.HasValue)
orderby m_eva_evaluation_group_detail.created descending
orderby
fk_external_employeeResult.department_degree_id,
fk_external_employeeResult.department_code,
fk_external_employeeResult.position_level_id,
fk_external_employeeResult.employee_no
select new eva_evaluation_group_detailViewModel()
{
id = m_eva_evaluation_group_detail.id,
@@ -157,6 +133,10 @@ namespace TodoAPI2.Models
position_name = fk_external_employeeResult.position_name,
fullname = fk_external_employeeResult.fullname,
department_name = fk_external_employeeResult.department_name,
position_level_text = fk_external_employeeResult.position_level_text,
employee_no = fk_external_employeeResult.employee_no,
isActive = m_eva_evaluation_group_detail.isActive,
Created = m_eva_evaluation_group_detail.created,
Updated = m_eva_evaluation_group_detail.updated

View File

@@ -26,5 +26,9 @@ namespace TodoAPI2.Models
public string fullname { get; set; }
public string department_name { get; set; }
public string position_level_text { get; set; }
public string employee_no { get; set; }
}
}
}

View File

@@ -19,6 +19,20 @@ namespace TodoAPI2.Models
public int? theTime { get; set; }
[NotMapped]
public string display_text
{
get
{
if(!theTime.HasValue || !fiscal_year.HasValue)
{
return "";
}
else
{
return theTime.ToString() + "/" + fiscal_year.ToString();
}
}
}
}
}

View File

@@ -72,7 +72,18 @@ 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,hpt.position_type_name,he.packing_date
he.position_type_id,hpt.position_type_name,he.packing_date,
(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
@@ -82,9 +93,21 @@ 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
where he.workingstatus = 'สถานะปฏิบัติงาน' and he.deleted_at is null and mpn.deleted_at is null
and opd.deleted_at is null --and htm.deleted_at is null
order by he.firstname,he.lastname;
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
and he.workingstatus = 'สถานะปฏิบัติงาน'
order by he.firstname, he.lastname;
", '"'.ToString());
var para = db.GetParameterListNpgsql();
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
@@ -143,6 +166,14 @@ order by he.firstname,he.lastname;
{
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);
}

View File

@@ -28,37 +28,27 @@ namespace TodoAPI2.Models
public class external_employeeViewModel
{
public int id { get; set; }
public string position_number { get; set; }
public string position_name { get; set; }
public string fullname { get; set; }
public string halfname { get; set; }
public int? employee_type_id { get; set; }
public int? position_id { get; set; }
public int? position_type_id { get; set; }
public string position_type_name { get; set; }
public string user_email { get; set; }
public int? user_id { get; set; }
public int? department_id { get; set; }
public string department_name { get; set; }
public string department_code { get; set; }
public decimal? salary { get; set; }
public string employee_type_name { get; set; }
public string employee_no { get; set; }
public int? position_level_id { get; set; }
public string position_level_text { get; set; }
public DateTime? packing_date { get; set; }
public int? department_degree_id { get; set; }
public string remark_hrm_work_record { get; set; }
public int? worked_month // ทำงานมาแล้วกี่เดือน
{

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
using TodoAPI2.Models;
namespace TodoAPI2.Models
{
public interface Irep_leave_total_02Service
{
rep_leave_total_02WithSelectionViewModel GetBlankItem();
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
namespace TodoAPI2.Models
{
public class rep_leave_total_02InputModel
{
public Guid? id { get; set; }
public string employee_id { get; set; }
public int? org_id { get; set; }
public DateTime? start_date { get; set; }
public DateTime? end_date { get; set; }
public string active_mode { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
namespace TodoAPI2.Models
{
public class rep_leave_total_02ReportRequestModel : rep_leave_total_02SearchModel
{
public string filetype { get; set; }
public string contentType { get { return MyHelper.GetContentType(filetype); } }
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
namespace TodoAPI2.Models
{
public class rep_leave_total_02SearchModel
{
public Guid id { get; set; }
public string employee_id { get; set; }
public int? org_id { get; set; }
public DateTime? start_date { get; set; }
public string start_date_text { get { return MyHelper.GetDateStringForReport(this.start_date); } }
public DateTime? end_date { get; set; }
public string end_date_text { get { return MyHelper.GetDateStringForReport(this.end_date); } }
}
}

View File

@@ -0,0 +1,46 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
using TodoAPI2.Models;
using System.IO;
using System.Web;
using System.Net;
using TTSW.Configure;
using Microsoft.Extensions.Options;
using System.Data;
namespace TodoAPI2.Models
{
public class rep_leave_total_02Service : Irep_leave_total_02Service
{
private IBaseRepository<eva_level_scoreEntity, Guid> _repository;
private IMyDatabase db;
private Iexternal_linkageService ext;
private Iexternal_employeeService emp;
public rep_leave_total_02Service(IBaseRepository<eva_level_scoreEntity, Guid> repository,
IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
{
_repository = repository;
db = mydb;
ext = inext;
emp = inemp;
}
public rep_leave_total_02WithSelectionViewModel GetBlankItem()
{
var i = new rep_leave_total_02WithSelectionViewModel();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) orderby x.fullname select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
return i;
}
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using TTSW.EF;
using TTSW.Utils;
using TTSW.Constant;
using TTSW.Common;
namespace TodoAPI2.Models
{
public class rep_leave_total_02ViewModel : BaseViewModel2<Guid>
{
public string employee_id { get; set; }
public int? org_id { get; set; }
public DateTime? start_date { get; set; }
public string txt_start_date { get { return MyHelper.GetDateStringForReport(this.start_date); } }
public DateTime? end_date { get; set; }
public string txt_end_date { get { return MyHelper.GetDateStringForReport(this.end_date); } }
public string employee_id_external_linkage_external_name { get; set; }
public string org_id_external_linkage_external_name { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TodoAPI2.Models
{
public class rep_leave_total_02WithSelectionViewModel: rep_leave_total_02ViewModel
{
public List<external_employeeViewModel> item_employee_id { get; set; }
public List<external_linkageViewModel> item_org_id { get; set; }
}
}

View File

@@ -294,6 +294,8 @@ namespace Test01
services.AddScoped<Ieva_idp_plan_ownerService, eva_idp_plan_ownerService>();
services.AddScoped<Irep_leave_total_02Service, rep_leave_total_02Service>();
#endregion
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
@@ -505,6 +507,10 @@ namespace Test01
cfg.CreateMap<eva_idp_planEntity, eva_idp_plan_ownerViewModel>();
cfg.CreateMap<eva_idp_planEntity, eva_idp_plan_ownerWithSelectionViewModel>();
cfg.CreateMap<rep_leave_total_02InputModel, eva_level_scoreEntity>();
cfg.CreateMap<eva_level_scoreEntity, rep_leave_total_02ViewModel>();
cfg.CreateMap<eva_level_scoreEntity, rep_leave_total_02WithSelectionViewModel>();
});
#endregion

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using TodoAPI2.Models;
using STAFF_API.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Configuration;
using TodoAPI2.Controllers;
namespace TodoAPI2.Controllers
{
public class rep_leave_total_02ViewController : Controller
{
private ILogger<rep_leave_total_02Controller> _logger;
private Irep_leave_total_02Service _repository;
private IConfiguration Configuration { get; set; }
/// <summary>
/// Default constructure for dependency injection
/// </summary>
/// <param name="repository"></param>
/// <param name="configuration"></param>
/// <param name="logger"></param>
public rep_leave_total_02ViewController(ILogger<rep_leave_total_02Controller> logger, Irep_leave_total_02Service repository, IConfiguration configuration)
{
_logger = logger;
_repository = repository;
Configuration = configuration;
}
// public IActionResult rep_leave_total_02()
// {
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
// return View();
// }
// public IActionResult rep_leave_total_02_d()
// {
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
// return View();
// }
public IActionResult rep_leave_total_02_report()
{
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
return View();
}
//public IActionResult rep_leave_total_02_inline()
//{
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
// return View();
//}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}

View File

@@ -67,7 +67,7 @@
<div class="step active ">
<!---->
<div class="content">
<div class="title">กำหนดผู้รับการประเมินและผู้ประเมินเลื่อนเงินเดือน</div>
<div class="title">สร้างแบบประเมิน</div>
<!---->
</div>
</div><div class="step">
@@ -83,7 +83,7 @@
</div>
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>กำหนดผู้รับการประเมินและผู้ประเมินเลื่อนเงินเดือน</div>
<div class="title col-md-12"><div class="line"></div>สร้างแบบประเมิน</div>
<section class="card no-border">

View File

@@ -29,7 +29,7 @@
<div class="step">
<!---->
<div class="content">
<div class="title">กำหนดผู้รับการประเมินและผู้ประเมินเลื่อนเงินเดือน</div>
<div class="title">สร้างแบบประเมิน</div>
<!---->
</div>
</div><div class="step active ">
@@ -106,17 +106,27 @@
<section class="wrapper">
<div class="title"><div class="line"></div>รายชื่อผู้รับการประเมิน</div>
<div class="tools">
<div class="row">
<div class="col-md-6">
<button class="btn btn-info" onclick="javascript:eva_create_evaluation_detail_SelectAll();">เลือก ทั้งหมด</button>
<button class="btn btn-info" onclick="javascript:eva_create_evaluation_detail_DeselectAll();">ไม่เลือก ทั้งหมด</button>
</div>
</div>
</div>
<table id="eva_create_evaluation_detailTable" class="display table table-bordered table-striped">
<thead>
<tr>
<th><label id='h_eva_create_evaluation_detail_employee_id'>ผู้รับการประเมิน</label></th>
<th><label id='h_eva_create_evaluation_detail_chief'>ผู้ประเมิน </label></th>
<th><label>สถานะการส่งแบบประเมิน<br />(ผู้รับการประเมิน)</label></th>
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมิน)</label></th>
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมินสูงสุด)</label></th>
<th><label>สถานะตรวจสอบ<br />(ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง)</label></th>
<th><label>สถานะตรวจสอบ<br />(ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด))</label></th>
<th>เลือก</th>
<th><label>รหัสพนักงาน</label></th>
<th><label>ผู้รับการประเมิน</label></th>
<th><label>ประเภทตำแหน่ง</label></th>
<th><label>ตำแหน่ง</label></th>
<th><label>ระดับตำแหน่ง</label></th>
<th><label>หมายเหตุ</label></th>
<th><label>ผู้ประเมิน</label></th>
<th><label>หน่วยงาน</label></th>
</tr>
</thead>
<tbody></tbody>
@@ -130,6 +140,9 @@
<div class="row">
<div class="col-md-3">
<button class="btn btn-info" onclick="javascript:go_back();">กลับ</button>
<button class="btn btn-info" onclick="javascript:eva_create_evaluation_detail_GetSelect('id');">พิมพ์แบบประเมิน</button>
</div>
</div>

View File

@@ -28,7 +28,7 @@
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_evaluation_behavior_weight" for="eva_evaluation_behavior_weight">น้ำหนัก</label>
<input disabled class="form-control" type="number" id="eva_evaluation_behavior_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_behavior" />
<input onchange="OnWeightChanged(this);" class="form-control" type="number" id="eva_evaluation_behavior_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_behavior" />
</div>
</div>
<div class='row' style="display:none;">
@@ -90,7 +90,7 @@
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_evaluation_achievement_weight" for="eva_evaluation_achievement_weight">น้ำหนัก</label>
<input class="form-control" type="number" id="eva_evaluation_achievement_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_achievement" />
<input onchange="OnWeightChanged(this);" class="form-control" type="number" id="eva_evaluation_achievement_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_achievement" />
</div>
<div class="form-group col-md-4">
@@ -105,7 +105,7 @@
<input type="hidden" id="eva_evaluation_achievement_thefile_hidURL" iLabel="แนบไฟล์" iRequire="false" iGroup="eva_evaluation_achievement" />
</div>
</div>
<div class='row'>
<div style="display:none;" class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_evaluation_achievement_target_score1" for="eva_evaluation_achievement_target_score1">คะแนนตามค่าระดับเป้าหมาย1</label>
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score1" iLabel="คะแนนตามค่าระดับเป้าหมาย1" iRequire="false" iGroup="eva_evaluation_achievement" />
@@ -121,7 +121,7 @@
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score3" iLabel="คะแนนตามค่าระดับเป้าหมาย3" iRequire="false" iGroup="eva_evaluation_achievement" />
</div>
</div>
<div class='row'>
<div style="display:none;" class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_evaluation_achievement_target_score4" for="eva_evaluation_achievement_target_score4">คะแนนตามค่าระดับเป้าหมาย4</label>
<input class="form-control" type="text" id="eva_evaluation_achievement_target_score4" iLabel="คะแนนตามค่าระดับเป้าหมาย4" iRequire="false" iGroup="eva_evaluation_achievement" />
@@ -221,55 +221,37 @@
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_agreement_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_agreement_create_evaluation_id" />
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_evaluation_round" for="eva_create_evaluation_detail_agreement_evaluation_round">รอบการประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_evaluation_round" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_code" for="eva_create_evaluation_detail_agreement_employee_code">รหัสพนักงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_code" />
</div>
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_agreement_chief_fullname" />
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_agreement_chief_position" />
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_fullname" for="eva_create_evaluation_detail_agreement_employee_fullname">ชื่อ-สกุล</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_fullname" />
</div>
<table width="100%">
<tr>
<td style="font-weight:800;">รอบการประเมิน</td>
<td><span id="eva_create_evaluation_detail_agreement_evaluation_round" /></td>
<td style="font-weight:800;">รหัสพนักงาน</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_code" /></td>
</tr>
<tr>
<td style="font-weight:800;">ชื่อ-ชื่อสกุล</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_fullname" /></td>
<td style="font-weight:800;">ประเภทตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_position_type" /></td>
</tr>
<tr>
<td style="font-weight:800;">ตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_position" /></td>
<td style="font-weight:800;">ระดับตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_position_level" /></td>
</tr>
<tr>
<td style="font-weight:800;">หน่วยงาน</td>
<td><span id="eva_create_evaluation_detail_agreement_employee_org" /></td>
<td style="font-weight:800;">หมายเหตุ</td>
<td><span id="remark_hrm_work_record" /></td>
</tr>
</table>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_position_type" for="eva_create_evaluation_detail_agreement_employee_position_type">ประเภทตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position_type" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_position" for="eva_create_evaluation_detail_agreement_employee_position">ตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_position_level" for="eva_create_evaluation_detail_agreement_employee_position_level">ระดับตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position_level" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_employee_org" for="eva_create_evaluation_detail_agreement_employee_org">หน่วยงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_org" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_chief_fullname" for="eva_create_evaluation_detail_agreement_chief_fullname">ชื่อผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_chief_fullname" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_agreement_chief_position" for="eva_create_evaluation_detail_agreement_chief_position">ตำแหน่งผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_agreement_chief_position" />
</div>
</div>
</div>
</div>
</div>
@@ -293,7 +275,7 @@
<input class="form-control" type="hidden" id="s_eva_evaluation_achievement_create_evaluation_detail_id" />
<div class="col-md-3">
<button class="btn btn-info" onclick="javascript:eva_evaluation_achievement_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
<button class="btn btn-info status_self" onclick="javascript:eva_evaluation_achievement_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
</div>
</div>
@@ -305,11 +287,11 @@
<th>เครื่องมือ</th>
<th><label id='h_eva_evaluation_achievement_achievement'>ผลสัมฤทธิ์ตัวชี้วัดผลงาน</label></th>
<th><label id='h_eva_evaluation_achievement_weight'>น้ำหนัก</label></th>
<th><label id='h_eva_evaluation_achievement_target_score1'>1</label></th>
<th><label id='h_eva_evaluation_achievement_target_score2'>2</label></th>
<th><label id='h_eva_evaluation_achievement_target_score3'>3</label></th>
<th><label id='h_eva_evaluation_achievement_target_score4'>4</label></th>
<th><label id='h_eva_evaluation_achievement_target_score5'>5</label></th>
<th style="display:none;"><label id='h_eva_evaluation_achievement_target_score1'>1</label></th>
<th style="display:none;"><label id='h_eva_evaluation_achievement_target_score2'>2</label></th>
<th style="display:none;"><label id='h_eva_evaluation_achievement_target_score3'>3</label></th>
<th style="display:none;"><label id='h_eva_evaluation_achievement_target_score4'>4</label></th>
<th style="display:none;"><label id='h_eva_evaluation_achievement_target_score5'>5</label></th>
<th><label id='h_eva_evaluation_achievement_thefile'>เอกสารแนบ</label></th>
</tr>
</thead>
@@ -319,11 +301,11 @@
<th>&nbsp;</th>
<th>&nbsp;</th>
<th><p id="sum_a"></p></th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th style="display:none;">&nbsp;</th>
<th style="display:none;">&nbsp;</th>
<th style="display:none;">&nbsp;</th>
<th style="display:none;">&nbsp;</th>
<th style="display:none;">&nbsp;</th>
<th>&nbsp;</th>
</tr>
</tfoot>
@@ -340,6 +322,7 @@
<tr>
<th>เครื่องมือ</th>
<th><label id='h_eva_evaluation_behavior_behavior'>พฤติกรรมการปฏิบัติงาน</label></th>
<th><label id='h_eva_evaluation_achievement_weight'>น้ำหนัก</label></th>
</tr>
</thead>
<tbody></tbody>
@@ -357,7 +340,7 @@
<input class="form-control" type="hidden" id="s_eva_idp_plan_owner_create_evaluation_detail_id" />
<div class="col-md-3">
<button class="btn btn-info" onclick="javascript:eva_idp_plan_owner_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
<button class="btn btn-info status_self" onclick="javascript:eva_idp_plan_owner_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
</div>
</div>
@@ -381,7 +364,7 @@
<br />
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>ส่งข้อตกลงการประเมิน</div>
<div class="title col-md-12"><div class="line"></div>ส่งข้อตกลงการประเมิน <span id="status" style="color:red;"></span></div>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_create_evaluation_id" />
@@ -391,8 +374,8 @@
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next0')">ส่งข้อตกลงการประเมิน</button>
<button type="button" class="btn btn-submit" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
<button type="button" class="btn btn-submit status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next0')">ส่งข้อตกลงการประเมิน</button>
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
</div>
</div>
@@ -406,6 +389,9 @@
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js"></script>
<script src="~/js/eva_idp_plan_owner/eva_idp_plan_owner.js"></script>
<script>
var status_self = "";
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
@@ -425,7 +411,34 @@
SetupValidationRemark("eva_evaluation_achievement");
SetupValidationRemark("eva_evaluation_behavior");
SetupValidationRemark("eva_idp_plan_owner");
setTimeout(CheckPermission, 1000);
});
function CheckPermission(){
if(status_self === "Y"){
$(".status_self").hide();
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
}
}
function OnWeightChanged(c){
if($(c).val() < 0){
$(c).val(0)
}
if($(c).val() > 100){
$(c).val(100)
}
}
function CheckWeightBeforeSubmitStatus(){
if(parseInt($("#sum_a").text()) !== 100){
return false;
}else{
return true;
}
}
</script>
}

View File

@@ -31,56 +31,37 @@
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_employee_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_create_evaluation_id" />
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_process_chief_fullname" />
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_process_chief_position" />
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_evaluation_round" for="eva_create_evaluation_detail_process_evaluation_round">รอบการประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_evaluation_round" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_code" for="eva_create_evaluation_detail_process_employee_code">รหัสพนักงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_code" />
</div>
<table width="100%">
<tr>
<td style="font-weight:800;">รอบการประเมิน</td>
<td><span id="eva_create_evaluation_detail_process_evaluation_round" /></td>
<td style="font-weight:800;">รหัสพนักงาน</td>
<td><span id="eva_create_evaluation_detail_process_employee_code" /></td>
</tr>
<tr>
<td style="font-weight:800;">ชื่อ-ชื่อสกุล</td>
<td><span id="eva_create_evaluation_detail_process_employee_fullname" /></td>
<td style="font-weight:800;">ประเภทตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position_type" /></td>
</tr>
<tr>
<td style="font-weight:800;">ตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position" /></td>
<td style="font-weight:800;">ระดับตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position_level" /></td>
</tr>
<tr>
<td style="font-weight:800;">หน่วยงาน</td>
<td><span id="eva_create_evaluation_detail_process_employee_org" /></td>
<td style="font-weight:800;">หมายเหตุ</td>
<td><span id="remark_hrm_work_record" /></td>
</tr>
</table>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_fullname" for="eva_create_evaluation_detail_process_employee_fullname">ชื่อ-สกุล</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_fullname" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position_type" for="eva_create_evaluation_detail_process_employee_position_type">ประเภทตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position_type" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position" for="eva_create_evaluation_detail_process_employee_position">ตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position_level" for="eva_create_evaluation_detail_process_employee_position_level">ระดับตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position_level" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_org" for="eva_create_evaluation_detail_process_employee_org">หน่วยงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_org" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_chief_fullname" for="eva_create_evaluation_detail_process_chief_fullname">ชื่อผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_chief_fullname" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_chief_position" for="eva_create_evaluation_detail_process_chief_position">ตำแหน่งผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_chief_position" />
</div>
</div>
</div>
</div>
</div>
@@ -460,6 +441,10 @@
eva_create_evaluation_detail_review01_PutUpdate();
}
function CheckWeightBeforeSubmitStatus(){
return true;
}
</script>
}

View File

@@ -81,57 +81,36 @@
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_employee_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_create_evaluation_id" />
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_process_chief_fullname" />
<p style="display:none;" class="form-control" id="eva_create_evaluation_detail_process_chief_position" />
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_evaluation_round" for="eva_create_evaluation_detail_process_evaluation_round">รอบการประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_evaluation_round" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_code" for="eva_create_evaluation_detail_process_employee_code">รหัสพนักงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_code" />
</div>
<table width="100%">
<tr>
<td style="font-weight:800;">รอบการประเมิน</td>
<td><span id="eva_create_evaluation_detail_process_evaluation_round" /></td>
<td style="font-weight:800;">รหัสพนักงาน</td>
<td><span id="eva_create_evaluation_detail_process_employee_code" /></td>
</tr>
<tr>
<td style="font-weight:800;">ชื่อ-ชื่อสกุล</td>
<td><span id="eva_create_evaluation_detail_process_employee_fullname" /></td>
<td style="font-weight:800;">ประเภทตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position_type" /></td>
</tr>
<tr>
<td style="font-weight:800;">ตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position" /></td>
<td style="font-weight:800;">ระดับตำแหน่ง</td>
<td><span id="eva_create_evaluation_detail_process_employee_position_level" /></td>
</tr>
<tr>
<td style="font-weight:800;">หน่วยงาน</td>
<td><span id="eva_create_evaluation_detail_process_employee_org" /></td>
<td style="font-weight:800;">หมายเหตุ</td>
<td><span id="remark_hrm_work_record" /></td>
</tr>
</table>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_fullname" for="eva_create_evaluation_detail_process_employee_fullname">ชื่อ-สกุล</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_fullname" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position_type" for="eva_create_evaluation_detail_process_employee_position_type">ประเภทตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position_type" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position" for="eva_create_evaluation_detail_process_employee_position">ตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position_level" for="eva_create_evaluation_detail_process_employee_position_level">ระดับตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position_level" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_org" for="eva_create_evaluation_detail_process_employee_org">หน่วยงาน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_org" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_chief_fullname" for="eva_create_evaluation_detail_process_chief_fullname">ชื่อผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_chief_fullname" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_chief_position" for="eva_create_evaluation_detail_process_chief_position">ตำแหน่งผู้ประเมิน</label>
<p class="form-control" id="eva_create_evaluation_detail_process_chief_position" />
</div>
</div>
</div>
</div>
</div>
@@ -748,6 +727,10 @@
eva_evaluation_behavior_process2_Save(getUrlParameter('id'));
eva_create_evaluation_detail_summary2_PutUpdate();
}
function CheckWeightBeforeSubmitStatus(){
return true;
}
</script>
}

View File

@@ -79,9 +79,11 @@
<thead>
<tr>
<th>เครื่องมือ</th>
<th><label>เลขที่ตำแหน่ง</label></th>
<th><label>ชื่อตำแหน่ง</label></th>
<th><label>รหัสพนักงาน</label></th>
<th><label>ชื่อ-สกุล</label></th>
<th><label>ตำแหน่ง</label></th>
<th><label>ระดับตำแหน่ง</label></th>
<th><label>หน่วยงาน</label></th>
</tr>
</thead>
<tbody></tbody>

View File

@@ -27,17 +27,17 @@
<div class="row">
<div class="form-group col-md-3">
<label id='lab_s_rep_family_employee_id' for='s_rep_family_employee_id'>ชื่อ - สกุล</label>
<select class="form-control" id="s_rep_family_employee_id" iLabel="ชื่อ - สกุล" iRequire="true" iGroup="s_rep_family" title='ชื่อ - สกุล' placeholder='ชื่อ - สกุล'></select>
<select class="form-control" id="s_rep_family_employee_id" iLabel="ชื่อ - สกุล" iRequire="false" iGroup="s_rep_family" title='ชื่อ - สกุล' placeholder='ชื่อ - สกุล'></select>
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_family_position_id' for='s_rep_family_position_id'>ตำแหน่ง</label>
<select class="form-control" id="s_rep_family_position_id" iLabel="ตำแหน่ง" iRequire="true" iGroup="s_rep_family" title='ตำแหน่ง' placeholder='ตำแหน่ง'></select>
<select class="form-control" id="s_rep_family_position_id" iLabel="ตำแหน่ง" iRequire="false" iGroup="s_rep_family" title='ตำแหน่ง' placeholder='ตำแหน่ง'></select>
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_family_org_id' for='s_rep_family_org_id'>หน่วยงาน</label>
<select class="form-control" id="s_rep_family_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_family" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
<select class="form-control" id="s_rep_family_org_id" iLabel="หน่วยงาน" iRequire="false" iGroup="s_rep_family" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
</div>
<div class="form-group col-md-3">

View File

@@ -0,0 +1,72 @@
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
ViewData["Title"] = "rep_leave_total_02";
}
<div class="row page-title">
<div class="col-md-5">
<div class="page-title">
@Configuration["SiteInformation:modulename"]
</div>
</div>
<div class="col-md-7">
<ol class="breadcrumb" style="">
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:mainsite"]');">หน้าแรก</a></li>
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:modulesite"]');">@Configuration["SiteInformation:modulename"]</a></li>
<li class="breadcrumb-item active">รายงานสรุปการลา ขาดงาน มาสาย ของพนักงานเนติบัณฑิตยสภา</li>
</ol>
</div>
</div>
<section class="wrapper">
<div class="title"><div class="line"></div>รายงานสรุปการลา ขาดงาน มาสาย ของพนักงานเนติบัณฑิตยสภา</div>
<div class="tools">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_02_employee_id' for='s_rep_leave_total_02_employee_id'>ชื่อ - สกุล</label>
<select class="form-control" id="s_rep_leave_total_02_employee_id" iLabel="ชื่อ - สกุล" iRequire="false" iGroup="s_rep_leave_total_02" title='ชื่อ - สกุล' placeholder='ชื่อ - สกุล'></select>
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_02_org_id' for='s_rep_leave_total_02_org_id'>หน่วยงาน</label>
<select class="form-control" id="s_rep_leave_total_02_org_id" iLabel="หน่วยงาน" iRequire="false" iGroup="s_rep_leave_total_02" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_02_start_date' for='s_rep_leave_total_02_start_date'>วันเริ่ม</label>
<input class="form-control" type="text" id="s_rep_leave_total_02_start_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันเริ่ม" iRequire="true" iGroup="s_rep_leave_total_02" title='วันเริ่ม' placeholder='วันเริ่ม' />
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_02_end_date' for='s_rep_leave_total_02_end_date'>วันสิ้นสุด</label>
<input class="form-control" type="text" id="s_rep_leave_total_02_end_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันสิ้นสุด" iRequire="true" iGroup="s_rep_leave_total_02" title='วันสิ้นสุด' placeholder='วันสิ้นสุด' />
</div>
</div>
</div>
<div class="col-md-12">
<button class="btn btn-info" onclick="javascript:rep_leave_total_02_DoSearch('pdf');">แสดงรายงาน</button>
<button class="btn btn-info" onclick="javascript:rep_leave_total_02_DoSearch('xlsx');">ดาวน์โหลดเป็น Excel</button>
</div>
</div>
</div>
</section>
<br />
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
@section FooterPlaceHolder{
<script src="~/js/rep_leave_total_02/rep_leave_total_02_report.js"></script>
<script>
$(document).ready(function () {
rep_leave_total_02_InitialForm();
SetupValidationRemark("s_rep_leave_total_02");
$("#s_rep_leave_total_02_employee_id").select2();
$("#s_rep_leave_total_02_org_id").select2();
});
</script>
}

View File

@@ -3743,6 +3743,34 @@
<response code="200">Returns the item</response>
<response code="500">Error Occurred</response>
</member>
<member name="M:TodoAPI2.Controllers.rep_leave_total_02Controller.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_leave_total_02Controller},TodoAPI2.Models.Irep_leave_total_02Service,Microsoft.Extensions.Configuration.IConfiguration)">
<summary>
Default constructure for dependency injection
</summary>
<param name="repository"></param>
<param name="configuration"></param>
<param name="logger"></param>
</member>
<member name="M:TodoAPI2.Controllers.rep_leave_total_02Controller.GetBlankItem">
<summary>
Get Blank Item
</summary>
<remarks>
</remarks>
<returns>Return a blank item</returns>
<response code="200">Returns the item</response>
<response code="500">Error Occurred</response>
</member>
<member name="M:TodoAPI2.Controllers.rep_leave_total_02Controller.rep_leave_total_02_report(TodoAPI2.Models.rep_leave_total_02ReportRequestModel)">
<summary>
Download Report
</summary>
<remarks>
</remarks>
<returns>Return list of items by specifced keyword</returns>
<response code="200">Returns the item</response>
<response code="500">Error Occurred</response>
</member>
<member name="M:TodoAPI2.Controllers.rep_position_salaryController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_position_salaryController},TodoAPI2.Models.Irep_position_salaryService,Microsoft.Extensions.Configuration.IConfiguration)">
<summary>
Default constructure for dependency injection
@@ -4123,6 +4151,14 @@
<param name="logger"></param>
<param name="inemp"></param>
</member>
<member name="M:TodoAPI2.Controllers.rep_leave_total_02ViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_leave_total_02Controller},TodoAPI2.Models.Irep_leave_total_02Service,Microsoft.Extensions.Configuration.IConfiguration)">
<summary>
Default constructure for dependency injection
</summary>
<param name="repository"></param>
<param name="configuration"></param>
<param name="logger"></param>
</member>
<member name="M:TodoAPI2.Controllers.rep_position_salaryViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_position_salaryController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Irep_position_salaryService,Microsoft.Extensions.Configuration.IConfiguration)">
<summary>
Default constructure for dependency injection

View File

@@ -263,9 +263,9 @@ function AlertSuccess(msg) {
}
function AlertDanger(xhr, status, error) {
var errorMessage = xhr.status + ': ' + xhr.statusText +': '+xhr.responseText;
var errorMessage = xhr.responseText;
endLoad();
alert('มีข้อผิดพลาดเกิดขึ้น ดังนี้ : ' + errorMessage);
alert(errorMessage);
}
function GetUnix(path) {

View File

@@ -128,6 +128,7 @@ var tag = "";
eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, (i + 1), blankItem);
});
//eva_adjust_postponement_detail_normal_02_Summary();
Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged();
endLoad();
};
startLoad();

View File

@@ -15,6 +15,8 @@ $("#eva_adjust_postponement_normal_limit_quota").val(data.limit_quota);
$("#eva_adjust_postponement_normal_percentage").val(data.percentage);
DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_managed_by"), data, "id", "fullname", "item_managed_by", getCookie("emp_id"));
//DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
Oneva_adjust_postponement_normal_limit_frameChange();
Oneva_adjust_postponement_normal_percentageChange();
}
@@ -126,7 +128,7 @@ function Oneva_adjust_postponement_normal_limit_frameChange(){
var limit_frame = $("#eva_adjust_postponement_normal_limit_frame").val();
limit_frame = Math.round(limit_frame*100)/100;
$("#eva_adjust_postponement_normal_limit_frame").val(limit_frame);
$("#eva_adjust_postponement_normal_limit_quota").val(Math.round((limit*limit_frame/100)*100)/100);
$("#eva_adjust_postponement_normal_limit_quota").val(Math.round( Math.ceil(limit*limit_frame)/1000)*10 );
}
function Oneva_adjust_postponement_normal_percentageChange(){
@@ -148,26 +150,26 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged()
$('#eva_adjust_postponement_detail_normal_02Body tr').each(function () {
var i = $(this).find("#rowCount").text();
var percentage = $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val();
percentage = Math.round(percentage*100)/100;
$("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val(percentage);
if(i){
var percentage = $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val();
percentage = Math.round(percentage*100)/100;
$("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val(percentage);
var middle = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_middle_" + i).text());
var old_salary = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_sarary_" + i).text());
var new_added = Math.ceil(((percentage * middle)/100)/10)*10;
var new_salary = parseFloat(old_salary + new_added);
var middle = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_middle_" + i).text());
var old_salary = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_sarary_" + i).text());
var new_added = Math.ceil(((percentage * middle)/100)/10)*10;
var new_salary = parseFloat(old_salary + new_added);
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(new_added);
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(formatNumber(new_salary));
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(new_added);
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(new_salary);
if(new_salary < 13285){
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(formatNumber(1000));
}else{
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
if(new_salary < 13285){
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(1000);
}else{
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
}
sum_postpone += new_added;
}
sum_postpone += new_added;
});
$("#remain_cost").val(Math.round((current_quota - sum_postpone)*100)/100);

View File

@@ -12,7 +12,7 @@ eva_create_evaluationSearchObject.evaluation_group_id = $("#s_eva_create_evaluat
}
function eva_create_evaluation_FeedDataToSearchForm(data) {
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
}
@@ -21,7 +21,7 @@ DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id
function eva_create_evaluation_FeedDataToForm(data) {
$("#eva_create_evaluation_id").val(data.id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
$("#eva_create_evaluation_score1").val(data.score1);
$("#eva_create_evaluation_score2").val(data.score2);

View File

@@ -5,7 +5,7 @@ var eva_create_evaluation_API = "/api/eva_create_evaluation/";
function eva_create_evaluation_FeedDataToForm(data) {
$("#eva_create_evaluation_id").val(data.id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
$("#eva_create_evaluation_score1").val(data.score1);
$("#eva_create_evaluation_score2").val(data.score2);

View File

@@ -152,28 +152,59 @@ var eva_create_evaluation_detailTableV;
var eva_create_evaluation_detail_setupTable = function (result) {
console.log(result);
var groupColumn = 8;
tmp = '"';
eva_create_evaluation_detailTableV = $('#eva_create_evaluation_detailTable').DataTable({
"processing": true,
"serverSide": false,
"data": result,
"select": false,
"select": {
"style": 'multi'
},
"columns": [
{ "data": "employee_id_external_linkage_external_name" },
{ "data": "chief_external_linkage_external_name" },
{ "data": "status_self" },
{ "data": "status_chief" },
{ "data": "status_supervisor" },
{ "data": "status_supervisor1A" },
{ "data": "status_supervisor2A" }
{ "data": "" },
{ "data": "employee_no" },
{ "data": "employee_id_external_linkage_external_name" },
{ "data": "position_type_text" },
{ "data": "position_name" },
{ "data": "position_level_text" },
{ "data": "remark" },
{ "data": "chief_external_linkage_external_name" },
{ "data": "department_name" },
],
"columnDefs": [
{
targets: 0,
data: "",
defaultContent: '',
orderable: false,
className: 'select-checkbox'
},
{ "visible": false, "targets": groupColumn }
],
"language": {
"url": appsite + "/DataTables-1.10.16/thai.json"
},
"paging": true,
"searching": false
"searching": false,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="9"><b>หน่วยงาน : '+group+'</b></td></tr>'
);
last = group;
}
} );
}
});
endLoad();
};
@@ -204,6 +235,14 @@ function eva_create_evaluation_detail_GetSelect(f) {
alert(eva_create_evaluation_detail_selectitem);
}
function eva_create_evaluation_detail_SelectAll(){
eva_create_evaluation_detailTableV.rows().select();
}
function eva_create_evaluation_detail_DeselectAll(){
eva_create_evaluation_detailTableV.rows().deselect();
}
//================= File Upload =========================================

View File

@@ -16,6 +16,10 @@ $("#eva_create_evaluation_detail_agreement_chief_fullname").text(data.chief_full
$("#eva_create_evaluation_detail_agreement_chief_position").text(data.chief_position);
$("#eva_create_evaluation_detail_agreement_create_evaluation_id").val(data.create_evaluation_id);
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
status_self = data.status_self;
CheckPermission();
}

View File

@@ -176,7 +176,7 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
var eva_create_evaluation_detail_processTableV;
var eva_create_evaluation_detail_process_setupTable = function (result) {
console.log(result);
var groupColumn = 5;
tmp = '"';
eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({
@@ -206,12 +206,28 @@ var eva_create_evaluation_detail_process_setupTable = function (result) {
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_process_GoEdit(" + tmp + data + tmp + "," + tmp + row["role_code"] + tmp + ")'><i class='fa fa-pencil'></i></button> ";
}
}],
},
{ "visible": false, "targets": groupColumn }],
"language": {
"url": appsite + "/DataTables-1.10.16/thai.json"
},
"paging": true,
"searching": false
"searching": false,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="12">'+group+'</td></tr>'
);
last = group;
}
} );
}
});
endLoad();
};

View File

@@ -43,6 +43,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_process_org_id
$("#eva_create_evaluation_detail_process_search_employee_code").val(data.search_employee_code);
$("#eva_create_evaluation_detail_process_search_employee_fullname").val(data.search_employee_fullname);
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
//console.log(data);
item_level_score = data.item_level_score;

View File

@@ -44,6 +44,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_process_org_id
$("#eva_create_evaluation_detail_process_search_employee_code").val(data.search_employee_code);
$("#eva_create_evaluation_detail_process_search_employee_fullname").val(data.search_employee_fullname);
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
item_level_score = data.item_level_score;
$("#w1").text(data.create_evaluation_score1.toFixed(2)+"%");
@@ -151,6 +153,22 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
//================= Control Function =========================================
function setViewOfComment(status_supervisor, status_supervisor1A, status_supervisor2A){
$("#eva_create_evaluation_detail_review02_supervisor2_result").hide();
$("#eva_create_evaluation_detail_review03_supervisor1A_result").hide();
$("#eva_create_evaluation_detail_review04_supervisor2A_result").hide();
if(status_supervisor === "Y"){
$("#eva_create_evaluation_detail_review02_supervisor2_result").show();
}
if(status_supervisor === "Y"){
$("#eva_create_evaluation_detail_review03_supervisor1A_result").show();
}
if(status_supervisor === "Y"){
$("#eva_create_evaluation_detail_review04_supervisor2A_result").show();
}
}
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor, status_supervisor1A, status_supervisor2A){
$("#btn01").hide();
@@ -177,8 +195,12 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
$("#btnd02").hide();
$("#btnd03").hide();
setViewOfComment(status_supervisor, status_supervisor1A, status_supervisor2A);
if(role_code === "2"){ // ความเห็น ความเห็นผู้ประเมินสูงสุด
$("#eva_create_evaluation_detail_review02_supervisor2_result").show();
if(status_chief === "Y" && status_self === "Y"){
$("#btn01").show();
$("#btn02").show();
@@ -208,6 +230,8 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
}
else if(role_code === "3"){ // ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง
$("#eva_create_evaluation_detail_review03_supervisor1A_result").show();
if(status_supervisor === "Y" && status_chief === "Y" && status_self === "Y"){
$("#eva_create_evaluation_detail_review03_supervisor1A_result").attr("disabled", false);
$("#eva_create_evaluation_detail_review03_supervisor1A_date").attr("disabled", false);
@@ -231,6 +255,9 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
}
else if(role_code === "4"){ // ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)
$("#eva_create_evaluation_detail_review04_supervisor2A_result").show();
if(status_supervisor1A === "Y" && status_supervisor === "Y" && status_chief === "Y" && status_self === "Y"){
$("#eva_create_evaluation_detail_review04_supervisor2A_result").attr("disabled", false);
$("#eva_create_evaluation_detail_review04_supervisor2A_date").attr("disabled", false);

View File

@@ -65,6 +65,12 @@ function eva_create_evaluation_detail_status_PutUpdate(a) {
{
return;
}
if(CheckWeightBeforeSubmitStatus() === false){
alert("น้ำหนักแต่ละส่วน ต้องมีค่า 100 จึงจะส่งแบบประเมินได้");
return;
}
var data = eva_create_evaluation_detail_status_GetFromForm();
if(a == "next0"){

View File

@@ -190,9 +190,12 @@ var eva_evaluation_achievement_setupTable = function (result) {
"targets": 0,
"data": "id",
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
}
}],
},{
targets: [ 3, 4, 5, 6, 7 ],
visible: false
}],
"language": {
"url": appsite + "/DataTables-1.10.16/thai.json"
},

View File

@@ -170,14 +170,15 @@ var eva_evaluation_behavior_setupTable = function (result) {
"select": false,
"columns": [
{ "data": "id" },
{ "data": "behavior" }
{ "data": "behavior" } ,
{ "data": "weight" }
],
"columnDefs": [
{
"targets": 0,
"data": "id",
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_evaluation_behavior_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_behavior_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
}
}],
"language": {

View File

@@ -150,6 +150,7 @@ var eva_evaluation_group_detailTableV;
var eva_evaluation_group_detail_setupTable = function (result) {
tmp = '"';
var groupColumn = 5;
eva_evaluation_group_detailTableV = $('#eva_evaluation_group_detailTable').DataTable({
"processing": true,
"serverSide": false,
@@ -157,9 +158,14 @@ var eva_evaluation_group_detail_setupTable = function (result) {
"select": false,
"columns": [
{ "data": "id" },
{ "data": "position_number" },
{ "data": "position_name" },
{ "data": "fullname" },
{ "data": "employee_no" },
{ "data": "fullname" },
{ "data": "position_name" },
{ "data": "position_level_text" },
{ "data": "department_name" },
],
"columnDefs": [
{
@@ -168,12 +174,27 @@ var eva_evaluation_group_detail_setupTable = function (result) {
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_evaluation_group_detail_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
}
}],
},{ "visible": false, "targets": groupColumn }],
"language": {
"url": appsite + "/DataTables-1.10.16/thai.json"
},
"paging": true,
"searching": false
"searching": false,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="6">'+group+'</td></tr>'
);
last = group;
}
} );
}
});
endLoad();
};

View File

@@ -170,7 +170,7 @@ var eva_idp_plan_owner_setupTable = function (result) {
"targets": 0,
"data": "id",
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_idp_plan_owner_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_idp_plan_owner_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_idp_plan_owner_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_idp_plan_owner_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
}
}],
"language": {

View File

@@ -0,0 +1,64 @@
var rep_leave_total_02_API = "/api/rep_leave_total_02/";
//================= Search Customizaiton =========================================
function rep_leave_total_02_GetSearchParameter(fileType) {
var rep_leave_total_02SearchObject = new Object();
rep_leave_total_02SearchObject.employee_id = $("#s_rep_leave_total_02_employee_id").val();
rep_leave_total_02SearchObject.org_id = $("#s_rep_leave_total_02_org_id").val();
rep_leave_total_02SearchObject.start_date = formatDateForGetParameter(getDate($("#s_rep_leave_total_02_start_date").val()));
rep_leave_total_02SearchObject.end_date = formatDateForGetParameter(getDate($("#s_rep_leave_total_02_end_date").val()));
rep_leave_total_02SearchObject.fileType = fileType;
console.log(rep_leave_total_02SearchObject);
return rep_leave_total_02SearchObject;
}
function rep_leave_total_02_FeedDataToSearchForm(data) {
DropDownClearFormAndFeedWithData($("#s_rep_leave_total_02_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
DropDownClearFormAndFeedWithData($("#s_rep_leave_total_02_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
$("#s_rep_leave_total_02_start_date").val(formatDate(data.start_date));
$("#s_rep_leave_total_02_end_date").val(formatDate(data.end_date));
}
//================= Form Data Customizaiton =========================================
function rep_leave_total_02_InitialForm(s) {
var successFunc = function (result) {
rep_leave_total_02_FeedDataToSearchForm(result);
endLoad();
};
startLoad();
AjaxGetRequest(apisite + rep_leave_total_02_API + "GetBlankItem", successFunc, AlertDanger);
}
//================= Data Table =========================================
var s_rep_leave_total_02_customValidation = function (group) {
return "";
};
function rep_leave_total_02_DoSearch(fileType) {
if (!ValidateForm('s_rep_leave_total_02', s_rep_leave_total_02_customValidation)) {
return;
}
var p = $.param(rep_leave_total_02_GetSearchParameter(fileType));
var report_url = apisite + "/api/rep_leave_total_02/rep_leave_total_02_report?" + p;
if (fileType === "pdf") {
$("#report_result").attr("src", report_url);
$("#report_result").show();
//window.open(report_url);
} else {
$("#report_result").hide();
window.open(report_url);
}
}