แก้ไข op 10 ข้อ
This commit is contained in:
@@ -237,6 +237,45 @@ namespace TodoAPI2.Controllers
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset_achievement
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Response Result Message</returns>
|
||||
/// <response code="200">Response Result Message</response>
|
||||
/// <response code="400">If the model is invalid</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpPut("reset_achievement")]
|
||||
[ProducesResponseType(typeof(CommonResponseMessage), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult reset_achievement(int id)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
_repository.reset_achievement(id);
|
||||
var message = new CommonResponseMessage();
|
||||
message.code = "200";
|
||||
message.message = $"ปรับปรุงข้อมูล เรียบร้อย";
|
||||
message.data = null;
|
||||
return Ok(message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while update {id.ToString()}.", ex);
|
||||
return StatusCode(500, $"Exception while update {id.ToString()}. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete item
|
||||
/// </summary>
|
||||
|
||||
@@ -216,6 +216,26 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
|
||||
if(model.is_print_22 == 1)
|
||||
{
|
||||
rep_eva_p01ReportRequestModel model2 = new rep_eva_p01ReportRequestModel();
|
||||
model2.filetype = model.filetype;
|
||||
model2.detail_id = k;
|
||||
|
||||
var data2x = GetReportP01(model2);
|
||||
|
||||
PdfReader reader2 = new PdfReader(data2x);
|
||||
reader2.ConsolidateNamedDestinations();
|
||||
|
||||
for (int i = 1; i <= reader2.NumberOfPages; i++)
|
||||
{
|
||||
PdfImportedPage page = writer.GetImportedPage(reader2, i);
|
||||
writer.AddPage(page);
|
||||
}
|
||||
|
||||
reader2.Close();
|
||||
}
|
||||
}
|
||||
|
||||
writer.Close();
|
||||
|
||||
922
Migrations/25640307042106_IncreaseFieldSize.Designer.cs
generated
Normal file
922
Migrations/25640307042106_IncreaseFieldSize.Designer.cs
generated
Normal file
@@ -0,0 +1,922 @@
|
||||
// <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("25640307042106_IncreaseFieldSize")]
|
||||
partial class IncreaseFieldSize
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("command_no")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<DateTime?>("imported_date");
|
||||
|
||||
b.Property<string>("imported_file")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit");
|
||||
|
||||
b.Property<decimal?>("limit_frame");
|
||||
|
||||
b.Property<decimal?>("limit_frame_quota");
|
||||
|
||||
b.Property<decimal?>("limit_quota");
|
||||
|
||||
b.Property<int?>("managed_by");
|
||||
|
||||
b.Property<decimal?>("percentage");
|
||||
|
||||
b.Property<string>("report_type")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("theDate");
|
||||
|
||||
b.Property<int?>("theRound");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_id");
|
||||
|
||||
b.Property<int?>("adjust_postponement_quota_id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<string>("migration_eva_result")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("migration_total_score");
|
||||
|
||||
b.Property<decimal?>("new_cost_living");
|
||||
|
||||
b.Property<decimal?>("new_sarary");
|
||||
|
||||
b.Property<decimal?>("new_sarary_with_quota");
|
||||
|
||||
b.Property<int?>("order_at_this_time");
|
||||
|
||||
b.Property<int?>("org_at_this_time");
|
||||
|
||||
b.Property<decimal?>("other_money_at_this_time");
|
||||
|
||||
b.Property<decimal?>("position_allowance_at_this_time");
|
||||
|
||||
b.Property<string>("position_this_time")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<decimal?>("receive_quota");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("total_promote");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("adjust_postponement_id");
|
||||
|
||||
b.HasIndex("adjust_postponement_quota_id");
|
||||
|
||||
b.ToTable("eva_adjust_postponement_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<decimal?>("score1");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<int?>("supervisor1_id");
|
||||
|
||||
b.Property<int?>("supervisor2_id");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_create_evaluation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("Final_summary_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("Final_summary_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("achievement_chief");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("achievement_supervisor2A");
|
||||
|
||||
b.Property<int?>("chief");
|
||||
|
||||
b.Property<int?>("chief_a");
|
||||
|
||||
b.Property<DateTime?>("chief_a_date");
|
||||
|
||||
b.Property<string>("chief_a_reject_reason")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("chief_a_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("competency_chief");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("competency_supervisor2A");
|
||||
|
||||
b.Property<int?>("create_evaluation_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_score_chief")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor1A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("level_score_supervisor2A")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<decimal?>("score_chief");
|
||||
|
||||
b.Property<decimal?>("score_supervisor");
|
||||
|
||||
b.Property<decimal?>("score_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("score_supervisor2A");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_chief_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_chief_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_chief_click_date");
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_self_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_self_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_supervisor1A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor1A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor2A")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<int?>("supervisor1A");
|
||||
|
||||
b.Property<DateTime?>("supervisor1A_date");
|
||||
|
||||
b.Property<string>("supervisor1A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor2");
|
||||
|
||||
b.Property<int?>("supervisor2A");
|
||||
|
||||
b.Property<DateTime?>("supervisor2A_date");
|
||||
|
||||
b.Property<string>("supervisor2A_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2A_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("supervisor2_date");
|
||||
|
||||
b.Property<string>("supervisor2_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor2_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_summary_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_chief");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_competency_supervisor2A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor1A");
|
||||
|
||||
b.Property<decimal?>("total_summary_supervisor2A");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_create_evaluation_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(3000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("thefile")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_achievement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("behavior")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("score");
|
||||
|
||||
b.Property<decimal?>("score2");
|
||||
|
||||
b.Property<decimal?>("score3");
|
||||
|
||||
b.Property<decimal?>("score4");
|
||||
|
||||
b.Property<decimal?>("sumary");
|
||||
|
||||
b.Property<decimal?>("sumary2");
|
||||
|
||||
b.Property<decimal?>("sumary3");
|
||||
|
||||
b.Property<decimal?>("sumary4");
|
||||
|
||||
b.Property<string>("target_score1")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score2")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score3")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score4")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<string>("target_score5")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.Property<decimal?>("weight");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_behavior");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("thegroup")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_evaluation_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("evaluation_group_id");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("evaluation_group_id");
|
||||
|
||||
b.ToTable("eva_evaluation_group_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("indicators")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("mission_detail")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<int?>("mission_no");
|
||||
|
||||
b.Property<string>("target")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("create_evaluation_detail_id");
|
||||
|
||||
b.ToTable("eva_evaluation_operating_agreement");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("develop")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("development_method")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("period_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_idp_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_level_score");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<decimal?>("cost_of_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("employee_id");
|
||||
|
||||
b.Property<Guid?>("frame_group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<string>("level_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("monthly_remuneration");
|
||||
|
||||
b.Property<int?>("order_of_data");
|
||||
|
||||
b.Property<int?>("org_id");
|
||||
|
||||
b.Property<decimal?>("position_allowance");
|
||||
|
||||
b.Property<string>("position_text")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<Guid?>("frame_plan_guid");
|
||||
|
||||
b.Property<Guid?>("group_guid");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_295");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit");
|
||||
|
||||
b.Property<decimal?>("total_salary_limit_rounded");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("frame_plan_guid");
|
||||
|
||||
b.HasIndex("group_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("executed_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005_total");
|
||||
|
||||
b.Property<decimal?>("limit_frame_005_total_rounded");
|
||||
|
||||
b.Property<Guid?>("plan_guid");
|
||||
|
||||
b.Property<DateTime?>("salary_adjustment_date");
|
||||
|
||||
b.Property<string>("status_chief")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<string>("status_self")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
b.Property<DateTime?>("supervisor1_date");
|
||||
|
||||
b.Property<string>("supervisor1_remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<string>("supervisor1_result")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<decimal?>("total_salary");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("plan_guid");
|
||||
|
||||
b.ToTable("eva_limit_frame_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<int?>("fiscal_year");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("theTime");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_performance_plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<DateTime?>("end_date");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<int?>("list_no");
|
||||
|
||||
b.Property<Guid?>("performance_plan_id");
|
||||
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime?>("start_date");
|
||||
|
||||
b.Property<string>("step")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("performance_plan_id");
|
||||
|
||||
b.ToTable("eva_performance_plan_detail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("code")
|
||||
.HasMaxLength(255);
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<string>("detail")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<Guid?>("level_score_id");
|
||||
|
||||
b.Property<decimal?>("max_score");
|
||||
|
||||
b.Property<decimal?>("min_score");
|
||||
|
||||
b.Property<decimal?>("promoted_percentage");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("level_score_id");
|
||||
|
||||
b.ToTable("eva_promoted_percentage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<decimal?>("cost_living");
|
||||
|
||||
b.Property<DateTime>("created");
|
||||
|
||||
b.Property<bool>("isActive");
|
||||
|
||||
b.Property<decimal?>("middle");
|
||||
|
||||
b.Property<int?>("position_level");
|
||||
|
||||
b.Property<int?>("position_type");
|
||||
|
||||
b.Property<decimal?>("temporary_min");
|
||||
|
||||
b.Property<decimal?>("themax");
|
||||
|
||||
b.Property<decimal?>("themin");
|
||||
|
||||
b.Property<DateTime>("updated");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("eva_salary_cylinder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
|
||||
.WithMany()
|
||||
.HasForeignKey("adjust_postponement_quota_id")
|
||||
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("performance_plan_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
|
||||
.WithMany()
|
||||
.HasForeignKey("evaluation_group_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
|
||||
.WithMany()
|
||||
.HasForeignKey("create_evaluation_detail_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_groupEntity", "eva_limit_frame_group_frame_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_groupEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_limit_frame_planEntity", "eva_limit_frame_plan_frame_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("frame_plan_guid");
|
||||
|
||||
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group_group_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("group_guid");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_planEntity", b =>
|
||||
{
|
||||
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan_plan_guid")
|
||||
.WithMany()
|
||||
.HasForeignKey("plan_guid");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Migrations/25640307042106_IncreaseFieldSize.cs
Normal file
31
Migrations/25640307042106_IncreaseFieldSize.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class IncreaseFieldSize : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "achievement",
|
||||
table: "eva_evaluation_achievement",
|
||||
maxLength: 3000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 1000,
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "achievement",
|
||||
table: "eva_evaluation_achievement",
|
||||
maxLength: 1000,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldMaxLength: 3000,
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -347,7 +347,7 @@ namespace tb320eva.Migrations
|
||||
b.Property<int>("id");
|
||||
|
||||
b.Property<string>("achievement")
|
||||
.HasMaxLength(1000);
|
||||
.HasMaxLength(3000);
|
||||
|
||||
b.Property<int?>("create_evaluation_detail_id");
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace TodoAPI2.Models
|
||||
select i).FirstOrDefault();
|
||||
string sql = $@"
|
||||
insert into notifications(id,type,notifiable_type,notifiable_id,data,created_at)
|
||||
values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','App\Models\User',{noti_to_user_id.ToString()},@data,NOW())
|
||||
values('{Guid.NewGuid().ToString()}','App\Notifications\WorkflowNotification','App\Models\User',{noti_to_user_id.ToString()},@data,NOW()now()+interval'7h')
|
||||
";
|
||||
DataOfNotification d = new DataOfNotification();
|
||||
d.title = noti_message.Replace("{0}", owner_info.fullname);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace TodoAPI2.Models
|
||||
eva_evaluation_achievementWithSelectionViewModel GetWithSelection(int id);
|
||||
eva_evaluation_achievementWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
void reset_achievement(int id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace TodoAPI2.Models
|
||||
public eva_create_evaluation_detailEntity eva_create_evaluation_detail { get; set; }
|
||||
public int? create_evaluation_detail_id { get; set; }
|
||||
|
||||
[MaxLength(1000)]
|
||||
[MaxLength(3000)]
|
||||
public string achievement { get; set; }
|
||||
|
||||
public decimal? weight { get; set; }
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace TodoAPI2.Models
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public eva_evaluation_achievementService(IBaseRepository2<eva_evaluation_achievementEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
public eva_evaluation_achievementService(IBaseRepository2<eva_evaluation_achievementEntity, int> repository,
|
||||
IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
@@ -96,7 +97,7 @@ namespace TodoAPI2.Models
|
||||
&& (m_eva_evaluation_achievement.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue)
|
||||
|
||||
|
||||
orderby m_eva_evaluation_achievement.achievement
|
||||
orderby m_eva_evaluation_achievement.created
|
||||
select new eva_evaluation_achievementViewModel()
|
||||
{
|
||||
id = m_eva_evaluation_achievement.id,
|
||||
@@ -240,6 +241,47 @@ namespace TodoAPI2.Models
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
public void reset_achievement(int id)
|
||||
{
|
||||
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
|
||||
where i.id == id
|
||||
select i).FirstOrDefault();
|
||||
|
||||
if(current_detail == null) throw new NotificationException("No data to update");
|
||||
|
||||
if (current_detail.status_self == "Y")
|
||||
{
|
||||
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
|
||||
}
|
||||
|
||||
var current_achievement = (from i in _repository.Context.eva_evaluation_achievement
|
||||
where i.create_evaluation_detail_id == id
|
||||
select i);
|
||||
_repository.Context.RemoveRange(current_achievement);
|
||||
|
||||
var opt = (from i in _repository.Context.eva_evaluation_operating_agreement
|
||||
where i.create_evaluation_detail_id == id
|
||||
orderby i.mission_no
|
||||
select i).ToList();
|
||||
|
||||
var newid = GetNewPrimaryKey();
|
||||
var enter = "\n";
|
||||
|
||||
foreach (var i in opt)
|
||||
{
|
||||
var n = new eva_evaluation_achievementEntity();
|
||||
n.id = newid;
|
||||
n.create_evaluation_detail_id = id;
|
||||
n.achievement = "รายละเอียดภารกิจ" + enter + enter + i.mission_detail + enter + enter + "เป้าหมาย" + enter + enter + i.target + enter + enter + "ตัวชี้วัด" + enter + enter + i.indicators;
|
||||
n.weight = 0;
|
||||
n.created = DateTime.Now.AddMinutes(-1 * newid);
|
||||
newid++;
|
||||
_repository.Context.Add(n);
|
||||
}
|
||||
|
||||
_repository.Context.SaveChanges();
|
||||
}
|
||||
|
||||
public string UpdateMultiple(List<eva_evaluation_achievementInputModel> model)
|
||||
{
|
||||
foreach (var i in model)
|
||||
|
||||
@@ -42,7 +42,14 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string target_score5 { get; set; }
|
||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||
|
||||
public string achievement_display
|
||||
{
|
||||
get
|
||||
{
|
||||
if (achievement == null) achievement = "";
|
||||
return achievement.Replace("\n", "<br/>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,5 +36,13 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||
|
||||
public string achievement_display {
|
||||
get
|
||||
{
|
||||
if (achievement == null) achievement = "";
|
||||
return achievement.Replace("\n", "<br/>");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -58,5 +58,13 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||
|
||||
public string achievement_display
|
||||
{
|
||||
get
|
||||
{
|
||||
if (achievement == null) achievement = "";
|
||||
return achievement.Replace("\n", "<br/>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<int> detail_id { get; set; }
|
||||
|
||||
public int? is_print_22 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,9 +133,15 @@
|
||||
eva_create_evaluation_InitiateDataTable();
|
||||
eva_create_evaluation_InitialForm();
|
||||
SetupValidationRemark("eva_create_evaluation");
|
||||
$("#eva_create_evaluation_employee_id").select2();
|
||||
$("#eva_create_evaluation_supervisor1_id").select2();
|
||||
$("#eva_create_evaluation_supervisor2_id").select2();
|
||||
$("#eva_create_evaluation_employee_id").select2({
|
||||
dropdownParent: $('#eva_create_evaluationModel')
|
||||
});
|
||||
$("#eva_create_evaluation_supervisor1_id").select2({
|
||||
dropdownParent: $('#eva_create_evaluationModel')
|
||||
});
|
||||
$("#eva_create_evaluation_supervisor2_id").select2({
|
||||
dropdownParent: $('#eva_create_evaluationModel')
|
||||
});
|
||||
$("#eva_create_evaluation_detail_employee_id").select2();
|
||||
$("#eva_create_evaluation_detail_chief").select2();
|
||||
});
|
||||
|
||||
@@ -6,6 +6,29 @@
|
||||
}
|
||||
|
||||
|
||||
<div class="modal fade" id="report_xModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="report_xModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="report_xModelLabel">พิมพ์แบบประเมิน</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ปิด</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="eva_evaluation_behaviorModel" style="z-index:1500" role="dialog" aria-labelledby="eva_evaluation_behaviorModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
@@ -278,8 +301,9 @@
|
||||
|
||||
<input class="form-control" type="hidden" id="s_eva_evaluation_achievement_create_evaluation_detail_id" />
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info status_self" onclick="javascript:eva_evaluation_achievement_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
|
||||
<button class="btn btn-info status_self" onclick="javascript:eva_evaluation_achievement_reset_achievement();"><i class="fa fa-plus" style="font-size: 14px;"></i> ดึงรายการจากแบบข้อตกลง</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -303,7 +327,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th><center><label>รวมน้ำหนัก</label></center></th>
|
||||
<th><p id="sum_a"></p></th>
|
||||
<th style="display:none;"> </th>
|
||||
<th style="display:none;"> </th>
|
||||
@@ -378,10 +402,14 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next0')">ส่งแบบประเมิน</button>
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
|
||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
|
||||
|
||||
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
||||
|
||||
<button type="button" class="btn btn-primary status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next0')">ส่งแบบประเมิน</button>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -393,6 +421,7 @@
|
||||
<script src="~/js/eva_evaluation_behavior/eva_evaluation_behavior.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_idp_plan_owner/eva_idp_plan_owner.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/rep_eva_x/rep_eva_x_report.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script>
|
||||
|
||||
var status_self = "";
|
||||
@@ -423,10 +452,10 @@
|
||||
});
|
||||
|
||||
function CheckPermission() {
|
||||
if (status_self === "Y") {
|
||||
$(".status_self").hide();
|
||||
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
||||
}
|
||||
//if (status_self === "Y") {
|
||||
// $(".status_self").hide();
|
||||
// $("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
||||
//}
|
||||
}
|
||||
|
||||
function OnWeightChanged(c) {
|
||||
@@ -446,6 +475,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
function print_report() {
|
||||
var eva_create_evaluation_detail_selectitem = [];
|
||||
eva_create_evaluation_detail_selectitem.push(getUrlParameter("id"));
|
||||
|
||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 1); // 1 คือให้ต่อท้าย แบบข้อตกลง ออกมาด้วย
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
@@ -259,13 +259,16 @@
|
||||
|
||||
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('nextA')">ส่งข้อตกลงการประเมิน</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('backB')">ส่งเอกสารคืน</button>
|
||||
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('save')">บันทึก</button>
|
||||
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('nextB')">ส่งข้อตกลงการประเมิน</button>
|
||||
|
||||
|
||||
<button class="btn btn-info" onclick="javascript:rep_eva_p01_DoSearch('pdf');">พิมพ์แบบข้อตกลง</button>
|
||||
|
||||
<button type="button" class="btn btn-submit status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('nextA')">ส่งข้อตกลงการประเมิน</button>
|
||||
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('nextB')">ส่งข้อตกลงการประเมิน</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
|
||||
@@ -5,6 +5,29 @@
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="report_xModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="report_xModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="report_xModelLabel">พิมพ์แบบประเมิน</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ปิด</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row page-title">
|
||||
<div class="col-md-5">
|
||||
<div class="page-title">
|
||||
@@ -322,7 +345,7 @@
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review01_supervisor1_remark" for="eva_create_evaluation_detail_review01_supervisor1_remark">ความเห็นผู้ประเมิน</label>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review01_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review01"></textarea>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review01_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="false" iGroup="eva_create_evaluation_detail_review01"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -345,6 +368,8 @@
|
||||
<div class="form-group col-md-12">
|
||||
<button id="btna01" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveAll()">บันทึก</button>
|
||||
|
||||
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
||||
|
||||
<button id="btna02" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveStatus('next1')">ส่งแบบประเมิน</button>
|
||||
|
||||
<button id="btna03" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveStatus('back1')">ตีกลับแบบประเมิน</button>
|
||||
@@ -360,6 +385,7 @@
|
||||
<script src="~/js/eva_create_evaluation_detail_summary1/eva_create_evaluation_detail_summary1_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_review01/eva_create_evaluation_detail_review01_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/rep_eva_x/rep_eva_x_report.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
@@ -426,8 +452,7 @@
|
||||
}
|
||||
|
||||
function saveStatus(s) {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review01', eva_create_evaluation_detail_review01_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review01', eva_create_evaluation_detail_review01_customValidation)) {
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
@@ -447,6 +472,14 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function print_report() {
|
||||
var eva_create_evaluation_detail_selectitem = [];
|
||||
eva_create_evaluation_detail_selectitem.push(getUrlParameter("id"));
|
||||
|
||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 1); // 1 คือให้ต่อท้าย แบบข้อตกลง ออกมาด้วย
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,29 @@
|
||||
Layout = "_LayoutDirect";
|
||||
}
|
||||
|
||||
<div class="modal fade" id="report_xModel" style="z-index:1500" tabindex="-1" role="dialog" aria-labelledby="report_xModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="report_xModelLabel">พิมพ์แบบประเมิน</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<iframe id="report_result" style="display:none; height:500px; width:100%;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">ปิด</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="eva_idp_planModel" style="z-index:1500" role="dialog" aria-labelledby="eva_idp_planModelLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
@@ -566,6 +589,8 @@
|
||||
<div class="form-group col-md-12">
|
||||
<button id="btnd01" type="button" class="btn btn-submit" onclick="javascript:saveReview04()">บันทึก</button>
|
||||
|
||||
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
||||
|
||||
<button id="btnd02" type="button" class="btn btn-submit" onclick="javascript:saveStatus('next4')">ส่งแบบประเมิน</button>
|
||||
|
||||
<button id="btnd03" type="button" class="btn btn-submit" onclick="javascript:saveStatus('back4')">ตีกลับแบบประเมิน</button>
|
||||
@@ -587,6 +612,7 @@
|
||||
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/eva_idp_plan/eva_idp_plan.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script src="~/js/rep_eva_x/rep_eva_x_report.js?version=@MyHelper.GetDummyText()"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var id = getUrlParameter("id");
|
||||
@@ -718,8 +744,7 @@
|
||||
|
||||
function saveStatus(s) {
|
||||
if (s === "next2" || s === "back2") {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review02', eva_create_evaluation_detail_review02_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review02', eva_create_evaluation_detail_review02_customValidation)) {
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
@@ -729,8 +754,7 @@
|
||||
}, 1000);
|
||||
}
|
||||
else if (s === "next3") {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review03', eva_create_evaluation_detail_review03_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review03', eva_create_evaluation_detail_review03_customValidation)) {
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
@@ -740,8 +764,7 @@
|
||||
}, 1000);
|
||||
}
|
||||
else if (s === "next4") {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review04', eva_create_evaluation_detail_review04_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail_review04', eva_create_evaluation_detail_review04_customValidation)) {
|
||||
return;
|
||||
}
|
||||
saveAll();
|
||||
@@ -761,6 +784,14 @@
|
||||
function CheckWeightBeforeSubmitStatus() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function print_report() {
|
||||
var eva_create_evaluation_detail_selectitem = [];
|
||||
eva_create_evaluation_detail_selectitem.push(getUrlParameter("id"));
|
||||
|
||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 1); // 1 คือให้ต่อท้าย แบบข้อตกลง ออกมาด้วย
|
||||
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
12
tb320eva.xml
12
tb320eva.xml
@@ -2110,6 +2110,18 @@
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_evaluation_achievementController.reset_achievement(System.Int32)">
|
||||
<summary>
|
||||
reset_achievement
|
||||
</summary>
|
||||
<remarks>
|
||||
</remarks>
|
||||
<param name="id"></param>
|
||||
<returns>Response Result Message</returns>
|
||||
<response code="200">Response Result Message</response>
|
||||
<response code="400">If the model is invalid</response>
|
||||
<response code="500">Error Occurred</response>
|
||||
</member>
|
||||
<member name="M:TodoAPI2.Controllers.eva_evaluation_achievementController.Delete(System.Int32)">
|
||||
<summary>
|
||||
Delete item
|
||||
|
||||
@@ -102,8 +102,7 @@ var eva_create_evaluation_detail_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail', eva_create_evaluation_detail_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail', eva_create_evaluation_detail_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,7 +232,7 @@ function eva_create_evaluation_detail_GetSelect(f) {
|
||||
});
|
||||
//alert(eva_create_evaluation_detail_selectitem);
|
||||
|
||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem)
|
||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 0); // 0 คือ ไม่ต้องต่อท้ายแบบข้อตกลง ออกมา
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,7 @@ var eva_create_evaluation_detail_agreement_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_agreement_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail_agreement', eva_create_evaluation_detail_agreement_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail_agreement', eva_create_evaluation_detail_agreement_customValidation)) {
|
||||
return;
|
||||
}
|
||||
var data = eva_create_evaluation_detail_agreement_GetFromForm();
|
||||
|
||||
@@ -143,6 +143,20 @@ function eva_evaluation_achievement_PutUpdate() {
|
||||
}
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_reset_achievement() {
|
||||
if (!confirm("ระบบจะล้างข้อมูลที่มีอยู่เดิม และดึงข้อมูลจากแบบข้อตกลง งด2/2 มาสร้างเป็น ผลสัมฤทธิ์ของงาน, คุณยืนยันที่จะดำเนินการใช่หรือไม่?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.message);
|
||||
eva_evaluation_achievement_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_evaluation_achievement_API + "reset_achievement?id=" + getUrlParameter("id"), null, successFunc1, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_evaluation_achievement_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
@@ -175,7 +189,7 @@ var eva_evaluation_achievement_setupTable = function (result) {
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "achievement" },
|
||||
{ "data": "achievement_display" },
|
||||
{ "data": "weight" },
|
||||
{ "data": "target_score1" },
|
||||
{ "data": "target_score2" },
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_eva_x_GetSearchParameter(fileType, data) {
|
||||
function rep_eva_x_GetSearchParameter(fileType, data, add22) {
|
||||
var rep_eva_xSearchObject = new Object();
|
||||
rep_eva_xSearchObject.detail_id = data;
|
||||
|
||||
rep_eva_xSearchObject.is_print_22 = add22;
|
||||
|
||||
rep_eva_xSearchObject.fileType = fileType;
|
||||
|
||||
@@ -37,9 +37,9 @@ var s_rep_eva_x_customValidation = function (group) {
|
||||
};
|
||||
|
||||
|
||||
function rep_eva_x_DoSearch(fileType, data) {
|
||||
function rep_eva_x_DoSearch(fileType, data, add22) {
|
||||
|
||||
var p = $.param(rep_eva_x_GetSearchParameter(fileType, data)).replaceAll("%5B%5D", '');
|
||||
var p = $.param(rep_eva_x_GetSearchParameter(fileType, data, add22)).replaceAll("%5B%5D", '');
|
||||
//console.log(p);
|
||||
|
||||
var report_url = apisite + "/api/rep_eva_x/rep_eva_x_report?" + p;
|
||||
|
||||
Reference in New Issue
Block a user