ปรับปรุงหน้าจก eva detail

This commit is contained in:
Nakorn Rientrakrunchai
2021-03-12 23:22:39 +07:00
parent e179b447d7
commit 60373ede6b
20 changed files with 3303 additions and 178 deletions

Binary file not shown.

View File

@@ -0,0 +1,936 @@
// <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("25640312143303_UpdateEvaDetail")]
partial class UpdateEvaDetail
{
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<int?>("eva_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<int?>("supervisor1_id");
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<int?>("supervisor2_id");
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(8000);
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<int?>("main_dept_id");
b.Property<decimal?>("percentage");
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<int?>("help_org_id");
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<int?>("main_dept_id");
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
}
}
}

View File

@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace tb320eva.Migrations
{
public partial class UpdateEvaDetail : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "eva_employee_id",
table: "eva_create_evaluation_detail",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "supervisor1_id",
table: "eva_create_evaluation_detail",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "supervisor2_id",
table: "eva_create_evaluation_detail",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "eva_employee_id",
table: "eva_create_evaluation_detail");
migrationBuilder.DropColumn(
name: "supervisor1_id",
table: "eva_create_evaluation_detail");
migrationBuilder.DropColumn(
name: "supervisor2_id",
table: "eva_create_evaluation_detail");
}
}
}

View File

@@ -0,0 +1,947 @@
// <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("25640312145857_UpdateEvaDetail02")]
partial class UpdateEvaDetail02
{
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<int?>("eva_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<int?>("supervisor1_id");
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<int?>("supervisor2_id");
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.Property<decimal?>("work_period");
b.HasKey("id");
b.HasIndex("create_evaluation_id");
b.ToTable("eva_create_evaluation_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
{
b.Property<int>("id");
b.Property<string>("achievement")
.HasMaxLength(8000);
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<int?>("main_dept_id");
b.Property<decimal?>("percentage");
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<int?>("help_org_id");
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<int?>("main_dept_id");
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_create_evaluation_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation_create_evaluation_id")
.WithMany()
.HasForeignKey("create_evaluation_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
}
}
}

View File

@@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace tb320eva.Migrations
{
public partial class UpdateEvaDetail02 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "work_period",
table: "eva_create_evaluation_detail",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_eva_create_evaluation_detail_create_evaluation_id",
table: "eva_create_evaluation_detail",
column: "create_evaluation_id");
migrationBuilder.AddForeignKey(
name: "FK_eva_create_evaluation_detail_eva_create_evaluation_create_e~",
table: "eva_create_evaluation_detail",
column: "create_evaluation_id",
principalTable: "eva_create_evaluation",
principalColumn: "id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_eva_create_evaluation_detail_eva_create_evaluation_create_e~",
table: "eva_create_evaluation_detail");
migrationBuilder.DropIndex(
name: "IX_eva_create_evaluation_detail_create_evaluation_id",
table: "eva_create_evaluation_detail");
migrationBuilder.DropColumn(
name: "work_period",
table: "eva_create_evaluation_detail");
}
}
}

View File

@@ -0,0 +1,951 @@
// <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("25640312161519_UpdateEvaDetail03")]
partial class UpdateEvaDetail03
{
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<int?>("eva_employee_id");
b.Property<int?>("help_org_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<int?>("order_of_data");
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<int?>("supervisor1_id");
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<int?>("supervisor2_id");
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.Property<decimal?>("work_period");
b.HasKey("id");
b.HasIndex("create_evaluation_id");
b.ToTable("eva_create_evaluation_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
{
b.Property<int>("id");
b.Property<string>("achievement")
.HasMaxLength(8000);
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<int?>("main_dept_id");
b.Property<decimal?>("percentage");
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<int?>("help_org_id");
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<int?>("main_dept_id");
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_create_evaluation_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation_create_evaluation_id")
.WithMany()
.HasForeignKey("create_evaluation_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
}
}
}

View File

@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace tb320eva.Migrations
{
public partial class UpdateEvaDetail03 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "help_org_id",
table: "eva_create_evaluation_detail",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "order_of_data",
table: "eva_create_evaluation_detail",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "help_org_id",
table: "eva_create_evaluation_detail");
migrationBuilder.DropColumn(
name: "order_of_data",
table: "eva_create_evaluation_detail");
}
}
}

View File

@@ -222,6 +222,10 @@ namespace tb320eva.Migrations
b.Property<int?>("employee_id");
b.Property<int?>("eva_employee_id");
b.Property<int?>("help_org_id");
b.Property<bool>("isActive");
b.Property<string>("level_score_chief")
@@ -236,6 +240,8 @@ namespace tb320eva.Migrations
b.Property<string>("level_score_supervisor2A")
.HasMaxLength(255);
b.Property<int?>("order_of_data");
b.Property<decimal?>("score_chief");
b.Property<decimal?>("score_supervisor");
@@ -293,6 +299,8 @@ namespace tb320eva.Migrations
b.Property<DateTime?>("supervisor1_date");
b.Property<int?>("supervisor1_id");
b.Property<string>("supervisor1_remark")
.HasMaxLength(1000);
@@ -313,6 +321,8 @@ namespace tb320eva.Migrations
b.Property<DateTime?>("supervisor2_date");
b.Property<int?>("supervisor2_id");
b.Property<string>("supervisor2_remark")
.HasMaxLength(1000);
@@ -337,8 +347,12 @@ namespace tb320eva.Migrations
b.Property<DateTime>("updated");
b.Property<decimal?>("work_period");
b.HasKey("id");
b.HasIndex("create_evaluation_id");
b.ToTable("eva_create_evaluation_detail");
});
@@ -856,6 +870,13 @@ namespace tb320eva.Migrations
.HasForeignKey("performance_plan_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation_create_evaluation_id")
.WithMany()
.HasForeignKey("create_evaluation_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")

View File

@@ -132,7 +132,7 @@ namespace TodoAPI2.Models
&& (m_eva_create_evaluation.evaluation_group_id == model.evaluation_group_id || !model.evaluation_group_id.HasValue)
orderby m_eva_create_evaluation.created descending
orderby fk_eva_performance_planResult1.fiscal_year, fk_eva_performance_planResult1.theTime, fk_eva_evaluation_groupResult5.code
select new eva_create_evaluationViewModel()
{
id = m_eva_create_evaluation.id,

View File

@@ -14,6 +14,8 @@ namespace TodoAPI2.Models
{
public class eva_create_evaluation_detailEntity : BaseEntity2<int>
{
[ForeignKey("create_evaluation_id")]
public eva_create_evaluationEntity eva_create_evaluation_create_evaluation_id { get; set; }
public int? create_evaluation_id { get; set; }
public int? employee_id { get; set; }
@@ -177,6 +179,18 @@ namespace TodoAPI2.Models
[MaxLength(1000)]
public string chief_a_reject_reason { get; set; }
public int? eva_employee_id { get; set; }
public int? supervisor1_id { get; set; }
public int? supervisor2_id { get; set; }
public decimal? work_period { get; set; }
public int? order_of_data { get; set; }
public int? help_org_id { get; set; }
}
}

View File

@@ -22,6 +22,18 @@ namespace TodoAPI2.Models
public int? chief { get; set; }
public int? eva_employee_id { get; set; }
public int? supervisor1_id { get; set; }
public int? supervisor2_id { get; set; }
public decimal? work_period { get; set; }
public int? order_of_data { get; set; }
public int? help_org_id { get; set; }
public string active_mode { get; set; }
}
}

View File

@@ -68,19 +68,34 @@ namespace TodoAPI2.Models
public eva_create_evaluation_detailWithSelectionViewModel GetWithSelection(int id)
{
var entity = _repository.Get(id);
var plan = (from x in _repository.Context.eva_create_evaluation where x.id == entity.create_evaluation_id select x.performance_plan_id).FirstOrDefault();
var i = Mapper.Map<eva_create_evaluation_detailWithSelectionViewModel>(entity);
i.item_create_evaluation_id = (from x in _repository.Context.eva_create_evaluation
join y in _repository.Context.eva_evaluation_group on x.evaluation_group_id equals y.id
where x.performance_plan_id==plan
orderby y.code
select new external_linkageViewModel { external_id = x.id, external_name = y.thegroup }).ToList();
i.item_employee_id = emp.GetAllEmployee();
i.item_chief = i.item_employee_id;
i.item_eva_employee_id = i.item_employee_id;
i.item_supervisor1_id = i.item_employee_id;
i.item_supervisor2_id = i.item_employee_id;
i.item_help_org_id = ext.GetDepartmentData();
return i;
}
public eva_create_evaluation_detailWithSelectionViewModel GetBlankItem()
{
var i = new eva_create_evaluation_detailWithSelectionViewModel();
i.item_create_evaluation_id = null;
i.item_employee_id = emp.GetAllEmployee();
i.item_chief = i.item_employee_id;
i.item_eva_employee_id = i.item_employee_id;
i.item_supervisor1_id = i.item_employee_id;
i.item_supervisor2_id = i.item_employee_id;
i.item_help_org_id = ext.GetDepartmentData();
return i;
}
@@ -119,6 +134,10 @@ namespace TodoAPI2.Models
into sort_depResult2
from fk_sort_depResult2 in sort_depResult2.DefaultIfEmpty()
join fk_external_linkage46 in ext.GetDepartmentData() on m_eva_create_evaluation_detail.help_org_id equals fk_external_linkage46.id
into external_linkageResult46
from fk_external_linkageResult46 in external_linkageResult46.DefaultIfEmpty()
where 1 == 1
&& (m_eva_create_evaluation_detail.create_evaluation_id == model.create_evaluation_id || !model.create_evaluation_id.HasValue)
@@ -163,6 +182,13 @@ namespace TodoAPI2.Models
status_chief = m_eva_create_evaluation_detail.status_chief,
status_supervisor = m_eva_create_evaluation_detail.status_supervisor,
eva_employee_id = m_eva_create_evaluation_detail.eva_employee_id,
supervisor1_id = m_eva_create_evaluation_detail.supervisor1_id,
supervisor2_id = m_eva_create_evaluation_detail.supervisor2_id,
work_period = m_eva_create_evaluation_detail.work_period,
order_of_data = m_eva_create_evaluation_detail.order_of_data,
help_org_id = m_eva_create_evaluation_detail.help_org_id,
status_supervisor1A = m_eva_create_evaluation_detail.status_supervisor1A,
status_supervisor2A = m_eva_create_evaluation_detail.status_supervisor2A,
@@ -186,6 +212,7 @@ namespace TodoAPI2.Models
status_supervisor2A_click_date = m_eva_create_evaluation_detail.status_supervisor2A_click_date,
department_name = fk_external_linkageResult2.department_name,
help_org_id_external_linkage_external_name = fk_external_linkageResult46.external_name,
isActive = m_eva_create_evaluation_detail.isActive,
Created = m_eva_create_evaluation_detail.created,
@@ -236,7 +263,12 @@ namespace TodoAPI2.Models
existingEntity.create_evaluation_id = model.create_evaluation_id;
existingEntity.employee_id = model.employee_id;
existingEntity.chief = model.chief;
existingEntity.eva_employee_id = model.eva_employee_id;
existingEntity.supervisor1_id = model.supervisor1_id;
existingEntity.supervisor2_id = model.supervisor2_id;
existingEntity.work_period = model.work_period;
existingEntity.order_of_data = model.order_of_data;
existingEntity.help_org_id = model.help_org_id;
var updated = _repository.Update(id, existingEntity);
return Get(updated.id);
@@ -257,7 +289,12 @@ namespace TodoAPI2.Models
existingEntity.create_evaluation_id = i.create_evaluation_id;
existingEntity.employee_id = i.employee_id;
existingEntity.chief = i.chief;
existingEntity.eva_employee_id = i.eva_employee_id;
existingEntity.supervisor1_id = i.supervisor1_id;
existingEntity.supervisor2_id = i.supervisor2_id;
existingEntity.work_period = i.work_period;
existingEntity.order_of_data = i.order_of_data;
existingEntity.help_org_id = i.help_org_id;
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
}
@@ -327,6 +364,7 @@ namespace TodoAPI2.Models
n.employee_id = i;
n.create_evaluation_id = create_evaluation_id;
n.chief = emp.GetLeader(i);
n.work_period = 6;
n.created = DateTime.Now;
n.updated = DateTime.Now;
n.isActive = true;

View File

@@ -104,12 +104,24 @@ namespace TodoAPI2.Models
public DateTime? status_supervisor1A_click_date { get; set; }
public DateTime? status_supervisor2A_click_date { get; set; }
public int? eva_employee_id { get; set; }
public int? supervisor1_id { get; set; }
public int? supervisor2_id { get; set; }
public decimal? work_period { get; set; }
public int? order_of_data { get; set; }
public int? help_org_id { get; set; }
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date); } }
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date); } }
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } }
public string txt_status_supervisor1A { get { return getStatusText(status_supervisor1A) + MyHelper.GetDateStringForReport(status_supervisor1A_click_date); } }
public string txt_status_supervisor2A { get { return getStatusText(status_supervisor2A) + MyHelper.GetDateStringForReport(status_supervisor2A_click_date); } }
public string help_org_id_external_linkage_external_name { get; set; }
private string getStatusText(string s)
{
if (!string.IsNullOrEmpty(s))

View File

@@ -7,8 +7,12 @@ namespace TodoAPI2.Models
{
public class eva_create_evaluation_detailWithSelectionViewModel: eva_create_evaluation_detailViewModel
{
public List<external_linkageViewModel> item_create_evaluation_id { get; set; }
public List<external_employeeViewModel> item_employee_id { get; set; }
public List<external_employeeViewModel> item_chief { get; set; }
public List<external_employeeViewModel> item_eva_employee_id { get; set; }
public List<external_employeeViewModel> item_supervisor1_id { get; set; }
public List<external_employeeViewModel> item_supervisor2_id { get; set; }
public List<external_linkageViewModel> item_help_org_id { get; set; }
}
}

View File

@@ -99,15 +99,12 @@
<thead>
<tr>
<th>ลำดับ</th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_code'>รหัสพนักงาน</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_fullname'>ชื่อ-นามสกุล</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_position'>ตำแหน่ง</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_level'>ระดับ</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_total_score'>คะแนนรวม</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_eva_result'>ผลการประเมิน</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_middle'>ค่ากลางฐานในการคำนวณ</label></th>
@@ -116,11 +113,28 @@
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_sarary'>เงินเดือนใหม่</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_remark'>หมายเหตุ</label></th>
</tr>
</thead>
<tbody class="thin-border-bottom" id="eva_adjust_postponement_detail_normal_02Body"></tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>รวม</th>
<th></th>
<th><p id="sum_before"></p></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th><p id="sum_after"></p></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
</section>

View File

@@ -18,20 +18,55 @@
<div class="row">
<div class="col-md-12">
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_create_evaluation_id" />
<div class='row'>
<div class="form-group col-md-6">
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_order_of_data" for="eva_create_evaluation_detail_order_of_data">ลำดับ</label>
<input class="form-control" type="number" id="eva_create_evaluation_detail_order_of_data" iLabel="ลำดับ" iRequire="false" iGroup="eva_create_evaluation_detail" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_employee_id" for="eva_create_evaluation_detail_employee_id">ผู้รับการประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_employee_id" iLabel="ผู้รับการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail"></select>
</div>
<div class="form-group col-md-6">
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_chief" for="eva_create_evaluation_detail_chief">ผู้ประเมิน </label>
<select class="form-control" id="eva_create_evaluation_detail_chief" iLabel="ผู้ประเมิน " iRequire="true" iGroup="eva_create_evaluation_detail"></select>
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_eva_employee_id" for="eva_create_evaluation_detail_eva_employee_id">ผู้ประเมินสูงสุด</label>
<select class="form-control" id="eva_create_evaluation_detail_eva_employee_id" iLabel="ผู้ประเมินสูงสุด" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_supervisor1_id" for="eva_create_evaluation_detail_supervisor1_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง </label>
<select class="form-control" id="eva_create_evaluation_detail_supervisor1_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง " iRequire="false" iGroup="eva_create_evaluation_detail"></select>
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_supervisor2_id" for="eva_create_evaluation_detail_supervisor2_id">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
<select class="form-control" id="eva_create_evaluation_detail_supervisor2_id" iLabel="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
</div>
</div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_work_period" for="eva_create_evaluation_detail_work_period">ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)</label>
<input class="form-control" type="number" id="eva_create_evaluation_detail_work_period" iLabel="ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)" iRequire="true" iGroup="eva_create_evaluation_detail" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_create_evaluation_id" for="eva_create_evaluation_detail_create_evaluation_id">แบบประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_create_evaluation_id" iLabel="แบบประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail"></select>
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_help_org_id" for="eva_create_evaluation_detail_help_org_id">ช่วยปฏิบัติงานที่</label>
<select class="form-control" id="eva_create_evaluation_detail_help_org_id" iLabel="ช่วยปฏิบัติงานที่" iRequire="false" iGroup="eva_create_evaluation_detail"></select>
</div>
</div>
</div>
</div>
@@ -166,6 +201,7 @@
<thead>
<tr>
<th>เครื่องมือ</th>
<th><label id='h_eva_create_evaluation_detail_order_of_data'>ลำดับ</label></th>
<th><label>รหัสพนักงาน</label></th>
<th><label>ผู้รับการประเมิน</label></th>
<th><label>ประเภทตำแหน่ง</label></th>
@@ -174,6 +210,8 @@
<th><label>หมายเหตุ</label></th>
<th><label>ผู้ประเมิน</label></th>
<th><label>หน่วยงาน</label></th>
<th><label id='h_eva_create_evaluation_detail_work_period'>ระยะเวลาทำงาน ในรอบการประเมินนี้ (เดือน)</label></th>
<th><label id='h_eva_create_evaluation_detail_help_org_id'>ช่วยปฏิบัติงานที่</label></th>
</tr>
</thead>
<tbody></tbody>
@@ -217,6 +255,15 @@
$("#eva_create_evaluation_detail_chief").select2({
dropdownParent: $('#eva_create_evaluation_detailModel')
});
$("#eva_create_evaluation_detail_eva_employee_id").select2({
dropdownParent: $('#eva_create_evaluation_detailModel')
});
$("#eva_create_evaluation_detail_supervisor1_id").select2({
dropdownParent: $('#eva_create_evaluation_detailModel')
});
$("#eva_create_evaluation_detail_supervisor2_id").select2({
dropdownParent: $('#eva_create_evaluation_detailModel')
});
});
function go_next() {

View File

@@ -149,6 +149,8 @@ function Oneva_adjust_postponement_normal_percentageChange(){
function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(){
var current_quota = $("#eva_adjust_postponement_normal_limit_quota").val().replace(/[,-]/g,'');
var sum_postpone = 0;
var sum_before = 0;
var sum_after = 0;
$('#eva_adjust_postponement_detail_normal_02Body tr').each(function () {
var i = $(this).find("#rowCount").text();
@@ -171,10 +173,14 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged()
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
}
sum_postpone += new_added;
sum_before += old_salary;
sum_after += new_salary;
}
});
// $("#remain_cost").val(Math.round((current_quota - sum_postpone)*100)/100);
$("#remain_cost").maskMoney('mask', Math.round((current_quota - sum_postpone) * 100) / 100);
$("#sum_before").text(formatNumber(sum_before));
$("#sum_after").text(formatNumber(sum_after));
}

View File

@@ -108,8 +108,7 @@ var eva_create_evaluation_customValidation = function (group) {
};
function eva_create_evaluation_PutUpdate() {
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation))
{
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation)) {
return;
}
@@ -177,7 +176,7 @@ var eva_create_evaluation_setupTable = function (result) {
"targets": 0,
"data": "id",
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' style='display:none;' class='btn btn-danger btn-sm' onclick='javascript:eva_create_evaluation_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_create_evaluation_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
}
}],
"language": {
@@ -219,15 +218,13 @@ function eva_create_evaluation_GetSelect(f) {
//================= Control Function =========================================
function Oneva_create_evaluation_score1Change()
{
function Oneva_create_evaluation_score1Change() {
var s1 = $("#eva_create_evaluation_score1").val();
var s2 = $("#eva_create_evaluation_score2").val();
$("#eva_create_evaluation_score2").val(100 - s1);
}
function Oneva_create_evaluation_score2Change()
{
function Oneva_create_evaluation_score2Change() {
var s1 = $("#eva_create_evaluation_score1").val();
var s2 = $("#eva_create_evaluation_score2").val();
$("#eva_create_evaluation_score1").val(100 - s2);

View File

@@ -19,9 +19,15 @@ $("#s_eva_create_evaluation_detail_create_evaluation_id").val(data.create_evalua
function eva_create_evaluation_detail_FeedDataToForm(data) {
$("#eva_create_evaluation_detail_id").val(data.id);
$("#eva_create_evaluation_detail_create_evaluation_id").val(data.create_evaluation_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_create_evaluation_id"), data, "external_id", "external_name", "item_create_evaluation_id", data.create_evaluation_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_chief"), data, "id", "fullname", "item_chief", data.chief);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_eva_employee_id"), data, "id", "fullname", "item_eva_employee_id", data.eva_employee_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
$("#eva_create_evaluation_detail_work_period").val(data.work_period);
$("#eva_create_evaluation_detail_order_of_data").val(data.order_of_data);
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_help_org_id"), data, "id", "external_name", "item_help_org_id", data.help_org_id);
}
@@ -31,7 +37,12 @@ eva_create_evaluation_detailObject.id = $("#eva_create_evaluation_detail_id").va
eva_create_evaluation_detailObject.create_evaluation_id = $("#eva_create_evaluation_detail_create_evaluation_id").val();
eva_create_evaluation_detailObject.employee_id = $("#eva_create_evaluation_detail_employee_id").val();
eva_create_evaluation_detailObject.chief = $("#eva_create_evaluation_detail_chief").val();
eva_create_evaluation_detailObject.eva_employee_id = $("#eva_create_evaluation_detail_eva_employee_id").val();
eva_create_evaluation_detailObject.supervisor1_id = $("#eva_create_evaluation_detail_supervisor1_id").val();
eva_create_evaluation_detailObject.supervisor2_id = $("#eva_create_evaluation_detail_supervisor2_id").val();
eva_create_evaluation_detailObject.work_period = $("#eva_create_evaluation_detail_work_period").val();
eva_create_evaluation_detailObject.order_of_data = $("#eva_create_evaluation_detail_order_of_data").val();
eva_create_evaluation_detailObject.help_org_id = $("#eva_create_evaluation_detail_help_org_id").val();
return eva_create_evaluation_detailObject;
}
@@ -102,8 +113,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;
}
@@ -152,7 +162,7 @@ var eva_create_evaluation_detailTableV;
var eva_create_evaluation_detail_setupTable = function (result) {
console.log(result);
var groupColumn = 8;
var groupColumn = 9;
tmp = '"';
eva_create_evaluation_detailTableV = $('#eva_create_evaluation_detailTable').DataTable({
"processing": true,
@@ -161,6 +171,7 @@ var groupColumn = 8;
"select": false,
"columns": [
{ "data": "id" },
{ "data": "order_of_data" },
{ "data": "employee_no" },
{ "data": "employee_id_external_linkage_external_name" },
{ "data": "position_type_text" },
@@ -169,7 +180,8 @@ var groupColumn = 8;
{ "data": "remark" },
{ "data": "chief_external_linkage_external_name" },
{ "data": "department_name" },
{ "data": "work_period" },
{ "data": "help_org_id_external_linkage_external_name" },
],
"columnDefs": [
{
@@ -193,7 +205,7 @@ var groupColumn = 8;
api.column(groupColumn, { page: 'current' }).data().each(function (group, i) {
if (last !== group) {
$(rows).eq(i).before(
'<tr class="group"><td colspan="9"><b>หน่วยงาน : '+group+'</b></td></tr>'
'<tr class="group"><td colspan="11"><b>หน่วยงาน : ' + group + '</b></td></tr>'
);
last = group;