เตรียม UI รายงานแบบประเมิน
This commit is contained in:
@@ -316,6 +316,42 @@ namespace TodoAPI2.Controllers
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
253
ApiControllers/rep_eva_xControllers.cs
Normal file
253
ApiControllers/rep_eva_xControllers.cs
Normal file
@@ -0,0 +1,253 @@
|
||||
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;
|
||||
using iTextSharp.text.pdf;
|
||||
using iTextSharp.text;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/rep_eva_x")]
|
||||
public class rep_eva_xController : BaseController
|
||||
{
|
||||
#region Private Variables
|
||||
private ILogger<rep_eva_xController> _logger;
|
||||
private Irep_eva_xService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
private Ieva_create_evaluation_detail_processService _process;
|
||||
private Iexternal_linkageService ext;
|
||||
Iexternal_employeeService emp;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="process"></param>
|
||||
/// <param name="inext"></param>
|
||||
/// <param name="inemp"></param>
|
||||
/// <param name="logger"></param>
|
||||
public rep_eva_xController(ILogger<rep_eva_xController> logger, Irep_eva_xService repository, IConfiguration configuration,
|
||||
Ieva_create_evaluation_detail_processService process, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
_process = process;
|
||||
Configuration = configuration;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Blank Item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return a blank item</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("GetBlankItem")]
|
||||
[ProducesResponseType(typeof(rep_eva_xWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult GetBlankItem()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var result = _repository.GetBlankItem();
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception in IActionResult GetBlankItem.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("rep_eva_x_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult rep_eva_x_report(rep_eva_xReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
|
||||
var p1 = GetParameter(Convert.ToInt16(model.detail_id));
|
||||
|
||||
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}/rep_eva_x1.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||
|
||||
//var data = httpclient.DownloadData(url);
|
||||
//var stream = new MemoryStream(data);
|
||||
|
||||
//return File(stream, model.contentType);
|
||||
|
||||
var stream = new MemoryStream();
|
||||
Document document = new Document();
|
||||
PdfCopy writer = new PdfCopy(document, stream);
|
||||
document.Open();
|
||||
|
||||
var rep_type = new int[] { 1, 2, 3, 4, 5};
|
||||
|
||||
foreach (var k in rep_type)
|
||||
{
|
||||
string url = $"{mainurl}{reportsite}/rep_eva_x{k}.{model.filetype}?{MyHelper.GetParameterForJasperReport(p1)}&j_username={username}&j_password={password}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
|
||||
PdfReader reader = new PdfReader(data);
|
||||
reader.ConsolidateNamedDestinations();
|
||||
|
||||
for (int i = 1; i <= reader.NumberOfPages; i++)
|
||||
{
|
||||
PdfImportedPage page = writer.GetImportedPage(reader, i);
|
||||
writer.AddPage(page);
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
writer.Close();
|
||||
document.Close();
|
||||
|
||||
var data2 = stream.ToArray();
|
||||
var stream2 = new MemoryStream(data2);
|
||||
|
||||
return File(stream2, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"{ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private rep_eva_xInputModel2 GetParameter(int detail_id)
|
||||
{
|
||||
var i = new rep_eva_xInputModel2();
|
||||
|
||||
i.create_evaluation_detail_id = detail_id;
|
||||
var p = _process.Get(detail_id, null, null);
|
||||
|
||||
i.employee_fullname = p.employee_fullname;
|
||||
i.employee_code = p.employee_code;
|
||||
i.employee_position_type = p.employee_position_type;
|
||||
i.employee_position_level = p.employee_position_level;
|
||||
i.employee_org = p.employee_org;
|
||||
i.employee_position = p.employee_position;
|
||||
if (!string.IsNullOrEmpty(p.employee_profile_picture))
|
||||
{
|
||||
i.image_url = MyHelper.GetConfig(Configuration, "SiteInformation:mainsite") + "/api/image/" + p.employee_profile_picture;
|
||||
}
|
||||
i.chief_fullname = p.chief_fullname;
|
||||
i.chief_position = p.chief_position;
|
||||
i.supervisor2_fullname = p.supervisor2_fullname;
|
||||
i.supervisor2_position = p.supervisor2_position;
|
||||
i.supervisor1A_fullname = p.supervisor1A_fullname;
|
||||
i.supervisor1A_position = p.supervisor1A_position;
|
||||
i.supervisor2A_fullname = p.supervisor2A_fullname;
|
||||
i.supervisor2A_position = p.supervisor2A_position;
|
||||
i.main_dept = p.employee_main_dept;
|
||||
i.leave_period = MyHelper.GetDateStringForReport(p.start_date) + " ถึง " + MyHelper.GetDateStringForReport(p.end_date);
|
||||
i.selected_round = p.selected_round;
|
||||
|
||||
var context = _process.GetDataContext();
|
||||
var all_eva = (from x in context.eva_performance_plan
|
||||
where x.fiscal_year == p.fiscal_year
|
||||
orderby x.theTime
|
||||
select x).ToList();
|
||||
foreach(var x2 in all_eva)
|
||||
{
|
||||
var start = (from n in context.eva_performance_plan_detail
|
||||
where n.performance_plan_id == x2.id
|
||||
select n.start_date).Min();
|
||||
var end = (from n in context.eva_performance_plan_detail
|
||||
where n.performance_plan_id == x2.id
|
||||
select n.end_date).Min();
|
||||
var text = MyHelper.GetDateStringForReport(start) + " ถึง " + MyHelper.GetDateStringForReport(end);
|
||||
if(x2.theTime == 1)
|
||||
{
|
||||
i.round1_text = text;
|
||||
}
|
||||
if (x2.theTime == 2)
|
||||
{
|
||||
i.round2_text = text;
|
||||
}
|
||||
}
|
||||
|
||||
var detail = (from x in context.eva_create_evaluation_detail
|
||||
where x.id == detail_id
|
||||
select x).FirstOrDefault();
|
||||
if(detail != null)
|
||||
{
|
||||
i.total_summary_supervisor2A = detail.total_summary_supervisor2A;
|
||||
i.Final_summary_supervisor2A = detail.Final_summary_supervisor2A;
|
||||
i.total_summary_competency_supervisor2A = detail.total_summary_competency_supervisor2A;
|
||||
i.Final_summary_competency_supervisor2A = detail.Final_summary_competency_supervisor2A;
|
||||
i.achievement_supervisor2A = detail.achievement_supervisor2A;
|
||||
i.competency_supervisor2A = detail.competency_supervisor2A;
|
||||
i.score_supervisor2A = detail.score_supervisor2A;
|
||||
i.level_score_supervisor2A = detail.level_score_supervisor2A;
|
||||
}
|
||||
|
||||
i.w1 = p.create_evaluation_score1;
|
||||
i.w2 = p.create_evaluation_score2;
|
||||
|
||||
var q = emp.GetLeaveOfEmployee(p.employee_id.Value, p.start_date, p.end_date);
|
||||
i.sum_day_sick_leave = q.sum_day_sick_leave;
|
||||
i.count_sick_leave = q.count_sick_leave;
|
||||
i.sum_day_personal_leave = q.sum_day_personal_leave;
|
||||
i.count_personal_leave = q.count_personal_leave;
|
||||
i.sum_day_vacation_leave = q.sum_day_vacation_leave;
|
||||
i.count_stop_working = q.count_stop_working;
|
||||
i.count_late_tad_processing_time_results = q.count_late_tad_processing_time_results;
|
||||
i.count_absence_tad_processing_time_results = q.count_absence_tad_processing_time_results;
|
||||
i.sum_day_sick_personal_leave = q.sum_day_sick_personal_leave;
|
||||
i.count_sick_personal_leave = q.count_sick_personal_leave;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
BIN
EXCEL/eva_level_score@rep_eva_x.xlsx
Normal file
BIN
EXCEL/eva_level_score@rep_eva_x.xlsx
Normal file
Binary file not shown.
690
Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs
generated
Normal file
690
Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs
generated
Normal file
@@ -0,0 +1,690 @@
|
||||
// <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("25630828080707_AddIdpPlanTimeText")]
|
||||
partial class AddIdpPlanTimeText
|
||||
{
|
||||
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(100);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
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<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<decimal?>("middle");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
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<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<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
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_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_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
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Migrations/25630828080707_AddIdpPlanTimeText.cs
Normal file
23
Migrations/25630828080707_AddIdpPlanTimeText.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddIdpPlanTimeText : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "period_text",
|
||||
table: "eva_idp_plan",
|
||||
maxLength: 1000,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "period_text",
|
||||
table: "eva_idp_plan");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -467,6 +467,9 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace TodoAPI2.Models
|
||||
eva_create_evaluation_detail_processWithSelectionViewModel GetWithSelection(int id, int? emp_id, string path);
|
||||
eva_create_evaluation_detail_processWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
eva_create_evaluation_detail_processWithSelectionViewModel Get(int id, int? emp_id, string path);
|
||||
DataContext GetDataContext();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,10 @@ namespace TodoAPI2.Models
|
||||
var data = (
|
||||
from m_eva_create_evaluation_detail_process in _repository.Context.eva_create_evaluation_detail
|
||||
|
||||
join fk_eva_create_evaluation10 in _repository.Context.eva_create_evaluation on m_eva_create_evaluation_detail_process.create_evaluation_id equals fk_eva_create_evaluation10.id
|
||||
into eva_create_evaluationResult10
|
||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
||||
|
||||
join fk_external_employee in allemp on m_eva_create_evaluation_detail_process.employee_id equals fk_external_employee.id
|
||||
into external_employeeResult
|
||||
from fk_external_employee in external_employeeResult.DefaultIfEmpty()
|
||||
@@ -100,9 +104,19 @@ namespace TodoAPI2.Models
|
||||
into external_chiefResult
|
||||
from fk_external_chief in external_chiefResult.DefaultIfEmpty()
|
||||
|
||||
join fk_eva_create_evaluation10 in _repository.Context.eva_create_evaluation on m_eva_create_evaluation_detail_process.create_evaluation_id equals fk_eva_create_evaluation10.id
|
||||
into eva_create_evaluationResult10
|
||||
from fk_eva_create_evaluationResult10 in eva_create_evaluationResult10.DefaultIfEmpty()
|
||||
join fk_external_supervisor2 in allemp on fk_eva_create_evaluationResult10.employee_id equals fk_external_supervisor2.id
|
||||
into external_supervisor2Result
|
||||
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
|
||||
into external_supervisor1AResult
|
||||
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
|
||||
into external_supervisor2AResult
|
||||
from fk_external_supervisor2A in external_supervisor2AResult.DefaultIfEmpty()
|
||||
|
||||
|
||||
|
||||
where m_eva_create_evaluation_detail_process.id == id
|
||||
|
||||
@@ -111,12 +125,16 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
id = m_eva_create_evaluation_detail_process.id,
|
||||
evaluation_round = fk_eva_create_evaluationResult10.eva_performance_plan.display_text,
|
||||
selected_round = fk_eva_create_evaluationResult10.eva_performance_plan.theTime,
|
||||
fiscal_year = fk_eva_create_evaluationResult10.eva_performance_plan.fiscal_year,
|
||||
employee_code = fk_external_employee.employee_no,
|
||||
employee_fullname = fk_external_employee.fullname,
|
||||
employee_profile_picture = fk_external_employee.profile_picture,
|
||||
employee_position = fk_external_employee.position_name,
|
||||
employee_position_type = fk_external_employee.position_type_name,
|
||||
employee_position_level = fk_external_employee.position_level_text,
|
||||
employee_org = fk_external_employee.department_name,
|
||||
employee_main_dept = ext.GetMainDept(fk_external_employee.department_id),
|
||||
employee_id = m_eva_create_evaluation_detail_process.employee_id,
|
||||
chief_fullname = fk_external_chief.fullname,
|
||||
chief_position = fk_external_chief.position_name,
|
||||
@@ -125,6 +143,13 @@ namespace TodoAPI2.Models
|
||||
search_employee_code = fk_external_employee.employee_no,
|
||||
search_employee_fullname = fk_external_employee.fullname,
|
||||
|
||||
supervisor2_fullname = fk_external_supervisor2.fullname,
|
||||
supervisor2_position = fk_external_supervisor2.position_name,
|
||||
supervisor1A_fullname = fk_external_supervisor1A.fullname,
|
||||
supervisor1A_position = fk_external_supervisor1A.position_name,
|
||||
supervisor2A_fullname = fk_external_supervisor2A.fullname,
|
||||
supervisor2A_position = fk_external_supervisor2A.position_name,
|
||||
|
||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||
|
||||
create_evaluation_score1 = fk_eva_create_evaluationResult10.score1,
|
||||
@@ -355,6 +380,11 @@ namespace TodoAPI2.Models
|
||||
return "";
|
||||
}
|
||||
|
||||
public DataContext GetDataContext()
|
||||
{
|
||||
return _repository.Context;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string employee_fullname { get; set; }
|
||||
|
||||
public string employee_profile_picture { get; set; }
|
||||
|
||||
public string employee_position { get; set; }
|
||||
|
||||
public string employee_position_type { get; set; }
|
||||
@@ -28,12 +30,26 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string employee_org { get; set; }
|
||||
|
||||
public string employee_main_dept { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public string chief_fullname { get; set; }
|
||||
|
||||
public string chief_position { get; set; }
|
||||
|
||||
public string supervisor2_fullname { get; set; }
|
||||
|
||||
public string supervisor2_position { get; set; }
|
||||
|
||||
public string supervisor1A_fullname { get; set; }
|
||||
|
||||
public string supervisor1A_position { get; set; }
|
||||
|
||||
public string supervisor2A_fullname { get; set; }
|
||||
|
||||
public string supervisor2A_position { get; set; }
|
||||
|
||||
public int? create_evaluation_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
@@ -20,5 +20,8 @@ namespace TodoAPI2.Models
|
||||
public DateTime? start_date { get; set; }
|
||||
|
||||
public DateTime? end_date { get; set; }
|
||||
|
||||
public int? selected_round { get; set; }
|
||||
public int? fiscal_year { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace TodoAPI2.Models
|
||||
eva_idp_planWithSelectionViewModel GetWithSelection(int id);
|
||||
eva_idp_planWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
void RefreshAutoFieldOfAllData();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
public class eva_idp_planEntity : BaseEntity2<int>
|
||||
{
|
||||
|
||||
|
||||
public int? create_evaluation_detail_id { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
@@ -28,6 +26,25 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? end_date { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
public string period_text { get; set; }
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
{
|
||||
string temp = "";
|
||||
if (start_date.HasValue)
|
||||
{
|
||||
temp = MyHelper.GetDateStringForReport(start_date);
|
||||
}
|
||||
if (end_date.HasValue)
|
||||
{
|
||||
temp += " ถึง " + MyHelper.GetDateStringForReport(end_date);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoAfterInsertUpdate(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace TodoAPI2.Models
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
|
||||
|
||||
entity.SetAutoField(_repository.Context);
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
return Get(inserted.id);
|
||||
@@ -156,7 +156,7 @@ namespace TodoAPI2.Models
|
||||
existingEntity.start_date = model.start_date;
|
||||
existingEntity.end_date = model.end_date;
|
||||
|
||||
|
||||
existingEntity.SetAutoField(_repository.Context);
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
@@ -228,5 +228,16 @@ namespace TodoAPI2.Models
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
public void RefreshAutoFieldOfAllData()
|
||||
{
|
||||
var all_items = from i in _repository.Context.eva_idp_plan
|
||||
select i;
|
||||
foreach (var item in all_items)
|
||||
{
|
||||
item.SetAutoField(_repository.Context);
|
||||
}
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,7 @@ orgdata.id as department_id,orgdata.department_name,orgdata.department_code,he.s
|
||||
he.employee_type_id, het.employee_type_name,opd.position_id as position_id,
|
||||
u.email as user_email, u.id as user_id,hpl.position_level_name,
|
||||
|
||||
he.profile_picture,
|
||||
he.position_level_id,
|
||||
he.position_type_id,
|
||||
hpl.position_level_id as hpl_position_level_id,
|
||||
@@ -123,6 +124,7 @@ order by he.firstname, he.lastname;
|
||||
{
|
||||
var i = new external_employeeViewModel();
|
||||
i.id = Convert.ToInt32(dr["id"]);
|
||||
i.profile_picture = dr["profile_picture"].ToString();
|
||||
i.position_number = dr["position_number"].ToString();
|
||||
i.position_name = dr["position_name"].ToString();
|
||||
i.fullname= dr["fullname"].ToString();
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace TodoAPI2.Models
|
||||
public decimal? cost_of_living { get; set; }
|
||||
public decimal? position_allowance { get; set; }
|
||||
public decimal? other_money { get; set; }
|
||||
public string profile_picture { get; set; }
|
||||
|
||||
public int? worked_month // ทำงานมาแล้วกี่เดือน
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace TodoAPI2.Models
|
||||
List<external_linkageViewModel> GetSortingDep();
|
||||
List<external_linkageViewModel> GetFiscalYear2();
|
||||
List<external_linkageViewModel> GetThaiMonth();
|
||||
string GetMainDept(int? dep_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -427,6 +427,28 @@ namespace TodoAPI2.Models
|
||||
return all_result;
|
||||
}
|
||||
|
||||
public string GetMainDept(int? dep_id)
|
||||
{
|
||||
var sql = string.Format(@"select data1.id,data1.department_name as p1,data2.department_name as p2
|
||||
from public.{0}DepartmentData{0} data1
|
||||
left join org_organization_chart_details detail
|
||||
on data1.id=detail.department_id
|
||||
left join public.{0}DepartmentData{0} data2
|
||||
on data2.id=detail.parent_department_id
|
||||
where data1.id={1};", '"'.ToString(), dep_id.ToString());
|
||||
var para = db.GetParameterListNpgsql();
|
||||
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
|
||||
var result = "";
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
if(dr["p2"] != null)
|
||||
{
|
||||
result = dr["p2"].ToString();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<external_linkageViewModel> GetChildInDep(int? dep_id)
|
||||
{
|
||||
var sql = string.Format(@"select data1.id,data1.department_name
|
||||
|
||||
18
Models/rep_eva_x/Irep_eva_xService.cs
Normal file
18
Models/rep_eva_x/Irep_eva_xService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public interface Irep_eva_xService
|
||||
{
|
||||
rep_eva_xWithSelectionViewModel GetBlankItem();
|
||||
}
|
||||
}
|
||||
|
||||
24
Models/rep_eva_x/rep_eva_xInputModel.cs
Normal file
24
Models/rep_eva_x/rep_eva_xInputModel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public string detail_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
61
Models/rep_eva_x/rep_eva_xInputModel2.cs
Normal file
61
Models/rep_eva_x/rep_eva_xInputModel2.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xInputModel2
|
||||
{
|
||||
public int? create_evaluation_detail_id { get; set; }
|
||||
|
||||
public string employee_fullname { get; set; }
|
||||
public string employee_code { get; set; }
|
||||
public string employee_position_type { get; set; }
|
||||
public string employee_position_level { get; set; }
|
||||
public string employee_org { get; set; }
|
||||
public string employee_position { get; set; }
|
||||
public string image_url { get; set; }
|
||||
public string chief_fullname { get; set; }
|
||||
public string chief_position { get; set; }
|
||||
public string supervisor2_fullname { get; set; }
|
||||
public string supervisor2_position { get; set; }
|
||||
public string supervisor1A_fullname { get; set; }
|
||||
public string supervisor1A_position { get; set; }
|
||||
public string supervisor2A_fullname { get; set; }
|
||||
public string supervisor2A_position { get; set; }
|
||||
public string leave_period { get; set; }
|
||||
public string main_dept { get; set; }
|
||||
public int? selected_round { get; set; }
|
||||
public string round1_text { get; set; }
|
||||
public string round2_text { get; set; }
|
||||
public decimal? total_summary_supervisor2A { get; set; }
|
||||
public decimal? Final_summary_supervisor2A { get; set; }
|
||||
public decimal? total_summary_competency_supervisor2A { get; set; }
|
||||
public decimal? Final_summary_competency_supervisor2A { get; set; }
|
||||
public decimal? achievement_supervisor2A { get; set; }
|
||||
public decimal? competency_supervisor2A { get; set; }
|
||||
public decimal? score_supervisor2A { get; set; }
|
||||
public string level_score_supervisor2A { get; set; }
|
||||
public decimal? w1 { get; set; }
|
||||
public decimal? w2 { get; set; }
|
||||
|
||||
public decimal? sum_day_sick_leave { get; set; }
|
||||
public decimal? count_sick_leave { get; set; }
|
||||
public decimal? sum_day_personal_leave { get; set; }
|
||||
public decimal? count_personal_leave { get; set; }
|
||||
public decimal? sum_day_vacation_leave { get; set; }
|
||||
public decimal? count_stop_working { get; set; }
|
||||
public decimal? count_late_tad_processing_time_results { get; set; }
|
||||
public decimal? count_absence_tad_processing_time_results { get; set; }
|
||||
public decimal? sum_day_sick_personal_leave { get; set; }
|
||||
public decimal? count_sick_personal_leave { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
21
Models/rep_eva_x/rep_eva_xReportRequestModel.cs
Normal file
21
Models/rep_eva_x/rep_eva_xReportRequestModel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xReportRequestModel : rep_eva_xSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
23
Models/rep_eva_x/rep_eva_xSearchModel.cs
Normal file
23
Models/rep_eva_x/rep_eva_xSearchModel.cs
Normal file
@@ -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 rep_eva_xSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public string detail_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
42
Models/rep_eva_x/rep_eva_xService.cs
Normal file
42
Models/rep_eva_x/rep_eva_xService.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using TTSW.Configure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Data;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xService : Irep_eva_xService
|
||||
{
|
||||
private IBaseRepository<eva_level_scoreEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public rep_eva_xService(IBaseRepository<eva_level_scoreEntity, Guid> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
public rep_eva_xWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_eva_xWithSelectionViewModel();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21
Models/rep_eva_x/rep_eva_xViewModel.cs
Normal file
21
Models/rep_eva_x/rep_eva_xViewModel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public string detail_id { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
12
Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs
Normal file
12
Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_eva_xWithSelectionViewModel: rep_eva_xViewModel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -289,6 +289,8 @@ namespace Test01
|
||||
|
||||
services.AddScoped<Irpt_payroll_summaryService, rpt_payroll_summaryService>();
|
||||
|
||||
services.AddScoped<Irep_eva_xService, rep_eva_xService>();
|
||||
|
||||
#endregion
|
||||
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
@@ -508,6 +510,9 @@ namespace Test01
|
||||
cfg.CreateMap<eva_level_scoreEntity, rpt_payroll_summaryViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rpt_payroll_summaryWithSelectionViewModel>();
|
||||
|
||||
cfg.CreateMap<rep_eva_xInputModel, eva_level_scoreEntity>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_xViewModel>();
|
||||
cfg.CreateMap<eva_level_scoreEntity, rep_eva_xWithSelectionViewModel>();
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
66
ViewControllers/rep_eva_xViewControllers.cs
Normal file
66
ViewControllers/rep_eva_xViewControllers.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TodoAPI2.Models;
|
||||
using STAFF_API.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using TodoAPI2.Controllers;
|
||||
|
||||
namespace TodoAPI2.Controllers
|
||||
{
|
||||
public class rep_eva_xViewController : Controller
|
||||
{
|
||||
private ILogger<rep_eva_xController> _logger;
|
||||
private Irep_eva_xService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
public rep_eva_xViewController(ILogger<rep_eva_xController> logger, Irep_eva_xService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
// public IActionResult rep_eva_x()
|
||||
// {
|
||||
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
// }
|
||||
|
||||
// public IActionResult rep_eva_x_d()
|
||||
// {
|
||||
//if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
// }
|
||||
|
||||
public IActionResult rep_eva_x_report()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
//public IActionResult rep_eva_x_inline()
|
||||
//{
|
||||
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
// return View();
|
||||
//}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
55
Views/rep_eva_xView/rep_eva_x_report.cshtml
Normal file
55
Views/rep_eva_xView/rep_eva_x_report.cshtml
Normal file
@@ -0,0 +1,55 @@
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = "rep_eva_x";
|
||||
}
|
||||
|
||||
<div class="row page-title">
|
||||
<div class="col-md-5">
|
||||
<div class="page-title">
|
||||
@Configuration["SiteInformation:modulename"]
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<ol class="breadcrumb" style="">
|
||||
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:mainsite"]');">หน้าแรก</a></li>
|
||||
<li class="breadcrumb-item "><a href="javascript:window_open_from_root('@Configuration["SiteInformation:modulesite"]');">@Configuration["SiteInformation:modulename"]</a></li>
|
||||
<li class="breadcrumb-item active">รายงาน rep_eva_x</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายงาน rep_eva_x</div>
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label id='lab_s_rep_eva_x_detail_id' for='s_rep_eva_x_detail_id'>detail_id</label>
|
||||
<input class="form-control" type="text" id="s_rep_eva_x_detail_id" iLabel="detail_id" iRequire="true" iGroup="s_rep_eva_x" title='detail_id' placeholder='detail_id' />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" onclick="javascript:rep_eva_x_DoSearch('pdf');">แสดงรายงาน</button>
|
||||
<button class="btn btn-info" onclick="javascript:rep_eva_x_DoSearch('xlsx');">ดาวน์โหลดเป็น Excel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<br/>
|
||||
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
|
||||
|
||||
@section FooterPlaceHolder{
|
||||
<script src="~/js/rep_eva_x/rep_eva_x_report.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
rep_eva_x_InitialForm();
|
||||
SetupValidationRemark("s_rep_eva_x");
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<PackageReference Include="elFinder.NetCore" Version="1.1.0" />
|
||||
<PackageReference Include="EPPlus.Core" Version="1.5.4" />
|
||||
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.6.0" />
|
||||
<PackageReference Include="iTextSharp.LGPLv2.Core" Version="1.6.7" />
|
||||
<PackageReference Include="MediaTypeMap.Core" Version="2.3.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
|
||||
|
||||
50
tb320eva.xml
50
tb320eva.xml
@@ -2491,6 +2491,17 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_idp_planController.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_idp_plan_ownerController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_idp_plan_ownerController},TodoAPI2.Models.Ieva_idp_plan_ownerService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -3348,6 +3359,37 @@
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_xController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_xController},TodoAPI2.Models.Irep_eva_xService,Microsoft.Extensions.Configuration.IConfiguration,TodoAPI2.Models.Ieva_create_evaluation_detail_processService,TodoAPI2.Models.Iexternal_linkageService,TodoAPI2.Models.Iexternal_employeeService)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
</summary>
|
||||
<param name="repository"></param>
|
||||
<param name="configuration"></param>
|
||||
<param name="process"></param>
|
||||
<param name="inext"></param>
|
||||
<param name="inemp"></param>
|
||||
<param name="logger"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_xController.GetBlankItem">
|
||||
<summary>
|
||||
Get Blank Item
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return a blank item</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_xController.rep_eva_x_report(TodoAPI2.Models.rep_eva_xReportRequestModel)">
|
||||
<summary>
|
||||
Download Report
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<returns>Return list of items by specifced keyword</returns>
|
||||
<response code="200">Returns the item</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_familyController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_familyController},TodoAPI2.Models.Irep_familyService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
@@ -3841,6 +3883,14 @@
|
||||
<param name="logger"></param>
|
||||
<param name="inemp"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_eva_xViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_eva_xController},TodoAPI2.Models.Irep_eva_xService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
</summary>
|
||||
<param name="repository"></param>
|
||||
<param name="configuration"></param>
|
||||
<param name="logger"></param>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.rep_familyViewController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.rep_familyController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Irep_familyService,Microsoft.Extensions.Configuration.IConfiguration)">
|
||||
<summary>
|
||||
Default constructure for dependency injection
|
||||
|
||||
58
wwwroot/js/rep_eva_x/rep_eva_x_report.js
Normal file
58
wwwroot/js/rep_eva_x/rep_eva_x_report.js
Normal file
@@ -0,0 +1,58 @@
|
||||
var rep_eva_x_API = "/api/rep_eva_x/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_eva_x_GetSearchParameter(fileType) {
|
||||
var rep_eva_xSearchObject = new Object();
|
||||
rep_eva_xSearchObject.detail_id = $("#s_rep_eva_x_detail_id").val();
|
||||
|
||||
|
||||
rep_eva_xSearchObject.fileType = fileType;
|
||||
|
||||
console.log(rep_eva_xSearchObject);
|
||||
|
||||
return rep_eva_xSearchObject;
|
||||
}
|
||||
|
||||
function rep_eva_x_FeedDataToSearchForm(data) {
|
||||
$("#s_rep_eva_x_detail_id").val(data.detail_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function rep_eva_x_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
rep_eva_x_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + rep_eva_x_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_rep_eva_x_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function rep_eva_x_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_rep_eva_x', s_rep_eva_x_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(rep_eva_x_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/rep_eva_x/rep_eva_x_report?" + p;
|
||||
|
||||
if (fileType === "pdf") {
|
||||
$("#report_result").attr("src", report_url);
|
||||
$("#report_result").show();
|
||||
//window.open(report_url);
|
||||
} else {
|
||||
$("#report_result").hide();
|
||||
window.open(report_url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user