diff --git a/EXCEL/eva_salary_cylinder.xlsx b/EXCEL/eva_salary_cylinder.xlsx index 4d8f6e1..1ad1d85 100644 Binary files a/EXCEL/eva_salary_cylinder.xlsx and b/EXCEL/eva_salary_cylinder.xlsx differ diff --git a/Migrations/20210708074957_Updatesalary_cylinder.Designer.cs b/Migrations/20210708074957_Updatesalary_cylinder.Designer.cs new file mode 100644 index 0000000..68fefc3 --- /dev/null +++ b/Migrations/20210708074957_Updatesalary_cylinder.Designer.cs @@ -0,0 +1,1075 @@ +// +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("20210708074957_Updatesalary_cylinder")] + partial class Updatesalary_cylinder + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("causer_id"); + + b.Property("causer_type") + .HasMaxLength(191); + + b.Property("created_at"); + + b.Property("description") + .HasMaxLength(4000); + + b.Property("ip_address") + .HasMaxLength(191); + + b.Property("log_name") + .HasMaxLength(191); + + b.Property("mac_address") + .HasMaxLength(191); + + b.Property("properties") + .HasMaxLength(8000); + + b.Property("subject_id"); + + b.Property("subject_type") + .HasMaxLength(191); + + b.Property("updated_at"); + + b.HasKey("id"); + + b.ToTable("activity_log_eva"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.Property("id"); + + b.Property("command_no") + .HasMaxLength(4000); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("imported_date"); + + b.Property("imported_file") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("limit"); + + b.Property("limit_frame"); + + b.Property("limit_frame_quota"); + + b.Property("limit_quota"); + + b.Property("managed_by"); + + b.Property("percentage"); + + b.Property("report_type") + .HasMaxLength(1000); + + b.Property("theDate"); + + b.Property("theRound"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_id"); + + b.ToTable("eva_adjust_postponement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.Property("id"); + + b.Property("achievement_final"); + + b.Property("adjust_postponement_id"); + + b.Property("adjust_postponement_quota_id"); + + b.Property("competency_final"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("employee_no_at_this_time") + .HasMaxLength(1000); + + b.Property("fullname_at_this_time") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("is_for_postponement"); + + b.Property("level_score_final") + .HasMaxLength(255); + + b.Property("level_this_time") + .HasMaxLength(1000); + + b.Property("middle"); + + b.Property("migration_eva_result") + .HasMaxLength(1000); + + b.Property("migration_total_score"); + + b.Property("new_cost_living"); + + b.Property("new_sarary"); + + b.Property("new_sarary_with_quota"); + + b.Property("order_at_this_time"); + + b.Property("org_at_this_time"); + + b.Property("other_money_at_this_time"); + + b.Property("position_allowance_at_this_time"); + + b.Property("position_this_time") + .HasMaxLength(1000); + + b.Property("promoted_percentage"); + + b.Property("receive_quota"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("sarary"); + + b.Property("score_final"); + + b.Property("total_promote"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("adjust_postponement_id"); + + b.HasIndex("adjust_postponement_quota_id"); + + b.ToTable("eva_adjust_postponement_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.Property("id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("performance_plan_id"); + + b.Property("score1"); + + b.Property("score2"); + + b.Property("supervisor1_id"); + + b.Property("supervisor2_id"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_create_evaluation"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b => + { + b.Property("id"); + + b.Property("Final_summary_chief"); + + b.Property("Final_summary_competency_chief"); + + b.Property("Final_summary_competency_supervisor"); + + b.Property("Final_summary_competency_supervisor1A"); + + b.Property("Final_summary_competency_supervisor2A"); + + b.Property("Final_summary_supervisor"); + + b.Property("Final_summary_supervisor1A"); + + b.Property("Final_summary_supervisor2A"); + + b.Property("achievement_chief"); + + b.Property("achievement_supervisor"); + + b.Property("achievement_supervisor1A"); + + b.Property("achievement_supervisor2A"); + + b.Property("chief"); + + b.Property("chief_a"); + + b.Property("chief_a_date"); + + b.Property("chief_a_reject_reason") + .HasMaxLength(1000); + + b.Property("chief_a_remark") + .HasMaxLength(1000); + + b.Property("chief_a_result") + .HasMaxLength(1); + + b.Property("competency_chief"); + + b.Property("competency_supervisor"); + + b.Property("competency_supervisor1A"); + + b.Property("competency_supervisor2A"); + + b.Property("create_evaluation_id"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("eva_employee_id"); + + b.Property("help_org_id"); + + b.Property("isActive"); + + b.Property("level_score_chief") + .HasMaxLength(255); + + b.Property("level_score_supervisor") + .HasMaxLength(255); + + b.Property("level_score_supervisor1A") + .HasMaxLength(255); + + b.Property("level_score_supervisor2A") + .HasMaxLength(255); + + b.Property("order_of_data"); + + b.Property("score_chief"); + + b.Property("score_supervisor"); + + b.Property("score_supervisor1A"); + + b.Property("score_supervisor2A"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_chief_a") + .HasMaxLength(1); + + b.Property("status_chief_a_click_date"); + + b.Property("status_chief_click_date"); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("status_self_a") + .HasMaxLength(1); + + b.Property("status_self_a_click_date"); + + b.Property("status_self_click_date"); + + b.Property("status_supervisor") + .HasMaxLength(1); + + b.Property("status_supervisor1A") + .HasMaxLength(1); + + b.Property("status_supervisor1A_click_date"); + + b.Property("status_supervisor2A") + .HasMaxLength(1); + + b.Property("status_supervisor2A_click_date"); + + b.Property("status_supervisor_click_date"); + + b.Property("supervisor1"); + + b.Property("supervisor1A"); + + b.Property("supervisor1A_date"); + + b.Property("supervisor1A_remark") + .HasMaxLength(1000); + + b.Property("supervisor1A_result") + .HasMaxLength(1); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_id"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("supervisor2"); + + b.Property("supervisor2A"); + + b.Property("supervisor2A_date"); + + b.Property("supervisor2A_remark") + .HasMaxLength(1000); + + b.Property("supervisor2A_result") + .HasMaxLength(1); + + b.Property("supervisor2_date"); + + b.Property("supervisor2_id"); + + b.Property("supervisor2_remark") + .HasMaxLength(1000); + + b.Property("supervisor2_result") + .HasMaxLength(1); + + b.Property("total_summary_chief"); + + b.Property("total_summary_competency_chief"); + + b.Property("total_summary_competency_supervisor"); + + b.Property("total_summary_competency_supervisor1A"); + + b.Property("total_summary_competency_supervisor2A"); + + b.Property("total_summary_supervisor"); + + b.Property("total_summary_supervisor1A"); + + b.Property("total_summary_supervisor2A"); + + b.Property("updated"); + + b.Property("work_period"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_id"); + + b.ToTable("eva_create_evaluation_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detail_historyEntity", b => + { + b.Property("id"); + + b.Property("action_detail") + .HasMaxLength(4000); + + b.Property("action_dt"); + + b.Property("action_emp_id"); + + b.Property("created"); + + b.Property("evaluation_detail_id"); + + b.Property("isActive"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_detail_id"); + + b.ToTable("eva_create_evaluation_detail_history"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b => + { + b.Property("id"); + + b.Property("achievement") + .HasMaxLength(8000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("thefile") + .HasMaxLength(1000); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_achievement"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievement_attachEntity", b => + { + b.Property("id"); + + b.Property("achievement_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("the_file") + .HasMaxLength(1000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("achievement_id"); + + b.ToTable("eva_evaluation_achievement_attach"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b => + { + b.Property("id"); + + b.Property("behavior") + .HasMaxLength(1000); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("score"); + + b.Property("score2"); + + b.Property("score3"); + + b.Property("score4"); + + b.Property("sumary"); + + b.Property("sumary2"); + + b.Property("sumary3"); + + b.Property("sumary4"); + + b.Property("target_score1") + .HasMaxLength(255); + + b.Property("target_score2") + .HasMaxLength(255); + + b.Property("target_score3") + .HasMaxLength(255); + + b.Property("target_score4") + .HasMaxLength(255); + + b.Property("target_score5") + .HasMaxLength(255); + + b.Property("updated"); + + b.Property("weight"); + + b.HasKey("id"); + + b.HasIndex("create_evaluation_detail_id"); + + b.ToTable("eva_evaluation_behavior"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("main_dept_id"); + + b.Property("percentage"); + + b.Property("thegroup") + .HasMaxLength(255); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_evaluation_group"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("evaluation_group_id"); + + b.Property("isActive"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("evaluation_group_id"); + + b.ToTable("eva_evaluation_group_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b => + { + b.Property("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("indicators") + .HasMaxLength(4000); + + b.Property("isActive"); + + b.Property("mission_detail") + .HasMaxLength(4000); + + b.Property("mission_no"); + + b.Property("target") + .HasMaxLength(4000); + + b.Property("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("id"); + + b.Property("create_evaluation_detail_id"); + + b.Property("created"); + + b.Property("develop") + .HasMaxLength(1000); + + b.Property("development_method") + .HasMaxLength(1000); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("period_text") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_idp_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_level_score"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_limit_frame_employeeEntity", b => + { + b.Property("id"); + + b.Property("cost_of_living"); + + b.Property("created"); + + b.Property("employee_id"); + + b.Property("frame_group_guid"); + + b.Property("help_org_id"); + + b.Property("isActive"); + + b.Property("level_text") + .HasMaxLength(1000); + + b.Property("monthly_remuneration"); + + b.Property("order_of_data"); + + b.Property("org_id"); + + b.Property("position_allowance"); + + b.Property("position_text") + .HasMaxLength(1000); + + b.Property("salary"); + + b.Property("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("id"); + + b.Property("created"); + + b.Property("frame_plan_guid"); + + b.Property("group_guid"); + + b.Property("isActive"); + + b.Property("limit_frame_295"); + + b.Property("main_dept_id"); + + b.Property("remark") + .HasMaxLength(4000); + + b.Property("total_salary"); + + b.Property("total_salary_limit"); + + b.Property("total_salary_limit_rounded"); + + b.Property("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("id"); + + b.Property("created"); + + b.Property("executed_date"); + + b.Property("isActive"); + + b.Property("limit_frame_005"); + + b.Property("limit_frame_005_total"); + + b.Property("limit_frame_005_total_rounded"); + + b.Property("plan_guid"); + + b.Property("salary_adjustment_date"); + + b.Property("status_chief") + .HasMaxLength(1); + + b.Property("status_self") + .HasMaxLength(1); + + b.Property("supervisor1"); + + b.Property("supervisor1_date"); + + b.Property("supervisor1_remark") + .HasMaxLength(1000); + + b.Property("supervisor1_result") + .HasMaxLength(1); + + b.Property("total_salary"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("plan_guid"); + + b.ToTable("eva_limit_frame_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("fiscal_year"); + + b.Property("isActive"); + + b.Property("percent"); + + b.Property("theTime"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_performance_plan"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("created"); + + b.Property("end_date"); + + b.Property("isActive"); + + b.Property("list_no"); + + b.Property("performance_plan_id"); + + b.Property("remark") + .HasMaxLength(1000); + + b.Property("start_date"); + + b.Property("step") + .HasMaxLength(1000); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("performance_plan_id"); + + b.ToTable("eva_performance_plan_detail"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b => + { + b.Property("id") + .ValueGeneratedOnAdd(); + + b.Property("code") + .HasMaxLength(255); + + b.Property("created"); + + b.Property("detail") + .HasMaxLength(1000); + + b.Property("isActive"); + + b.Property("level_score_id"); + + b.Property("max_score"); + + b.Property("min_score"); + + b.Property("promoted_percentage"); + + b.Property("updated"); + + b.HasKey("id"); + + b.HasIndex("level_score_id"); + + b.ToTable("eva_promoted_percentage"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b => + { + b.Property("id"); + + b.Property("cost_living"); + + b.Property("created"); + + b.Property("isActive"); + + b.Property("middle"); + + b.Property("monthly_compensation"); + + b.Property("position_allowance"); + + b.Property("position_level"); + + b.Property("position_type"); + + b.Property("temporary_min"); + + b.Property("themax"); + + b.Property("themin"); + + b.Property("updated"); + + b.HasKey("id"); + + b.ToTable("eva_salary_cylinder"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation") + .WithMany() + .HasForeignKey("create_evaluation_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement") + .WithMany() + .HasForeignKey("adjust_postponement_id"); + + b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota") + .WithMany() + .HasForeignKey("adjust_postponement_quota_id") + .HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group") + .WithMany() + .HasForeignKey("evaluation_group_id"); + + b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan") + .WithMany() + .HasForeignKey("performance_plan_id"); + }); + + modelBuilder.Entity("TodoAPI2.Models.eva_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_create_evaluation_detail_historyEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_evaluation_detail_id") + .WithMany() + .HasForeignKey("evaluation_detail_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_achievement_attachEntity", b => + { + b.HasOne("TodoAPI2.Models.eva_evaluation_achievementEntity", "eva_evaluation_achievement_achievement_id") + .WithMany() + .HasForeignKey("achievement_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 + } + } +} diff --git a/Migrations/20210708074957_Updatesalary_cylinder.cs b/Migrations/20210708074957_Updatesalary_cylinder.cs new file mode 100644 index 0000000..8c06716 --- /dev/null +++ b/Migrations/20210708074957_Updatesalary_cylinder.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace tb320eva.Migrations +{ + public partial class Updatesalary_cylinder : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "monthly_compensation", + table: "eva_salary_cylinder", + nullable: true); + + migrationBuilder.AddColumn( + name: "position_allowance", + table: "eva_salary_cylinder", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "monthly_compensation", + table: "eva_salary_cylinder"); + + migrationBuilder.DropColumn( + name: "position_allowance", + table: "eva_salary_cylinder"); + } + } +} diff --git a/Migrations/DataContextModelSnapshot.cs b/Migrations/DataContextModelSnapshot.cs index 5596a3d..907deae 100644 --- a/Migrations/DataContextModelSnapshot.cs +++ b/Migrations/DataContextModelSnapshot.cs @@ -929,6 +929,10 @@ namespace tb320eva.Migrations b.Property("middle"); + b.Property("monthly_compensation"); + + b.Property("position_allowance"); + b.Property("position_level"); b.Property("position_type"); diff --git a/Models/eva_salary_cylinder/eva_salary_cylinderEntity.cs b/Models/eva_salary_cylinder/eva_salary_cylinderEntity.cs index ad96fab..3cfdf6c 100644 --- a/Models/eva_salary_cylinder/eva_salary_cylinderEntity.cs +++ b/Models/eva_salary_cylinder/eva_salary_cylinderEntity.cs @@ -30,6 +30,8 @@ namespace TodoAPI2.Models public decimal? cost_living { get; set; } + public decimal? position_allowance { get; set; } + public decimal? monthly_compensation { get; set; } } } diff --git a/Models/eva_salary_cylinder/eva_salary_cylinderInputModel.cs b/Models/eva_salary_cylinder/eva_salary_cylinderInputModel.cs index 211b276..679d5ab 100644 --- a/Models/eva_salary_cylinder/eva_salary_cylinderInputModel.cs +++ b/Models/eva_salary_cylinder/eva_salary_cylinderInputModel.cs @@ -30,6 +30,10 @@ namespace TodoAPI2.Models public decimal? cost_living { get; set; } + public decimal? position_allowance { get; set; } + + public decimal? monthly_compensation { get; set; } + public string active_mode { get; set; } } } diff --git a/Models/eva_salary_cylinder/eva_salary_cylinderService.cs b/Models/eva_salary_cylinder/eva_salary_cylinderService.cs index 846ddcd..5e0c213 100644 --- a/Models/eva_salary_cylinder/eva_salary_cylinderService.cs +++ b/Models/eva_salary_cylinder/eva_salary_cylinderService.cs @@ -20,14 +20,14 @@ namespace TodoAPI2.Models public class eva_salary_cylinderService : Ieva_salary_cylinderService { private IBaseRepository2 _repository; - private IMyDatabase db; - private Iexternal_linkageService ext; + private IMyDatabase db; + private Iexternal_linkageService ext; public eva_salary_cylinderService(IBaseRepository2 repository, IMyDatabase mydb, Iexternal_linkageService inext) { _repository = repository; - db = mydb; - ext = inext; + db = mydb; + ext = inext; } #region Private Functions @@ -47,7 +47,7 @@ namespace TodoAPI2.Models { return Mapper.Map>(entities); } - + #endregion #region Public Functions @@ -93,7 +93,7 @@ namespace TodoAPI2.Models from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty() - where m_eva_salary_cylinder.position_type == position_type || !position_type.HasValue + where m_eva_salary_cylinder.position_type == position_type || !position_type.HasValue orderby m_eva_salary_cylinder.created descending select new eva_salary_cylinderViewModel() @@ -105,7 +105,9 @@ namespace TodoAPI2.Models themin = m_eva_salary_cylinder.themin, themax = m_eva_salary_cylinder.themax, middle = m_eva_salary_cylinder.middle, - cost_living = m_eva_salary_cylinder.cost_living , + cost_living = m_eva_salary_cylinder.cost_living, + position_allowance = m_eva_salary_cylinder.position_allowance, + monthly_compensation = m_eva_salary_cylinder.monthly_compensation, position_type_external_linkage_external_name = fk_external_linkageResult1.external_name, position_level_external_linkage_external_name = fk_external_linkageResult2.external_name, @@ -119,7 +121,7 @@ namespace TodoAPI2.Models return data; } - public List GetListBySearch(eva_salary_cylinderSearchModel model) + public List GetListBySearch(eva_salary_cylinderSearchModel model) { var data = ( from m_eva_salary_cylinder in _repository.Context.eva_salary_cylinder @@ -133,7 +135,7 @@ namespace TodoAPI2.Models from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty() - where 1==1 + where 1 == 1 && (m_eva_salary_cylinder.position_type == model.position_type || !model.position_type.HasValue) @@ -147,7 +149,9 @@ namespace TodoAPI2.Models themin = m_eva_salary_cylinder.themin, themax = m_eva_salary_cylinder.themax, middle = m_eva_salary_cylinder.middle, - cost_living = m_eva_salary_cylinder.cost_living , + cost_living = m_eva_salary_cylinder.cost_living, + position_allowance = m_eva_salary_cylinder.position_allowance, + monthly_compensation = m_eva_salary_cylinder.monthly_compensation, position_type_external_linkage_external_name = fk_external_linkageResult1.external_name, position_level_external_linkage_external_name = fk_external_linkageResult2.external_name, @@ -170,10 +174,10 @@ namespace TodoAPI2.Models int? newkey = 0; var x = (from i in _repository.Context.eva_salary_cylinder - orderby i.id descending - select i).Take(1).ToList(); + orderby i.id descending + select i).Take(1).ToList(); - if(x.Count > 0) + if (x.Count > 0) { newkey = x[0].id + 1; } @@ -189,7 +193,7 @@ namespace TodoAPI2.Models var inserted = _repository.Insert(entity); - + return Get(inserted.id); } @@ -204,33 +208,35 @@ namespace TodoAPI2.Models existingEntity.themin = model.themin; existingEntity.themax = model.themax; existingEntity.middle = model.middle; - existingEntity.cost_living = model.cost_living ; - + existingEntity.cost_living = model.cost_living; + existingEntity.position_allowance = model.position_allowance; + existingEntity.monthly_compensation = model.monthly_compensation; var updated = _repository.Update(id, existingEntity); return Get(updated.id); } else - throw new NotificationException("No data to update"); + throw new NotificationException("No data to update"); } - public string UpdateMultiple(List model) + public string UpdateMultiple(List model) { - foreach(var i in model) + foreach (var i in model) { if (i.active_mode == "1" && i.id.HasValue) // update - { + { var existingEntity = _repository.Get(i.id.Value); if (existingEntity != null) { - existingEntity.position_type = i.position_type; - existingEntity.position_level = i.position_level; - existingEntity.temporary_min = i.temporary_min; - existingEntity.themin = i.themin; - existingEntity.themax = i.themax; - existingEntity.middle = i.middle; - existingEntity.cost_living = i.cost_living ; - + existingEntity.position_type = i.position_type; + existingEntity.position_level = i.position_level; + existingEntity.temporary_min = i.temporary_min; + existingEntity.themin = i.themin; + existingEntity.themax = i.themax; + existingEntity.middle = i.middle; + existingEntity.cost_living = i.cost_living; + existingEntity.position_allowance = i.position_allowance; + existingEntity.monthly_compensation = i.monthly_compensation; _repository.UpdateWithoutCommit(i.id.Value, existingEntity); } @@ -242,15 +248,15 @@ namespace TodoAPI2.Models _repository.InsertWithoutCommit(entity); } else if (i.active_mode == "0" && i.id.HasValue) // remove - { + { _repository.DeleteWithoutCommit(i.id.Value); } else if (i.active_mode == "0" && !i.id.HasValue) { // nothing to do - } + } } - _repository.Context.SaveChanges(); + _repository.Context.SaveChanges(); return model.Count().ToString(); } diff --git a/Models/eva_salary_cylinder/eva_salary_cylinderViewModel.cs b/Models/eva_salary_cylinder/eva_salary_cylinderViewModel.cs index 52e3f2f..98fd7bf 100644 --- a/Models/eva_salary_cylinder/eva_salary_cylinderViewModel.cs +++ b/Models/eva_salary_cylinder/eva_salary_cylinderViewModel.cs @@ -28,6 +28,10 @@ namespace TodoAPI2.Models public decimal? cost_living { get; set; } + public decimal? position_allowance { get; set; } + + public decimal? monthly_compensation { get; set; } + public string position_type_external_linkage_external_name { get; set; } public string position_level_external_linkage_external_name { get; set; } diff --git a/Views/eva_salary_cylinderView/eva_salary_cylinder.cshtml b/Views/eva_salary_cylinderView/eva_salary_cylinder.cshtml index 9651a91..78116a0 100644 --- a/Views/eva_salary_cylinderView/eva_salary_cylinder.cshtml +++ b/Views/eva_salary_cylinderView/eva_salary_cylinder.cshtml @@ -32,33 +32,41 @@
- +
- +
- +
- +
-
+
- + +
+
+ + +
+ +
+ +
-
@@ -114,7 +122,8 @@ - + + diff --git a/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal.js b/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal.js index 90d1e45..74ecea6 100644 --- a/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal.js +++ b/wwwroot/js/eva_adjust_postponement_normal/eva_adjust_postponement_normal.js @@ -39,6 +39,8 @@ function eva_adjust_postponement_normal_FeedDataToForm(data) { DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_managed_by"), data, "id", "fullname", "item_managed_by", getCookie("emp_id")); //DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_org_id"), data, "id", "external_name", "item_org_id", data.org_id); + $("#eva_salary_cylinder_position_allowance").val(data.position_allowance); + $("#eva_salary_cylinder_monthly_compensation").val(data.monthly_compensation); } function eva_adjust_postponement_normal_GetFromForm() { @@ -55,6 +57,8 @@ function eva_adjust_postponement_normal_GetFromForm() { eva_adjust_postponement_normalObject.managed_by = $("#eva_adjust_postponement_normal_managed_by").val(); //eva_adjust_postponement_normalObject.org_id = $("#eva_adjust_postponement_normal_org_id").val(); + eva_salary_cylinderObject.position_allowance = $("#eva_salary_cylinder_position_allowance").val(); + eva_salary_cylinderObject.monthly_compensation = $("#eva_salary_cylinder_monthly_compensation").val(); return eva_adjust_postponement_normalObject; } diff --git a/wwwroot/js/eva_salary_cylinder/eva_salary_cylinder.js b/wwwroot/js/eva_salary_cylinder/eva_salary_cylinder.js index b3b9deb..90dde50 100644 --- a/wwwroot/js/eva_salary_cylinder/eva_salary_cylinder.js +++ b/wwwroot/js/eva_salary_cylinder/eva_salary_cylinder.js @@ -21,17 +21,13 @@ function eva_salary_cylinder_FeedDataToForm(data) { $("#eva_salary_cylinder_id").val(data.id); DropDownClearFormAndFeedWithData($("#eva_salary_cylinder_position_type"), data, "id", "external_name", "item_position_type", data.position_type); DropDownClearFormAndFeedWithData($("#eva_salary_cylinder_position_level"), data, "id", "external_name", "item_position_level", data.position_level); - // $("#eva_salary_cylinder_temporary_min").val(data.temporary_min); - // $("#eva_salary_cylinder_themin").val(data.themin); - // $("#eva_salary_cylinder_themax").val(data.themax); - // $("#eva_salary_cylinder_middle").val(data.middle); - // $("#eva_salary_cylinder_cost_living").val(data.cost_living); - $("#eva_salary_cylinder_temporary_min").maskMoney('mask',data.temporary_min); - $("#eva_salary_cylinder_themin").maskMoney('mask',data.themin); - $("#eva_salary_cylinder_themax").maskMoney('mask',data.themax); - $("#eva_salary_cylinder_middle").maskMoney('mask',data.middle); - $("#eva_salary_cylinder_cost_living").maskMoney('mask',data.cost_living); - + $("#eva_salary_cylinder_temporary_min").val(data.temporary_min); + $("#eva_salary_cylinder_themin").val(data.themin); + $("#eva_salary_cylinder_themax").val(data.themax); + $("#eva_salary_cylinder_middle").val(data.middle); + $("#eva_salary_cylinder_cost_living").val(data.cost_living); + $("#eva_salary_cylinder_position_allowance").val(data.position_allowance); + $("#eva_salary_cylinder_monthly_compensation").val(data.monthly_compensation); } function eva_salary_cylinder_GetFromForm() { @@ -39,12 +35,13 @@ function eva_salary_cylinder_GetFromForm() { eva_salary_cylinderObject.id = $("#eva_salary_cylinder_id").val(); eva_salary_cylinderObject.position_type = $("#eva_salary_cylinder_position_type").val(); eva_salary_cylinderObject.position_level = $("#eva_salary_cylinder_position_level").val(); - eva_salary_cylinderObject.temporary_min = $("#eva_salary_cylinder_temporary_min").val().replace(/[,-]/g,''); - eva_salary_cylinderObject.themin = $("#eva_salary_cylinder_themin").val().replace(/[,-]/g,''); - eva_salary_cylinderObject.themax = $("#eva_salary_cylinder_themax").val().replace(/[,-]/g,''); - eva_salary_cylinderObject.middle = $("#eva_salary_cylinder_middle").val().replace(/[,-]/g,''); - eva_salary_cylinderObject.cost_living = $("#eva_salary_cylinder_cost_living").val().replace(/[,-]/g,''); - + eva_salary_cylinderObject.temporary_min = $("#eva_salary_cylinder_temporary_min").val(); + eva_salary_cylinderObject.themin = $("#eva_salary_cylinder_themin").val(); + eva_salary_cylinderObject.themax = $("#eva_salary_cylinder_themax").val(); + eva_salary_cylinderObject.middle = $("#eva_salary_cylinder_middle").val(); + eva_salary_cylinderObject.cost_living = $("#eva_salary_cylinder_cost_living").val(); + eva_salary_cylinderObject.position_allowance = $("#eva_salary_cylinder_position_allowance").val(); + eva_salary_cylinderObject.monthly_compensation = $("#eva_salary_cylinder_monthly_compensation").val(); return eva_salary_cylinderObject; } @@ -117,6 +114,7 @@ function eva_salary_cylinder_PutUpdate() { } var data = eva_salary_cylinder_GetFromForm(); + console.log(data); //Update Mode if (eva_salary_cylinder_editMode === "UPDATE") { @@ -176,6 +174,8 @@ var eva_salary_cylinder_setupTable = function (result) { { "data": "themax" }, { "data": "middle" }, { "data": "cost_living" }, + { "data": "position_allowance" }, + { "data": "monthly_compensation" }, ], "columnDefs": [ { @@ -219,6 +219,20 @@ var eva_salary_cylinder_setupTable = function (result) { "render": function (data, type, row, meta) { return formatNumber(data); } + }, + { + "targets": 8, + "data": "position_allowance", + "render": function (data, type, row, meta) { + return formatNumber(data); + } + }, + { + "targets": 9, + "data": "monthly_compensation", + "render": function (data, type, row, meta) { + return formatNumber(data); + } }], "language": { "url": appsite + "/DataTables-1.10.16/thai.json"