Compare commits
23 Commits
v0.0.1
...
94bf0709d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94bf0709d1 | ||
|
|
71f1906d79 | ||
|
|
f5ebda01bf | ||
|
|
ba57633ab8 | ||
|
|
9774fb0a9c | ||
|
|
c6d107e179 | ||
|
|
61f067f150 | ||
|
|
f6afc23b45 | ||
|
|
67a4c35f8e | ||
|
|
aae66b1d97 | ||
|
|
b6e27e9f12 | ||
|
|
afc4429e63 | ||
|
|
4b98790d2e | ||
|
|
6d0a2ace7d | ||
|
|
260c542b10 | ||
|
|
0d0e309589 | ||
|
|
7baab53365 | ||
|
|
8e8596116f | ||
|
|
4d7f6186d5 | ||
|
|
40d91d2ad2 | ||
|
|
26f416ec46 | ||
|
|
544d1224de | ||
|
|
f6b58c8406 |
@@ -0,0 +1,361 @@
|
|||||||
|
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/eva_create_evaluation_detail_review05")]
|
||||||
|
public class eva_create_evaluation_detail_review05Controller : BaseController
|
||||||
|
{
|
||||||
|
#region Private Variables
|
||||||
|
private ILogger<eva_create_evaluation_detail_review05Controller> _logger;
|
||||||
|
private Ieva_create_evaluation_detail_review05Service _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 eva_create_evaluation_detail_review05Controller(ILogger<eva_create_evaluation_detail_review05Controller> logger, Ieva_create_evaluation_detail_review05Service repository, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_repository = repository;
|
||||||
|
Configuration = configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get specific item by id
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>Return Get specific item by id</returns>
|
||||||
|
/// <response code="200">Returns the item</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpGet("{id}")]
|
||||||
|
[ProducesResponseType(typeof(eva_create_evaluation_detail_review05WithSelectionViewModel), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult Get(int id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
var result = _repository.GetWithSelection(id);
|
||||||
|
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception in IActionResult Get.", ex);
|
||||||
|
return StatusCode(500, $"{ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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(eva_create_evaluation_detail_review05WithSelectionViewModel), 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>
|
||||||
|
/// Get list items by create_evaluation_id
|
||||||
|
/// </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("")]
|
||||||
|
[ProducesResponseType(typeof(List<eva_create_evaluation_detail_review05ViewModel>), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult GetList(int? create_evaluation_id)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception in IActionResult GetList.", ex);
|
||||||
|
return StatusCode(500, $"{ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get list items by search
|
||||||
|
/// </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("GetListBySearch")]
|
||||||
|
[ProducesResponseType(typeof(List<eva_create_evaluation_detail_review05ViewModel>), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult GetListBySearch(eva_create_evaluation_detail_review05SearchModel model)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
return Ok(_repository.GetListBySearch(model));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception in IActionResult GetListBySearch.", ex);
|
||||||
|
return StatusCode(500, $"{ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create new item
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns>Response Result Message</returns>
|
||||||
|
/// <response code="200">Response Result Message</response>
|
||||||
|
/// <response code="400">If the model is invalid</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpPost("")]
|
||||||
|
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult Insert([FromBody] eva_create_evaluation_detail_review05InputModel model)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
var result = _repository.Insert(model, true);
|
||||||
|
var message = new CommonResponseMessage();
|
||||||
|
message.code = "200";
|
||||||
|
message.message = $"เพิ่มข้อมูล เรียบร้อย";
|
||||||
|
message.data = result;
|
||||||
|
return Ok(message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception while insert.", ex);
|
||||||
|
return StatusCode(500, $"{ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update item
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns>Response Result Message</returns>
|
||||||
|
/// <response code="200">Response Result Message</response>
|
||||||
|
/// <response code="400">If the model is invalid</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpPut("{id}")]
|
||||||
|
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult Update(int id, [FromBody] eva_create_evaluation_detail_review05InputModel model)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
var result = _repository.Update(id, model, true);
|
||||||
|
var message = new CommonResponseMessage();
|
||||||
|
message.code = "200";
|
||||||
|
message.message = $"แก้ไขข้อมูล เรียบร้อย";
|
||||||
|
message.data = result;
|
||||||
|
return Ok(message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception while update {id.ToString()}.", ex);
|
||||||
|
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete item
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns>Response Result Message</returns>
|
||||||
|
/// <response code="200">Response Result Message</response>
|
||||||
|
/// <response code="400">If the model is invalid</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpDelete("{id}")]
|
||||||
|
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult Delete(int id)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
_repository.Delete(id);
|
||||||
|
var message = new CommonResponseMessage();
|
||||||
|
message.code = "200";
|
||||||
|
message.message = $"ลบข้อมูล เรียบร้อย";
|
||||||
|
message.data = null;
|
||||||
|
return Ok(message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception while delete {id.ToString()}.", ex);
|
||||||
|
return StatusCode(500, $"{id.ToString()}. {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update multiple item
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="model"></param>
|
||||||
|
/// <returns>Response Result Message</returns>
|
||||||
|
/// <response code="200">Response Result Message</response>
|
||||||
|
/// <response code="400">If the model is invalid</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpPut("UpdateMultiple")]
|
||||||
|
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult UpdateMultiple([FromBody] List<eva_create_evaluation_detail_review05InputModel> model)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
string rowCount = _repository.UpdateMultiple(model, true);
|
||||||
|
var message = new CommonResponseMessage();
|
||||||
|
message.code = "200";
|
||||||
|
message.message = "ปรับปรุงข้อมูลเรียบร้อย จำนวน "+rowCount+" รายการ";
|
||||||
|
message.data = null;
|
||||||
|
return Ok(message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception while UpdateMultiple.", ex);
|
||||||
|
return StatusCode(500, $"{ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Refresh AutoField of all items
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>Response Result Message</returns>
|
||||||
|
/// <response code="200">Response Result Message</response>
|
||||||
|
/// <response code="400">If the model is invalid</response>
|
||||||
|
/// <response code="500">Error Occurred</response>
|
||||||
|
[HttpPut("RefreshAutoField")]
|
||||||
|
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||||
|
[ProducesResponseType(400)]
|
||||||
|
[ProducesResponseType(500)]
|
||||||
|
//[ValidateAntiForgeryToken]
|
||||||
|
public IActionResult RefreshAutoField()
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||||
|
_repository.RefreshAutoFieldOfAllData();
|
||||||
|
var message = new CommonResponseMessage();
|
||||||
|
message.code = "200";
|
||||||
|
message.message = $"ปรับปรุง Auto Field ของทุก record เรียบร้อย";
|
||||||
|
message.data = null;
|
||||||
|
return Ok(message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical($"Exception while RefreshAutoField.", ex);
|
||||||
|
return StatusCode(500, $"มีปัญหาระหว่างการปรับปรุง Auto Field. {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return BadRequest(ModelState);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -271,13 +271,63 @@ namespace TodoAPI2.Controllers
|
|||||||
|
|
||||||
var rep_type = new int[] { 1, 2, 3, 4, 5 };
|
var rep_type = new int[] { 1, 2, 3, 4, 5 };
|
||||||
|
|
||||||
|
var loginPositionName = (from i in emp.GetAllEmployee()
|
||||||
|
where i.id.ToString() == Request.Cookies["emp_id"]
|
||||||
|
select i.position_name).FirstOrDefault();
|
||||||
|
|
||||||
foreach (var k in rep_type)
|
foreach (var k in rep_type)
|
||||||
{
|
{
|
||||||
|
//if (!string.IsNullOrEmpty(loginPositionName))
|
||||||
|
//{
|
||||||
|
// if (!(loginPositionName == "นักทรัพยากรบุคคล" || loginPositionName.Contains("ผู้อำนวยการ"))
|
||||||
|
// && (k == 2 || k == 3 || k == 4 || k == 5)
|
||||||
|
// )
|
||||||
|
// {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
string url = $"{mainurl}{reportsite}/rep_eva_x{k}.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
string url = $"{mainurl}{reportsite}/rep_eva_x{k}.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
|
||||||
if(p1.chief_fullname == p1.supervisor2_fullname && k == 3)
|
if(k == 3)
|
||||||
|
{
|
||||||
|
if (p1.chief_fullname == p1.supervisor2_fullname)
|
||||||
{
|
{
|
||||||
url = $"{mainurl}{reportsite}/rep_eva_x{k}A.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}A.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
if (!string.IsNullOrEmpty(p1.supervisor3A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}AC.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(p1.supervisor2A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}A2.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(p1.supervisor2A_fullname) && string.IsNullOrEmpty(p1.supervisor1A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}B.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
|
else if (string.IsNullOrEmpty(p1.supervisor2A_fullname) && string.IsNullOrEmpty(p1.supervisor1A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}B2.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
|
else if (string.IsNullOrEmpty(p1.supervisor3A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}C.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
|
||||||
|
if (p1.supervisor1A_fullname == p1.supervisor2A_fullname || string.IsNullOrEmpty(p1.supervisor2A_fullname))
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}C2.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p1.employee_position_type == "อำนวยการ" && k == 1)
|
||||||
|
{
|
||||||
|
url = $"{mainurl}{reportsite}/rep_eva_x{k}a.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = httpclient.DownloadData(url);
|
var data = httpclient.DownloadData(url);
|
||||||
@@ -356,6 +406,8 @@ namespace TodoAPI2.Controllers
|
|||||||
i.supervisor1A_position = p.supervisor1A_position + checkLevel(p.supervisor1A_position_type_id, p.supervisor1A_position_level_text, p.supervisor1A_fullname);
|
i.supervisor1A_position = p.supervisor1A_position + checkLevel(p.supervisor1A_position_type_id, p.supervisor1A_position_level_text, p.supervisor1A_fullname);
|
||||||
i.supervisor2A_fullname = p.supervisor2A_fullname;
|
i.supervisor2A_fullname = p.supervisor2A_fullname;
|
||||||
i.supervisor2A_position = p.supervisor2A_position + checkLevel(p.supervisor2A_position_type_id, p.supervisor2A_position_level_text, p.supervisor2A_fullname);
|
i.supervisor2A_position = p.supervisor2A_position + checkLevel(p.supervisor2A_position_type_id, p.supervisor2A_position_level_text, p.supervisor2A_fullname);
|
||||||
|
i.supervisor3A_fullname = p.supervisor3A_fullname;
|
||||||
|
i.supervisor3A_position = p.supervisor3A_position + checkLevel(p.supervisor3A_position_type_id, p.supervisor3A_position_level_text, p.supervisor3A_fullname);
|
||||||
i.main_dept = p.employee_main_dept;
|
i.main_dept = p.employee_main_dept;
|
||||||
|
|
||||||
if (i.main_dept != null) i.main_dept = i.main_dept.Replace("กอง","");
|
if (i.main_dept != null) i.main_dept = i.main_dept.Replace("กอง","");
|
||||||
@@ -377,7 +429,7 @@ namespace TodoAPI2.Controllers
|
|||||||
select n.start_date).Min();
|
select n.start_date).Min();
|
||||||
var end = (from n in context.eva_performance_plan_detail
|
var end = (from n in context.eva_performance_plan_detail
|
||||||
where n.performance_plan_id == x2.id
|
where n.performance_plan_id == x2.id
|
||||||
select n.end_date).Min();
|
select n.end_date).Max();
|
||||||
var text = MyHelper.GetDateStringForReport(start) + " ถึง " + MyHelper.GetDateStringForReport(end);
|
var text = MyHelper.GetDateStringForReport(start) + " ถึง " + MyHelper.GetDateStringForReport(end);
|
||||||
if(x2.theTime == 1)
|
if(x2.theTime == 1)
|
||||||
{
|
{
|
||||||
@@ -389,6 +441,11 @@ namespace TodoAPI2.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(i.round2_text))
|
||||||
|
{
|
||||||
|
i.round2_text = $"1 เมษายน {p.fiscal_year} ถึง 30 กันยายน {p.fiscal_year}";
|
||||||
|
}
|
||||||
|
|
||||||
var detail = (from x in context.eva_create_evaluation_detail
|
var detail = (from x in context.eva_create_evaluation_detail
|
||||||
where x.id == detail_id
|
where x.id == detail_id
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
@@ -429,6 +486,20 @@ namespace TodoAPI2.Controllers
|
|||||||
i.txt_status_chief_a_click_date = MyHelper.GetDateStringForReport(p.status_chief_a_click_date);
|
i.txt_status_chief_a_click_date = MyHelper.GetDateStringForReport(p.status_chief_a_click_date);
|
||||||
if (i.txt_status_chief_a_click_date == "") i.txt_status_chief_a_click_date = "..................................";
|
if (i.txt_status_chief_a_click_date == "") i.txt_status_chief_a_click_date = "..................................";
|
||||||
|
|
||||||
|
i.txt_status_self_click_date = MyHelper.GetDateStringForReport(p.status_self_click_date);
|
||||||
|
if (i.txt_status_self_click_date == "") i.txt_status_self_click_date = "..................................";
|
||||||
|
i.txt_status_chief_click_date = MyHelper.GetDateStringForReport(p.status_chief_click_date);
|
||||||
|
if (i.txt_status_chief_click_date == "") i.txt_status_chief_click_date = "..................................";
|
||||||
|
|
||||||
|
i.txt_status_supervisor_click_date = MyHelper.GetDateStringForReport(p.status_supervisor_click_date);
|
||||||
|
if (i.txt_status_supervisor_click_date == "") i.txt_status_supervisor_click_date = "..................................";
|
||||||
|
i.txt_status_supervisor1A_click_date = MyHelper.GetDateStringForReport(p.status_supervisor1A_click_date);
|
||||||
|
if (i.txt_status_supervisor1A_click_date == "") i.txt_status_supervisor1A_click_date = "..................................";
|
||||||
|
i.txt_status_supervisor2A_click_date = MyHelper.GetDateStringForReport(p.status_supervisor2A_click_date);
|
||||||
|
if (i.txt_status_supervisor2A_click_date == "") i.txt_status_supervisor2A_click_date = "..................................";
|
||||||
|
i.txt_status_supervisor3A_click_date = MyHelper.GetDateStringForReport(p.status_supervisor3A_click_date);
|
||||||
|
if (i.txt_status_supervisor3A_click_date == "") i.txt_status_supervisor3A_click_date = "..................................";
|
||||||
|
|
||||||
i.print_dt = MyHelper.GetDateStringForReport(DateTime.Now) + " " + MyHelper.GetTimeStringFromDate(DateTime.Now);
|
i.print_dt = MyHelper.GetDateStringForReport(DateTime.Now) + " " + MyHelper.GetTimeStringFromDate(DateTime.Now);
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
@@ -436,7 +507,18 @@ namespace TodoAPI2.Controllers
|
|||||||
|
|
||||||
private void checkValue(eva_create_evaluation_detailEntity detail, ref rep_eva_xInputModel2 i)
|
private void checkValue(eva_create_evaluation_detailEntity detail, ref rep_eva_xInputModel2 i)
|
||||||
{
|
{
|
||||||
if (detail.status_supervisor2A == "Y")
|
if (detail.status_supervisor3A == "Y")
|
||||||
|
{
|
||||||
|
i.total_summary_supervisor2a = detail.total_summary_supervisor3A;
|
||||||
|
i.final_summary_supervisor2a = detail.Final_summary_supervisor3A;
|
||||||
|
i.total_summary_competency_supervisor2a = detail.total_summary_competency_supervisor3A;
|
||||||
|
i.final_summary_competency_supervisor2a = detail.Final_summary_competency_supervisor3A;
|
||||||
|
i.achievement_supervisor2a = detail.achievement_supervisor3A;
|
||||||
|
i.competency_supervisor2a = detail.competency_supervisor3A;
|
||||||
|
i.score_supervisor2a = detail.score_supervisor3A;
|
||||||
|
i.level_score_supervisor2a = detail.level_score_supervisor3A;
|
||||||
|
}
|
||||||
|
else if (detail.status_supervisor2A == "Y")
|
||||||
{
|
{
|
||||||
i.total_summary_supervisor2a = detail.total_summary_supervisor2A;
|
i.total_summary_supervisor2a = detail.total_summary_supervisor2A;
|
||||||
i.final_summary_supervisor2a = detail.Final_summary_supervisor2A;
|
i.final_summary_supervisor2a = detail.Final_summary_supervisor2A;
|
||||||
@@ -458,7 +540,7 @@ namespace TodoAPI2.Controllers
|
|||||||
i.score_supervisor2a = detail.score_supervisor1A;
|
i.score_supervisor2a = detail.score_supervisor1A;
|
||||||
i.level_score_supervisor2a = detail.level_score_supervisor1A;
|
i.level_score_supervisor2a = detail.level_score_supervisor1A;
|
||||||
}
|
}
|
||||||
else if (detail.status_supervisor == "Y")
|
else if (detail.status_supervisor == "Y" || detail.supervisor2_result == "Y")
|
||||||
{
|
{
|
||||||
i.total_summary_supervisor2a = detail.total_summary_supervisor;
|
i.total_summary_supervisor2a = detail.total_summary_supervisor;
|
||||||
i.final_summary_supervisor2a = detail.Final_summary_supervisor;
|
i.final_summary_supervisor2a = detail.Final_summary_supervisor;
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace TTSW.EF {
|
|||||||
public DbSet<eva_create_evaluation_detailEntity> eva_create_evaluation_detail { get; set; }
|
public DbSet<eva_create_evaluation_detailEntity> eva_create_evaluation_detail { get; set; }
|
||||||
//public DbSet<eva_create_evaluation_detail_agreementEntity> eva_create_evaluation_detail_agreement { get; set; }
|
//public DbSet<eva_create_evaluation_detail_agreementEntity> eva_create_evaluation_detail_agreement { get; set; }
|
||||||
public DbSet<eva_evaluation_achievementEntity> eva_evaluation_achievement { get; set; }
|
public DbSet<eva_evaluation_achievementEntity> eva_evaluation_achievement { get; set; }
|
||||||
|
|
||||||
|
public DbSet<eva_evaluation_achievement_detailEntity> eva_evaluation_achievement_detail { get; set; }
|
||||||
public DbSet<eva_evaluation_behaviorEntity> eva_evaluation_behavior { get; set; }
|
public DbSet<eva_evaluation_behaviorEntity> eva_evaluation_behavior { get; set; }
|
||||||
public DbSet<eva_evaluation_groupEntity> eva_evaluation_group { get; set; }
|
public DbSet<eva_evaluation_groupEntity> eva_evaluation_group { get; set; }
|
||||||
public DbSet<eva_evaluation_group_detailEntity> eva_evaluation_group_detail { get; set; }
|
public DbSet<eva_evaluation_group_detailEntity> eva_evaluation_group_detail { get; set; }
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1158
Migrations/20211028033728_UpdateFieldLength.Designer.cs
generated
Normal file
1158
Migrations/20211028033728_UpdateFieldLength.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
49
Migrations/20211028033728_UpdateFieldLength.cs
Normal file
49
Migrations/20211028033728_UpdateFieldLength.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class UpdateFieldLength : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "behavior",
|
||||||
|
table: "eva_evaluation_behavior",
|
||||||
|
maxLength: 16000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 1000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "achievement",
|
||||||
|
table: "eva_evaluation_achievement",
|
||||||
|
maxLength: 16000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 8000,
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "behavior",
|
||||||
|
table: "eva_evaluation_behavior",
|
||||||
|
maxLength: 1000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 16000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "achievement",
|
||||||
|
table: "eva_evaluation_achievement",
|
||||||
|
maxLength: 8000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 16000,
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1158
Migrations/20211028034057_UpdateFieldLength2.Designer.cs
generated
Normal file
1158
Migrations/20211028034057_UpdateFieldLength2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
49
Migrations/20211028034057_UpdateFieldLength2.cs
Normal file
49
Migrations/20211028034057_UpdateFieldLength2.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class UpdateFieldLength2 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "properties",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 32000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 8000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "description",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 32000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 4000,
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "properties",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 8000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 32000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "description",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 4000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 32000,
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1165
Migrations/20211030034925_AddLevelScoreForGroup2.Designer.cs
generated
Normal file
1165
Migrations/20211030034925_AddLevelScoreForGroup2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
153
Migrations/20211030034925_AddLevelScoreForGroup2.cs
Normal file
153
Migrations/20211030034925_AddLevelScoreForGroup2.cs
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddLevelScoreForGroup2 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||||
|
table: "eva_level_score_detail");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "level_score_id",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(Guid));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "group_guid",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "behavior",
|
||||||
|
table: "eva_evaluation_behavior",
|
||||||
|
maxLength: 16000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 1000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "achievement",
|
||||||
|
table: "eva_evaluation_achievement",
|
||||||
|
maxLength: 16000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 8000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "properties",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 32000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 8000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "description",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 32000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 4000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_eva_level_score_detail_group_guid",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
column: "group_guid");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_evaluation_group_group_guid",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
column: "group_guid",
|
||||||
|
principalTable: "eva_evaluation_group",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
column: "level_score_id",
|
||||||
|
principalTable: "eva_level_score",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_evaluation_group_group_guid",
|
||||||
|
table: "eva_level_score_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||||
|
table: "eva_level_score_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_eva_level_score_detail_group_guid",
|
||||||
|
table: "eva_level_score_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "group_guid",
|
||||||
|
table: "eva_level_score_detail");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "level_score_id",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "behavior",
|
||||||
|
table: "eva_evaluation_behavior",
|
||||||
|
maxLength: 1000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 16000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "achievement",
|
||||||
|
table: "eva_evaluation_achievement",
|
||||||
|
maxLength: 8000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 16000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "properties",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 8000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 32000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "description",
|
||||||
|
table: "activity_log_eva",
|
||||||
|
maxLength: 4000,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldMaxLength: 32000,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_eva_level_score_detail_eva_level_score_level_score_id",
|
||||||
|
table: "eva_level_score_detail",
|
||||||
|
column: "level_score_id",
|
||||||
|
principalTable: "eva_level_score",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1198
Migrations/20211031122756_Addachievement_detail.Designer.cs
generated
Normal file
1198
Migrations/20211031122756_Addachievement_detail.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
46
Migrations/20211031122756_Addachievement_detail.cs
Normal file
46
Migrations/20211031122756_Addachievement_detail.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class Addachievement_detail : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "eva_evaluation_achievement_detail",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<Guid>(nullable: false),
|
||||||
|
created = table.Column<DateTime>(nullable: false),
|
||||||
|
updated = table.Column<DateTime>(nullable: false),
|
||||||
|
isActive = table.Column<bool>(nullable: false),
|
||||||
|
create_evaluation_detail_id = table.Column<int>(nullable: true),
|
||||||
|
achievement_id = table.Column<int>(nullable: true),
|
||||||
|
achievement_detail = table.Column<string>(maxLength: 16000, nullable: true),
|
||||||
|
achievement_order = table.Column<int>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_eva_evaluation_achievement_detail", x => x.id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_eva_evaluation_achievement_detail_eva_create_evaluation_det~",
|
||||||
|
column: x => x.create_evaluation_detail_id,
|
||||||
|
principalTable: "eva_create_evaluation_detail",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_eva_evaluation_achievement_detail_create_evaluation_detail_~",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
column: "create_evaluation_detail_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "eva_evaluation_achievement_detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1199
Migrations/20211031134555_ManageAchievement.Designer.cs
generated
Normal file
1199
Migrations/20211031134555_ManageAchievement.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
74
Migrations/20211031134555_ManageAchievement.cs
Normal file
74
Migrations/20211031134555_ManageAchievement.cs
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class ManageAchievement : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_eva_evaluation_achievement_detail_eva_create_evaluation_det~",
|
||||||
|
table: "eva_evaluation_achievement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_eva_evaluation_achievement_detail_create_evaluation_detail_~",
|
||||||
|
table: "eva_evaluation_achievement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "create_evaluation_detail_id",
|
||||||
|
table: "eva_evaluation_achievement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "achievement_line1",
|
||||||
|
table: "eva_evaluation_achievement",
|
||||||
|
maxLength: 16000,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_eva_evaluation_achievement_detail_achievement_id",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
column: "achievement_id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_eva_evaluation_achievement_detail_eva_evaluation_achievemen~",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
column: "achievement_id",
|
||||||
|
principalTable: "eva_evaluation_achievement",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_eva_evaluation_achievement_detail_eva_evaluation_achievemen~",
|
||||||
|
table: "eva_evaluation_achievement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_eva_evaluation_achievement_detail_achievement_id",
|
||||||
|
table: "eva_evaluation_achievement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "achievement_line1",
|
||||||
|
table: "eva_evaluation_achievement");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "create_evaluation_detail_id",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_eva_evaluation_achievement_detail_create_evaluation_detail_~",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
column: "create_evaluation_detail_id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_eva_evaluation_achievement_detail_eva_create_evaluation_det~",
|
||||||
|
table: "eva_evaluation_achievement_detail",
|
||||||
|
column: "create_evaluation_detail_id",
|
||||||
|
principalTable: "eva_create_evaluation_detail",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1201
Migrations/20211108074744_AddSupervisor3.Designer.cs
generated
Normal file
1201
Migrations/20211108074744_AddSupervisor3.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
22
Migrations/20211108074744_AddSupervisor3.cs
Normal file
22
Migrations/20211108074744_AddSupervisor3.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddSupervisor3 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "supervisor3_id",
|
||||||
|
table: "eva_create_evaluation",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3_id",
|
||||||
|
table: "eva_create_evaluation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1218
Migrations/20211108081106_AddX111.Designer.cs
generated
Normal file
1218
Migrations/20211108081106_AddX111.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
80
Migrations/20211108081106_AddX111.cs
Normal file
80
Migrations/20211108081106_AddX111.cs
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddX111 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "status_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
maxLength: 1,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "status_supervisor3A_click_date",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "supervisor3A_date",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "supervisor3A_remark",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
maxLength: 1000,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "supervisor3A_result",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
maxLength: 1,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "supervisor3_id",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "status_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "status_supervisor3A_click_date",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3A_date",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3A_remark",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3A_result",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "supervisor3_id",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1235
Migrations/20211118041126_AddEx01.Designer.cs
generated
Normal file
1235
Migrations/20211118041126_AddEx01.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
86
Migrations/20211118041126_AddEx01.cs
Normal file
86
Migrations/20211118041126_AddEx01.cs
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddEx01 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "Final_summary_competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "Final_summary_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "achievement_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "level_score_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
maxLength: 255,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "score_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "total_summary_competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "total_summary_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Final_summary_competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Final_summary_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "achievement_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "level_score_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "score_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "total_summary_competency_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "total_summary_supervisor3A",
|
||||||
|
table: "eva_create_evaluation_detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1239
Migrations/20220319035041_AddSpecialCompensation.Designer.cs
generated
Normal file
1239
Migrations/20220319035041_AddSpecialCompensation.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
Migrations/20220319035041_AddSpecialCompensation.cs
Normal file
31
Migrations/20220319035041_AddSpecialCompensation.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddSpecialCompensation : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1235
Migrations/20220319042956_RemoveSpecialCom.Designer.cs
generated
Normal file
1235
Migrations/20220319042956_RemoveSpecialCom.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
Migrations/20220319042956_RemoveSpecialCom.cs
Normal file
31
Migrations/20220319042956_RemoveSpecialCom.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace tb320eva.Migrations
|
||||||
|
{
|
||||||
|
public partial class RemoveSpecialCom : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "new_special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<decimal>(
|
||||||
|
name: "special_compensation",
|
||||||
|
table: "eva_adjust_postponement_detail",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ namespace tb320eva.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b =>
|
modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b =>
|
||||||
@@ -32,7 +32,7 @@ namespace tb320eva.Migrations
|
|||||||
b.Property<DateTime?>("created_at");
|
b.Property<DateTime?>("created_at");
|
||||||
|
|
||||||
b.Property<string>("description")
|
b.Property<string>("description")
|
||||||
.HasMaxLength(4000);
|
.HasMaxLength(32000);
|
||||||
|
|
||||||
b.Property<string>("ip_address")
|
b.Property<string>("ip_address")
|
||||||
.HasMaxLength(191);
|
.HasMaxLength(191);
|
||||||
@@ -44,7 +44,7 @@ namespace tb320eva.Migrations
|
|||||||
.HasMaxLength(191);
|
.HasMaxLength(191);
|
||||||
|
|
||||||
b.Property<string>("properties")
|
b.Property<string>("properties")
|
||||||
.HasMaxLength(8000);
|
.HasMaxLength(32000);
|
||||||
|
|
||||||
b.Property<int?>("subject_id");
|
b.Property<int?>("subject_id");
|
||||||
|
|
||||||
@@ -216,6 +216,8 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<int?>("supervisor2_id");
|
b.Property<int?>("supervisor2_id");
|
||||||
|
|
||||||
|
b.Property<int?>("supervisor3_id");
|
||||||
|
|
||||||
b.Property<DateTime>("updated");
|
b.Property<DateTime>("updated");
|
||||||
|
|
||||||
b.HasKey("id");
|
b.HasKey("id");
|
||||||
@@ -241,12 +243,16 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("Final_summary_competency_supervisor3A");
|
||||||
|
|
||||||
b.Property<decimal?>("Final_summary_supervisor");
|
b.Property<decimal?>("Final_summary_supervisor");
|
||||||
|
|
||||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||||
|
|
||||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("Final_summary_supervisor3A");
|
||||||
|
|
||||||
b.Property<decimal?>("achievement_chief");
|
b.Property<decimal?>("achievement_chief");
|
||||||
|
|
||||||
b.Property<decimal?>("achievement_supervisor");
|
b.Property<decimal?>("achievement_supervisor");
|
||||||
@@ -255,6 +261,8 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<decimal?>("achievement_supervisor2A");
|
b.Property<decimal?>("achievement_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("achievement_supervisor3A");
|
||||||
|
|
||||||
b.Property<int?>("chief");
|
b.Property<int?>("chief");
|
||||||
|
|
||||||
b.Property<int?>("chief_a");
|
b.Property<int?>("chief_a");
|
||||||
@@ -278,6 +286,8 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<decimal?>("competency_supervisor2A");
|
b.Property<decimal?>("competency_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("competency_supervisor3A");
|
||||||
|
|
||||||
b.Property<int?>("create_evaluation_id");
|
b.Property<int?>("create_evaluation_id");
|
||||||
|
|
||||||
b.Property<DateTime>("created");
|
b.Property<DateTime>("created");
|
||||||
@@ -302,6 +312,9 @@ namespace tb320eva.Migrations
|
|||||||
b.Property<string>("level_score_supervisor2A")
|
b.Property<string>("level_score_supervisor2A")
|
||||||
.HasMaxLength(255);
|
.HasMaxLength(255);
|
||||||
|
|
||||||
|
b.Property<string>("level_score_supervisor3A")
|
||||||
|
.HasMaxLength(255);
|
||||||
|
|
||||||
b.Property<int?>("order_of_data");
|
b.Property<int?>("order_of_data");
|
||||||
|
|
||||||
b.Property<string>("remark")
|
b.Property<string>("remark")
|
||||||
@@ -315,6 +328,8 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<decimal?>("score_supervisor2A");
|
b.Property<decimal?>("score_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("score_supervisor3A");
|
||||||
|
|
||||||
b.Property<string>("status_chief")
|
b.Property<string>("status_chief")
|
||||||
.HasMaxLength(1);
|
.HasMaxLength(1);
|
||||||
|
|
||||||
@@ -348,6 +363,11 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||||
|
|
||||||
|
b.Property<string>("status_supervisor3A")
|
||||||
|
.HasMaxLength(1);
|
||||||
|
|
||||||
|
b.Property<DateTime?>("status_supervisor3A_click_date");
|
||||||
|
|
||||||
b.Property<string>("status_supervisor_a")
|
b.Property<string>("status_supervisor_a")
|
||||||
.HasMaxLength(1);
|
.HasMaxLength(1);
|
||||||
|
|
||||||
@@ -399,6 +419,18 @@ namespace tb320eva.Migrations
|
|||||||
b.Property<string>("supervisor2_result")
|
b.Property<string>("supervisor2_result")
|
||||||
.HasMaxLength(1);
|
.HasMaxLength(1);
|
||||||
|
|
||||||
|
b.Property<int?>("supervisor3A");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("supervisor3A_date");
|
||||||
|
|
||||||
|
b.Property<string>("supervisor3A_remark")
|
||||||
|
.HasMaxLength(1000);
|
||||||
|
|
||||||
|
b.Property<string>("supervisor3A_result")
|
||||||
|
.HasMaxLength(1);
|
||||||
|
|
||||||
|
b.Property<int?>("supervisor3_id");
|
||||||
|
|
||||||
b.Property<decimal?>("total_summary_chief");
|
b.Property<decimal?>("total_summary_chief");
|
||||||
|
|
||||||
b.Property<decimal?>("total_summary_competency_chief");
|
b.Property<decimal?>("total_summary_competency_chief");
|
||||||
@@ -409,12 +441,16 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("total_summary_competency_supervisor3A");
|
||||||
|
|
||||||
b.Property<decimal?>("total_summary_supervisor");
|
b.Property<decimal?>("total_summary_supervisor");
|
||||||
|
|
||||||
b.Property<decimal?>("total_summary_supervisor1A");
|
b.Property<decimal?>("total_summary_supervisor1A");
|
||||||
|
|
||||||
b.Property<decimal?>("total_summary_supervisor2A");
|
b.Property<decimal?>("total_summary_supervisor2A");
|
||||||
|
|
||||||
|
b.Property<decimal?>("total_summary_supervisor3A");
|
||||||
|
|
||||||
b.Property<DateTime>("updated");
|
b.Property<DateTime>("updated");
|
||||||
|
|
||||||
b.Property<decimal?>("work_period");
|
b.Property<decimal?>("work_period");
|
||||||
@@ -459,7 +495,10 @@ namespace tb320eva.Migrations
|
|||||||
b.Property<int>("id");
|
b.Property<int>("id");
|
||||||
|
|
||||||
b.Property<string>("achievement")
|
b.Property<string>("achievement")
|
||||||
.HasMaxLength(8000);
|
.HasMaxLength(16000);
|
||||||
|
|
||||||
|
b.Property<string>("achievement_line1")
|
||||||
|
.HasMaxLength(16000);
|
||||||
|
|
||||||
b.Property<int?>("create_evaluation_detail_id");
|
b.Property<int?>("create_evaluation_detail_id");
|
||||||
|
|
||||||
@@ -534,12 +573,36 @@ namespace tb320eva.Migrations
|
|||||||
b.ToTable("eva_evaluation_achievement_attach");
|
b.ToTable("eva_evaluation_achievement_attach");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievement_detailEntity", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("id");
|
||||||
|
|
||||||
|
b.Property<string>("achievement_detail")
|
||||||
|
.HasMaxLength(16000);
|
||||||
|
|
||||||
|
b.Property<int?>("achievement_id");
|
||||||
|
|
||||||
|
b.Property<int?>("achievement_order");
|
||||||
|
|
||||||
|
b.Property<DateTime>("created");
|
||||||
|
|
||||||
|
b.Property<bool>("isActive");
|
||||||
|
|
||||||
|
b.Property<DateTime>("updated");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.HasIndex("achievement_id");
|
||||||
|
|
||||||
|
b.ToTable("eva_evaluation_achievement_detail");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("id");
|
b.Property<int>("id");
|
||||||
|
|
||||||
b.Property<string>("behavior")
|
b.Property<string>("behavior")
|
||||||
.HasMaxLength(1000);
|
.HasMaxLength(16000);
|
||||||
|
|
||||||
b.Property<int?>("create_evaluation_detail_id");
|
b.Property<int?>("create_evaluation_detail_id");
|
||||||
|
|
||||||
@@ -729,9 +792,11 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("created");
|
b.Property<DateTime>("created");
|
||||||
|
|
||||||
|
b.Property<Guid?>("group_guid");
|
||||||
|
|
||||||
b.Property<bool>("isActive");
|
b.Property<bool>("isActive");
|
||||||
|
|
||||||
b.Property<Guid>("level_score_id");
|
b.Property<Guid?>("level_score_id");
|
||||||
|
|
||||||
b.Property<decimal?>("max_percentage");
|
b.Property<decimal?>("max_percentage");
|
||||||
|
|
||||||
@@ -745,6 +810,8 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
b.HasKey("id");
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.HasIndex("group_guid");
|
||||||
|
|
||||||
b.HasIndex("level_score_id");
|
b.HasIndex("level_score_id");
|
||||||
|
|
||||||
b.ToTable("eva_level_score_detail");
|
b.ToTable("eva_level_score_detail");
|
||||||
@@ -1083,6 +1150,13 @@ namespace tb320eva.Migrations
|
|||||||
.HasForeignKey("achievement_id");
|
.HasForeignKey("achievement_id");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievement_detailEntity", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("TodoAPI2.Models.eva_evaluation_achievementEntity", "eva_evaluation_achievement")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("achievement_id");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||||
@@ -1106,10 +1180,13 @@ namespace tb320eva.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_score_detailEntity", b =>
|
modelBuilder.Entity("TodoAPI2.Models.eva_level_score_detailEntity", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("group_guid");
|
||||||
|
|
||||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score_level_score_id")
|
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score_level_score_id")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("level_score_id")
|
.HasForeignKey("level_score_id");
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace TodoAPI2.Models
|
|||||||
[MaxLength(191)]
|
[MaxLength(191)]
|
||||||
public string log_name { get; set; }
|
public string log_name { get; set; }
|
||||||
|
|
||||||
[MaxLength(4000)]
|
[MaxLength(32000)]
|
||||||
public string description { get; set; }
|
public string description { get; set; }
|
||||||
|
|
||||||
public int? subject_id { get; set; }
|
public int? subject_id { get; set; }
|
||||||
@@ -33,7 +33,7 @@ namespace TodoAPI2.Models
|
|||||||
[MaxLength(191)]
|
[MaxLength(191)]
|
||||||
public string causer_type { get; set; }
|
public string causer_type { get; set; }
|
||||||
|
|
||||||
[MaxLength(8000)]
|
[MaxLength(32000)]
|
||||||
public string properties { get; set; }
|
public string properties { get; set; }
|
||||||
|
|
||||||
[MaxLength(191)]
|
[MaxLength(191)]
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace TodoAPI2.Models
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (0, null);
|
return (detail.score_chief, detail.level_score_chief);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ namespace TodoAPI2.Models
|
|||||||
&& m.employee_id == i.employee_id
|
&& m.employee_id == i.employee_id
|
||||||
select m;
|
select m;
|
||||||
|
|
||||||
foreach(var x in rawData)
|
foreach (var x in rawData)
|
||||||
{
|
{
|
||||||
var y = (from i in baseScore
|
var y = (from i in baseScore
|
||||||
where i.employee_id == x.employee_id
|
where i.employee_id == x.employee_id
|
||||||
@@ -151,19 +151,25 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
private (decimal?, decimal?) GetRangePercentage(List<eva_level_score_detailEntity> level_detail, decimal? score)
|
private (decimal?, decimal?) GetRangePercentage(List<eva_level_score_detailEntity> level_detail, decimal? score)
|
||||||
{
|
{
|
||||||
var item = (from i in level_detail
|
/*var item = (from i in level_detail
|
||||||
where i.min_value <= score && i.max_value >= score
|
where i.min_value <= score && i.max_value >= score
|
||||||
select i).FirstOrDefault();
|
select i).FirstOrDefault();
|
||||||
if(item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
return (item.min_percentage, item.max_percentage);
|
return (item.min_percentage, item.max_percentage);
|
||||||
}
|
}*/
|
||||||
return (-100, 100);
|
return (-100, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<eva_adjust_postponement_detail_normal_02ViewModel> GetListBySearch(eva_adjust_postponement_detail_normal_02SearchModel model)
|
public List<eva_adjust_postponement_detail_normal_02ViewModel> GetListBySearch(eva_adjust_postponement_detail_normal_02SearchModel model)
|
||||||
{
|
{
|
||||||
|
var theGroup = (from i in _repository.Context.eva_adjust_postponement
|
||||||
|
join j in _repository.Context.eva_create_evaluation on i.create_evaluation_id equals j.id
|
||||||
|
where i.id == model.adjust_postponement_id
|
||||||
|
select j.evaluation_group_id).FirstOrDefault();
|
||||||
|
|
||||||
var level_detail = (from i in _repository.Context.eva_level_score_detail
|
var level_detail = (from i in _repository.Context.eva_level_score_detail
|
||||||
|
where i.group_guid == theGroup
|
||||||
select i).ToList();
|
select i).ToList();
|
||||||
|
|
||||||
var all_emp = emp.GetListByemployee_type(null, null);
|
var all_emp = emp.GetListByemployee_type(null, null);
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace TodoAPI2.Models
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (0, null);
|
return (detail.score_chief, detail.level_score_chief);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,16 @@ namespace TodoAPI2.Models
|
|||||||
entity.limit_quota = 0;
|
entity.limit_quota = 0;
|
||||||
entity.limit_frame_quota = 0;
|
entity.limit_frame_quota = 0;
|
||||||
|
|
||||||
var all_emp = (from i in emp.GetListByemployee_type(null, null) where i.workingstatus == "สถานะปฏิบัติงาน" select i).ToList();
|
var active_emp = (from i in _repository.Context.eva_adjust_postponement_detail
|
||||||
|
join j in _repository.Context.eva_adjust_postponement on i.adjust_postponement_id equals j.id
|
||||||
|
where j.fiscal_year == model.fiscal_year
|
||||||
|
&& j.theRound == model.theRound
|
||||||
|
select i.employee_id).ToList();
|
||||||
|
|
||||||
|
var all_emp = (from i in emp.GetListByemployee_type(null, null)
|
||||||
|
where i.workingstatus != "คณะกรรมการเนติบัณฑิตยสภา"
|
||||||
|
&& active_emp.Contains(i.id)
|
||||||
|
select i).ToList();
|
||||||
var all_emp_id_list = (from i in all_emp select i.id).ToList();
|
var all_emp_id_list = (from i in all_emp select i.id).ToList();
|
||||||
entity.limit = AddMultipleDetail(entity.id, all_emp_id_list, entity.fiscal_year, entity.theRound, all_emp);
|
entity.limit = AddMultipleDetail(entity.id, all_emp_id_list, entity.fiscal_year, entity.theRound, all_emp);
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,6 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public int? supervisor2_id { get; set; }
|
public int? supervisor2_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public int? supervisor2_id { get; set; }
|
public int? supervisor2_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
|
|
||||||
public string active_mode { get; set; }
|
public string active_mode { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ namespace TodoAPI2.Models
|
|||||||
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||||
i.item_supervisor1_id = all_emp;
|
i.item_supervisor1_id = all_emp;
|
||||||
i.item_supervisor2_id = all_emp;
|
i.item_supervisor2_id = all_emp;
|
||||||
|
i.item_supervisor3_id = all_emp;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -89,6 +90,7 @@ namespace TodoAPI2.Models
|
|||||||
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
i.item_evaluation_group_id = (from x in _repository.Context.eva_evaluation_group select x).ToList();
|
||||||
i.item_supervisor1_id = all_emp;
|
i.item_supervisor1_id = all_emp;
|
||||||
i.item_supervisor2_id = all_emp;
|
i.item_supervisor2_id = all_emp;
|
||||||
|
i.item_supervisor3_id = all_emp;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -127,6 +129,10 @@ namespace TodoAPI2.Models
|
|||||||
into external_linkageResult7
|
into external_linkageResult7
|
||||||
from fk_external_linkageResult7 in external_linkageResult7.DefaultIfEmpty()
|
from fk_external_linkageResult7 in external_linkageResult7.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join fk_external_linkage8 in all_emp on m_eva_create_evaluation.supervisor3_id equals fk_external_linkage8.id
|
||||||
|
into external_linkageResult8
|
||||||
|
from fk_external_linkageResult8 in external_linkageResult8.DefaultIfEmpty()
|
||||||
|
|
||||||
where 1==1
|
where 1==1
|
||||||
&& (m_eva_create_evaluation.performance_plan_id == model.performance_plan_id || !model.performance_plan_id.HasValue)
|
&& (m_eva_create_evaluation.performance_plan_id == model.performance_plan_id || !model.performance_plan_id.HasValue)
|
||||||
&& (m_eva_create_evaluation.evaluation_group_id == model.evaluation_group_id || !model.evaluation_group_id.HasValue)
|
&& (m_eva_create_evaluation.evaluation_group_id == model.evaluation_group_id || !model.evaluation_group_id.HasValue)
|
||||||
@@ -143,6 +149,7 @@ namespace TodoAPI2.Models
|
|||||||
evaluation_group_id = m_eva_create_evaluation.evaluation_group_id,
|
evaluation_group_id = m_eva_create_evaluation.evaluation_group_id,
|
||||||
supervisor1_id = m_eva_create_evaluation.supervisor1_id,
|
supervisor1_id = m_eva_create_evaluation.supervisor1_id,
|
||||||
supervisor2_id = m_eva_create_evaluation.supervisor2_id,
|
supervisor2_id = m_eva_create_evaluation.supervisor2_id,
|
||||||
|
supervisor3_id = m_eva_create_evaluation.supervisor3_id,
|
||||||
|
|
||||||
performance_plan_id_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.display_text,
|
performance_plan_id_eva_performance_plan_fiscal_year = fk_eva_performance_planResult1.display_text,
|
||||||
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
||||||
@@ -150,6 +157,7 @@ namespace TodoAPI2.Models
|
|||||||
evaluation_group_id_eva_evaluation_group_name = fk_eva_evaluation_groupResult5.thegroup,
|
evaluation_group_id_eva_evaluation_group_name = fk_eva_evaluation_groupResult5.thegroup,
|
||||||
supervisor1_id_external_linkage_external_name = fk_external_linkageResult6.fullname,
|
supervisor1_id_external_linkage_external_name = fk_external_linkageResult6.fullname,
|
||||||
supervisor2_id_external_linkage_external_name = fk_external_linkageResult7.fullname,
|
supervisor2_id_external_linkage_external_name = fk_external_linkageResult7.fullname,
|
||||||
|
supervisor3_id_external_linkage_external_name = fk_external_linkageResult8.fullname,
|
||||||
|
|
||||||
isActive = m_eva_create_evaluation.isActive,
|
isActive = m_eva_create_evaluation.isActive,
|
||||||
Created = m_eva_create_evaluation.created,
|
Created = m_eva_create_evaluation.created,
|
||||||
@@ -209,7 +217,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.evaluation_group_id = model.evaluation_group_id;
|
existingEntity.evaluation_group_id = model.evaluation_group_id;
|
||||||
existingEntity.supervisor1_id = model.supervisor1_id;
|
existingEntity.supervisor1_id = model.supervisor1_id;
|
||||||
existingEntity.supervisor2_id = model.supervisor2_id;
|
existingEntity.supervisor2_id = model.supervisor2_id;
|
||||||
|
existingEntity.supervisor3_id = model.supervisor3_id;
|
||||||
|
|
||||||
var updated = _repository.Update(id, existingEntity);
|
var updated = _repository.Update(id, existingEntity);
|
||||||
return Get(updated.id);
|
return Get(updated.id);
|
||||||
@@ -234,7 +242,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.evaluation_group_id = i.evaluation_group_id;
|
existingEntity.evaluation_group_id = i.evaluation_group_id;
|
||||||
existingEntity.supervisor1_id = i.supervisor1_id;
|
existingEntity.supervisor1_id = i.supervisor1_id;
|
||||||
existingEntity.supervisor2_id = i.supervisor2_id;
|
existingEntity.supervisor2_id = i.supervisor2_id;
|
||||||
|
existingEntity.supervisor3_id = i.supervisor3_id;
|
||||||
|
|
||||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public int? supervisor2_id { get; set; }
|
public int? supervisor2_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
|
|
||||||
public string 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 employee_id_external_linkage_external_name { get; set; }
|
||||||
public string evaluation_group_id_eva_evaluation_group_code { get; set; }
|
public string evaluation_group_id_eva_evaluation_group_code { get; set; }
|
||||||
@@ -36,6 +38,8 @@ namespace TodoAPI2.Models
|
|||||||
public string supervisor1_id_external_linkage_external_name { get; set; }
|
public string supervisor1_id_external_linkage_external_name { get; set; }
|
||||||
public string supervisor2_id_external_linkage_external_name { get; set; }
|
public string supervisor2_id_external_linkage_external_name { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3_id_external_linkage_external_name { get; set; }
|
||||||
|
|
||||||
public string description
|
public string description
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ namespace TodoAPI2.Models
|
|||||||
public List<eva_evaluation_groupEntity> item_evaluation_group_id { get; set; }
|
public List<eva_evaluation_groupEntity> item_evaluation_group_id { get; set; }
|
||||||
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
|
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
|
||||||
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
|
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
|
||||||
|
public List<external_employeeViewModel> item_supervisor3_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,6 +137,8 @@ namespace TodoAPI2.Models
|
|||||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||||
|
|
||||||
|
public DateTime? status_supervisor3A_click_date { get; set; }
|
||||||
|
|
||||||
public decimal? total_summary_supervisor1A { get; set; }
|
public decimal? total_summary_supervisor1A { get; set; }
|
||||||
|
|
||||||
public decimal? Final_summary_supervisor1A { get; set; }
|
public decimal? Final_summary_supervisor1A { get; set; }
|
||||||
@@ -198,6 +200,38 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
[MaxLength(1000)]
|
[MaxLength(1000)]
|
||||||
public string remark { get; set; }
|
public string remark { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3A { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(1)]
|
||||||
|
public string supervisor3A_result { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(1000)]
|
||||||
|
public string supervisor3A_remark { get; set; }
|
||||||
|
|
||||||
|
public DateTime? supervisor3A_date { get; set; }
|
||||||
|
[MaxLength(1)]
|
||||||
|
public string status_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public decimal? total_summary_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? Final_summary_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? total_summary_competency_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? Final_summary_competency_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? achievement_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? competency_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public decimal? score_supervisor3A { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(255)]
|
||||||
|
public string level_score_supervisor3A { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string remark { get; set; }
|
public string remark { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
|
|
||||||
public string active_mode { get; set; }
|
public string active_mode { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ namespace TodoAPI2.Models
|
|||||||
i.item_eva_employee_id = i.item_employee_id;
|
i.item_eva_employee_id = i.item_employee_id;
|
||||||
i.item_supervisor1_id = i.item_employee_id;
|
i.item_supervisor1_id = i.item_employee_id;
|
||||||
i.item_supervisor2_id = i.item_employee_id;
|
i.item_supervisor2_id = i.item_employee_id;
|
||||||
|
i.item_supervisor3_id = i.item_employee_id;
|
||||||
i.item_help_org_id = ext.GetDepartmentData();
|
i.item_help_org_id = ext.GetDepartmentData();
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
@@ -95,6 +96,7 @@ namespace TodoAPI2.Models
|
|||||||
i.item_eva_employee_id = i.item_employee_id;
|
i.item_eva_employee_id = i.item_employee_id;
|
||||||
i.item_supervisor1_id = i.item_employee_id;
|
i.item_supervisor1_id = i.item_employee_id;
|
||||||
i.item_supervisor2_id = i.item_employee_id;
|
i.item_supervisor2_id = i.item_employee_id;
|
||||||
|
i.item_supervisor3_id = i.item_employee_id;
|
||||||
i.item_help_org_id = ext.GetDepartmentData();
|
i.item_help_org_id = ext.GetDepartmentData();
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
@@ -139,6 +141,10 @@ namespace TodoAPI2.Models
|
|||||||
into external_linkageResult46
|
into external_linkageResult46
|
||||||
from fk_external_linkageResult46 in external_linkageResult46.DefaultIfEmpty()
|
from fk_external_linkageResult46 in external_linkageResult46.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join fk_external_linkage48 in allemp on m_eva_create_evaluation_detail.supervisor3_id equals fk_external_linkage48.id
|
||||||
|
into external_linkageResult48
|
||||||
|
from fk_external_linkageResult48 in external_linkageResult48.DefaultIfEmpty()
|
||||||
|
|
||||||
join fk_external_linkage99 in ext.GetDepartmentData() on (m_eva_create_evaluation_detail.help_org_id.HasValue ? m_eva_create_evaluation_detail.help_org_id : fk_external_linkageResult2.department_id) equals fk_external_linkage99.id
|
join fk_external_linkage99 in ext.GetDepartmentData() on (m_eva_create_evaluation_detail.help_org_id.HasValue ? m_eva_create_evaluation_detail.help_org_id : fk_external_linkageResult2.department_id) equals fk_external_linkage99.id
|
||||||
into external_linkageResult99
|
into external_linkageResult99
|
||||||
from fk_external_linkageResult99 in external_linkageResult99.DefaultIfEmpty()
|
from fk_external_linkageResult99 in external_linkageResult99.DefaultIfEmpty()
|
||||||
@@ -197,6 +203,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
status_supervisor1A = m_eva_create_evaluation_detail.status_supervisor1A,
|
status_supervisor1A = m_eva_create_evaluation_detail.status_supervisor1A,
|
||||||
status_supervisor2A = m_eva_create_evaluation_detail.status_supervisor2A,
|
status_supervisor2A = m_eva_create_evaluation_detail.status_supervisor2A,
|
||||||
|
status_supervisor3A = m_eva_create_evaluation_detail.status_supervisor3A,
|
||||||
|
|
||||||
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
||||||
chief_external_linkage_external_name = fk_external_linkageResult3.fullname,
|
chief_external_linkage_external_name = fk_external_linkageResult3.fullname,
|
||||||
@@ -216,6 +223,7 @@ namespace TodoAPI2.Models
|
|||||||
status_supervisor_click_date = m_eva_create_evaluation_detail.status_supervisor_click_date,
|
status_supervisor_click_date = m_eva_create_evaluation_detail.status_supervisor_click_date,
|
||||||
status_supervisor1A_click_date = m_eva_create_evaluation_detail.status_supervisor1A_click_date,
|
status_supervisor1A_click_date = m_eva_create_evaluation_detail.status_supervisor1A_click_date,
|
||||||
status_supervisor2A_click_date = m_eva_create_evaluation_detail.status_supervisor2A_click_date,
|
status_supervisor2A_click_date = m_eva_create_evaluation_detail.status_supervisor2A_click_date,
|
||||||
|
status_supervisor3A_click_date = m_eva_create_evaluation_detail.status_supervisor3A_click_date,
|
||||||
|
|
||||||
department_name = fk_external_linkageResult99.external_name,
|
department_name = fk_external_linkageResult99.external_name,
|
||||||
help_org_id_external_linkage_external_name = fk_external_linkageResult46.external_name,
|
help_org_id_external_linkage_external_name = fk_external_linkageResult46.external_name,
|
||||||
|
|||||||
@@ -82,10 +82,13 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string status_supervisor2A { get; set; }
|
public string status_supervisor2A { get; set; }
|
||||||
|
|
||||||
|
public string status_supervisor3A { get; set; }
|
||||||
|
|
||||||
public string employee_id_external_linkage_external_name { get; set; }
|
public string employee_id_external_linkage_external_name { get; set; }
|
||||||
public string chief_external_linkage_external_name { get; set; }
|
public string chief_external_linkage_external_name { get; set; }
|
||||||
public string supervisor1_result_external_linkage_external_name { get; set; }
|
public string supervisor1_result_external_linkage_external_name { get; set; }
|
||||||
public string supervisor2_result_external_linkage_external_name { get; set; }
|
public string supervisor2_result_external_linkage_external_name { get; set; }
|
||||||
|
public string supervisor3_result_external_linkage_external_name { get; set; }
|
||||||
|
|
||||||
public string position_type_text { get; set; }
|
public string position_type_text { get; set; }
|
||||||
public string position_level_text { get; set; }
|
public string position_level_text { get; set; }
|
||||||
@@ -103,6 +106,7 @@ namespace TodoAPI2.Models
|
|||||||
public DateTime? status_supervisor_click_date { get; set; }
|
public DateTime? status_supervisor_click_date { get; set; }
|
||||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||||
|
public DateTime? status_supervisor3A_click_date { get; set; }
|
||||||
|
|
||||||
public int? eva_employee_id { get; set; }
|
public int? eva_employee_id { get; set; }
|
||||||
|
|
||||||
@@ -110,6 +114,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public int? supervisor2_id { get; set; }
|
public int? supervisor2_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3_id { get; set; }
|
||||||
|
|
||||||
public decimal? work_period { get; set; }
|
public decimal? work_period { get; set; }
|
||||||
public int? order_of_data { get; set; }
|
public int? order_of_data { get; set; }
|
||||||
|
|
||||||
@@ -120,6 +126,7 @@ namespace TodoAPI2.Models
|
|||||||
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } }
|
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } }
|
||||||
public string txt_status_supervisor1A { get { return getStatusText(status_supervisor1A) + MyHelper.GetDateStringForReport(status_supervisor1A_click_date); } }
|
public string txt_status_supervisor1A { get { return getStatusText(status_supervisor1A) + MyHelper.GetDateStringForReport(status_supervisor1A_click_date); } }
|
||||||
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date); } }
|
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date); } }
|
||||||
|
public string txt_status_supervisor3A { get { return getStatusText(status_supervisor3A) + MyHelper.GetDateStringForReport(status_supervisor3A_click_date); } }
|
||||||
|
|
||||||
public string help_org_id_external_linkage_external_name { get; set; }
|
public string help_org_id_external_linkage_external_name { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace TodoAPI2.Models
|
|||||||
public List<external_employeeViewModel> item_eva_employee_id { get; set; }
|
public List<external_employeeViewModel> item_eva_employee_id { get; set; }
|
||||||
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
|
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
|
||||||
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
|
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
|
||||||
|
public List<external_employeeViewModel> item_supervisor3_id { get; set; }
|
||||||
public List<external_linkageViewModel> item_help_org_id { get; set; }
|
public List<external_linkageViewModel> item_help_org_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ namespace TodoAPI2.Models
|
|||||||
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
||||||
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
||||||
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
||||||
status_supervisor_a = null,
|
status_supervisor_a = m_eva_create_evaluation_detail_agreement.status_supervisor_a,
|
||||||
|
|
||||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||||
|
|
||||||
@@ -445,6 +445,7 @@ namespace TodoAPI2.Models
|
|||||||
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
||||||
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
||||||
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
||||||
|
status_supervisor_a = m_eva_create_evaluation_detail_agreement.status_supervisor_a,
|
||||||
|
|
||||||
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? fk_external_linkageResult11.external_name : fk_external_linkageResult12.external_name,
|
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? fk_external_linkageResult11.external_name : fk_external_linkageResult12.external_name,
|
||||||
|
|
||||||
@@ -453,6 +454,7 @@ namespace TodoAPI2.Models
|
|||||||
status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date,
|
status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date,
|
||||||
status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date,
|
status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date,
|
||||||
status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date,
|
status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date,
|
||||||
|
status_supervisor_a_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_a_click_date,
|
||||||
|
|
||||||
plan_round_year = checkNull(fk_planResult.theTime) + "/" + checkNull(fk_planResult.fiscal_year),
|
plan_round_year = checkNull(fk_planResult.theTime) + "/" + checkNull(fk_planResult.fiscal_year),
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
if (s == "Y")
|
if (s == "Y")
|
||||||
{
|
{
|
||||||
return "ส่งแบบประเมินแล้ว <br/>";
|
return "ส่งข้อตกลงแล้ว <br/>";
|
||||||
}
|
}
|
||||||
else if (s == "N")
|
else if (s == "N")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,6 +72,13 @@ namespace TodoAPI2.Models
|
|||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private T isNull<T>(T s, T o)
|
||||||
|
{
|
||||||
|
if(s == null) return o;
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
public eva_create_evaluation_detail_processWithSelectionViewModel Get(int id, int? emp_id, string path)
|
public eva_create_evaluation_detail_processWithSelectionViewModel Get(int id, int? emp_id, string path)
|
||||||
{
|
{
|
||||||
object special_person = (from x in _repository.Context.eva_setup_permission
|
object special_person = (from x in _repository.Context.eva_setup_permission
|
||||||
@@ -121,19 +128,21 @@ namespace TodoAPI2.Models
|
|||||||
into external_chiefResult
|
into external_chiefResult
|
||||||
from fk_external_chief in external_chiefResult.DefaultIfEmpty()
|
from fk_external_chief in external_chiefResult.DefaultIfEmpty()
|
||||||
|
|
||||||
join fk_external_supervisor2 in allemp on fk_eva_create_evaluationResult10.employee_id equals fk_external_supervisor2.id
|
join fk_external_supervisor2 in allemp on isNull<int?>(m_eva_create_evaluation_detail_process.eva_employee_id,fk_eva_create_evaluationResult10.employee_id) equals fk_external_supervisor2.id
|
||||||
into external_supervisor2Result
|
into external_supervisor2Result
|
||||||
from fk_external_supervisor2 in external_supervisor2Result.DefaultIfEmpty()
|
from fk_external_supervisor2 in external_supervisor2Result.DefaultIfEmpty()
|
||||||
|
|
||||||
join fk_external_supervisor1A in allemp on fk_eva_create_evaluationResult10.supervisor1_id equals fk_external_supervisor1A.id
|
join fk_external_supervisor1A in allemp on isNull<int?>(m_eva_create_evaluation_detail_process.supervisor1_id, fk_eva_create_evaluationResult10.supervisor1_id) equals fk_external_supervisor1A.id
|
||||||
into external_supervisor1AResult
|
into external_supervisor1AResult
|
||||||
from fk_external_supervisor1A in external_supervisor1AResult.DefaultIfEmpty()
|
from fk_external_supervisor1A in external_supervisor1AResult.DefaultIfEmpty()
|
||||||
|
|
||||||
join fk_external_supervisor2A in allemp on fk_eva_create_evaluationResult10.supervisor2_id equals fk_external_supervisor2A.id
|
join fk_external_supervisor2A in allemp on isNull<int?>(m_eva_create_evaluation_detail_process.supervisor2_id, fk_eva_create_evaluationResult10.supervisor2_id) equals fk_external_supervisor2A.id
|
||||||
into external_supervisor2AResult
|
into external_supervisor2AResult
|
||||||
from fk_external_supervisor2A in external_supervisor2AResult.DefaultIfEmpty()
|
from fk_external_supervisor2A in external_supervisor2AResult.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join fk_external_supervisor3A in allemp on isNull<int?>(m_eva_create_evaluation_detail_process.supervisor3_id, fk_eva_create_evaluationResult10.supervisor3_id) equals fk_external_supervisor3A.id
|
||||||
|
into external_supervisor3AResult
|
||||||
|
from fk_external_supervisor3A in external_supervisor3AResult.DefaultIfEmpty()
|
||||||
|
|
||||||
where m_eva_create_evaluation_detail_process.id == id
|
where m_eva_create_evaluation_detail_process.id == id
|
||||||
|
|
||||||
@@ -166,6 +175,8 @@ namespace TodoAPI2.Models
|
|||||||
supervisor1A_position = fk_external_supervisor1A.position_name,
|
supervisor1A_position = fk_external_supervisor1A.position_name,
|
||||||
supervisor2A_fullname = fk_external_supervisor2A.fullname,
|
supervisor2A_fullname = fk_external_supervisor2A.fullname,
|
||||||
supervisor2A_position = fk_external_supervisor2A.position_name,
|
supervisor2A_position = fk_external_supervisor2A.position_name,
|
||||||
|
supervisor3A_fullname = fk_external_supervisor3A.fullname,
|
||||||
|
supervisor3A_position = fk_external_supervisor3A.position_name,
|
||||||
|
|
||||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||||
|
|
||||||
@@ -178,6 +189,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
status_supervisor1A = m_eva_create_evaluation_detail_process.status_supervisor1A,
|
status_supervisor1A = m_eva_create_evaluation_detail_process.status_supervisor1A,
|
||||||
status_supervisor2A = m_eva_create_evaluation_detail_process.status_supervisor2A,
|
status_supervisor2A = m_eva_create_evaluation_detail_process.status_supervisor2A,
|
||||||
|
status_supervisor3A = m_eva_create_evaluation_detail_process.status_supervisor3A,
|
||||||
|
|
||||||
role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_process.chief,
|
role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_process.chief,
|
||||||
m_eva_create_evaluation_detail_process.chief,
|
m_eva_create_evaluation_detail_process.chief,
|
||||||
@@ -185,7 +197,8 @@ namespace TodoAPI2.Models
|
|||||||
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
||||||
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
||||||
path,
|
path,
|
||||||
special_person),
|
special_person,
|
||||||
|
m_eva_create_evaluation_detail_process.supervisor3_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor3_id : fk_eva_create_evaluationResult10.supervisor3_id),
|
||||||
|
|
||||||
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
|
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
|
||||||
m_eva_create_evaluation_detail_process.chief,
|
m_eva_create_evaluation_detail_process.chief,
|
||||||
@@ -193,7 +206,8 @@ namespace TodoAPI2.Models
|
|||||||
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
||||||
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
||||||
path,
|
path,
|
||||||
special_person),
|
special_person,
|
||||||
|
m_eva_create_evaluation_detail_process.supervisor3_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor3_id : fk_eva_create_evaluationResult10.supervisor3_id),
|
||||||
|
|
||||||
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record
|
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record
|
||||||
+ GetWorkTimeText(fk_external_employee.packing_date, end_date),
|
+ GetWorkTimeText(fk_external_employee.packing_date, end_date),
|
||||||
@@ -204,6 +218,14 @@ namespace TodoAPI2.Models
|
|||||||
status_self_a_click_date = m_eva_create_evaluation_detail_process.status_self_a_click_date,
|
status_self_a_click_date = m_eva_create_evaluation_detail_process.status_self_a_click_date,
|
||||||
status_chief_a_click_date = m_eva_create_evaluation_detail_process.status_chief_a_click_date,
|
status_chief_a_click_date = m_eva_create_evaluation_detail_process.status_chief_a_click_date,
|
||||||
|
|
||||||
|
status_self_click_date = m_eva_create_evaluation_detail_process.status_self_click_date,
|
||||||
|
status_chief_click_date = m_eva_create_evaluation_detail_process.status_chief_click_date,
|
||||||
|
|
||||||
|
status_supervisor_click_date = m_eva_create_evaluation_detail_process.status_supervisor_click_date,
|
||||||
|
status_supervisor1A_click_date = m_eva_create_evaluation_detail_process.status_supervisor1A_click_date,
|
||||||
|
status_supervisor2A_click_date = m_eva_create_evaluation_detail_process.status_supervisor2A_click_date,
|
||||||
|
status_supervisor3A_click_date = m_eva_create_evaluation_detail_process.status_supervisor3A_click_date,
|
||||||
|
|
||||||
isActive = m_eva_create_evaluation_detail_process.isActive,
|
isActive = m_eva_create_evaluation_detail_process.isActive,
|
||||||
Created = m_eva_create_evaluation_detail_process.created,
|
Created = m_eva_create_evaluation_detail_process.created,
|
||||||
Updated = m_eva_create_evaluation_detail_process.updated,
|
Updated = m_eva_create_evaluation_detail_process.updated,
|
||||||
@@ -211,12 +233,14 @@ namespace TodoAPI2.Models
|
|||||||
supervisor2_position_type_id = fk_external_supervisor2.position_type_id,
|
supervisor2_position_type_id = fk_external_supervisor2.position_type_id,
|
||||||
supervisor1A_position_type_id = fk_external_supervisor1A.position_type_id,
|
supervisor1A_position_type_id = fk_external_supervisor1A.position_type_id,
|
||||||
supervisor2A_position_type_id = fk_external_supervisor2A.position_type_id,
|
supervisor2A_position_type_id = fk_external_supervisor2A.position_type_id,
|
||||||
|
supervisor3A_position_type_id = fk_external_supervisor3A.position_type_id,
|
||||||
employee_position_type_id = fk_external_employee.position_type_id,
|
employee_position_type_id = fk_external_employee.position_type_id,
|
||||||
chief_position_type_id = fk_external_chief.position_type_id,
|
chief_position_type_id = fk_external_chief.position_type_id,
|
||||||
|
|
||||||
supervisor2_position_level_text = fk_external_supervisor2.position_level_text,
|
supervisor2_position_level_text = fk_external_supervisor2.position_level_text,
|
||||||
supervisor1A_position_level_text = fk_external_supervisor1A.position_level_text,
|
supervisor1A_position_level_text = fk_external_supervisor1A.position_level_text,
|
||||||
supervisor2A_position_level_text = fk_external_supervisor2A.position_level_text,
|
supervisor2A_position_level_text = fk_external_supervisor2A.position_level_text,
|
||||||
|
supervisor3A_position_level_text = fk_external_supervisor3A.position_level_text,
|
||||||
employee_position_level_text = fk_external_employee.position_level_text,
|
employee_position_level_text = fk_external_employee.position_level_text,
|
||||||
chief_position_level_text = fk_external_chief.position_level_text,
|
chief_position_level_text = fk_external_chief.position_level_text,
|
||||||
|
|
||||||
@@ -363,6 +387,13 @@ namespace TodoAPI2.Models
|
|||||||
return GetListBySearch(model, emp_id, path);
|
return GetListBySearch(model, emp_id, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetOnlyDep(string input)
|
||||||
|
{
|
||||||
|
var i = input.Split('-');
|
||||||
|
if (i.Length == 2) return i[1].Trim();
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id, string path)
|
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id, string path)
|
||||||
{
|
{
|
||||||
object special_person = (from x in _repository.Context.eva_setup_permission
|
object special_person = (from x in _repository.Context.eva_setup_permission
|
||||||
@@ -453,7 +484,7 @@ namespace TodoAPI2.Models
|
|||||||
search_employee_code = fk_external_employee.employee_no,
|
search_employee_code = fk_external_employee.employee_no,
|
||||||
search_employee_fullname = fk_external_employee.fullname,
|
search_employee_fullname = fk_external_employee.fullname,
|
||||||
|
|
||||||
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? fk_external_linkageResult11.external_name : fk_external_employee.department_name,
|
org_id_external_linkage_external_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? GetOnlyDep(fk_external_linkageResult11.external_name) : fk_external_employee.department_name,
|
||||||
|
|
||||||
status_self = m_eva_create_evaluation_detail_process.status_self,
|
status_self = m_eva_create_evaluation_detail_process.status_self,
|
||||||
status_chief = m_eva_create_evaluation_detail_process.status_chief,
|
status_chief = m_eva_create_evaluation_detail_process.status_chief,
|
||||||
@@ -461,6 +492,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
status_supervisor1A = m_eva_create_evaluation_detail_process.status_supervisor1A,
|
status_supervisor1A = m_eva_create_evaluation_detail_process.status_supervisor1A,
|
||||||
status_supervisor2A = m_eva_create_evaluation_detail_process.status_supervisor2A,
|
status_supervisor2A = m_eva_create_evaluation_detail_process.status_supervisor2A,
|
||||||
|
status_supervisor3A = m_eva_create_evaluation_detail_process.status_supervisor3A,
|
||||||
|
|
||||||
role_code = getRoleCodeSearch(emp_id, m_eva_create_evaluation_detail_process.chief,
|
role_code = getRoleCodeSearch(emp_id, m_eva_create_evaluation_detail_process.chief,
|
||||||
m_eva_create_evaluation_detail_process.chief,
|
m_eva_create_evaluation_detail_process.chief,
|
||||||
@@ -468,7 +500,8 @@ namespace TodoAPI2.Models
|
|||||||
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
||||||
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
||||||
m_eva_create_evaluation_detail_process.status_chief,
|
m_eva_create_evaluation_detail_process.status_chief,
|
||||||
special_person
|
special_person,
|
||||||
|
m_eva_create_evaluation_detail_process.supervisor3_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor3_id : fk_eva_create_evaluationResult10.supervisor3_id
|
||||||
),
|
),
|
||||||
|
|
||||||
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
|
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
|
||||||
@@ -477,13 +510,20 @@ namespace TodoAPI2.Models
|
|||||||
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
m_eva_create_evaluation_detail_process.supervisor1_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor1_id : fk_eva_create_evaluationResult10.supervisor1_id,
|
||||||
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
m_eva_create_evaluation_detail_process.supervisor2_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor2_id : fk_eva_create_evaluationResult10.supervisor2_id,
|
||||||
path,
|
path,
|
||||||
special_person),
|
special_person,
|
||||||
|
m_eva_create_evaluation_detail_process.supervisor3_id.HasValue ? m_eva_create_evaluation_detail_process.supervisor3_id : fk_eva_create_evaluationResult10.supervisor3_id
|
||||||
|
),
|
||||||
|
|
||||||
|
status_self_a_click_date = m_eva_create_evaluation_detail_process.status_self_a_click_date,
|
||||||
|
status_chief_a_click_date = m_eva_create_evaluation_detail_process.status_chief_a_click_date,
|
||||||
|
|
||||||
status_self_click_date = m_eva_create_evaluation_detail_process.status_self_click_date,
|
status_self_click_date = m_eva_create_evaluation_detail_process.status_self_click_date,
|
||||||
status_chief_click_date = m_eva_create_evaluation_detail_process.status_chief_click_date,
|
status_chief_click_date = m_eva_create_evaluation_detail_process.status_chief_click_date,
|
||||||
|
|
||||||
status_supervisor_click_date = m_eva_create_evaluation_detail_process.status_supervisor_click_date,
|
status_supervisor_click_date = m_eva_create_evaluation_detail_process.status_supervisor_click_date,
|
||||||
status_supervisor1A_click_date = m_eva_create_evaluation_detail_process.status_supervisor1A_click_date,
|
status_supervisor1A_click_date = m_eva_create_evaluation_detail_process.status_supervisor1A_click_date,
|
||||||
status_supervisor2A_click_date = m_eva_create_evaluation_detail_process.status_supervisor2A_click_date,
|
status_supervisor2A_click_date = m_eva_create_evaluation_detail_process.status_supervisor2A_click_date,
|
||||||
|
status_supervisor3A_click_date = m_eva_create_evaluation_detail_process.status_supervisor3A_click_date,
|
||||||
|
|
||||||
plan_round_year = checkNull(fk_planResult.theTime)+"/"+checkNull(fk_planResult.fiscal_year),
|
plan_round_year = checkNull(fk_planResult.theTime)+"/"+checkNull(fk_planResult.fiscal_year),
|
||||||
|
|
||||||
@@ -505,7 +545,7 @@ namespace TodoAPI2.Models
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getRoleCode(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string path, object special_person)
|
private string getRoleCode(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string path, object special_person, int? supervisor3A)
|
||||||
{
|
{
|
||||||
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && path == "d2") return "2";
|
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && path == "d2") return "2";
|
||||||
else if (emp_id == chief) return "1";
|
else if (emp_id == chief) return "1";
|
||||||
@@ -513,11 +553,12 @@ namespace TodoAPI2.Models
|
|||||||
else if (emp_id == supervisor2) return "2";
|
else if (emp_id == supervisor2) return "2";
|
||||||
else if (emp_id == supervisor1A) return "3";
|
else if (emp_id == supervisor1A) return "3";
|
||||||
else if (emp_id == supervisor2A) return "4";
|
else if (emp_id == supervisor2A) return "4";
|
||||||
|
else if (emp_id == supervisor3A) return "5";
|
||||||
if (((int?[])special_person).Contains(emp_id)) return "99";
|
if (((int?[])special_person).Contains(emp_id)) return "99";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getRoleCodeSearch(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string status_chief, object special_person)
|
private string getRoleCodeSearch(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string status_chief, object special_person, int? supervisor3A)
|
||||||
{
|
{
|
||||||
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && status_chief=="Y") return "2";
|
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && status_chief=="Y") return "2";
|
||||||
else if (emp_id == chief) return "1";
|
else if (emp_id == chief) return "1";
|
||||||
@@ -525,11 +566,12 @@ namespace TodoAPI2.Models
|
|||||||
else if (emp_id == supervisor2) return "2";
|
else if (emp_id == supervisor2) return "2";
|
||||||
else if (emp_id == supervisor1A) return "3";
|
else if (emp_id == supervisor1A) return "3";
|
||||||
else if (emp_id == supervisor2A) return "4";
|
else if (emp_id == supervisor2A) return "4";
|
||||||
|
else if (emp_id == supervisor3A) return "5";
|
||||||
if (((int?[])special_person).Contains(emp_id)) return "99";
|
if (((int?[])special_person).Contains(emp_id)) return "99";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getRoleName(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string path, object special_person)
|
private string getRoleName(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A, string path, object special_person, int? supervisor3A)
|
||||||
{
|
{
|
||||||
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && path == "d2") return "ผู้ประเมินสูงสุด";
|
if ((emp_id == chief || emp_id == supervisor1) && chief == supervisor2 && path == "d2") return "ผู้ประเมินสูงสุด";
|
||||||
else if (emp_id == chief) return "ผู้ประเมิน";
|
else if (emp_id == chief) return "ผู้ประเมิน";
|
||||||
@@ -537,6 +579,7 @@ namespace TodoAPI2.Models
|
|||||||
else if (emp_id == supervisor2) return "ผู้ประเมินสูงสุด";
|
else if (emp_id == supervisor2) return "ผู้ประเมินสูงสุด";
|
||||||
else if (emp_id == supervisor1A) return "ผู้บังคับบัญชาเหนือขึ้นไป";
|
else if (emp_id == supervisor1A) return "ผู้บังคับบัญชาเหนือขึ้นไป";
|
||||||
else if (emp_id == supervisor2A) return "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)";
|
else if (emp_id == supervisor2A) return "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)";
|
||||||
|
else if (emp_id == supervisor3A) return "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)";
|
||||||
if (((int?[])special_person).Contains(emp_id)) return "ผู้ตรวจสอบ";
|
if (((int?[])special_person).Contains(emp_id)) return "ผู้ตรวจสอบ";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string supervisor2A_position { get; set; }
|
public string supervisor2A_position { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_fullname { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_position { get; set; }
|
||||||
|
|
||||||
public int? create_evaluation_id { get; set; }
|
public int? create_evaluation_id { get; set; }
|
||||||
|
|
||||||
public int? org_id { get; set; }
|
public int? org_id { get; set; }
|
||||||
@@ -70,6 +74,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string status_supervisor2A { get; set; }
|
public string status_supervisor2A { get; set; }
|
||||||
|
|
||||||
|
public string status_supervisor3A { get; set; }
|
||||||
|
|
||||||
public string role_desc { get; set; }
|
public string role_desc { get; set; }
|
||||||
|
|
||||||
public string role_code { get; set; }
|
public string role_code { get; set; }
|
||||||
@@ -87,11 +93,14 @@ namespace TodoAPI2.Models
|
|||||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||||
|
|
||||||
|
public DateTime? status_supervisor3A_click_date { get; set; }
|
||||||
|
|
||||||
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date) + " " + MyHelper.GetTimeStringFromDate(status_self_click_date) + getHistoryLink(status_self); } }
|
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date) + " " + MyHelper.GetTimeStringFromDate(status_self_click_date) + getHistoryLink(status_self); } }
|
||||||
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date) + " " + MyHelper.GetTimeStringFromDate(status_chief_click_date) + getHistoryLink(status_chief); } }
|
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date) + " " + MyHelper.GetTimeStringFromDate(status_chief_click_date) + getHistoryLink(status_chief); } }
|
||||||
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_click_date) + getHistoryLink(status_supervisor); } }
|
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_click_date) + getHistoryLink(status_supervisor); } }
|
||||||
public string txt_status_supervisor1A { get { return getStatusText(status_supervisor1A) + MyHelper.GetDateStringForReport(status_supervisor1A_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor1A_click_date) + getHistoryLink(status_supervisor1A); } }
|
public string txt_status_supervisor1A { get { return getStatusText(status_supervisor1A) + MyHelper.GetDateStringForReport(status_supervisor1A_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor1A_click_date) + getHistoryLink(status_supervisor1A); } }
|
||||||
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor2A_click_date) + getHistoryLink(status_supervisor2A); } }
|
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor2A_click_date) + getHistoryLink(status_supervisor2A); } }
|
||||||
|
public string txt_status_supervisor3A { get { return getStatusText(status_supervisor3A) + MyHelper.GetDateStringForReport(status_supervisor3A_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor3A_click_date) + getHistoryLink(status_supervisor3A); } }
|
||||||
|
|
||||||
private string getHistoryLink(string s)
|
private string getHistoryLink(string s)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,12 +29,14 @@ namespace TodoAPI2.Models
|
|||||||
public int? supervisor2_position_type_id { get; set; }
|
public int? supervisor2_position_type_id { get; set; }
|
||||||
public int? supervisor1A_position_type_id { get; set; }
|
public int? supervisor1A_position_type_id { get; set; }
|
||||||
public int? supervisor2A_position_type_id { get; set; }
|
public int? supervisor2A_position_type_id { get; set; }
|
||||||
|
public int? supervisor3A_position_type_id { get; set; }
|
||||||
public int? employee_position_type_id { get; set; }
|
public int? employee_position_type_id { get; set; }
|
||||||
public int? chief_position_type_id { get; set; }
|
public int? chief_position_type_id { get; set; }
|
||||||
|
|
||||||
public string supervisor2_position_level_text { get; set; }
|
public string supervisor2_position_level_text { get; set; }
|
||||||
public string supervisor1A_position_level_text { get; set; }
|
public string supervisor1A_position_level_text { get; set; }
|
||||||
public string supervisor2A_position_level_text { get; set; }
|
public string supervisor2A_position_level_text { get; set; }
|
||||||
|
public string supervisor3A_position_level_text { get; set; }
|
||||||
public string employee_position_level_text { get; set; }
|
public string employee_position_level_text { get; set; }
|
||||||
public string chief_position_level_text { get; set; }
|
public string chief_position_level_text { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ namespace TodoAPI2.Models
|
|||||||
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||||
|
|
||||||
|
|
||||||
where 1==1
|
where 1 == 1
|
||||||
//&& (m_eva_create_evaluation_detail_review04.id == model.id || !model.id.HasValue)
|
//&& (m_eva_create_evaluation_detail_review04.id == model.id || !model.id.HasValue)
|
||||||
&& (m_eva_create_evaluation_detail_review04.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
&& (m_eva_create_evaluation_detail_review04.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ namespace TodoAPI2.Models
|
|||||||
orderby i.id descending
|
orderby i.id descending
|
||||||
select i).Take(1).ToList();
|
select i).Take(1).ToList();
|
||||||
|
|
||||||
if(x.Count > 0)
|
if (x.Count > 0)
|
||||||
{
|
{
|
||||||
newkey = x[0].id + 1;
|
newkey = x[0].id + 1;
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string UpdateMultiple(List<eva_create_evaluation_detail_review04InputModel> model)
|
public string UpdateMultiple(List<eva_create_evaluation_detail_review04InputModel> model)
|
||||||
{
|
{
|
||||||
foreach(var i in model)
|
foreach (var i in model)
|
||||||
{
|
{
|
||||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
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 Ieva_create_evaluation_detail_review05Service : IBaseService2<int, eva_create_evaluation_detail_review05InputModel, eva_create_evaluation_detail_review05ViewModel>
|
||||||
|
{
|
||||||
|
new eva_create_evaluation_detail_review05ViewModel Insert(eva_create_evaluation_detail_review05InputModel model, bool is_force_save);
|
||||||
|
new eva_create_evaluation_detail_review05ViewModel Update(int id, eva_create_evaluation_detail_review05InputModel model, bool is_force_save);
|
||||||
|
List<eva_create_evaluation_detail_review05ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id);
|
||||||
|
List<eva_create_evaluation_detail_review05ViewModel> GetListBySearch(eva_create_evaluation_detail_review05SearchModel model);
|
||||||
|
|
||||||
|
string UpdateMultiple(List<eva_create_evaluation_detail_review05InputModel> model, bool is_force_save);
|
||||||
|
eva_create_evaluation_detail_review05WithSelectionViewModel GetWithSelection(int id);
|
||||||
|
eva_create_evaluation_detail_review05WithSelectionViewModel GetBlankItem();
|
||||||
|
|
||||||
|
void RefreshAutoFieldOfAllData();
|
||||||
|
eva_create_evaluation_detailEntity GetEntity(int id);
|
||||||
|
DataContext GetContext();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
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 eva_create_evaluation_detail_review05InputModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public int? id { get; set; }
|
||||||
|
|
||||||
|
public int? create_evaluation_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_result { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_remark { get; set; }
|
||||||
|
|
||||||
|
public DateTime? supervisor3A_date { get; set; }
|
||||||
|
|
||||||
|
public string active_mode { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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 eva_create_evaluation_detail_review05ReportRequestModel : eva_create_evaluation_detail_review05SearchModel
|
||||||
|
{
|
||||||
|
public string filetype { get; set; }
|
||||||
|
|
||||||
|
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
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 eva_create_evaluation_detail_review05SearchModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public int id { get; set; }
|
||||||
|
|
||||||
|
public int? create_evaluation_id { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,307 @@
|
|||||||
|
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 eva_create_evaluation_detail_review05Service : Ieva_create_evaluation_detail_review05Service
|
||||||
|
{
|
||||||
|
private IBaseRepository2<eva_create_evaluation_detailEntity, int> _repository;
|
||||||
|
private IMyDatabase db;
|
||||||
|
private Iexternal_linkageService ext;
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05Service(IBaseRepository2<eva_create_evaluation_detailEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
db = mydb;
|
||||||
|
ext = inext;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Private Functions
|
||||||
|
private eva_create_evaluation_detailEntity GetEntity(eva_create_evaluation_detail_review05InputModel model)
|
||||||
|
{
|
||||||
|
return Mapper.Map<eva_create_evaluation_detailEntity>(model);
|
||||||
|
}
|
||||||
|
private List<eva_create_evaluation_detailEntity> GetEntityList(List<eva_create_evaluation_detail_review05InputModel> models)
|
||||||
|
{
|
||||||
|
return Mapper.Map<List<eva_create_evaluation_detailEntity>>(models);
|
||||||
|
}
|
||||||
|
private eva_create_evaluation_detail_review05ViewModel GetDto(eva_create_evaluation_detailEntity entity)
|
||||||
|
{
|
||||||
|
return Mapper.Map<eva_create_evaluation_detail_review05ViewModel>(entity);
|
||||||
|
}
|
||||||
|
private List<eva_create_evaluation_detail_review05ViewModel> GetDtoList(List<eva_create_evaluation_detailEntity> entities)
|
||||||
|
{
|
||||||
|
return Mapper.Map<List<eva_create_evaluation_detail_review05ViewModel>>(entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Functions
|
||||||
|
#region Query Functions
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05ViewModel Get(int id)
|
||||||
|
{
|
||||||
|
var entity = _repository.Get(id);
|
||||||
|
|
||||||
|
return GetDto(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public eva_create_evaluation_detailEntity GetEntity(int id)
|
||||||
|
{
|
||||||
|
var entity = _repository.Get(id);
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataContext GetContext()
|
||||||
|
{
|
||||||
|
return _repository.Context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05WithSelectionViewModel GetWithSelection(int id)
|
||||||
|
{
|
||||||
|
var entity = _repository.Get(id);
|
||||||
|
var i = Mapper.Map<eva_create_evaluation_detail_review05WithSelectionViewModel>(entity);
|
||||||
|
i.item_supervisor3A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
public eva_create_evaluation_detail_review05WithSelectionViewModel GetBlankItem()
|
||||||
|
{
|
||||||
|
var i = new eva_create_evaluation_detail_review05WithSelectionViewModel();
|
||||||
|
i.item_supervisor3A_result = (from x in ext.GetAgreeDisagree() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<eva_create_evaluation_detail_review05ViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id)
|
||||||
|
{
|
||||||
|
var model = new eva_create_evaluation_detail_review05SearchModel();
|
||||||
|
model.create_evaluation_id = create_evaluation_id;
|
||||||
|
return GetListBySearch(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<eva_create_evaluation_detail_review05ViewModel> GetListBySearch(eva_create_evaluation_detail_review05SearchModel model)
|
||||||
|
{
|
||||||
|
var data = (
|
||||||
|
from m_eva_create_evaluation_detail_review05 in _repository.Context.eva_create_evaluation_detail
|
||||||
|
|
||||||
|
join fk_external_linkage3 in ext.GetAgreeDisagree() on m_eva_create_evaluation_detail_review05.supervisor3A_result equals fk_external_linkage3.external_code
|
||||||
|
into external_linkageResult3
|
||||||
|
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||||
|
|
||||||
|
|
||||||
|
where
|
||||||
|
1 == 1
|
||||||
|
&& (!model.create_evaluation_id.HasValue || m_eva_create_evaluation_detail_review05.create_evaluation_id == model.create_evaluation_id)
|
||||||
|
|
||||||
|
|
||||||
|
orderby m_eva_create_evaluation_detail_review05.created descending
|
||||||
|
select new eva_create_evaluation_detail_review05ViewModel()
|
||||||
|
{
|
||||||
|
id = m_eva_create_evaluation_detail_review05.id,
|
||||||
|
create_evaluation_id = m_eva_create_evaluation_detail_review05.create_evaluation_id,
|
||||||
|
supervisor3A = m_eva_create_evaluation_detail_review05.supervisor3A,
|
||||||
|
supervisor3A_result = m_eva_create_evaluation_detail_review05.supervisor3A_result,
|
||||||
|
supervisor3A_remark = m_eva_create_evaluation_detail_review05.supervisor3A_remark,
|
||||||
|
supervisor3A_date = m_eva_create_evaluation_detail_review05.supervisor3A_date,
|
||||||
|
|
||||||
|
supervisor3A_result_external_linkage_external_name = fk_external_linkageResult3.external_name,
|
||||||
|
|
||||||
|
isActive = m_eva_create_evaluation_detail_review05.isActive,
|
||||||
|
Created = m_eva_create_evaluation_detail_review05.created,
|
||||||
|
Updated = m_eva_create_evaluation_detail_review05.updated
|
||||||
|
}
|
||||||
|
).Take(1000).ToList();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Manipulation Functions
|
||||||
|
|
||||||
|
|
||||||
|
public int GetNewPrimaryKey()
|
||||||
|
{
|
||||||
|
int? newkey = 0;
|
||||||
|
|
||||||
|
var x = (from i in _repository.Context.eva_create_evaluation_detail
|
||||||
|
orderby i.id descending
|
||||||
|
select i).Take(1).ToList();
|
||||||
|
|
||||||
|
if (x.Count > 0)
|
||||||
|
{
|
||||||
|
newkey = x[0].id + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return newkey.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05ViewModel Insert(eva_create_evaluation_detail_review05InputModel model, bool is_force_save)
|
||||||
|
{
|
||||||
|
var entity = GetEntity(model);
|
||||||
|
entity.id = GetNewPrimaryKey();
|
||||||
|
|
||||||
|
|
||||||
|
//entity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
|
if (is_force_save)
|
||||||
|
{
|
||||||
|
var inserted = _repository.Insert(entity);
|
||||||
|
//entity.DoAfterInsertUpdate(_repository.Context);
|
||||||
|
return Get(inserted.id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_repository.InsertWithoutCommit(entity);
|
||||||
|
//entity.DoAfterInsertUpdate(_repository.Context);
|
||||||
|
return Mapper.Map<eva_create_evaluation_detail_review05ViewModel>(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05ViewModel Update(int id, eva_create_evaluation_detail_review05InputModel model, bool is_force_save)
|
||||||
|
{
|
||||||
|
var existingEntity = _repository.Get(id);
|
||||||
|
if (existingEntity != null)
|
||||||
|
{
|
||||||
|
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||||
|
existingEntity.supervisor3A = model.supervisor3A;
|
||||||
|
existingEntity.supervisor3A_result = model.supervisor3A_result;
|
||||||
|
existingEntity.supervisor3A_remark = model.supervisor3A_remark;
|
||||||
|
existingEntity.supervisor3A_date = model.supervisor3A_date;
|
||||||
|
|
||||||
|
//existingEntity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
|
if (is_force_save)
|
||||||
|
{
|
||||||
|
var updated = _repository.Update(id, existingEntity);
|
||||||
|
//existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||||
|
return Get(updated.id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_repository.UpdateWithoutCommit(id, existingEntity);
|
||||||
|
//existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||||
|
return Mapper.Map<eva_create_evaluation_detail_review05ViewModel>(existingEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw new NotificationException("No data to update");
|
||||||
|
}
|
||||||
|
|
||||||
|
public string UpdateMultiple(List<eva_create_evaluation_detail_review05InputModel> model, bool is_force_save)
|
||||||
|
{
|
||||||
|
foreach (var i in model)
|
||||||
|
{
|
||||||
|
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||||
|
{
|
||||||
|
var existingEntity = _repository.Get(i.id.Value);
|
||||||
|
if (existingEntity != null)
|
||||||
|
{
|
||||||
|
existingEntity.create_evaluation_id = i.create_evaluation_id;
|
||||||
|
existingEntity.supervisor3A = i.supervisor3A;
|
||||||
|
existingEntity.supervisor3A_result = i.supervisor3A_result;
|
||||||
|
existingEntity.supervisor3A_remark = i.supervisor3A_remark;
|
||||||
|
existingEntity.supervisor3A_date = i.supervisor3A_date;
|
||||||
|
|
||||||
|
//existingEntity.SetAutoField(_repository.Context);
|
||||||
|
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (i.active_mode == "1" && !i.id.HasValue) // add
|
||||||
|
{
|
||||||
|
var entity = GetEntity(i);
|
||||||
|
entity.id = GetNewPrimaryKey();
|
||||||
|
//entity.SetAutoField(_repository.Context);
|
||||||
|
_repository.InsertWithoutCommit(entity);
|
||||||
|
}
|
||||||
|
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||||
|
{
|
||||||
|
_repository.DeleteWithoutCommit(i.id.Value);
|
||||||
|
}
|
||||||
|
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_force_save)
|
||||||
|
{
|
||||||
|
_repository.Context.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
return model.Count().ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public eva_create_evaluation_detail_review05ViewModel SetAsActive(int id)
|
||||||
|
{
|
||||||
|
var updated = _repository.SetAsActive(id);
|
||||||
|
|
||||||
|
return Get(updated.id);
|
||||||
|
}
|
||||||
|
public eva_create_evaluation_detail_review05ViewModel SetAsInactive(int id)
|
||||||
|
{
|
||||||
|
var updated = _repository.SetAsInActive(id);
|
||||||
|
|
||||||
|
return Get(updated.id);
|
||||||
|
}
|
||||||
|
public void Delete(int id)
|
||||||
|
{
|
||||||
|
_repository.Delete(id);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshAutoFieldOfAllData()
|
||||||
|
{
|
||||||
|
//var all_items = from i in _repository.Context.eva_create_evaluation_detail
|
||||||
|
// select i;
|
||||||
|
//foreach (var item in all_items)
|
||||||
|
//{
|
||||||
|
// item.SetAutoField(_repository.Context);
|
||||||
|
//}
|
||||||
|
//_repository.Context.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<string, string> GetLookupForLog()
|
||||||
|
{
|
||||||
|
var i = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
|
||||||
|
i.Add("create_evaluation_id", "แบบประเมิน");
|
||||||
|
i.Add("supervisor3A", "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)");
|
||||||
|
i.Add("supervisor3A_result", "ผลการประเมิน");
|
||||||
|
i.Add("supervisor3A_result_external_linkage_external_name", "ผลการประเมิน");
|
||||||
|
i.Add("supervisor3A_remark", "ความเห็นผู้ประเมินสูงสุด");
|
||||||
|
i.Add("supervisor3A_date", "วันที่ประเมิน");
|
||||||
|
i.Add("txt_supervisor3A_date", "วันที่ประเมิน");
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Match Item
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
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 eva_create_evaluation_detail_review05ViewModel : BaseViewModel2<int>
|
||||||
|
{
|
||||||
|
|
||||||
|
public int? create_evaluation_id { get; set; }
|
||||||
|
|
||||||
|
public int? supervisor3A { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_result { get; set; }
|
||||||
|
|
||||||
|
public string supervisor3A_remark { get; set; }
|
||||||
|
|
||||||
|
public DateTime? supervisor3A_date { get; set; }
|
||||||
|
|
||||||
|
public string txt_supervisor3A_date { get { return MyHelper.GetDateStringForReport(this.supervisor3A_date); } }
|
||||||
|
|
||||||
|
public string supervisor3A_result_external_linkage_external_name { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TodoAPI2.Models
|
||||||
|
{
|
||||||
|
public class eva_create_evaluation_detail_review05WithSelectionViewModel: eva_create_evaluation_detail_review05ViewModel
|
||||||
|
{
|
||||||
|
public List<external_linkageViewModel> item_supervisor3A_result { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -187,10 +187,10 @@ namespace TodoAPI2.Models
|
|||||||
where k.id == model.id
|
where k.id == model.id
|
||||||
select k).FirstOrDefault();
|
select k).FirstOrDefault();
|
||||||
|
|
||||||
if (current_detail.status_chief_a == "Y")
|
//if (current_detail.status_chief_a == "Y")
|
||||||
{
|
//{
|
||||||
throw new Exception("ผู้ประเมิน อนุมัติข้อตกลงไปแล้ว บันทึกไม่ได้");
|
// throw new Exception("ผู้ประเมิน อนุมัติข้อตกลงไปแล้ว บันทึกไม่ได้");
|
||||||
}
|
//}
|
||||||
|
|
||||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||||
existingEntity.chief_a = model.chief_a;
|
existingEntity.chief_a = model.chief_a;
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string status_chief_a { get; set; }
|
public string status_chief_a { get; set; }
|
||||||
|
|
||||||
|
public string status_supervisor_a { get; set; }
|
||||||
|
|
||||||
public string status_supervisor { get; set; }
|
public string status_supervisor { get; set; }
|
||||||
|
|
||||||
public string status_supervisor1A { get; set; }
|
public string status_supervisor1A { get; set; }
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.status_chief = model.status_chief;
|
existingEntity.status_chief = model.status_chief;
|
||||||
existingEntity.status_self_a = model.status_self_a;
|
existingEntity.status_self_a = model.status_self_a;
|
||||||
existingEntity.status_chief_a = model.status_chief_a;
|
existingEntity.status_chief_a = model.status_chief_a;
|
||||||
|
existingEntity.status_supervisor_a = model.status_supervisor_a;
|
||||||
existingEntity.status_supervisor = model.status_supervisor;
|
existingEntity.status_supervisor = model.status_supervisor;
|
||||||
existingEntity.status_supervisor1A = model.status_supervisor1A;
|
existingEntity.status_supervisor1A = model.status_supervisor1A;
|
||||||
existingEntity.status_supervisor2A = model.status_supervisor2A;
|
existingEntity.status_supervisor2A = model.status_supervisor2A;
|
||||||
@@ -350,6 +351,24 @@ namespace TodoAPI2.Models
|
|||||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id, 2);
|
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id, 2);
|
||||||
}
|
}
|
||||||
|
else if (model.status_mode == "next5")
|
||||||
|
{
|
||||||
|
existingEntity.status_supervisor3A_click_date = DateTime.Now;
|
||||||
|
|
||||||
|
noti_to_employee_id2 = owner_eva_employee_id;
|
||||||
|
noti_message2 = "แบบประเมินของ {0} ได้รับการประเมินเรียบร้อยแล้ว";
|
||||||
|
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
|
||||||
|
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ) อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||||
|
}
|
||||||
|
else if (model.status_mode == "back5")
|
||||||
|
{
|
||||||
|
existingEntity.status_supervisor3A_click_date = DateTime.Now;
|
||||||
|
existingEntity.status_supervisor2A_click_date = null;
|
||||||
|
noti_to_employee_id = current_eva.supervisor2_id;
|
||||||
|
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||||
|
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||||
|
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)", model.employee_id, existingEntity.id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (need_noti)
|
if (need_noti)
|
||||||
{
|
{
|
||||||
@@ -369,6 +388,18 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
private void SendNotification(int? noti_to_employee_id, int? owner_eva_employee_id, int? detail_id, string noti_message, string noti_url)
|
private void SendNotification(int? noti_to_employee_id, int? owner_eva_employee_id, int? detail_id, string noti_message, string noti_url)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
@Nakorn (ต้น) คุณนครคะ
|
||||||
|
ผอ.กลางจะให้ท่านเลขาธิการฯ เริ่มทำในระบบ วันที่ 1 เมษายน 2565 ค่ะ โดยที่ประชุมที่ผ่านมาได้ตรวจรับระบบใบลาไว้ ผอ.กลางจึงขอให้ทางแซดดี ระงับการแจ้งเตือนที่ส่งไปถึงท่าน ณ ตอนนี้ทุกรายการ
|
||||||
|
และล้างรายการแจ้งเตือนของเดิมที่ค้างไว้ออกให้หมดค่ะ เพื่อที่ทางผอ.กลางจะส่งเรื่องให้ท่านเริ่มใช้งานค่ะ
|
||||||
|
|
||||||
|
*** โดยในวันที่ 1 เมษายน 65 เริ่มให้มีแต่การแจ้งเตือนและการอนุมัติเฉพาะระบบใบลาเท่านั้นค่ะ ***
|
||||||
|
*
|
||||||
|
ขอให้คุณนครดำเนินการให้ด้วยค่ะ
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (noti_to_employee_id == 163) return;
|
||||||
|
|
||||||
if (!noti_to_employee_id.HasValue || !owner_eva_employee_id.HasValue || !detail_id.HasValue) return;
|
if (!noti_to_employee_id.HasValue || !owner_eva_employee_id.HasValue || !detail_id.HasValue) return;
|
||||||
|
|
||||||
var all_emp = emp.GetAllEmployee();
|
var all_emp = emp.GetAllEmployee();
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace TodoAPI2.Models
|
|||||||
public eva_create_evaluation_detailEntity eva_create_evaluation_detail { get; set; }
|
public eva_create_evaluation_detailEntity eva_create_evaluation_detail { get; set; }
|
||||||
public int? create_evaluation_detail_id { get; set; }
|
public int? create_evaluation_detail_id { get; set; }
|
||||||
|
|
||||||
[MaxLength(8000)]
|
[MaxLength(16000)]
|
||||||
public string achievement { get; set; }
|
public string achievement { get; set; }
|
||||||
|
|
||||||
public decimal? weight { get; set; }
|
public decimal? weight { get; set; }
|
||||||
@@ -61,5 +61,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
[MaxLength(255)]
|
[MaxLength(255)]
|
||||||
public string target_score5 { get; set; }
|
public string target_score5 { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(16000)]
|
||||||
|
public string achievement_line1 { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,38 @@ namespace TodoAPI2.Models
|
|||||||
return newkey.Value;
|
return newkey.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ManageDetail(eva_evaluation_achievementEntity entity)
|
||||||
|
{
|
||||||
|
var oldDetail = from x in _repository.Context.eva_evaluation_achievement_detail
|
||||||
|
where x.achievement_id == entity.id
|
||||||
|
select x;
|
||||||
|
_repository.Context.eva_evaluation_achievement_detail.RemoveRange(oldDetail);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(entity.achievement))
|
||||||
|
{
|
||||||
|
var sp = entity.achievement.Split("^");
|
||||||
|
int i = 0;
|
||||||
|
foreach (var s in sp)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
entity.achievement_line1 = s.Trim();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var n = new eva_evaluation_achievement_detailEntity();
|
||||||
|
n.id = Guid.NewGuid();
|
||||||
|
n.achievement_order = i;
|
||||||
|
n.achievement_id = entity.id;
|
||||||
|
n.achievement_detail = s.Trim();
|
||||||
|
_repository.Context.Add(n);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
_repository.Context.SaveChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public eva_evaluation_achievementViewModel Insert(eva_evaluation_achievementInputModel model)
|
public eva_evaluation_achievementViewModel Insert(eva_evaluation_achievementInputModel model)
|
||||||
{
|
{
|
||||||
var entity = GetEntity(model);
|
var entity = GetEntity(model);
|
||||||
@@ -176,6 +208,7 @@ namespace TodoAPI2.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
var inserted = _repository.Insert(entity);
|
var inserted = _repository.Insert(entity);
|
||||||
|
ManageDetail(inserted);
|
||||||
|
|
||||||
return Get(inserted.id);
|
return Get(inserted.id);
|
||||||
}
|
}
|
||||||
@@ -199,10 +232,10 @@ namespace TodoAPI2.Models
|
|||||||
where i.id == model.create_evaluation_detail_id
|
where i.id == model.create_evaluation_detail_id
|
||||||
select i).FirstOrDefault();
|
select i).FirstOrDefault();
|
||||||
|
|
||||||
if (current_detail.status_self == "Y")
|
//if (current_detail.status_self == "Y")
|
||||||
{
|
//{
|
||||||
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
|
// throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
|
||||||
}
|
//}
|
||||||
|
|
||||||
var existingEntity = _repository.Get(id);
|
var existingEntity = _repository.Get(id);
|
||||||
if (existingEntity != null)
|
if (existingEntity != null)
|
||||||
@@ -235,6 +268,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
|
|
||||||
var updated = _repository.Update(id, existingEntity);
|
var updated = _repository.Update(id, existingEntity);
|
||||||
|
ManageDetail(updated);
|
||||||
return Get(updated.id);
|
return Get(updated.id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace TodoAPI2.Models
|
||||||
|
{
|
||||||
|
public class eva_evaluation_achievement_detailEntity : BaseEntity2<Guid>
|
||||||
|
{
|
||||||
|
[ForeignKey("achievement_id")]
|
||||||
|
public eva_evaluation_achievementEntity eva_evaluation_achievement { get; set; }
|
||||||
|
public int? achievement_id { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(16000)]
|
||||||
|
public string achievement_detail { get; set; }
|
||||||
|
|
||||||
|
public int? achievement_order { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ namespace TodoAPI2.Models
|
|||||||
public eva_create_evaluation_detailEntity eva_create_evaluation_detail { get; set; }
|
public eva_create_evaluation_detailEntity eva_create_evaluation_detail { get; set; }
|
||||||
public int? create_evaluation_detail_id { get; set; }
|
public int? create_evaluation_detail_id { get; set; }
|
||||||
|
|
||||||
[MaxLength(1000)]
|
[MaxLength(16000)]
|
||||||
public string behavior { get; set; }
|
public string behavior { get; set; }
|
||||||
|
|
||||||
public decimal? weight { get; set; }
|
public decimal? weight { get; set; }
|
||||||
|
|||||||
@@ -151,6 +151,20 @@ namespace TodoAPI2.Models
|
|||||||
return newkey.Value;
|
return newkey.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateMissionNo(int? create_evaluation_detail_id)
|
||||||
|
{
|
||||||
|
var items = (from i in _repository.Context.eva_evaluation_operating_agreement
|
||||||
|
where i.create_evaluation_detail_id == create_evaluation_detail_id
|
||||||
|
orderby i.mission_no
|
||||||
|
select i);
|
||||||
|
int p = 1;
|
||||||
|
foreach(var i in items)
|
||||||
|
{
|
||||||
|
i.mission_no = p;
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
_repository.Context.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
public eva_evaluation_operating_agreementViewModel Insert(eva_evaluation_operating_agreementInputModel model)
|
public eva_evaluation_operating_agreementViewModel Insert(eva_evaluation_operating_agreementInputModel model)
|
||||||
{
|
{
|
||||||
@@ -175,6 +189,9 @@ namespace TodoAPI2.Models
|
|||||||
entity.SetAutoField(_repository.Context);
|
entity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
var inserted = _repository.Insert(entity);
|
var inserted = _repository.Insert(entity);
|
||||||
|
|
||||||
|
updateMissionNo(entity.create_evaluation_detail_id);
|
||||||
|
|
||||||
entity.DoAfterInsertUpdate(_repository.Context);
|
entity.DoAfterInsertUpdate(_repository.Context);
|
||||||
return Get(inserted.id);
|
return Get(inserted.id);
|
||||||
}
|
}
|
||||||
@@ -193,6 +210,9 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.SetAutoField(_repository.Context);
|
existingEntity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
var updated = _repository.Update(id, existingEntity);
|
var updated = _repository.Update(id, existingEntity);
|
||||||
|
|
||||||
|
updateMissionNo(existingEntity.create_evaluation_detail_id);
|
||||||
|
|
||||||
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
existingEntity.DoAfterInsertUpdate(_repository.Context);
|
||||||
return Get(updated.id);
|
return Get(updated.id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
[ForeignKey("level_score_id")]
|
[ForeignKey("level_score_id")]
|
||||||
public eva_level_scoreEntity eva_level_score_level_score_id { get; set; }
|
public eva_level_scoreEntity eva_level_score_level_score_id { get; set; }
|
||||||
public Guid level_score_id { get; set; }
|
public Guid? level_score_id { get; set; }
|
||||||
|
|
||||||
public decimal? min_value { get; set; }
|
public decimal? min_value { get; set; }
|
||||||
|
|
||||||
@@ -28,7 +28,9 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public decimal? max_percentage { get; set; }
|
public decimal? max_percentage { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("group_guid")]
|
||||||
|
public eva_evaluation_groupEntity eva_evaluation_group_group_guid { get; set; }
|
||||||
|
public Guid? group_guid { get; set; }
|
||||||
public void SetAutoField(DataContext context)
|
public void SetAutoField(DataContext context)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public Guid? id { get; set; }
|
public Guid? id { get; set; }
|
||||||
|
|
||||||
public Guid level_score_id { get; set; }
|
public Guid? level_score_id { get; set; }
|
||||||
|
|
||||||
public decimal? min_value { get; set; }
|
public decimal? min_value { get; set; }
|
||||||
|
|
||||||
@@ -26,6 +26,8 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public decimal? max_percentage { get; set; }
|
public decimal? max_percentage { get; set; }
|
||||||
|
|
||||||
|
public Guid? group_guid { get; set; }
|
||||||
|
|
||||||
public string active_mode { get; set; }
|
public string active_mode { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public Guid id { get; set; }
|
public Guid id { get; set; }
|
||||||
|
|
||||||
public Guid level_score_id { get; set; }
|
public Guid? level_score_id { get; set; }
|
||||||
|
|
||||||
|
public Guid? group_guid { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var entity = _repository.Get(id);
|
var entity = _repository.Get(id);
|
||||||
var i = Mapper.Map<eva_level_score_detailWithSelectionViewModel>(entity);
|
var i = Mapper.Map<eva_level_score_detailWithSelectionViewModel>(entity);
|
||||||
|
i.item_level_score_id = (from x in _repository.Context.eva_level_score select x).ToList();
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
public eva_level_score_detailWithSelectionViewModel GetBlankItem()
|
public eva_level_score_detailWithSelectionViewModel GetBlankItem()
|
||||||
{
|
{
|
||||||
var i = new eva_level_score_detailWithSelectionViewModel();
|
var i = new eva_level_score_detailWithSelectionViewModel();
|
||||||
|
i.item_level_score_id = (from x in _repository.Context.eva_level_score select x).ToList();
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -104,11 +104,14 @@ namespace TodoAPI2.Models
|
|||||||
into eva_level_scoreResult1
|
into eva_level_scoreResult1
|
||||||
from fk_eva_level_scoreResult1 in eva_level_scoreResult1.DefaultIfEmpty()
|
from fk_eva_level_scoreResult1 in eva_level_scoreResult1.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join fk_eva_evaluation_group6 in _repository.Context.eva_evaluation_group on m_eva_level_score_detail.group_guid equals fk_eva_evaluation_group6.id
|
||||||
|
into eva_evaluation_groupResult6
|
||||||
|
from fk_eva_evaluation_groupResult6 in eva_evaluation_groupResult6.DefaultIfEmpty()
|
||||||
|
|
||||||
where
|
where
|
||||||
1 == 1
|
1 == 1
|
||||||
&& (m_eva_level_score_detail.level_score_id == model.level_score_id)
|
&& (!model.level_score_id.HasValue || m_eva_level_score_detail.level_score_id == model.level_score_id)
|
||||||
|
&& (m_eva_level_score_detail.group_guid == model.group_guid)
|
||||||
|
|
||||||
orderby m_eva_level_score_detail.min_value descending
|
orderby m_eva_level_score_detail.min_value descending
|
||||||
select new eva_level_score_detailViewModel()
|
select new eva_level_score_detailViewModel()
|
||||||
@@ -119,8 +122,10 @@ namespace TodoAPI2.Models
|
|||||||
max_value = m_eva_level_score_detail.max_value,
|
max_value = m_eva_level_score_detail.max_value,
|
||||||
min_percentage = m_eva_level_score_detail.min_percentage,
|
min_percentage = m_eva_level_score_detail.min_percentage,
|
||||||
max_percentage = m_eva_level_score_detail.max_percentage,
|
max_percentage = m_eva_level_score_detail.max_percentage,
|
||||||
|
group_guid = m_eva_level_score_detail.group_guid,
|
||||||
|
|
||||||
level_score_id_eva_level_score_code = fk_eva_level_scoreResult1.code,
|
level_score_id_eva_level_score_code = fk_eva_level_scoreResult1.detail,
|
||||||
|
group_guid_eva_evaluation_group_code = fk_eva_evaluation_groupResult6.thegroup,
|
||||||
|
|
||||||
isActive = m_eva_level_score_detail.isActive,
|
isActive = m_eva_level_score_detail.isActive,
|
||||||
Created = m_eva_level_score_detail.created,
|
Created = m_eva_level_score_detail.created,
|
||||||
@@ -169,6 +174,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.max_value = model.max_value;
|
existingEntity.max_value = model.max_value;
|
||||||
existingEntity.min_percentage = model.min_percentage;
|
existingEntity.min_percentage = model.min_percentage;
|
||||||
existingEntity.max_percentage = model.max_percentage;
|
existingEntity.max_percentage = model.max_percentage;
|
||||||
|
existingEntity.group_guid = model.group_guid;
|
||||||
|
|
||||||
existingEntity.SetAutoField(_repository.Context);
|
existingEntity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
@@ -191,7 +197,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public string UpdateMultiple(List<eva_level_score_detailInputModel> model, bool is_force_save)
|
public string UpdateMultiple(List<eva_level_score_detailInputModel> model, bool is_force_save)
|
||||||
{
|
{
|
||||||
foreach(var i in model)
|
foreach (var i in model)
|
||||||
{
|
{
|
||||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||||
{
|
{
|
||||||
@@ -203,6 +209,7 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.max_value = i.max_value;
|
existingEntity.max_value = i.max_value;
|
||||||
existingEntity.min_percentage = i.min_percentage;
|
existingEntity.min_percentage = i.min_percentage;
|
||||||
existingEntity.max_percentage = i.max_percentage;
|
existingEntity.max_percentage = i.max_percentage;
|
||||||
|
existingEntity.group_guid = i.group_guid;
|
||||||
|
|
||||||
existingEntity.SetAutoField(_repository.Context);
|
existingEntity.SetAutoField(_repository.Context);
|
||||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||||
@@ -262,17 +269,18 @@ namespace TodoAPI2.Models
|
|||||||
_repository.Context.SaveChanges();
|
_repository.Context.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dictionary<string,string> GetLookupForLog()
|
private Dictionary<string, string> GetLookupForLog()
|
||||||
{
|
{
|
||||||
var i = new Dictionary<string, string>();
|
var i = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
|
||||||
i.Add("level_score_id", "level_score_id");
|
i.Add("level_score_id", "level_score_id");
|
||||||
i.Add("level_score_id_eva_level_score_code", "level_score_id");
|
i.Add("level_score_id_eva_level_score_code", "level_score_id");
|
||||||
i.Add("min_value", "ช่วงคะแนนต่ำสุด");
|
i.Add("min_value", "ช่วงคะแนนต่ำสุด");
|
||||||
i.Add("max_value", "ช่วงคะแนนสูงสุด");
|
i.Add("max_value", "ช่วงคะแนนสูงสุด");
|
||||||
i.Add("min_percentage", "ร้อยละที่ได้เลื่อนต่ำสุด");
|
i.Add("min_percentage", "ร้อยละที่ได้เลื่อนต่ำสุด");
|
||||||
i.Add("max_percentage", "ร้อยละที่ได้เลื่อนสูงสุด");
|
i.Add("max_percentage", "ร้อยละที่ได้เลื่อนสูงสุด");
|
||||||
|
i.Add("group_guid", "กลุ่มการประเมิน");
|
||||||
|
i.Add("group_guid_eva_evaluation_group_code", "กลุ่มการประเมิน");
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace TodoAPI2.Models
|
|||||||
public class eva_level_score_detailViewModel : BaseViewModel2<Guid>
|
public class eva_level_score_detailViewModel : BaseViewModel2<Guid>
|
||||||
{
|
{
|
||||||
|
|
||||||
public Guid level_score_id { get; set; }
|
public Guid? level_score_id { get; set; }
|
||||||
|
|
||||||
public decimal? min_value { get; set; }
|
public decimal? min_value { get; set; }
|
||||||
|
|
||||||
@@ -24,7 +24,10 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public decimal? max_percentage { get; set; }
|
public decimal? max_percentage { get; set; }
|
||||||
|
|
||||||
|
public Guid? group_guid { get; set; }
|
||||||
|
|
||||||
public string level_score_id_eva_level_score_code { get; set; }
|
public string level_score_id_eva_level_score_code { get; set; }
|
||||||
|
public string group_guid_eva_evaluation_group_code { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,6 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
public class eva_level_score_detailWithSelectionViewModel: eva_level_score_detailViewModel
|
public class eva_level_score_detailWithSelectionViewModel: eva_level_score_detailViewModel
|
||||||
{
|
{
|
||||||
|
public List<eva_level_scoreEntity> item_level_score_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,15 +183,23 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var existingEntity = _repository.Get(id);
|
var existingEntity = _repository.Get(id);
|
||||||
|
|
||||||
var plan = (from i in _repository.Context.eva_limit_frame_plan where i.plan_guid == existingEntity.frame_plan_guid select i).FirstOrDefault();
|
var plan = (from i in _repository.Context.eva_limit_frame_plan
|
||||||
|
where i.id == existingEntity.frame_plan_guid
|
||||||
|
select i).FirstOrDefault();
|
||||||
|
|
||||||
|
var start = (from n in _repository.Context.eva_performance_plan_detail
|
||||||
|
where n.performance_plan_id == plan.plan_guid
|
||||||
|
select n.start_date).Min();
|
||||||
|
var end = (from n in _repository.Context.eva_performance_plan_detail
|
||||||
|
where n.performance_plan_id == plan.plan_guid
|
||||||
|
select n.end_date).Max();
|
||||||
|
|
||||||
var all_all_emp = emp.GetAllEmployee();
|
var all_all_emp = emp.GetAllEmployee();
|
||||||
var mapping_dept = emp.GetDeptMapping();
|
var mapping_dept = emp.GetDeptMapping();
|
||||||
var working_record = from i in emp.GetWorkingRecord()
|
var working_record = from i in emp.GetWorkingRecord()
|
||||||
// where
|
where
|
||||||
//plan.executed_date.HasValue
|
i.start_date >= start
|
||||||
//&& i.start_date <= plan.executed_date
|
&& i.end_date <= end
|
||||||
//&& i.end_date >= plan.executed_date
|
|
||||||
select i;
|
select i;
|
||||||
|
|
||||||
if (existingEntity != null)
|
if (existingEntity != null)
|
||||||
@@ -212,8 +220,10 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var theemp = (from q in all_all_emp where q.id == y.employee_id select q).FirstOrDefault();
|
var theemp = (from q in all_all_emp where q.id == y.employee_id select q).FirstOrDefault();
|
||||||
var thedetail = (from r in working_record where r.employee_id == y.employee_id select r).FirstOrDefault();
|
var thedetail = (from r in working_record where r.employee_id == y.employee_id select r).FirstOrDefault();
|
||||||
|
if(thedetail != null)
|
||||||
|
{
|
||||||
var help_at = (from s in mapping_dept where s.id == thedetail.place select s).FirstOrDefault();
|
var help_at = (from s in mapping_dept where s.id == thedetail.place select s).FirstOrDefault();
|
||||||
if (theemp != null && thedetail != null && help_at != null)
|
if (theemp != null && help_at != null)
|
||||||
{
|
{
|
||||||
if (existingEntity.remark != "") existingEntity.remark += "\n";
|
if (existingEntity.remark != "") existingEntity.remark += "\n";
|
||||||
existingEntity.remark += $"{j}.ในลำดับที่ {y.order_of_data} {theemp.fullname} ตำแหน่ง{theemp.position_name} {theemp.department_name} \nมาช่วยปฏิบัติงานที่{help_at.department_name} ตั้งแต่วันที่ {MyHelper.GetDateStringForReport(thedetail.start_date)} - {MyHelper.GetDateStringForReport(thedetail.end_date)} \nตาม{thedetail.subject}";
|
existingEntity.remark += $"{j}.ในลำดับที่ {y.order_of_data} {theemp.fullname} ตำแหน่ง{theemp.position_name} {theemp.department_name} \nมาช่วยปฏิบัติงานที่{help_at.department_name} ตั้งแต่วันที่ {MyHelper.GetDateStringForReport(thedetail.start_date)} - {MyHelper.GetDateStringForReport(thedetail.end_date)} \nตาม{thedetail.subject}";
|
||||||
@@ -221,6 +231,7 @@ namespace TodoAPI2.Models
|
|||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
existingEntity.SetAutoField(_repository.Context);
|
existingEntity.SetAutoField(_repository.Context);
|
||||||
|
|
||||||
|
|||||||
@@ -312,112 +312,63 @@ and u.id=@user_id;
|
|||||||
public employee_leaveViewModel GetLeaveOfEmployee(int employee_id, DateTime? start_date, DateTime? end_date)
|
public employee_leaveViewModel GetLeaveOfEmployee(int employee_id, DateTime? start_date, DateTime? end_date)
|
||||||
{
|
{
|
||||||
var sql = string.Format(@"
|
var sql = string.Format(@"
|
||||||
select {0}b{0}.{0}employee_id{0}, (
|
SELECT
|
||||||
SELECT SUM(tad_general.total_dayoff) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
SUM(CASE WHEN tad_general.leave_type_id = '2' THEN tad_general_detail.dayoff_qty END) as sum_day_sick_leave,
|
||||||
WHERE tad_general.deleted_at is null
|
COUNT(DISTINCT CASE WHEN tad_general.leave_type_id = '2' THEN tad_general_detail.general_leave_id END) as count_sick_leave,
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 2
|
SUM(CASE WHEN tad_general.leave_type_id = '4' THEN tad_general_detail.dayoff_qty END) as sum_day_personal_leave,
|
||||||
AND tad_general.employee_id = b.employee_id
|
COUNT(DISTINCT CASE WHEN tad_general.leave_type_id = '4' THEN tad_general_detail.general_leave_id END) as count_personal_leave,
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
SUM(CASE WHEN tad_general.leave_type_id = '1' THEN tad_general_detail.dayoff_qty END) as sum_day_vacation_leave,
|
||||||
AND tad_general.end_date <= @end_date
|
COUNT(DISTINCT CASE WHEN tad_general.leave_type_id = '1' THEN tad_general_detail.general_leave_id END) as count_vacation_leave,
|
||||||
) as sum_day_sick_leave, (
|
|
||||||
SELECT COUNT(tad_general.*) FROM tad_general_leaves as tad_general
|
(
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
SELECT COUNT(DISTINCT tad_stop.date) FROM public.tad_stop_workings as tad_stop
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 2
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as count_sick_leave, (
|
|
||||||
SELECT SUM(tad_general.total_dayoff) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 4
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as sum_day_personal_leave, (
|
|
||||||
SELECT COUNT(tad_general.*) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 4
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as count_personal_leave, (
|
|
||||||
SELECT SUM(tad_general.total_dayoff) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 1
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as sum_day_vacation_leave, (
|
|
||||||
SELECT COUNT(tad_general.*) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id = 1
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as count_vacation_leave, (
|
|
||||||
SELECT COUNT(DISTINCT tad_stop.date) FROM tad_stop_workings as tad_stop
|
|
||||||
WHERE tad_stop.deleted_at is null
|
WHERE tad_stop.deleted_at is null
|
||||||
AND tad_stop.employee_id = b.employee_id
|
AND tad_stop.status = 3
|
||||||
|
|
||||||
|
AND tad_stop.employee_id = @employee_id
|
||||||
AND tad_stop.date BETWEEN @start_date AND @end_date
|
AND tad_stop.date BETWEEN @start_date AND @end_date
|
||||||
) as count_stop_working, (
|
) as count_stop_working,
|
||||||
|
|
||||||
|
(
|
||||||
SELECT COUNT(prs_time_result.id) FROM tad_processing_time_results as prs_time_result
|
SELECT COUNT(prs_time_result.id) FROM tad_processing_time_results as prs_time_result
|
||||||
LEFT JOIN tad_processing_times as prs_time ON prs_time_result.processing_time_id = prs_time.id
|
INNER JOIN tad_processing_times as prs_time ON prs_time_result.processing_time_id = prs_time.id
|
||||||
WHERE prs_time_result.deleted_at is null
|
WHERE prs_time_result.deleted_at is null
|
||||||
AND prs_time.deleted_at is null
|
AND prs_time.deleted_at is null
|
||||||
AND prs_time_result.employee_id = b.employee_id
|
|
||||||
AND prs_time_result.time_in is not null
|
AND prs_time_result.time_in is not null
|
||||||
AND prs_time_result.time_out is not null
|
AND prs_time_result.time_out is not null
|
||||||
AND prs_time_result.late is not null
|
AND prs_time_result.late is not null
|
||||||
|
|
||||||
|
AND prs_time_result.employee_id = @employee_id
|
||||||
AND prs_time_result.date BETWEEN @start_date AND @end_date
|
AND prs_time_result.date BETWEEN @start_date AND @end_date
|
||||||
) as count_late_tad_processing_time_results, (
|
) as count_late_tad_processing_time_results,
|
||||||
|
|
||||||
|
(
|
||||||
SELECT COUNT(prs_time_result.id) FROM tad_processing_time_results as prs_time_result
|
SELECT COUNT(prs_time_result.id) FROM tad_processing_time_results as prs_time_result
|
||||||
LEFT JOIN tad_processing_times as prs_time ON prs_time_result.processing_time_id = prs_time.id
|
INNER JOIN tad_processing_times as prs_time ON prs_time_result.processing_time_id = prs_time.id
|
||||||
WHERE prs_time_result.deleted_at is null
|
WHERE prs_time_result.deleted_at is null
|
||||||
AND prs_time.deleted_at is null
|
AND prs_time.deleted_at is null
|
||||||
AND prs_time_result.employee_id = b.employee_id
|
|
||||||
AND prs_time_result.time_in is null
|
AND prs_time_result.time_in is null
|
||||||
AND prs_time_result.time_out is null
|
AND prs_time_result.time_out is null
|
||||||
AND prs_time_result.record_type = 'Absence'
|
AND prs_time_result.record_type = 'Absence'
|
||||||
|
|
||||||
|
AND prs_time_result.employee_id = @employee_id
|
||||||
AND prs_time_result.date BETWEEN @start_date AND @end_date
|
AND prs_time_result.date BETWEEN @start_date AND @end_date
|
||||||
) as count_absence_tad_processing_time_results, (
|
) as count_absence_tad_processing_time_results,
|
||||||
SELECT SUM(tad_general.total_dayoff) FROM tad_general_leaves as tad_general
|
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
SUM(CASE WHEN tad_general.leave_type_id = '2' OR tad_general.leave_type_id = '4' THEN tad_general_detail.dayoff_qty END) as sum_day_sick_personal_leave,
|
||||||
WHERE tad_general.deleted_at is null
|
COUNT(DISTINCT CASE WHEN tad_general.leave_type_id = '2' OR tad_general.leave_type_id = '4' THEN tad_general_detail.general_leave_id END) as count_sick_personal_leave
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id in (2,4)
|
FROM public.tad_general_leave_details as tad_general_detail
|
||||||
AND tad_general.employee_id = b.employee_id
|
inner join public.tad_general_leaves as tad_general on tad_general_detail.general_leave_id = tad_general.id
|
||||||
AND tad_general.status = '3'
|
where tad_general_detail.deleted_at is null
|
||||||
AND tad_general.start_date >= @start_date
|
and tad_general.deleted_at is null
|
||||||
AND tad_general.end_date <= @end_date
|
and tad_general.status = '3'
|
||||||
) as sum_day_sick_personal_leave, (
|
|
||||||
SELECT COUNT(tad_general.*) FROM tad_general_leaves as tad_general
|
and tad_general.employee_id = @employee_id
|
||||||
LEFT JOIN tad_leave_types as leave_type ON tad_general.leave_type_id = CAST(leave_type.id as varchar)
|
and tad_general_detail.date BETWEEN @start_date AND @end_date
|
||||||
WHERE tad_general.deleted_at is null
|
|
||||||
AND leave_type.deleted_at is null
|
|
||||||
AND leave_type.id in (2,4)
|
|
||||||
AND tad_general.employee_id = b.employee_id
|
|
||||||
AND tad_general.status = '3'
|
|
||||||
AND tad_general.start_date >= @start_date
|
|
||||||
AND tad_general.end_date <= @end_date
|
|
||||||
) as count_sick_personal_leave from {0}tad_table_workings{0} as {0}a{0} left join {0}hrm_employees{0} as {0}b{0} on {0}a{0}.{0}employee_id{0} = {0}b{0}.{0}employee_id{0} left join {0}tad_workshifts{0} as {0}c{0} on {0}a{0}.{0}workshift_id{0} = {0}c{0}.{0}id{0} where {0}a{0}.{0}deleted_at{0} is null and {0}b{0}.{0}deleted_at{0} is null and {0}c{0}.{0}deleted_at{0} is null and {0}b{0}.{0}employee_id{0} = @employee_id
|
|
||||||
", '"'.ToString());
|
", '"'.ToString());
|
||||||
|
|
||||||
var para = db.GetParameterListNpgsql();
|
var para = db.GetParameterListNpgsql();
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ namespace TodoAPI2.Models
|
|||||||
List<external_linkageViewModel> Getevaluation_accept();
|
List<external_linkageViewModel> Getevaluation_accept();
|
||||||
List<external_linkageViewModel> GetAgreeDisagree();
|
List<external_linkageViewModel> GetAgreeDisagree();
|
||||||
List<external_linkageViewModel> GetAgreeDisagree2();
|
List<external_linkageViewModel> GetAgreeDisagree2();
|
||||||
|
|
||||||
|
List<external_linkageViewModel> GetAgreeDisagree3();
|
||||||
List<external_linkageViewModel> GetDepartmentData();
|
List<external_linkageViewModel> GetDepartmentData();
|
||||||
List<external_linkageViewModel> GetDepartmentDataForReport();
|
List<external_linkageViewModel> GetDepartmentDataForReport();
|
||||||
List<external_linkageViewModel> GetPositionForReport();
|
List<external_linkageViewModel> GetPositionForReport();
|
||||||
|
|||||||
@@ -248,6 +248,30 @@ namespace TodoAPI2.Models
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<external_linkageViewModel> GetAgreeDisagree3()
|
||||||
|
{
|
||||||
|
var result = new List<external_linkageViewModel>();
|
||||||
|
var i = new external_linkageViewModel();
|
||||||
|
i.external_id = 1;
|
||||||
|
i.external_code = "Y";
|
||||||
|
i.external_name = "เห็นด้วยกับผลการประเมิน";
|
||||||
|
result.Add(i);
|
||||||
|
|
||||||
|
var j = new external_linkageViewModel();
|
||||||
|
j.external_id = 2;
|
||||||
|
j.external_code = "N";
|
||||||
|
j.external_name = "ไม่เห็นด้วยและมีความเห็นต่าง";
|
||||||
|
result.Add(j);
|
||||||
|
|
||||||
|
var k = new external_linkageViewModel();
|
||||||
|
k.external_id = 3;
|
||||||
|
k.external_code = "R";
|
||||||
|
k.external_name = "อยู่ระหว่างพิจารณา แต่ให้พิมพ์ออกได้ก่อน";
|
||||||
|
result.Add(k);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public List<external_linkageViewModel> GetAgreeDisagree()
|
public List<external_linkageViewModel> GetAgreeDisagree()
|
||||||
{
|
{
|
||||||
var result = new List<external_linkageViewModel>();
|
var result = new List<external_linkageViewModel>();
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ namespace TodoAPI2.Models
|
|||||||
public string supervisor1A_position { get; set; }
|
public string supervisor1A_position { get; set; }
|
||||||
public string supervisor2A_fullname { get; set; }
|
public string supervisor2A_fullname { get; set; }
|
||||||
public string supervisor2A_position { get; set; }
|
public string supervisor2A_position { get; set; }
|
||||||
|
public string supervisor3A_fullname { get; set; }
|
||||||
|
public string supervisor3A_position { get; set; }
|
||||||
public string leave_period { get; set; }
|
public string leave_period { get; set; }
|
||||||
public string main_dept { get; set; }
|
public string main_dept { get; set; }
|
||||||
public int? selected_round { get; set; }
|
public int? selected_round { get; set; }
|
||||||
@@ -61,11 +63,21 @@ namespace TodoAPI2.Models
|
|||||||
public string txt_status_self_a_click_date { get; set; }
|
public string txt_status_self_a_click_date { get; set; }
|
||||||
public string txt_status_chief_a_click_date { get; set; }
|
public string txt_status_chief_a_click_date { get; set; }
|
||||||
|
|
||||||
|
public string txt_status_self_click_date { get; set; }
|
||||||
|
public string txt_status_chief_click_date { get; set; }
|
||||||
|
|
||||||
|
public string txt_status_supervisor_click_date { get; set; }
|
||||||
|
public string txt_status_supervisor1A_click_date { get; set; }
|
||||||
|
public string txt_status_supervisor2A_click_date { get; set; }
|
||||||
|
public string txt_status_supervisor3A_click_date { get; set; }
|
||||||
|
|
||||||
public string plan_remark { get; set; }
|
public string plan_remark { get; set; }
|
||||||
|
|
||||||
public string eva_detail_remark { get; set; }
|
public string eva_detail_remark { get; set; }
|
||||||
|
|
||||||
public string print_dt { get; set; }
|
public string print_dt { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,12 +150,19 @@ namespace TodoAPI2.Models
|
|||||||
entity.id = Guid.NewGuid();
|
entity.id = Guid.NewGuid();
|
||||||
entity.limit_frame_005 = (decimal?)0.05;
|
entity.limit_frame_005 = (decimal?)0.05;
|
||||||
|
|
||||||
|
var start = (from n in _repository.Context.eva_performance_plan_detail
|
||||||
|
where n.performance_plan_id == model.plan_guid
|
||||||
|
select n.start_date).Min();
|
||||||
|
var end = (from n in _repository.Context.eva_performance_plan_detail
|
||||||
|
where n.performance_plan_id == model.plan_guid
|
||||||
|
select n.end_date).Max();
|
||||||
|
|
||||||
var all_all_emp = emp.GetAllEmployee();
|
var all_all_emp = emp.GetAllEmployee();
|
||||||
var mapping_dept = emp.GetDeptMapping();
|
var mapping_dept = emp.GetDeptMapping();
|
||||||
var working_record = from i in emp.GetWorkingRecord() where
|
var working_record = from i in emp.GetWorkingRecord()
|
||||||
model.executed_date.HasValue
|
where
|
||||||
&& i.start_date <= model.executed_date
|
i.start_date >= start
|
||||||
&& i.end_date >= model.executed_date
|
&& i.end_date <= end
|
||||||
select i;
|
select i;
|
||||||
var result_frame_group = new List<eva_limit_frame_groupEntity>();
|
var result_frame_group = new List<eva_limit_frame_groupEntity>();
|
||||||
var result_frame_employee = new List<eva_limit_frame_employeeEntity>();
|
var result_frame_employee = new List<eva_limit_frame_employeeEntity>();
|
||||||
@@ -242,8 +249,10 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var theemp = (from q in all_all_emp where q.id == y.employee_id select q).FirstOrDefault();
|
var theemp = (from q in all_all_emp where q.id == y.employee_id select q).FirstOrDefault();
|
||||||
var thedetail = (from r in working_record where r.employee_id == y.employee_id select r).FirstOrDefault();
|
var thedetail = (from r in working_record where r.employee_id == y.employee_id select r).FirstOrDefault();
|
||||||
|
if(thedetail != null)
|
||||||
|
{
|
||||||
var help_at = (from s in mapping_dept where s.id == thedetail.place select s).FirstOrDefault();
|
var help_at = (from s in mapping_dept where s.id == thedetail.place select s).FirstOrDefault();
|
||||||
if(theemp != null && thedetail != null && help_at != null)
|
if (theemp != null && help_at != null)
|
||||||
{
|
{
|
||||||
if (x.remark != "") x.remark += "\n";
|
if (x.remark != "") x.remark += "\n";
|
||||||
x.remark += $"{j}.ในลำดับที่ {y.order_of_data} {theemp.fullname} ตำแหน่ง{theemp.position_name} {theemp.department_name} \nมาช่วยปฏิบัติงานที่{help_at.department_name} ตั้งแต่วันที่ {MyHelper.GetDateStringForReport(thedetail.start_date)} - {MyHelper.GetDateStringForReport(thedetail.end_date)} \nตาม{thedetail.subject}";
|
x.remark += $"{j}.ในลำดับที่ {y.order_of_data} {theemp.fullname} ตำแหน่ง{theemp.position_name} {theemp.department_name} \nมาช่วยปฏิบัติงานที่{help_at.department_name} ตั้งแต่วันที่ {MyHelper.GetDateStringForReport(thedetail.start_date)} - {MyHelper.GetDateStringForReport(thedetail.end_date)} \nตาม{thedetail.subject}";
|
||||||
@@ -252,6 +261,7 @@ namespace TodoAPI2.Models
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_repository.Context.AddRange(result_frame_group);
|
_repository.Context.AddRange(result_frame_group);
|
||||||
_repository.Context.AddRange(result_frame_employee);
|
_repository.Context.AddRange(result_frame_employee);
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ namespace Test01
|
|||||||
|
|
||||||
services.AddScoped<Ieva_create_evaluation_detail_review04Service, eva_create_evaluation_detail_review04Service>();
|
services.AddScoped<Ieva_create_evaluation_detail_review04Service, eva_create_evaluation_detail_review04Service>();
|
||||||
|
|
||||||
|
services.AddScoped<Ieva_create_evaluation_detail_review05Service, eva_create_evaluation_detail_review05Service>();
|
||||||
|
|
||||||
services.AddScoped<Ieva_level_score_basicService, eva_level_score_basicService>();
|
services.AddScoped<Ieva_level_score_basicService, eva_level_score_basicService>();
|
||||||
|
|
||||||
services.AddScoped<Isearch_employeeService, search_employeeService>();
|
services.AddScoped<Isearch_employeeService, search_employeeService>();
|
||||||
@@ -542,6 +544,10 @@ namespace Test01
|
|||||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04ViewModel>();
|
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04ViewModel>();
|
||||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04WithSelectionViewModel>();
|
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review04WithSelectionViewModel>();
|
||||||
|
|
||||||
|
cfg.CreateMap<eva_create_evaluation_detail_review05InputModel, eva_create_evaluation_detailEntity>();
|
||||||
|
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review05ViewModel>();
|
||||||
|
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review05WithSelectionViewModel>();
|
||||||
|
|
||||||
cfg.CreateMap<eva_level_score_basicInputModel, eva_level_scoreEntity>();
|
cfg.CreateMap<eva_level_score_basicInputModel, eva_level_scoreEntity>();
|
||||||
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicViewModel>();
|
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicViewModel>();
|
||||||
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicWithSelectionViewModel>();
|
cfg.CreateMap<eva_level_scoreEntity, eva_level_score_basicWithSelectionViewModel>();
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ namespace TodoAPI2.Controllers
|
|||||||
{
|
{
|
||||||
MyHelper.get_login(HttpContext, emp, Response);
|
MyHelper.get_login(HttpContext, emp, Response);
|
||||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||||
return View();
|
return View("eva_self_review_close");
|
||||||
|
//return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public IActionResult eva_self_review_d()
|
// public IActionResult eva_self_review_d()
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace TodoAPI2.Controllers
|
|||||||
Response.Cookies.Append("user_id", HttpContext.Request.Query["user_id"], option);
|
Response.Cookies.Append("user_id", HttpContext.Request.Query["user_id"], option);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Redirect("/eva/home/index");
|
return Redirect("/eva/home/index2");
|
||||||
}
|
}
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
|
|||||||
@@ -123,16 +123,16 @@
|
|||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_eva_result'>ผลการประเมิน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_eva_result'>ผลการประเมิน</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
||||||
|
|
||||||
<th style="display:none;"><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
||||||
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_reward'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_middle'>ค่ากลางฐานในการคำนวณ</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_middle'>ค่ากลางฐานในการคำนวณ</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_total_promote'>จำนวนเงินที่ได้เลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_total_promote'>จำนวนเงินที่ได้เลื่อน</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_sarary'>เงินเดือนใหม่</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_sarary'>เงินเดือนใหม่</label></th>
|
||||||
<th style="display:none;"><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
||||||
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_reward'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_remark'>หมายเหตุ</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_normal_02_remark'>หมายเหตุ</label></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -149,13 +149,13 @@
|
|||||||
<th>รวม</th>
|
<th>รวม</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><p id="sum_before"></p></th>
|
<th><p id="sum_before"></p></th>
|
||||||
<th style="display:none;"></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><p id="sum_after"></p></th>
|
<th><p id="sum_after"></p></th>
|
||||||
<th style="display:none;"></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -83,54 +83,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-6">
|
||||||
<label>ผลรวมเงินเดือนปัจจุบัน คือ</label>
|
<label>ผลรวมเงินเดือนปัจจุบัน คือ</label>
|
||||||
<input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="sum_current_salary" />
|
<input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="sum_current_salary" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_adjust_postponement_quota_limit_frame_quota" for="eva_adjust_postponement_quota_limit_frame_quota">กรอบโควต้าพิเศษร้อยละ</label>
|
|
||||||
<input onchange="Oneva_adjust_postponement_quota_limit_frame_quotaChange();" placeholder="0.00" class="form-control money mask_plugin" type="number" id="eva_adjust_postponement_quota_limit_frame_quota" iLabel="กรอบโควต้าพิเศษร้อยละ" iRequire="true" iGroup="eva_adjust_postponement_quota" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_adjust_postponement_quota_limit_quota" for="eva_adjust_postponement_quota_limit_quota">จำนวนเงินที่สามารถบริหารวงเงินที่กันไว้</label>
|
|
||||||
<input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="eva_adjust_postponement_quota_limit_quota" iLabel="จำนวนเงินที่สามารถบริหารวงเงินที่กันไว้" iRequire="true" iGroup="eva_adjust_postponement_quota" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='row'>
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label for="remain_quota">จำนวนเงินโควต้าพิเศษคงเหลือ</label>
|
|
||||||
<input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="remain_quota" iLabel="จำนวนเงินโควต้าพิเศษคงเหลือ" iRequire="false" iGroup="eva_adjust_postponement_quota" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label id="lab_eva_adjust_postponement_quota_command_no" for="eva_adjust_postponement_quota_command_no">เลขที่คำสั่ง</label>
|
<label id="lab_eva_adjust_postponement_quota_command_no" for="eva_adjust_postponement_quota_command_no">เลขที่คำสั่ง</label>
|
||||||
<input class="form-control" type="text" id="eva_adjust_postponement_quota_command_no" iLabel="เลขที่คำสั่ง" iRequire="true" iGroup="eva_adjust_postponement_quota" />
|
<input class="form-control" type="text" id="eva_adjust_postponement_quota_command_no" iLabel="เลขที่คำสั่ง" iRequire="true" iGroup="eva_adjust_postponement_quota" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-md-12">
|
|
||||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
|
||||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_adjust_postponement_quota_PutUpdate()">บันทึก</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<table style="position:fixed; bottom:0px; left:0px; background-color:black; width:100%; z-index:100;">
|
||||||
|
<tr>
|
||||||
|
<td><button type="button" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button></td>
|
||||||
|
<td><label style="color:white;" id="lab_eva_adjust_postponement_quota_limit_frame_quota" for="eva_adjust_postponement_quota_limit_frame_quota">กรอบโควต้าพิเศษร้อยละ</label></td>
|
||||||
|
<td><input onchange="Oneva_adjust_postponement_quota_limit_frame_quotaChange();" placeholder="0.00" class="form-control money mask_plugin" type="number" id="eva_adjust_postponement_quota_limit_frame_quota" iLabel="กรอบโควต้าพิเศษร้อยละ" iRequire="true" iGroup="eva_adjust_postponement_quota" /></td>
|
||||||
|
<td><label style="color:white;" id="lab_eva_adjust_postponement_quota_limit_quota" for="eva_adjust_postponement_quota_limit_quota">จำนวนเงินที่สามารถบริหารวงเงินที่กันไว้</label></td>
|
||||||
|
<td><input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="eva_adjust_postponement_quota_limit_quota" iLabel="จำนวนเงินที่สามารถบริหารวงเงินที่กันไว้" iRequire="true" iGroup="eva_adjust_postponement_quota" /></td>
|
||||||
|
<td><label style="color:white;" for="remain_quota">จำนวนเงินโควต้าพิเศษคงเหลือ</label></td>
|
||||||
|
<td><input disabled placeholder="0.00" class="form-control money mask_plugin" type="text" id="remain_quota" iLabel="จำนวนเงินโควต้าพิเศษคงเหลือ" iRequire="false" iGroup="eva_adjust_postponement_quota" /></td>
|
||||||
|
<td><button type="button" onclick="javascript:eva_adjust_postponement_quota_PutUpdate()">บันทึก</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<section class="wrapper">
|
<section class="wrapper">
|
||||||
<div class="title"><div class="line"></div>รายชื่อบุคลลากร</div>
|
<div class="title"><div class="line"></div>รายชื่อบุคลลากร</div>
|
||||||
|
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button class="btn btn-info" type="button" onclick="javascript:CalculateRemainQuota(true)">คำนวณค่าครองชีพใหม่ ตามเกณฑ์เงินเดือน 13,285</button>
|
<button style="display:none;" class="btn btn-info" type="button" onclick="javascript:CalculateRemainQuota(true)">คำนวณค่าครองชีพใหม่ ตามเกณฑ์เงินเดือน 13,285</button>
|
||||||
<button type="button" class="btn btn-submit" onclick="javascript:rep_eva_savemessage_DoSearch('pdf')">พิมพ์ บันทึกข้อความ</button>
|
<button type="button" class="btn btn-submit" onclick="javascript:rep_eva_savemessage_DoSearch('pdf')">พิมพ์ บันทึกข้อความ</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,8 +141,8 @@
|
|||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_level'>ระดับ</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_level'>ระดับ</label></th>
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
||||||
<th style="display:none;"><label id='h_eva_adjust_postponement_detail_quota_02_reward_old'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
||||||
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_reward_old'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_total_score'>คะแนนรวม</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_total_score'>คะแนนรวม</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_eva_result'>ผลการประเมิน</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_eva_result'>ผลการประเมิน</label></th>
|
||||||
@@ -159,8 +153,8 @@
|
|||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_receive_quota'>ได้รับเงินโควต้าพิเศษ</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_receive_quota'>ได้รับเงินโควต้าพิเศษ</label></th>
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_sarary_with_quota'>เงินเดือนใหม่ (รวมโควต้า)</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_sarary_with_quota'>เงินเดือนใหม่ (รวมโควต้า)</label></th>
|
||||||
<th style="display:none;"><label id='h_eva_adjust_postponement_detail_quota_02_reward_new2'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
||||||
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_reward_new2'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
||||||
|
|
||||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_remark'>หมายเหตุ</label></th>
|
<th><label id='h_eva_adjust_postponement_detail_quota_02_remark'>หมายเหตุ</label></th>
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@
|
|||||||
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||||
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_create_evaluation_supervisor3_id" for="eva_create_evaluation_supervisor3_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)</label>
|
||||||
|
<select class="form-control" id="eva_create_evaluation_supervisor3_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
@@ -127,8 +132,8 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
@section FooterPlaceHolder{
|
||||||
<script src="~/js/eva_create_evaluation/eva_create_evaluation.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation/eva_create_evaluation.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
eva_create_evaluation_InitiateDataTable();
|
eva_create_evaluation_InitiateDataTable();
|
||||||
eva_create_evaluation_InitialForm();
|
eva_create_evaluation_InitialForm();
|
||||||
@@ -142,9 +147,12 @@
|
|||||||
$("#eva_create_evaluation_supervisor2_id").select2({
|
$("#eva_create_evaluation_supervisor2_id").select2({
|
||||||
dropdownParent: $('#eva_create_evaluationModel')
|
dropdownParent: $('#eva_create_evaluationModel')
|
||||||
});
|
});
|
||||||
|
$("#eva_create_evaluation_supervisor3_id").select2({
|
||||||
|
dropdownParent: $('#eva_create_evaluationModel')
|
||||||
|
});
|
||||||
$("#eva_create_evaluation_detail_employee_id").select2();
|
$("#eva_create_evaluation_detail_employee_id").select2();
|
||||||
$("#eva_create_evaluation_detail_chief").select2();
|
$("#eva_create_evaluation_detail_chief").select2();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,16 @@
|
|||||||
<label id="lab_eva_create_evaluation_detail_supervisor2_id" for="eva_create_evaluation_detail_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
<label id="lab_eva_create_evaluation_detail_supervisor2_id" for="eva_create_evaluation_detail_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||||
<select class="form-control" id="eva_create_evaluation_detail_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
|
<select class="form-control" id="eva_create_evaluation_detail_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_create_evaluation_detail_supervisor3_id" for="eva_create_evaluation_detail_supervisor3_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)</label>
|
||||||
|
<select class="form-control" id="eva_create_evaluation_detail_supervisor3_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)" iRequire="false" iGroup="eva_create_evaluation_detail" ></select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label id="lab_eva_create_evaluation_detail_work_period" for="eva_create_evaluation_detail_work_period">ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)</label>
|
<label id="lab_eva_create_evaluation_detail_work_period" for="eva_create_evaluation_detail_work_period">ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)</label>
|
||||||
<input class="form-control" type="number" id="eva_create_evaluation_detail_work_period" iLabel="ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)" iRequire="false" iGroup="eva_create_evaluation_detail" />
|
<input class="form-control" type="number" id="eva_create_evaluation_detail_work_period" iLabel="ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)" iRequire="false" iGroup="eva_create_evaluation_detail" />
|
||||||
@@ -159,6 +167,11 @@
|
|||||||
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
<label id="lab_eva_create_evaluation_supervisor2_id" for="eva_create_evaluation_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
|
||||||
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
<select class="form-control" id="eva_create_evaluation_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_create_evaluation_supervisor3_id" for="eva_create_evaluation_supervisor3_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)</label>
|
||||||
|
<select class="form-control" id="eva_create_evaluation_supervisor3_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ)" iRequire="false" iGroup="eva_create_evaluation"></select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
@@ -238,9 +251,9 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
@section FooterPlaceHolder{
|
||||||
<script src="~/js/eva_create_evaluation/eva_create_evaluation_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation/eva_create_evaluation_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_create_evaluation_detail/eva_create_evaluation_detail.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation_detail/eva_create_evaluation_detail.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var id = getUrlParameter("id");
|
var id = getUrlParameter("id");
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -255,6 +268,8 @@
|
|||||||
$("#eva_create_evaluation_employee_id").select2();
|
$("#eva_create_evaluation_employee_id").select2();
|
||||||
$("#eva_create_evaluation_supervisor1_id").select2();
|
$("#eva_create_evaluation_supervisor1_id").select2();
|
||||||
$("#eva_create_evaluation_supervisor2_id").select2();
|
$("#eva_create_evaluation_supervisor2_id").select2();
|
||||||
|
$("#eva_create_evaluation_supervisor3_id").select2();
|
||||||
|
|
||||||
$("#eva_create_evaluation_detail_employee_id").select2({
|
$("#eva_create_evaluation_detail_employee_id").select2({
|
||||||
dropdownParent: $('#eva_create_evaluation_detailModel')
|
dropdownParent: $('#eva_create_evaluation_detailModel')
|
||||||
});
|
});
|
||||||
@@ -270,6 +285,9 @@
|
|||||||
$("#eva_create_evaluation_detail_supervisor2_id").select2({
|
$("#eva_create_evaluation_detail_supervisor2_id").select2({
|
||||||
dropdownParent: $('#eva_create_evaluation_detailModel')
|
dropdownParent: $('#eva_create_evaluation_detailModel')
|
||||||
});
|
});
|
||||||
|
$("#eva_create_evaluation_detail_supervisor3_id").select2({
|
||||||
|
dropdownParent: $('#eva_create_evaluation_detailModel')
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function go_next() {
|
function go_next() {
|
||||||
@@ -277,11 +295,11 @@
|
|||||||
window.location = "eva_create_evaluation_d_summary?id=" + id;
|
window.location = "eva_create_evaluation_d_summary?id=" + id;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
@section HeadPlaceHolder{
|
@section HeadPlaceHolder{
|
||||||
<link href="~/BackendScript/css/step.css" rel="stylesheet">
|
<link href="~/BackendScript/css/step.css" rel="stylesheet">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -455,6 +455,11 @@
|
|||||||
function CheckPermission() {
|
function CheckPermission() {
|
||||||
if (status_self === "Y") {
|
if (status_self === "Y") {
|
||||||
$(".status_self").hide();
|
$(".status_self").hide();
|
||||||
|
var isEdit = getUrlParameter("e");
|
||||||
|
console.log(isEdit);
|
||||||
|
if (!isEdit) {
|
||||||
|
$(".status_self2").hide();
|
||||||
|
}
|
||||||
$(".status_self_text").attr("disabled", true);
|
$(".status_self_text").attr("disabled", true);
|
||||||
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -319,6 +319,8 @@
|
|||||||
|
|
||||||
function CheckPermission() {
|
function CheckPermission() {
|
||||||
|
|
||||||
|
console.log("status_supervisor_a =" + status_supervisor_a);
|
||||||
|
|
||||||
$(".status_self").hide();
|
$(".status_self").hide();
|
||||||
$(".status_chief").hide();
|
$(".status_chief").hide();
|
||||||
$(".status_supervisor").hide();
|
$(".status_supervisor").hide();
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<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><label>สถานะตรวจสอบ<br />(ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด))</label></th>
|
||||||
|
<th><label>สถานะตรวจสอบ<br />(ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ))</label></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
|
|||||||
@@ -589,7 +589,7 @@
|
|||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<button id="btnd01" type="button" class="btn btn-submit" onclick="javascript:saveReview04()">บันทึก</button>
|
<button id="btnd01" type="button" class="btn btn-submit" onclick="javascript:saveReview04()">บันทึก</button>
|
||||||
|
|
||||||
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
|
||||||
|
|
||||||
<button id="btnd02" type="button" class="btn btn-submit" onclick="javascript:saveStatus('next4')">ส่งแบบประเมิน</button>
|
<button id="btnd02" type="button" class="btn btn-submit" onclick="javascript:saveStatus('next4')">ส่งแบบประเมิน</button>
|
||||||
|
|
||||||
@@ -599,6 +599,57 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<section class="wrapper">
|
||||||
|
<div class="title col-md-12"><div class="line"></div>ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (พิเศษ) <span style="color:red;" id="thestatus3A"></span></div>
|
||||||
|
<section class="card no-border">
|
||||||
|
<div class="card-body" style="">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review05_id" />
|
||||||
|
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review05_create_evaluation_id" />
|
||||||
|
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review05_supervisor3A" />
|
||||||
|
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label id="lab_eva_create_evaluation_detail_review05_supervisor3A_result" for="eva_create_evaluation_detail_review05_supervisor3A_result">ผลการประเมิน</label>
|
||||||
|
<select onchange="Oneva_create_evaluation_detail_review05_supervisor3A_resultChanged(this)" class="form-control" id="eva_create_evaluation_detail_review05_supervisor3A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review05"></select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label id="lab_eva_create_evaluation_detail_review05_supervisor3A_date" for="eva_create_evaluation_detail_review05_supervisor3A_date">วันที่ประเมิน</label>
|
||||||
|
<input disabled class="form-control" type="text" id="eva_create_evaluation_detail_review05_supervisor3A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="false" iGroup="eva_create_evaluation_detail_review05" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label id="lab_eva_create_evaluation_detail_review05_supervisor3A_remark" for="eva_create_evaluation_detail_review05_supervisor3A_remark">ความเห็นผู้ประเมินสูงสุด</label> <span id="review05x" style="color:red;display:none;">*</span>
|
||||||
|
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review05_supervisor3A_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="false" iGroup="eva_create_evaluation_detail_review05"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<button id="btne01" type="button" class="btn btn-submit" onclick="javascript:savereview05()">บันทึก</button>
|
||||||
|
|
||||||
|
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
||||||
|
|
||||||
|
<button id="btne02" type="button" class="btn btn-submit" onclick="javascript:saveStatus('next5')">ส่งแบบประเมิน</button>
|
||||||
|
|
||||||
|
<button id="btne03" type="button" class="btn btn-danger" onclick="javascript:saveStatus('back5')">ตีกลับแบบประเมิน</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
@section FooterPlaceHolder{
|
||||||
@@ -610,6 +661,7 @@
|
|||||||
<script src="~/js/eva_create_evaluation_detail_review02/eva_create_evaluation_detail_review02_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation_detail_review02/eva_create_evaluation_detail_review02_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_create_evaluation_detail_review03/eva_create_evaluation_detail_review03_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation_detail_review03/eva_create_evaluation_detail_review03_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
|
<script src="~/js/eva_create_evaluation_detail_review05/eva_create_evaluation_detail_review05_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_idp_plan/eva_idp_plan.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_idp_plan/eva_idp_plan.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/rep_eva_x/rep_eva_x_report.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/rep_eva_x/rep_eva_x_report.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
@@ -623,6 +675,7 @@
|
|||||||
eva_create_evaluation_detail_review02_SetEditForm(id);
|
eva_create_evaluation_detail_review02_SetEditForm(id);
|
||||||
eva_create_evaluation_detail_review03_SetEditForm(id);
|
eva_create_evaluation_detail_review03_SetEditForm(id);
|
||||||
eva_create_evaluation_detail_review04_SetEditForm(id);
|
eva_create_evaluation_detail_review04_SetEditForm(id);
|
||||||
|
eva_create_evaluation_detail_review05_SetEditForm(id);
|
||||||
eva_create_evaluation_detail_status_SetEditForm(id);
|
eva_create_evaluation_detail_status_SetEditForm(id);
|
||||||
|
|
||||||
eva_idp_plan_InitiateDataTable(id);
|
eva_idp_plan_InitiateDataTable(id);
|
||||||
@@ -638,6 +691,7 @@
|
|||||||
SetupValidationRemark("eva_create_evaluation_detail_review02");
|
SetupValidationRemark("eva_create_evaluation_detail_review02");
|
||||||
SetupValidationRemark("eva_create_evaluation_detail_review03");
|
SetupValidationRemark("eva_create_evaluation_detail_review03");
|
||||||
SetupValidationRemark("eva_create_evaluation_detail_review04");
|
SetupValidationRemark("eva_create_evaluation_detail_review04");
|
||||||
|
SetupValidationRemark("eva_create_evaluation_detail_review05");
|
||||||
SetupValidationRemark("eva_idp_plan");
|
SetupValidationRemark("eva_idp_plan");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -648,13 +702,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Oneva_create_evaluation_detail_review02_supervisor2_resultChanged(a) {
|
function Oneva_create_evaluation_detail_review02_supervisor2_resultChanged(a) {
|
||||||
if ($(a).val() == "Y") {
|
if ($(a).val() === "N") {
|
||||||
|
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire", "true");
|
||||||
|
$("#review02x").show();
|
||||||
|
} else {
|
||||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire", "false");
|
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire", "false");
|
||||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").css('border-color', '');
|
$("#eva_create_evaluation_detail_review02_supervisor2_remark").css('border-color', '');
|
||||||
$("#review02x").hide();
|
$("#review02x").hide();
|
||||||
} else {
|
|
||||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire", "true");
|
|
||||||
$("#review02x").show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,6 +734,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Oneva_create_evaluation_detail_review05_supervisor3A_resultChanged(a) {
|
||||||
|
if ($(a).val() == "Y") {
|
||||||
|
$("#eva_create_evaluation_detail_review05_supervisor3A_remark").attr("iRequire", "false");
|
||||||
|
$("#eva_create_evaluation_detail_review05_supervisor3A_remark").css('border-color', '');
|
||||||
|
$("#review05x").hide();
|
||||||
|
} else {
|
||||||
|
$("#eva_create_evaluation_detail_review05_supervisor3A_remark").attr("iRequire", "true");
|
||||||
|
$("#review05x").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function searchVacation_GetFromForm() {
|
function searchVacation_GetFromForm() {
|
||||||
var searchVacationObject = new Object();
|
var searchVacationObject = new Object();
|
||||||
searchVacationObject.start_date = formatDateForGetParameter(getDate($("#date_from").val()));
|
searchVacationObject.start_date = formatDateForGetParameter(getDate($("#date_from").val()));
|
||||||
@@ -751,6 +816,14 @@
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function savereview05() {
|
||||||
|
saveAll();
|
||||||
|
setTimeout(function () {
|
||||||
|
eva_create_evaluation_detail_review05_PutUpdate(true);
|
||||||
|
endLoad();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
function saveStatus(s) {
|
function saveStatus(s) {
|
||||||
if (s === "next2" || s === "back2") {
|
if (s === "next2" || s === "back2") {
|
||||||
if (!ValidateForm('eva_create_evaluation_detail_review02', eva_create_evaluation_detail_review02_customValidation)) {
|
if (!ValidateForm('eva_create_evaluation_detail_review02', eva_create_evaluation_detail_review02_customValidation)) {
|
||||||
@@ -785,6 +858,17 @@
|
|||||||
eva_create_evaluation_detail_status_PutUpdate(s);
|
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
else if (s === "next5") {
|
||||||
|
if (!ValidateForm('eva_create_evaluation_detail_review05', eva_create_evaluation_detail_review05_customValidation)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
startLoad();
|
||||||
|
saveAll();
|
||||||
|
eva_create_evaluation_detail_review05_PutUpdate(false);
|
||||||
|
setTimeout(function () {
|
||||||
|
eva_create_evaluation_detail_status_PutUpdate(s);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveAll() {
|
function saveAll() {
|
||||||
|
|||||||
@@ -5,6 +5,64 @@
|
|||||||
Layout = "_LayoutDirect";
|
Layout = "_LayoutDirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<div class="modal fade" id="eva_level_score_detailModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_level_score_detailModelLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="eva_level_score_detailModelLabel">บันทึกข้อมูล ช่วงร้อยละที่ได้เลื่อน</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<input class="form-control" type="hidden" id="eva_level_score_detail_id" />
|
||||||
|
<input class="form-control" type="hidden" id="eva_level_score_detail_group_guid" />
|
||||||
|
|
||||||
|
<div class='row'></div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_level_score_detail_level_score_id" for="eva_level_score_detail_level_score_id">ระดับคะแนน</label>
|
||||||
|
<select class="form-control" id="eva_level_score_detail_level_score_id" iLabel="ระดับคะแนน" iRequire="true" iGroup="eva_level_score_detail"></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_level_score_detail_min_value" for="eva_level_score_detail_min_value">ช่วงคะแนนต่ำสุด</label>
|
||||||
|
<input class="form-control" type="number" id="eva_level_score_detail_min_value" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_level_score_detail_max_value" for="eva_level_score_detail_max_value">ช่วงคะแนนสูงสุด</label>
|
||||||
|
<input class="form-control" type="number" id="eva_level_score_detail_max_value" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_level_score_detail_min_percentage" for="eva_level_score_detail_min_percentage">ร้อยละที่ได้เลื่อนต่ำสุด</label>
|
||||||
|
<input class="form-control" type="number" id="eva_level_score_detail_min_percentage" iLabel="ร้อยละที่ได้เลื่อนต่ำสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_level_score_detail_max_percentage" for="eva_level_score_detail_max_percentage">ร้อยละที่ได้เลื่อนสูงสุด</label>
|
||||||
|
<input class="form-control" type="number" id="eva_level_score_detail_max_percentage" iLabel="ร้อยละที่ได้เลื่อนสูงสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
||||||
|
<button type="button" class="btn btn-primary" onclick="javascript:eva_level_score_detail_PutUpdate()">บันทึก</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row page-title">
|
<div class="row page-title">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
@@ -70,7 +128,7 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<br/>
|
<br />
|
||||||
|
|
||||||
<section class="wrapper">
|
<section class="wrapper">
|
||||||
<div class="title"><div class="line"></div>รายชื่อบุคลากร</div>
|
<div class="title"><div class="line"></div>รายชื่อบุคลากร</div>
|
||||||
@@ -100,19 +158,64 @@
|
|||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<input class="form-control" type="hidden" id="s_eva_level_score_detail_group_guid" />
|
||||||
|
|
||||||
|
<section class="wrapper">
|
||||||
|
<div class="title"><div class="line"></div>ตารางกำหนดช่วงร้อยละที่ได้เลื่อน</div>
|
||||||
|
<div class="tools">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label id='lab_s_eva_level_score_detail_level_score_id' for='s_eva_level_score_detail_level_score_id'>ระดับคะแนน</label>
|
||||||
|
<select class="form-control" id="s_eva_level_score_detail_level_score_id" iLabel="ระดับคะแนน" iRequire="true" iGroup="s_eva_level_score_detail" title='ระดับคะแนน' placeholder='ระดับคะแนน'></select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<button class="btn btn-info" onclick="javascript:eva_level_score_detail_DoSearch();">ค้นหา</button>
|
||||||
|
<button class="btn btn-info" onclick="javascript:eva_level_score_detail_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table id="eva_level_score_detailTable" class="display table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<!--<th>เลือก</th>-->
|
||||||
|
<th>เครื่องมือ</th>
|
||||||
|
|
||||||
|
<th><label id='h_eva_level_score_detail_level_score_id'>ระดับคะแนน</label></th>
|
||||||
|
<th><label id='h_eva_level_score_detail_min_value'>ช่วงคะแนนต่ำสุด</label></th>
|
||||||
|
<th><label id='h_eva_level_score_detail_max_value'>ช่วงคะแนนสูงสุด</label></th>
|
||||||
|
<th><label id='h_eva_level_score_detail_min_percentage'>ร้อยละที่ได้เลื่อนต่ำสุด</label></th>
|
||||||
|
<th><label id='h_eva_level_score_detail_max_percentage'>ร้อยละที่ได้เลื่อนสูงสุด</label></th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
@section FooterPlaceHolder{
|
||||||
<script src="~/js/eva_evaluation_group/eva_evaluation_group_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_evaluation_group/eva_evaluation_group_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_evaluation_group_detail/eva_evaluation_group_detail.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_evaluation_group_detail/eva_evaluation_group_detail.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
|
<script src="~/js/eva_level_score_detail/eva_level_score_detail.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var id = getUrlParameter("id");
|
var id = getUrlParameter("id");
|
||||||
if (id) {
|
if (id) {
|
||||||
eva_evaluation_group_SetEditForm(id);
|
eva_evaluation_group_SetEditForm(id);
|
||||||
eva_evaluation_group_detail_InitiateDataTable(id);
|
eva_evaluation_group_detail_InitiateDataTable(id);
|
||||||
|
eva_level_score_detail_InitiateDataTable();
|
||||||
|
eva_level_score_detail_InitialForm();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
eva_evaluation_group_SetCreateForm();
|
eva_evaluation_group_SetCreateForm();
|
||||||
}
|
}
|
||||||
SetupValidationRemark("eva_evaluation_group");
|
SetupValidationRemark("eva_evaluation_group");
|
||||||
|
SetupValidationRemark("eva_level_score_detail");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,59 +5,6 @@
|
|||||||
Layout = "_LayoutDirect";
|
Layout = "_LayoutDirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="modal fade" id="eva_level_score_detailModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="eva_level_score_detailModelLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="eva_level_score_detailModelLabel">บันทึกข้อมูล ช่วงร้อยละที่ได้เลื่อน</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<input class="form-control" type="hidden" id="eva_level_score_detail_id" />
|
|
||||||
<input class="form-control" type="hidden" id="eva_level_score_detail_level_score_id" />
|
|
||||||
|
|
||||||
<div class='row'></div>
|
|
||||||
<div class='row'></div>
|
|
||||||
<div class='row'>
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_level_score_detail_min_value" for="eva_level_score_detail_min_value">ช่วงคะแนนต่ำสุด</label>
|
|
||||||
<input class="form-control" type="number" id="eva_level_score_detail_min_value" iLabel="ช่วงคะแนนต่ำสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_level_score_detail_max_value" for="eva_level_score_detail_max_value">ช่วงคะแนนสูงสุด</label>
|
|
||||||
<input class="form-control" type="number" id="eva_level_score_detail_max_value" iLabel="ช่วงคะแนนสูงสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='row'>
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_level_score_detail_min_percentage" for="eva_level_score_detail_min_percentage">ร้อยละที่ได้เลื่อนต่ำสุด</label>
|
|
||||||
<input class="form-control" type="number" id="eva_level_score_detail_min_percentage" iLabel="ร้อยละที่ได้เลื่อนต่ำสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label id="lab_eva_level_score_detail_max_percentage" for="eva_level_score_detail_max_percentage">ร้อยละที่ได้เลื่อนสูงสุด</label>
|
|
||||||
<input class="form-control" type="number" id="eva_level_score_detail_max_percentage" iLabel="ร้อยละที่ได้เลื่อนสูงสุด" iRequire="true" iGroup="eva_level_score_detail" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
|
|
||||||
<button type="button" class="btn btn-primary" onclick="javascript:eva_level_score_detail_PutUpdate()">บันทึก</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal fade" id="eva_promoted_percentageModel" style="z-index:1500" role="dialog" aria-labelledby="eva_promoted_percentageModelLabel" aria-hidden="true">
|
<div class="modal fade" id="eva_promoted_percentageModel" style="z-index:1500" role="dialog" aria-labelledby="eva_promoted_percentageModelLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -203,42 +150,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<section class="wrapper">
|
|
||||||
<div class="title"><div class="line"></div>ตารางกำหนดช่วงร้อยละที่ได้เลื่อน</div>
|
|
||||||
<div class="tools">
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<input class="form-control" type="hidden" id="s_eva_level_score_detail_level_score_id" />
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<button class="btn btn-info" onclick="javascript:eva_level_score_detail_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table id="eva_level_score_detailTable" class="display table table-bordered table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<!--<th>เลือก</th>-->
|
|
||||||
<th>เครื่องมือ</th>
|
|
||||||
<th><label id='h_eva_level_score_detail_min_value'>ช่วงคะแนนต่ำสุด</label></th>
|
|
||||||
<th><label id='h_eva_level_score_detail_max_value'>ช่วงคะแนนสูงสุด</label></th>
|
|
||||||
<th><label id='h_eva_level_score_detail_min_percentage'>ร้อยละที่ได้เลื่อนต่ำสุด</label></th>
|
|
||||||
<th><label id='h_eva_level_score_detail_max_percentage'>ร้อยละที่ได้เลื่อนสูงสุด</label></th>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody></tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
@section FooterPlaceHolder{
|
@section FooterPlaceHolder{
|
||||||
<script src="~/js/eva_level_score/eva_level_score_d.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_level_score/eva_level_score_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_promoted_percentage/eva_promoted_percentage.js?version=@MyHelper.GetDummyText()"></script>
|
<script src="~/js/eva_promoted_percentage/eva_promoted_percentage.js?version=@MyHelper.GetDummyText()"></script>
|
||||||
<script src="~/js/eva_level_score_detail/eva_level_score_detail.js?version=@MyHelper.GetDummyText()"></script>
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var id = getUrlParameter("id");
|
var id = getUrlParameter("id");
|
||||||
@@ -246,14 +162,11 @@
|
|||||||
eva_level_score_SetEditForm(id);
|
eva_level_score_SetEditForm(id);
|
||||||
eva_promoted_percentage_InitiateDataTable(id);
|
eva_promoted_percentage_InitiateDataTable(id);
|
||||||
eva_promoted_percentage_InitialForm();
|
eva_promoted_percentage_InitialForm();
|
||||||
eva_level_score_detail_InitiateDataTable();
|
|
||||||
eva_level_score_detail_InitialForm();
|
|
||||||
} else {
|
} else {
|
||||||
eva_level_score_SetCreateForm();
|
eva_level_score_SetCreateForm();
|
||||||
}
|
}
|
||||||
SetupValidationRemark("eva_level_score");
|
SetupValidationRemark("eva_level_score");
|
||||||
SetupValidationRemark("eva_promoted_percentage");
|
SetupValidationRemark("eva_promoted_percentage");
|
||||||
SetupValidationRemark("eva_level_score_detail");
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|||||||
38
Views/eva_self_reviewView/eva_self_review_close.cshtml
Normal file
38
Views/eva_self_reviewView/eva_self_review_close.cshtml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
@using Microsoft.Extensions.Configuration
|
||||||
|
@inject IConfiguration Configuration
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "eva_self_review";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<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="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
|
||||||
|
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@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">
|
||||||
|
|
||||||
|
<p>ยังไม่เปิดให้บริการ</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
@section FooterPlaceHolder{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -26,10 +26,11 @@
|
|||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-8">
|
||||||
<input class="form-control" type="text" id="external_employee_search_box">
|
กด Ctrl+F เพื่อทำการค้นหาชื่อ
|
||||||
|
<input style="display:none;" class="form-control" type="text" id="external_employee_search_box">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="display:none;">
|
||||||
|
|
||||||
<button class="btn btn-info" onclick="javascript:external_employee_DoSearch();"><i class="fa fa-search" style="font-size: 14px;"></i> ค้นหา</button>
|
<button class="btn btn-info" onclick="javascript:external_employee_DoSearch();"><i class="fa fa-search" style="font-size: 14px;"></i> ค้นหา</button>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"connectionStrings": {
|
"connectionStrings": {
|
||||||
"mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2;User ID=postgres;Password=ZdPr0jects;",
|
"mainDBConnectionString": "Server=192.168.1.34;Port=32432;Database=tb320_hr_site2_eva2;User ID=postgres;Password=ZdPr0jects;",
|
||||||
"externalDBConnectionString": "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_eva2;User ID=postgres;Password=ZdPr0jects;"
|
||||||
//"mainDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;",
|
//"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*;"
|
//"externalDBConnectionString": "Server=192.168.2.233;Port=5432;Database=tb320_hr_site2;User ID=postgres;Password=project0*;"
|
||||||
},
|
},
|
||||||
|
|||||||
5
build_command.txt
Normal file
5
build_command.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
docker build -t registry.gitlab.com/zd-team/tb/tb320eva_zd .
|
||||||
|
|
||||||
|
docker login registry.gitlab.com -u nakorn2526 -p
|
||||||
|
|
||||||
|
docker push registry.gitlab.com/zd-team/tb/tb320eva_zd
|
||||||
108
tb320eva.xml
108
tb320eva.xml
@@ -1756,6 +1756,114 @@
|
|||||||
<response code="400">If the model is invalid</response>
|
<response code="400">If the model is invalid</response>
|
||||||
<response code="500">Error Occurred</response>
|
<response code="500">Error Occurred</response>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller},TodoAPI2.Models.Ieva_create_evaluation_detail_review05Service,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.eva_create_evaluation_detail_review05Controller.Get(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Get specific item by id
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<returns>Return Get specific item by id</returns>
|
||||||
|
<response code="200">Returns the item</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.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.eva_create_evaluation_detail_review05Controller.GetList(System.Nullable{System.Int32})">
|
||||||
|
<summary>
|
||||||
|
Get list items by create_evaluation_id
|
||||||
|
</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.eva_create_evaluation_detail_review05Controller.GetListBySearch(TodoAPI2.Models.eva_create_evaluation_detail_review05SearchModel)">
|
||||||
|
<summary>
|
||||||
|
Get list items by search
|
||||||
|
</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.eva_create_evaluation_detail_review05Controller.Insert(TodoAPI2.Models.eva_create_evaluation_detail_review05InputModel)">
|
||||||
|
<summary>
|
||||||
|
Create new item
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<param name="model"></param>
|
||||||
|
<returns>Response Result Message</returns>
|
||||||
|
<response code="200">Response Result Message</response>
|
||||||
|
<response code="400">If the model is invalid</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.Update(System.Int32,TodoAPI2.Models.eva_create_evaluation_detail_review05InputModel)">
|
||||||
|
<summary>
|
||||||
|
Update item
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<param name="id"></param>
|
||||||
|
<param name="model"></param>
|
||||||
|
<returns>Response Result Message</returns>
|
||||||
|
<response code="200">Response Result Message</response>
|
||||||
|
<response code="400">If the model is invalid</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.Delete(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
Delete item
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<param name="id"></param>
|
||||||
|
<returns>Response Result Message</returns>
|
||||||
|
<response code="200">Response Result Message</response>
|
||||||
|
<response code="400">If the model is invalid</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_create_evaluation_detail_review05InputModel})">
|
||||||
|
<summary>
|
||||||
|
Update multiple item
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<param name="model"></param>
|
||||||
|
<returns>Response Result Message</returns>
|
||||||
|
<response code="200">Response Result Message</response>
|
||||||
|
<response code="400">If the model is invalid</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review05Controller.RefreshAutoField">
|
||||||
|
<summary>
|
||||||
|
Refresh AutoField of all items
|
||||||
|
</summary>
|
||||||
|
<remarks>
|
||||||
|
</remarks>
|
||||||
|
<returns>Response Result Message</returns>
|
||||||
|
<response code="200">Response Result Message</response>
|
||||||
|
<response code="400">If the model is invalid</response>
|
||||||
|
<response code="500">Error Occurred</response>
|
||||||
|
</member>
|
||||||
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review0AController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_review0AController},TodoAPI2.Models.Ieva_create_evaluation_detail_review0AService,Microsoft.Extensions.Configuration.IConfiguration)">
|
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review0AController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_review0AController},TodoAPI2.Models.Ieva_create_evaluation_detail_review0AService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||||
<summary>
|
<summary>
|
||||||
Default constructure for dependency injection
|
Default constructure for dependency injection
|
||||||
|
|||||||
@@ -64,16 +64,19 @@ function eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, i, blankI
|
|||||||
$("#eva_adjust_postponement_detail_normal_02_salary_max_" + i).text(data.salary_max);
|
$("#eva_adjust_postponement_detail_normal_02_salary_max_" + i).text(data.salary_max);
|
||||||
$("#eva_adjust_postponement_detail_normal_02_themax_" + i).text(data.themax);
|
$("#eva_adjust_postponement_detail_normal_02_themax_" + i).text(data.themax);
|
||||||
|
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).val(data.reward_old);
|
//if (data.new_sarary > data.themax) {
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).val(data.reward_new);
|
// $("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 0));
|
||||||
|
//} else {
|
||||||
|
// $("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(0, 0));
|
||||||
|
//}
|
||||||
|
|
||||||
if (data.new_sarary > data.themax) {
|
if (data.reward_old) {
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 3));
|
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(data.reward_old, 0));
|
||||||
} else {
|
} else {
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(0, 3));
|
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(data.reward_new, 3));
|
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(data.reward_new, 0));
|
||||||
$("#themax_" + i).val(data.themax);
|
$("#themax_" + i).val(data.themax);
|
||||||
$("#min_percentage_" + i).val(data.min_percentage);
|
$("#min_percentage_" + i).val(data.min_percentage);
|
||||||
$("#max_percentage_" + i).val(data.max_percentage);
|
$("#max_percentage_" + i).val(data.max_percentage);
|
||||||
@@ -156,16 +159,16 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
|||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_eva_result_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_eva_result_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_sarary_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_sarary_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
tag += '<td style="display:none;"><p id="eva_adjust_postponement_detail_normal_02_reward_old_' + (i + 1) + '" /></td>';
|
|
||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_cost_living_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_cost_living_' + (i + 1) + '" /></td>';
|
||||||
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_reward_old_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_middle_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_middle_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><input class="form-control" onchange="Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(true)" type="number" id="eva_adjust_postponement_detail_normal_02_promoted_percentage_' + (i + 1) + '" /></td>';
|
tag += '<td><input class="form-control" onchange="Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(true)" type="number" id="eva_adjust_postponement_detail_normal_02_promoted_percentage_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_total_promote_' + (i + 1) + '" /></td>';
|
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_total_promote_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_new_sarary_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_new_sarary_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td style="display:none;"><p id="eva_adjust_postponement_detail_normal_02_reward_new_' + (i + 1) + '" /></td>';
|
|
||||||
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_new_cost_living_' + (i + 1) + '" /></td>';
|
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||||
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_reward_new_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_remark_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_salary_max_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_themax_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_remark_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_salary_max_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_themax_' + (i + 1) + '" /></td>';
|
||||||
tag += '</tr>';
|
tag += '</tr>';
|
||||||
|
|
||||||
@@ -181,13 +184,13 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
|||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '</tr>';
|
tag += '</tr>';
|
||||||
@@ -205,13 +208,13 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
|||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '</tr>';
|
tag += '</tr>';
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function eva_adjust_postponement_detail_quota_02_FeedDataToForm(data, i, blankIt
|
|||||||
$("#eva_adjust_postponement_detail_quota_02_sarary_" + i).text(formatNumber(data.sarary));
|
$("#eva_adjust_postponement_detail_quota_02_sarary_" + i).text(formatNumber(data.sarary));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_cost_living_" + i).text(formatNumber(data.cost_living));
|
$("#eva_adjust_postponement_detail_quota_02_cost_living_" + i).text(formatNumber(data.cost_living));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_middle_" + i).text(formatNumber(data.middle));
|
$("#eva_adjust_postponement_detail_quota_02_middle_" + i).text(formatNumber(data.middle));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_promoted_percentage_" + i).text(formatNumberTemp(data.promoted_percentage));
|
$("#eva_adjust_postponement_detail_quota_02_promoted_percentage_" + i).text(formatNumber2(data.promoted_percentage, 3));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_total_promote_" + i).text(formatNumber(data.total_promote));
|
$("#eva_adjust_postponement_detail_quota_02_total_promote_" + i).text(formatNumber(data.total_promote));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text(formatNumberTemp(data.new_sarary));
|
$("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text(formatNumberTemp(data.new_sarary));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(data.new_cost_living);
|
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(data.new_cost_living);
|
||||||
@@ -43,15 +43,20 @@ function eva_adjust_postponement_detail_quota_02_FeedDataToForm(data, i, blankIt
|
|||||||
$("#eva_adjust_postponement_detail_quota_02_emp_fullname_" + i).text(data.emp_fullname);
|
$("#eva_adjust_postponement_detail_quota_02_emp_fullname_" + i).text(data.emp_fullname);
|
||||||
$("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text(data.emp_position);
|
$("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text(data.emp_position);
|
||||||
$("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text(data.emp_level);
|
$("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text(data.emp_level);
|
||||||
$("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(data.total_score);
|
$("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(formatNumber2(data.total_score,3));
|
||||||
$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(data.eva_result);
|
$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(data.eva_result);
|
||||||
|
|
||||||
if (data.new_sarary > data.themax) {
|
//if (data.new_sarary > data.themax) {
|
||||||
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 3));
|
// $("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 3));
|
||||||
|
//} else {
|
||||||
|
// $("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(0, 3));
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (data.reward_old) {
|
||||||
|
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(data.reward_old, 3));
|
||||||
} else {
|
} else {
|
||||||
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(0, 3));
|
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(0, 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(data.reward_new2, 3));
|
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(data.reward_new2, 3));
|
||||||
$("#themax_" + i).val(data.themax);
|
$("#themax_" + i).val(data.themax);
|
||||||
}
|
}
|
||||||
@@ -133,8 +138,8 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_emp_level_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_emp_level_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_sarary_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_sarary_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td style="display:none;"><p id="eva_adjust_postponement_detail_quota_02_reward_old_' + (i + 1) + '" /></td>';
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_cost_living_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_cost_living_' + (i + 1) + '" /></td>';
|
||||||
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_reward_old_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_total_score_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_total_score_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_eva_result_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_eva_result_' + (i + 1) + '" /></td>';
|
||||||
@@ -145,8 +150,8 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
|
|
||||||
tag += '<td><input onchange="CalculateRemainQuota(false);" class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_receive_quota_' + (i + 1) + '" /></td>';
|
tag += '<td><input onchange="CalculateRemainQuota(false);" class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_receive_quota_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td style="display:none;"><p id="eva_adjust_postponement_detail_quota_02_reward_new2_' + (i + 1) + '" /></td>';
|
tag += '<td><input class="form-control" disabled type="number" id="eva_adjust_postponement_detail_quota_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><input class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_new_cost_living_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_reward_new2_' + (i + 1) + '" /></td>';
|
||||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_remark_' + (i + 1) + '" /></td>';
|
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_remark_' + (i + 1) + '" /></td>';
|
||||||
|
|
||||||
|
|
||||||
@@ -160,7 +165,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
tag += '<td>เงินประจำตำแหน่ง</td>';
|
tag += '<td>เงินประจำตำแหน่ง</td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
@@ -169,7 +174,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '</tr>';
|
tag += '</tr>';
|
||||||
@@ -183,7 +188,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
tag += '<td>ค่าตอบแทนรายเดือน</td>';
|
tag += '<td>ค่าตอบแทนรายเดือน</td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
@@ -192,7 +197,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
|||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||||
tag += '<td style="display:none;"></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '<td></td>';
|
tag += '<td></td>';
|
||||||
tag += '</tr>';
|
tag += '</tr>';
|
||||||
|
|||||||
@@ -181,14 +181,20 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(m
|
|||||||
var new_added = Math.ceil(((percentage * middle) / 100) / 10) * 10;
|
var new_added = Math.ceil(((percentage * middle) / 100) / 10) * 10;
|
||||||
var new_salary = parseFloat(old_salary + new_added);
|
var new_salary = parseFloat(old_salary + new_added);
|
||||||
|
|
||||||
if (new_salary > salary_max) {
|
//if (new_salary > themax) {
|
||||||
alert("เงินเดือนเกินกรอบวงเงินขั้นสูงของพนักงานคือ " + formatNumber(themax) + " บาท แต่สามารถหยอดได้ถึง " + formatNumber(salary_max) + " บาท กรุณาหยอดร้อยละที่ได้เลื่อนอีกครั้งค่ะ");
|
// alert("เงินเดือนเกินกรอบวงเงินขั้นสูงของพนักงานคือ " + formatNumber(themax) + " บาท แต่สามารถหยอดได้ถึง " + formatNumber(salary_max) + " บาท กรุณาหยอดร้อยละที่ได้เลื่อนอีกครั้งค่ะ");
|
||||||
}
|
//}
|
||||||
|
//if (new_salary > salary_max) {
|
||||||
|
// alert("เงินเดือนใหม่ที่ได้รับ เกินกรอบวงเงินสูงสุด(1 ขั้น) ของพนักงาน คือ " + formatNumber(salary_max) + " บาท");
|
||||||
|
// percentage = 0.000;
|
||||||
|
// $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val("0.000");
|
||||||
|
// new_added = Math.ceil(((percentage * middle) / 100) / 10) * 10;
|
||||||
|
// new_salary = parseFloat(old_salary + new_added);
|
||||||
|
//}
|
||||||
|
|
||||||
var format_new_added = coreFormatPrice(new_added, 3);
|
var format_new_added = coreFormatPrice(new_added, 3);
|
||||||
|
|
||||||
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(format_new_added);
|
|
||||||
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(formatNumber(new_salary));
|
|
||||||
|
|
||||||
//if (m) {
|
//if (m) {
|
||||||
// if (new_salary < 13285) {
|
// if (new_salary < 13285) {
|
||||||
@@ -208,11 +214,34 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(m
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_salary > $("#themax_" + i).val()) {
|
//if (new_salary > $("#themax_" + i).val()) {
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(new_salary - $("#themax_" + i).val(), 3));
|
// $("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(new_salary - $("#themax_" + i).val(), 3));
|
||||||
} else {
|
//} else {
|
||||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(0, 3));
|
// $("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(0, 3));
|
||||||
|
//}
|
||||||
|
|
||||||
|
var emp_position = $("#eva_adjust_postponement_detail_normal_02_emp_position_" + i).text();
|
||||||
|
var emp_level = $("#eva_adjust_postponement_detail_normal_02_emp_position_" + i).text();
|
||||||
|
|
||||||
|
if (emp_position === "พนักงานทั่วไป") {
|
||||||
|
if (emp_level === "ชำนาญการ" && new_salary > 49480) {
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(new_salary - 49480, 0));
|
||||||
}
|
}
|
||||||
|
else if (new_salary > 25020) {
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(new_salary - 25020, 0));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
var reward_new = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text().replace(/[,-]/g, ''));
|
||||||
|
new_salary = new_salary - reward_new;
|
||||||
|
} else {
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(format_new_added);
|
||||||
|
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(formatNumber(new_salary));
|
||||||
|
|
||||||
sum_postpone += new_added;
|
sum_postpone += new_added;
|
||||||
sum_before += old_salary;
|
sum_before += old_salary;
|
||||||
|
|||||||
@@ -150,14 +150,38 @@ function CalculateRemainQuota(m) {
|
|||||||
var i = $(this).find("#rowCount").text();
|
var i = $(this).find("#rowCount").text();
|
||||||
if (i) {
|
if (i) {
|
||||||
var current_salary = parseFloat($("#eva_adjust_postponement_detail_quota_02_sarary_" + i).text().replace(/[,-]/g, ''));
|
var current_salary = parseFloat($("#eva_adjust_postponement_detail_quota_02_sarary_" + i).text().replace(/[,-]/g, ''));
|
||||||
var new_sarary = parseFloat($("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text());
|
var new_sarary = parseFloat($("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text().replace(/[,-]/g, ''));
|
||||||
|
if (!new_sarary) new_sarary = parseFloat($("#eva_adjust_postponement_detail_quota_02_sarary_" + i).text().replace(/[,-]/g, ''));
|
||||||
var receive_quota = parseFloat($("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val());
|
var receive_quota = parseFloat($("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val());
|
||||||
|
|
||||||
receive_quota = Math.round(receive_quota * 100) / 100;
|
receive_quota = Math.round(receive_quota * 100) / 100;
|
||||||
if (receive_quota < 0) receive_quota = 0;
|
if (receive_quota < 0) receive_quota = 0;
|
||||||
$("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val(receive_quota);
|
$("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val(receive_quota);
|
||||||
|
|
||||||
|
var emp_position = $("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text();
|
||||||
|
var emp_level = $("#eva_adjust_postponement_detail_quota_02_emp_position_" + i).text();
|
||||||
|
|
||||||
|
if (emp_position === "พนักงานทั่วไป") {
|
||||||
|
if (emp_level === "ชำนาญการ" && new_sarary > 49480) {
|
||||||
|
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(new_sarary - 49480, 0));
|
||||||
|
}
|
||||||
|
else if (new_sarary > 25020) {
|
||||||
|
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(new_sarary - 25020, 0));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
var reward_new2 = parseFloat($(this).find("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text().replace(/[,-]/g, ''));
|
||||||
|
new_sarary = new_sarary - reward_new2;
|
||||||
|
} else {
|
||||||
|
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
var new_sarary_with_quota = new_sarary + receive_quota;
|
var new_sarary_with_quota = new_sarary + receive_quota;
|
||||||
|
|
||||||
|
|
||||||
|
console.log(new_sarary);
|
||||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text(formatNumber(new_sarary_with_quota));
|
$("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text(formatNumber(new_sarary_with_quota));
|
||||||
|
|
||||||
//if (m) {
|
//if (m) {
|
||||||
@@ -178,11 +202,13 @@ function CalculateRemainQuota(m) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_sarary_with_quota > $("#themax_" + i).val()) {
|
//if (new_sarary_with_quota > $("#themax_" + i).val()) {
|
||||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(new_sarary_with_quota - $("#themax_" + i).val(), 3));
|
// $("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(new_sarary_with_quota - $("#themax_" + i).val(), 3));
|
||||||
} else {
|
//} else {
|
||||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(0, 3));
|
// $("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(0, 3));
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sum_receive_quota += receive_quota;
|
sum_receive_quota += receive_quota;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ function eva_create_evaluation_FeedDataToForm(data) {
|
|||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||||
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor3_id"), data, "id", "fullname", "item_supervisor3_id", data.supervisor3_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@ function eva_create_evaluation_GetFromForm() {
|
|||||||
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
||||||
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||||
|
eva_create_evaluationObject.supervisor3_id = $("#eva_create_evaluation_supervisor3_id").val();
|
||||||
|
|
||||||
return eva_create_evaluationObject;
|
return eva_create_evaluationObject;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ function eva_create_evaluation_FeedDataToForm(data) {
|
|||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||||
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor3_id"), data, "id", "fullname", "item_supervisor3_id", data.supervisor3_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ function eva_create_evaluation_GetFromForm() {
|
|||||||
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
||||||
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||||
|
eva_create_evaluationObject.supervisor3_id = $("#eva_create_evaluation_supervisor3_id").val();
|
||||||
|
|
||||||
return eva_create_evaluationObject;
|
return eva_create_evaluationObject;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user