From 933c9f7b4f097688f1576076e37151414301eaec Mon Sep 17 00:00:00 2001 From: Nakorn Rientrakrunchai Date: Sat, 29 Aug 2020 19:19:13 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=95=E0=B8=A3=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=A1=20UI=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99=E0=B9=81=E0=B8=9A=E0=B8=9A=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B9=80=E0=B8=A1=E0=B8=B4=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiControllers/eva_idp_planControllers.cs | 36 + ApiControllers/rep_eva_xControllers.cs | 253 +++++++ EXCEL/eva_level_score@rep_eva_x.xlsx | Bin 0 -> 9848 bytes ...30828080707_AddIdpPlanTimeText.Designer.cs | 690 ++++++++++++++++++ .../25630828080707_AddIdpPlanTimeText.cs | 23 + Migrations/DataContextModelSnapshot.cs | 3 + ...create_evaluation_detail_processService.cs | 4 +- ...create_evaluation_detail_processService.cs | 36 +- ...eate_evaluation_detail_processViewModel.cs | 16 + ...on_detail_processWithSelectionViewModel.cs | 3 + Models/eva_idp_plan/Ieva_idp_planService.cs | 2 +- Models/eva_idp_plan/eva_idp_planEntity.cs | 21 +- Models/eva_idp_plan/eva_idp_planService.cs | 15 +- .../external_employeeService.cs | 2 + .../external_employeeViewModel.cs | 1 + .../Iexternal_linkageService.cs | 1 + .../external_linkageService.cs | 22 + Models/rep_eva_x/Irep_eva_xService.cs | 18 + Models/rep_eva_x/rep_eva_xInputModel.cs | 24 + Models/rep_eva_x/rep_eva_xInputModel2.cs | 61 ++ .../rep_eva_x/rep_eva_xReportRequestModel.cs | 21 + Models/rep_eva_x/rep_eva_xSearchModel.cs | 23 + Models/rep_eva_x/rep_eva_xService.cs | 42 ++ Models/rep_eva_x/rep_eva_xViewModel.cs | 21 + .../rep_eva_xWithSelectionViewModel.cs | 12 + Startup.cs | 5 + ViewControllers/rep_eva_xViewControllers.cs | 66 ++ Views/rep_eva_xView/rep_eva_x_report.cshtml | 55 ++ tb320eva.csproj | 1 + tb320eva.xml | 50 ++ wwwroot/js/rep_eva_x/rep_eva_x_report.js | 58 ++ 31 files changed, 1575 insertions(+), 10 deletions(-) create mode 100644 ApiControllers/rep_eva_xControllers.cs create mode 100644 EXCEL/eva_level_score@rep_eva_x.xlsx create mode 100644 Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs create mode 100644 Migrations/25630828080707_AddIdpPlanTimeText.cs create mode 100644 Models/rep_eva_x/Irep_eva_xService.cs create mode 100644 Models/rep_eva_x/rep_eva_xInputModel.cs create mode 100644 Models/rep_eva_x/rep_eva_xInputModel2.cs create mode 100644 Models/rep_eva_x/rep_eva_xReportRequestModel.cs create mode 100644 Models/rep_eva_x/rep_eva_xSearchModel.cs create mode 100644 Models/rep_eva_x/rep_eva_xService.cs create mode 100644 Models/rep_eva_x/rep_eva_xViewModel.cs create mode 100644 Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs create mode 100644 ViewControllers/rep_eva_xViewControllers.cs create mode 100644 Views/rep_eva_xView/rep_eva_x_report.cshtml create mode 100644 wwwroot/js/rep_eva_x/rep_eva_x_report.js diff --git a/ApiControllers/eva_idp_planControllers.cs b/ApiControllers/eva_idp_planControllers.cs index 8f322a2..7a36b84 100644 --- a/ApiControllers/eva_idp_planControllers.cs +++ b/ApiControllers/eva_idp_planControllers.cs @@ -316,6 +316,42 @@ namespace TodoAPI2.Controllers return BadRequest(ModelState); } + /// + /// Refresh AutoField of all items + /// + /// + /// + /// Response Result Message + /// Response Result Message + /// If the model is invalid + /// Error Occurred + [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); + } } } diff --git a/ApiControllers/rep_eva_xControllers.cs b/ApiControllers/rep_eva_xControllers.cs new file mode 100644 index 0000000..92bc353 --- /dev/null +++ b/ApiControllers/rep_eva_xControllers.cs @@ -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 _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 + + /// + /// Default constructure for dependency injection + /// + /// + /// + /// + /// + /// + /// + public rep_eva_xController(ILogger 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; + } + + /// + /// Get Blank Item + /// + /// + /// + /// Return a blank item + /// Returns the item + /// Error Occurred + [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}"); + } + } + + /// + /// Download Report + /// + /// + /// + /// Return list of items by specifced keyword + /// Returns the item + /// Error Occurred + [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; + } + + } +} diff --git a/EXCEL/eva_level_score@rep_eva_x.xlsx b/EXCEL/eva_level_score@rep_eva_x.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1db8e2699386a3629272d3cc36bf4a545afb957f GIT binary patch literal 9848 zcmeHN1y>x|wr*U51cC$zuECwgU4y&3I|O%k4+-w>7Tnzl5*&gBg1gJ>jJ(V+^WGo0 zw|cFvbyn5>y3eltZ7o?z2uO4QGyoO=01yKB+5E<>!2keAC;$Kr01K`mXk+bYWbLS< z=xS@^phfFqWl4|?2~Lp-00-Uw-{U`61Eq?C)?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yW7h^Va(>1V~V^ z`^V4!e~tL(fX_SGzW||;egk~o*M1K0yx#r=koD^KJ^gR>{ao~U74S<`1pE1Be$@oe zQU0E({K5bLc5p!z#`C=8x%l%i^9#TnWW^wjJ_|C>*S`gw=b(T0)W0AB01tw{{HH(s XwyY!+$OZubM9_x}WX4>?KUe<)5AFmD literal 0 HcmV?d00001 diff --git a/Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs b/Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs new file mode 100644 index 0000000..efbc505 --- /dev/null +++ b/Migrations/25630828080707_AddIdpPlanTimeText.Designer.cs @@ -0,0 +1,690 @@ +// +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("id"); + + b.Property("command_no") + .HasMaxLength(100); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("limit"); + + b.Property("limit_frame"); + + b.Property("limit_frame_quota"); + + b.Property("limit_quota"); + + b.Property("managed_by"); + + b.Property("percentage"); + + b.Property("theDate"); + + b.Property("theRound"); + + b.Property("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("id"); + + b.Property("adjust_postponement_id"); + + b.Property("adjust_postponement_quota_id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("new_cost_living"); + + b.Property("new_sarary"); + + b.Property("new_sarary_with_quota"); + + b.Property("promoted_percentage"); + + b.Property("receive_quota"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("sarary"); + + b.Property("total_promote"); + + b.Property("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("id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("performance_plan_id"); + + b.Property("score1"); + + b.Property("score2"); + + b.Property("supervisor1_id"); + + b.Property("supervisor2_id"); + + b.Property("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("id"); + + b.Property("Final_summary_chief"); + + b.Property("Final_summary_competency_chief"); + + b.Property("Final_summary_competency_supervisor"); + + b.Property("Final_summary_competency_supervisor1A"); + + b.Property("Final_summary_competency_supervisor2A"); + + b.Property("Final_summary_supervisor"); + + b.Property("Final_summary_supervisor1A"); + + b.Property("Final_summary_supervisor2A"); + + b.Property("achievement_chief"); + + b.Property("achievement_supervisor"); + + b.Property("achievement_supervisor1A"); + + b.Property("achievement_supervisor2A"); + + b.Property("chief"); + + b.Property("competency_chief"); + + b.Property("competency_supervisor"); + + b.Property("competency_supervisor1A"); + + b.Property("competency_supervisor2A"); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("isActive"); + + b.Property("level_score_chief") + .HasMaxLength(255); + + b.Property("level_score_supervisor") + .HasMaxLength(255); + + b.Property("level_score_supervisor1A") + .HasMaxLength(255); + + b.Property("level_score_supervisor2A") + .HasMaxLength(255); + + b.Property("score_chief"); + + b.Property("score_supervisor"); + + b.Property("score_supervisor1A"); + + b.Property("score_supervisor2A"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_chief_click_date"); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("status_self_click_date"); + + b.Property("status_supervisor") + .HasMaxLength(1); + + b.Property("status_supervisor1A") + .HasMaxLength(1); + + b.Property("status_supervisor1A_click_date"); + + b.Property("status_supervisor2A") + .HasMaxLength(1); + + b.Property("status_supervisor2A_click_date"); + + b.Property("status_supervisor_click_date"); + + b.Property("supervisor1"); + + b.Property("supervisor1A"); + + b.Property("supervisor1A_date"); + + b.Property("supervisor1A_remark") + .HasMaxLength(1000); + + b.Property("supervisor1A_result") + .HasMaxLength(1); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("supervisor2"); + + b.Property("supervisor2A"); + + b.Property("supervisor2A_date"); + + b.Property("supervisor2A_remark") + .HasMaxLength(1000); + + b.Property("supervisor2A_result") + .HasMaxLength(1); + + b.Property("supervisor2_date"); + + b.Property("supervisor2_remark") + .HasMaxLength(1000); + + b.Property("supervisor2_result") + .HasMaxLength(1); + + b.Property("total_summary_chief"); + + b.Property("total_summary_competency_chief"); + + b.Property("total_summary_competency_supervisor"); + + b.Property("total_summary_competency_supervisor1A"); + + b.Property("total_summary_competency_supervisor2A"); + + b.Property("total_summary_supervisor"); + + b.Property("total_summary_supervisor1A"); + + b.Property("total_summary_supervisor2A"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_create_evaluation_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.Property("id"); + + b.Property("achievement") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("thefile") + .HasMaxLength(1000); + + b.Property("updated"); + + b.Property("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("id"); + + b.Property("behavior") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("updated"); + + b.Property("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("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("thegroup") + .HasMaxLength(255); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_evaluation_group"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("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("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("develop") + .HasMaxLength(1000); + + b.Property("development_method") + .HasMaxLength(1000); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("period_text") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_idp_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_level_score"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("theTime"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_performance_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("list_no"); + + b.Property("performance_plan_id"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("step") + .HasMaxLength(1000); + + b.Property("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("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("level_score_id"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("promoted_percentage"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("level_score_id"); + + b.ToTable("eva_promoted_percentage"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b => + { + b.Property("id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("position_level"); + + b.Property("position_type"); + + b.Property("temporary_min"); + + b.Property("themax"); + + b.Property("themin"); + + b.Property("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 + } + } +} diff --git a/Migrations/25630828080707_AddIdpPlanTimeText.cs b/Migrations/25630828080707_AddIdpPlanTimeText.cs new file mode 100644 index 0000000..f38531b --- /dev/null +++ b/Migrations/25630828080707_AddIdpPlanTimeText.cs @@ -0,0 +1,23 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace tb320eva.Migrations +{ + public partial class AddIdpPlanTimeText : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + 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"); + } + } +} diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index b9a4470..184ccd1 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -467,6 +467,9 @@ namespace tb320eva.Migrations b.Property("isActive"); + b.Property("period_text") + .HasMaxLength(1000); + b.Property("start_date"); b.Property("updated"); diff --git a/Models/eva_create_evaluation_detail_process/Ieva_create_evaluation_detail_processService.cs b/Models/eva_create_evaluation_detail_process/Ieva_create_evaluation_detail_processService.cs index d422e73..b1b8e99 100644 --- a/Models/eva_create_evaluation_detail_process/Ieva_create_evaluation_detail_processService.cs +++ b/Models/eva_create_evaluation_detail_process/Ieva_create_evaluation_detail_processService.cs @@ -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(); } } diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs index 356bb39..63d3a78 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processService.cs @@ -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 diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs index 604c0d0..ea39eb7 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processViewModel.cs @@ -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; } diff --git a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs index f287c02..46456cd 100644 --- a/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs +++ b/Models/eva_create_evaluation_detail_process/eva_create_evaluation_detail_processWithSelectionViewModel.cs @@ -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; } } } diff --git a/Models/eva_idp_plan/Ieva_idp_planService.cs b/Models/eva_idp_plan/Ieva_idp_planService.cs index de61091..9b31203 100644 --- a/Models/eva_idp_plan/Ieva_idp_planService.cs +++ b/Models/eva_idp_plan/Ieva_idp_planService.cs @@ -21,7 +21,7 @@ namespace TodoAPI2.Models eva_idp_planWithSelectionViewModel GetWithSelection(int id); eva_idp_planWithSelectionViewModel GetBlankItem(); - + void RefreshAutoFieldOfAllData(); } } diff --git a/Models/eva_idp_plan/eva_idp_planEntity.cs b/Models/eva_idp_plan/eva_idp_planEntity.cs index b6b36e8..bd9d0e0 100644 --- a/Models/eva_idp_plan/eva_idp_planEntity.cs +++ b/Models/eva_idp_plan/eva_idp_planEntity.cs @@ -14,8 +14,6 @@ namespace TodoAPI2.Models { public class eva_idp_planEntity : BaseEntity2 { - - 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) + { + + } } } diff --git a/Models/eva_idp_plan/eva_idp_planService.cs b/Models/eva_idp_plan/eva_idp_planService.cs index 8fd3250..972430f 100644 --- a/Models/eva_idp_plan/eva_idp_planService.cs +++ b/Models/eva_idp_plan/eva_idp_planService.cs @@ -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(); + } } } \ No newline at end of file diff --git a/Models/external_employee/external_employeeService.cs b/Models/external_employee/external_employeeService.cs index a56df1f..a78f5e8 100644 --- a/Models/external_employee/external_employeeService.cs +++ b/Models/external_employee/external_employeeService.cs @@ -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(); diff --git a/Models/external_employee/external_employeeViewModel.cs b/Models/external_employee/external_employeeViewModel.cs index fbb5c46..e8c9a39 100644 --- a/Models/external_employee/external_employeeViewModel.cs +++ b/Models/external_employee/external_employeeViewModel.cs @@ -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 // ทำงานมาแล้วกี่เดือน { diff --git a/Models/external_linkage/Iexternal_linkageService.cs b/Models/external_linkage/Iexternal_linkageService.cs index e047137..134e754 100644 --- a/Models/external_linkage/Iexternal_linkageService.cs +++ b/Models/external_linkage/Iexternal_linkageService.cs @@ -35,6 +35,7 @@ namespace TodoAPI2.Models List GetSortingDep(); List GetFiscalYear2(); List GetThaiMonth(); + string GetMainDept(int? dep_id); } } diff --git a/Models/external_linkage/external_linkageService.cs b/Models/external_linkage/external_linkageService.cs index 1d7272b..8b26bc6 100644 --- a/Models/external_linkage/external_linkageService.cs +++ b/Models/external_linkage/external_linkageService.cs @@ -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 GetChildInDep(int? dep_id) { var sql = string.Format(@"select data1.id,data1.department_name diff --git a/Models/rep_eva_x/Irep_eva_xService.cs b/Models/rep_eva_x/Irep_eva_xService.cs new file mode 100644 index 0000000..9e24aec --- /dev/null +++ b/Models/rep_eva_x/Irep_eva_xService.cs @@ -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(); + } +} + diff --git a/Models/rep_eva_x/rep_eva_xInputModel.cs b/Models/rep_eva_x/rep_eva_xInputModel.cs new file mode 100644 index 0000000..fbfd978 --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xInputModel.cs @@ -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; } + } +} + diff --git a/Models/rep_eva_x/rep_eva_xInputModel2.cs b/Models/rep_eva_x/rep_eva_xInputModel2.cs new file mode 100644 index 0000000..ff4c3a6 --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xInputModel2.cs @@ -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; } + } +} + diff --git a/Models/rep_eva_x/rep_eva_xReportRequestModel.cs b/Models/rep_eva_x/rep_eva_xReportRequestModel.cs new file mode 100644 index 0000000..34d8492 --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xReportRequestModel.cs @@ -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); } } + } +} + diff --git a/Models/rep_eva_x/rep_eva_xSearchModel.cs b/Models/rep_eva_x/rep_eva_xSearchModel.cs new file mode 100644 index 0000000..6e5846a --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xSearchModel.cs @@ -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; } + + } +} + diff --git a/Models/rep_eva_x/rep_eva_xService.cs b/Models/rep_eva_x/rep_eva_xService.cs new file mode 100644 index 0000000..c833e81 --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xService.cs @@ -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 _repository; + private IMyDatabase db; + private Iexternal_linkageService ext; + + public rep_eva_xService(IBaseRepository 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; + } + } +} + diff --git a/Models/rep_eva_x/rep_eva_xViewModel.cs b/Models/rep_eva_x/rep_eva_xViewModel.cs new file mode 100644 index 0000000..fff254c --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xViewModel.cs @@ -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 + { + + public string detail_id { get; set; } + + + } +} \ No newline at end of file diff --git a/Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs b/Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs new file mode 100644 index 0000000..b7744ab --- /dev/null +++ b/Models/rep_eva_x/rep_eva_xWithSelectionViewModel.cs @@ -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 + { + + } +} \ No newline at end of file diff --git a/Startup.cs b/Startup.cs index 3fca47b..dfacd9e 100644 --- a/Startup.cs +++ b/Startup.cs @@ -289,6 +289,8 @@ namespace Test01 services.AddScoped(); + services.AddScoped(); + #endregion services.TryAddSingleton(); @@ -508,6 +510,9 @@ namespace Test01 cfg.CreateMap(); cfg.CreateMap(); + cfg.CreateMap(); + cfg.CreateMap(); + cfg.CreateMap(); }); #endregion diff --git a/ViewControllers/rep_eva_xViewControllers.cs b/ViewControllers/rep_eva_xViewControllers.cs new file mode 100644 index 0000000..bc06358 --- /dev/null +++ b/ViewControllers/rep_eva_xViewControllers.cs @@ -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 _logger; + private Irep_eva_xService _repository; + private IConfiguration Configuration { get; set; } + + ///

+ /// Default constructure for dependency injection + /// + /// + /// + /// + public rep_eva_xViewController(ILogger 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 }); + } + } +} + + diff --git a/Views/rep_eva_xView/rep_eva_x_report.cshtml b/Views/rep_eva_xView/rep_eva_x_report.cshtml new file mode 100644 index 0000000..e15bd57 --- /dev/null +++ b/Views/rep_eva_xView/rep_eva_x_report.cshtml @@ -0,0 +1,55 @@ +@using Microsoft.Extensions.Configuration +@inject IConfiguration Configuration +@{ + ViewData["Title"] = "rep_eva_x"; +} + +
+
+
+ @Configuration["SiteInformation:modulename"] +
+
+
+ +
+
+ +
+
รายงาน rep_eva_x
+
+
+
+
+ +
+ + +
+ +
+
+
+ + +
+
+
+
+
+ + +@section FooterPlaceHolder{ + + +} + diff --git a/tb320eva.csproj b/tb320eva.csproj index cba03a2..e96b314 100644 --- a/tb320eva.csproj +++ b/tb320eva.csproj @@ -33,6 +33,7 @@ + diff --git a/tb320eva.xml b/tb320eva.xml index 97749ca..275ba74 100644 --- a/tb320eva.xml +++ b/tb320eva.xml @@ -2491,6 +2491,17 @@ If the model is invalid Error Occurred + + + Refresh AutoField of all items + + + + Response Result Message + Response Result Message + If the model is invalid + Error Occurred + Default constructure for dependency injection @@ -3348,6 +3359,37 @@ Returns the item Error Occurred + + + Default constructure for dependency injection + + + + + + + + + + + Get Blank Item + + + + Return a blank item + Returns the item + Error Occurred + + + + Download Report + + + + Return list of items by specifced keyword + Returns the item + Error Occurred + Default constructure for dependency injection @@ -3841,6 +3883,14 @@ + + + Default constructure for dependency injection + + + + + Default constructure for dependency injection diff --git a/wwwroot/js/rep_eva_x/rep_eva_x_report.js b/wwwroot/js/rep_eva_x/rep_eva_x_report.js new file mode 100644 index 0000000..4e1312f --- /dev/null +++ b/wwwroot/js/rep_eva_x/rep_eva_x_report.js @@ -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); + } +} +