เพิ่มหน้าจอบันทึกผลการตรวจข้อตกลงการประเมิน
This commit is contained in:
@@ -0,0 +1,403 @@
|
||||
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_review0A")]
|
||||
public class eva_create_evaluation_detail_review0AController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<eva_create_evaluation_detail_review0AController> _logger;
|
||||
private Ieva_create_evaluation_detail_review0AService _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_review0AController(ILogger<eva_create_evaluation_detail_review0AController> logger, Ieva_create_evaluation_detail_review0AService 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_review0AWithSelectionViewModel), 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_review0AWithSelectionViewModel), 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_review0AViewModel>), 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_review0AViewModel>), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetListBySearch(eva_create_evaluation_detail_review0ASearchModel 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>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_review0A_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review0A_report(eva_create_evaluation_detail_review0AReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/xxใส่ชื่อรายงานตรงนี้xx.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
if (model.filetype == "xlsx")
|
||||
{
|
||||
url += "&ignorePagination=true";
|
||||
}
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <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_review0AInputModel 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_review0AInputModel 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_review0AInputModel> 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
774
Migrations/25640212050657_Addchief_a.Designer.cs
generated
Normal file
774
Migrations/25640212050657_Addchief_a.Designer.cs
generated
Normal file
@@ -0,0 +1,774 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using TTSW.EF;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("25640212050657_Addchief_a")]
|
||||
partial class Addchief_a
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
|
||||
.WithMany()
|
||||
.HasForeignKey("level_score_id");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Migrations/25640212050657_Addchief_a.cs
Normal file
52
Migrations/25640212050657_Addchief_a.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class Addchief_a : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "chief_a",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "chief_a_date",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "chief_a_remark",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1000,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "chief_a_result",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "chief_a",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "chief_a_date",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "chief_a_remark",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "chief_a_result",
|
||||
table: "eva_create_evaluation_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,6 +195,16 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
@@ -164,6 +164,16 @@ namespace TodoAPI2.Models
|
||||
|
||||
[MaxLength(255)]
|
||||
public string level_score_supervisor2A { get; set; }
|
||||
|
||||
public int? chief_a { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string chief_a_result { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string chief_a_remark { get; set; }
|
||||
|
||||
public DateTime? chief_a_date { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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_review0AService : IBaseService2<int, eva_create_evaluation_detail_review0AInputModel, eva_create_evaluation_detail_review0AViewModel>
|
||||
{
|
||||
new eva_create_evaluation_detail_review0AViewModel Insert(eva_create_evaluation_detail_review0AInputModel model, bool is_force_save);
|
||||
new eva_create_evaluation_detail_review0AViewModel Update(int id, eva_create_evaluation_detail_review0AInputModel model, bool is_force_save);
|
||||
List<eva_create_evaluation_detail_review0AViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id);
|
||||
List<eva_create_evaluation_detail_review0AViewModel> GetListBySearch(eva_create_evaluation_detail_review0ASearchModel model);
|
||||
|
||||
string UpdateMultiple(List<eva_create_evaluation_detail_review0AInputModel> model, bool is_force_save);
|
||||
eva_create_evaluation_detail_review0AWithSelectionViewModel GetWithSelection(int id);
|
||||
eva_create_evaluation_detail_review0AWithSelectionViewModel 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_review0AInputModel
|
||||
{
|
||||
|
||||
public int? id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? chief_a { get; set; }
|
||||
|
||||
public string chief_a_result { get; set; }
|
||||
|
||||
public string chief_a_remark { get; set; }
|
||||
|
||||
public DateTime? chief_a_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_review0AReportRequestModel : eva_create_evaluation_detail_review0ASearchModel
|
||||
{
|
||||
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_review0ASearchModel
|
||||
{
|
||||
|
||||
public int id { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,316 @@
|
||||
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_review0AService : Ieva_create_evaluation_detail_review0AService
|
||||
{
|
||||
private IBaseRepository2<eva_create_evaluation_detailEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_create_evaluation_detail_review0AService(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_review0AInputModel model)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detailEntity>(model);
|
||||
}
|
||||
private List<eva_create_evaluation_detailEntity> GetEntityList(List<eva_create_evaluation_detail_review0AInputModel> models)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detailEntity>>(models);
|
||||
}
|
||||
private eva_create_evaluation_detail_review0AViewModel GetDto(eva_create_evaluation_detailEntity entity)
|
||||
{
|
||||
return Mapper.Map<eva_create_evaluation_detail_review0AViewModel>(entity);
|
||||
}
|
||||
private List<eva_create_evaluation_detail_review0AViewModel> GetDtoList(List<eva_create_evaluation_detailEntity> entities)
|
||||
{
|
||||
return Mapper.Map<List<eva_create_evaluation_detail_review0AViewModel>>(entities);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
#region Query Functions
|
||||
|
||||
public eva_create_evaluation_detail_review0AViewModel 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_review0AWithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_create_evaluation_detail_review0AWithSelectionViewModel>(entity);
|
||||
i.item_chief_a_result = (from x in ext.GetAgreeDisagree2() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
public eva_create_evaluation_detail_review0AWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new eva_create_evaluation_detail_review0AWithSelectionViewModel();
|
||||
i.item_chief_a_result = (from x in ext.GetAgreeDisagree2() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review0AViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id)
|
||||
{
|
||||
var model = new eva_create_evaluation_detail_review0ASearchModel();
|
||||
model.create_evaluation_id = create_evaluation_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public List<eva_create_evaluation_detail_review0AViewModel> GetListBySearch(eva_create_evaluation_detail_review0ASearchModel model)
|
||||
{
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_review0A in _repository.Context.eva_create_evaluation_detail
|
||||
|
||||
join fk_external_linkage3 in ext.GetAgreeDisagree2() on m_eva_create_evaluation_detail_review0A.chief_a_result equals fk_external_linkage3.external_code
|
||||
into external_linkageResult3
|
||||
from fk_external_linkageResult3 in external_linkageResult3.DefaultIfEmpty()
|
||||
|
||||
|
||||
where 1 == 1
|
||||
//&& (m_eva_create_evaluation_detail_review01.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_create_evaluation_detail_review0A.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_create_evaluation_detail_review0A.created descending
|
||||
select new eva_create_evaluation_detail_review0AViewModel()
|
||||
{
|
||||
id = m_eva_create_evaluation_detail_review0A.id,
|
||||
create_evaluation_id = m_eva_create_evaluation_detail_review0A.create_evaluation_id,
|
||||
chief_a = m_eva_create_evaluation_detail_review0A.chief_a,
|
||||
chief_a_result = m_eva_create_evaluation_detail_review0A.chief_a_result,
|
||||
chief_a_remark = m_eva_create_evaluation_detail_review0A.chief_a_remark,
|
||||
chief_a_date = m_eva_create_evaluation_detail_review0A.chief_a_date,
|
||||
|
||||
chief_a_result_external_linkage_external_name = fk_external_linkageResult3.external_name,
|
||||
|
||||
isActive = m_eva_create_evaluation_detail_review0A.isActive,
|
||||
Created = m_eva_create_evaluation_detail_review0A.created,
|
||||
Updated = m_eva_create_evaluation_detail_review0A.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_review0AViewModel Insert(eva_create_evaluation_detail_review0AInputModel 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_review0AViewModel>(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public eva_create_evaluation_detail_review0AViewModel Update(int id, eva_create_evaluation_detail_review0AInputModel model, bool is_force_save)
|
||||
{
|
||||
var existingEntity = _repository.Get(id);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
|
||||
where k.id == model.id
|
||||
select k).FirstOrDefault();
|
||||
|
||||
if (current_detail.status_chief_a == "Y")
|
||||
{
|
||||
throw new Exception("ผู้ประเมิน อนุมัติข้อตกลงไปแล้ว บันทึกไม่ได้");
|
||||
}
|
||||
|
||||
existingEntity.create_evaluation_id = model.create_evaluation_id;
|
||||
existingEntity.chief_a = model.chief_a;
|
||||
existingEntity.chief_a_result = model.chief_a_result;
|
||||
existingEntity.chief_a_remark = model.chief_a_remark;
|
||||
existingEntity.chief_a_date = model.chief_a_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_review0AViewModel>(existingEntity);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_create_evaluation_detail_review0AInputModel> 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.chief_a = i.chief_a;
|
||||
existingEntity.chief_a_result = i.chief_a_result;
|
||||
existingEntity.chief_a_remark = i.chief_a_remark;
|
||||
existingEntity.chief_a_date = i.chief_a_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_review0AViewModel SetAsActive(int id)
|
||||
{
|
||||
var updated = _repository.SetAsActive(id);
|
||||
|
||||
return Get(updated.id);
|
||||
}
|
||||
public eva_create_evaluation_detail_review0AViewModel 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("chief_a", "ผู้ประเมิน");
|
||||
i.Add("chief_a_result", "ผลการประเมิน");
|
||||
i.Add("chief_a_result_external_linkage_external_name", "ผลการประเมิน");
|
||||
i.Add("chief_a_remark", "ความเห็นผู้ประเมินสูงสุด");
|
||||
i.Add("chief_a_date", "วันที่ประเมิน");
|
||||
i.Add("txt_chief_a_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_review0AViewModel : BaseViewModel2<int>
|
||||
{
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? chief_a { get; set; }
|
||||
|
||||
public string chief_a_result { get; set; }
|
||||
|
||||
public string chief_a_remark { get; set; }
|
||||
|
||||
public DateTime? chief_a_date { get; set; }
|
||||
|
||||
public string txt_chief_a_date { get { return MyHelper.GetDateStringForReport(this.chief_a_date); } }
|
||||
|
||||
public string chief_a_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_review0AWithSelectionViewModel: eva_create_evaluation_detail_review0AViewModel
|
||||
{
|
||||
public List<external_linkageViewModel> item_chief_a_result { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ namespace TodoAPI2.Models
|
||||
List<external_linkageViewModel> Getevaluation_status();
|
||||
List<external_linkageViewModel> Getevaluation_accept();
|
||||
List<external_linkageViewModel> GetAgreeDisagree();
|
||||
List<external_linkageViewModel> GetAgreeDisagree2();
|
||||
List<external_linkageViewModel> GetDepartmentData();
|
||||
List<external_linkageViewModel> GetDepartmentDataForReport();
|
||||
List<external_linkageViewModel> GetPositionForReport();
|
||||
|
||||
@@ -266,6 +266,24 @@ namespace TodoAPI2.Models
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<external_linkageViewModel> GetAgreeDisagree2()
|
||||
{
|
||||
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);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<external_linkageViewModel> GetDepartmentData()
|
||||
{
|
||||
var sql = string.Format("select * from public.{0}DepartmentData{0} where department_name != '' and deleted_at is null order by department_name; ", '"'.ToString());
|
||||
|
||||
@@ -310,6 +310,8 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Ieva_create_evaluation_detail_firstdocService, eva_create_evaluation_detail_firstdocService>();
|
||||
|
||||
services.AddScoped<Ieva_create_evaluation_detail_review0AService, eva_create_evaluation_detail_review0AService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -565,6 +567,10 @@ namespace Test01
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_firstdocViewModel>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_firstdocWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<eva_create_evaluation_detail_review0AInputModel, eva_create_evaluation_detailEntity>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review0AViewModel>();
|
||||
cfg.CreateMap<eva_create_evaluation_detailEntity, eva_create_evaluation_detail_review0AWithSelectionViewModel>();
|
||||
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -194,6 +194,56 @@
|
||||
|
||||
<br />
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกผลการตรวจข้อตกลงการประเมิน</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_review0A_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_create_evaluation_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_chief_a" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_result" for="eva_create_evaluation_detail_review0A_chief_a_result">ผลการตรวจข้อตกลงการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ผลการตรวจข้อตกลงการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_date" for="eva_create_evaluation_detail_review0A_chief_a_date">วันที่ตรวจ</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review0A_chief_a_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตรวจ" iRequire="true" iGroup="eva_create_evaluation_detail_review0A" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_remark" for="eva_create_evaluation_detail_review0A_chief_a_remark">ความเห็นของผู้ตรวจ</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นของผู้ตรวจ" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<br />
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>ส่งข้อตกลงการประเมิน <span id="status" style="color:red;"></span></div>
|
||||
|
||||
@@ -223,6 +273,7 @@
|
||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/rep_eva_x/rep_eva_p01_report.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_evaluation_operating_agreement/eva_evaluation_operating_agreement.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review0A/eva_create_evaluation_detail_review0A_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script>
|
||||
|
||||
var status_self = "";
|
||||
@@ -237,7 +288,7 @@
|
||||
eva_evaluation_operating_agreement_InitiateDataTable();
|
||||
eva_evaluation_operating_agreement_InitialForm();
|
||||
|
||||
|
||||
eva_create_evaluation_detail_review0A_SetEditForm(id);
|
||||
} else {
|
||||
eva_create_evaluation_detail_firstdoc_SetCreateForm();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "eva_create_evaluation_detail_review0A";
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<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">eva_create_evaluation_detail_review0A</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review0A</div>
|
||||
|
||||
<section class="card no-border">
|
||||
<header class="card-header">
|
||||
กรุณากรอกข้อมูลลงในแบบฟอร์ม
|
||||
</header>
|
||||
<div class="card-body" style="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_create_evaluation_id" />
|
||||
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_chief_a" />
|
||||
|
||||
<div class='row'></div>
|
||||
<div class='row'></div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_result" for="eva_create_evaluation_detail_review0A_chief_a_result">ผลการประเมิน</label>
|
||||
<select class="form-control" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_date" for="eva_create_evaluation_detail_review0A_chief_a_date">วันที่ประเมิน</label>
|
||||
<input class="form-control" type="text" id="eva_create_evaluation_detail_review0A_chief_a_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_remark" for="eva_create_evaluation_detail_review0A_chief_a_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
|
||||
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate()">บันทึก</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/eva_create_evaluation_detail_review0A/eva_create_evaluation_detail_review0A_d.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
if (id) {
|
||||
eva_create_evaluation_detail_review0A_SetEditForm(id);
|
||||
} else {
|
||||
eva_create_evaluation_detail_review0A_SetCreateForm();
|
||||
}
|
||||
SetupValidationRemark("eva_create_evaluation_detail_review0A");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -70,12 +70,14 @@
|
||||
<Folder Include="Seed\" CopyToOutputDirectory="Always" />
|
||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc.cshtml" />
|
||||
<None Include="Views\eva_create_evaluation_detail_firstdocView\eva_create_evaluation_detail_firstdoc_d.cshtml" />
|
||||
<None Include="Views\eva_create_evaluation_detail_review0AView\eva_create_evaluation_detail_review0A_d.cshtml" />
|
||||
<None Include="Views\eva_evaluation_operating_agreementView\eva_evaluation_operating_agreement.cshtml" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_detail_migration\eva_adjust_postponement_detail_migration.js" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration.js" />
|
||||
<None Include="wwwroot\js\eva_adjust_postponement_migration\eva_adjust_postponement_migration_d.js" />
|
||||
<None Include="wwwroot\js\eva_create_evaluation_detail_firstdoc\eva_create_evaluation_detail_firstdoc.js" />
|
||||
<None Include="wwwroot\js\eva_create_evaluation_detail_firstdoc\eva_create_evaluation_detail_firstdoc_d.js" />
|
||||
<None Include="wwwroot\js\eva_create_evaluation_detail_review0A\eva_create_evaluation_detail_review0A_d.js" />
|
||||
<None Include="wwwroot\js\eva_evaluation_operating_agreement\eva_evaluation_operating_agreement.js" />
|
||||
<None Include="wwwroot\js\eva_self_review\eva_self_review.js" />
|
||||
<None Include="wwwroot\js\rep_eva_self_review\rep_eva_self_review_report.js" />
|
||||
|
||||
118
tb320eva.xml
118
tb320eva.xml
@@ -1628,6 +1628,124 @@
|
||||
<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)">
|
||||
<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_review0AController.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_review0AController.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_review0AController.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_review0AController.GetListBySearch(TodoAPI2.Models.eva_create_evaluation_detail_review0ASearchModel)">
|
||||
<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_review0AController.eva_create_evaluation_detail_review0A_report(TodoAPI2.Models.eva_create_evaluation_detail_review0AReportRequestModel)">
|
||||
<summary>
|
||||
Download Report
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return list of items by specifced keyword</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_review0AController.Insert(TodoAPI2.Models.eva_create_evaluation_detail_review0AInputModel)">
|
||||
<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_review0AController.Update(System.Int32,TodoAPI2.Models.eva_create_evaluation_detail_review0AInputModel)">
|
||||
<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_review0AController.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_review0AController.UpdateMultiple(System.Collections.Generic.List{TodoAPI2.Models.eva_create_evaluation_detail_review0AInputModel})">
|
||||
<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_review0AController.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_statusController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_statusController},TodoAPI2.Models.Ieva_create_evaluation_detail_statusService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
var eva_create_evaluation_detail_review0A_editMode = "CREATE";
|
||||
var eva_create_evaluation_detail_review0A_API = "/api/eva_create_evaluation_detail_review0A/";
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review0A_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_review0A_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_review0A_create_evaluation_id").val(data.create_evaluation_id);
|
||||
$("#eva_create_evaluation_detail_review0A_chief_a").val(data.chief_a);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_review0A_chief_a_result"), data, "id", "external_name", "item_chief_a_result", data.chief_a_result);
|
||||
$("#eva_create_evaluation_detail_review0A_chief_a_remark").val(data.chief_a_remark);
|
||||
$("#eva_create_evaluation_detail_review0A_chief_a_date").val(formatDate(data.chief_a_date));
|
||||
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review0A_GetFromForm() {
|
||||
var eva_create_evaluation_detail_review0AObject = new Object();
|
||||
eva_create_evaluation_detail_review0AObject.id = $("#eva_create_evaluation_detail_review0A_id").val();
|
||||
eva_create_evaluation_detail_review0AObject.create_evaluation_id = $("#eva_create_evaluation_detail_review0A_create_evaluation_id").val();
|
||||
eva_create_evaluation_detail_review0AObject.chief_a = $("#eva_create_evaluation_detail_review0A_chief_a").val();
|
||||
eva_create_evaluation_detail_review0AObject.chief_a_result = $("#eva_create_evaluation_detail_review0A_chief_a_result").val();
|
||||
eva_create_evaluation_detail_review0AObject.chief_a_remark = $("#eva_create_evaluation_detail_review0A_chief_a_remark").val();
|
||||
eva_create_evaluation_detail_review0AObject.chief_a_date = getDate($("#eva_create_evaluation_detail_review0A_chief_a_date").val());
|
||||
|
||||
|
||||
return eva_create_evaluation_detail_review0AObject;
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review0A_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review0A_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review0A_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_create_evaluation_detail_review0A_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_review0A_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_review0A_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_review0A_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review0A_SetCreateForm() {
|
||||
eva_create_evaluation_detail_review0A_editMode = "CREATE";
|
||||
eva_create_evaluation_detail_review0A_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_create_evaluation_detail_review0A_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_review0A_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review0A', eva_create_evaluation_detail_review0A_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_create_evaluation_detail_review0A_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_create_evaluation_detail_review0A_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_create_evaluation_detail_review0A_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_create_evaluation_detail_review0A_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_review0A_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_create_evaluation_detail_review0A_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_create_evaluation_detail_review0A_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user