From d17f470c8ceb5c20b2d4a9c3156a57182f530268 Mon Sep 17 00:00:00 2001 From: "LAPTOP-KB8JC2K2\\acer" Date: Thu, 8 Jul 2021 15:15:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=84=E0=B8=AD=E0=B8=A5=E0=B8=B1=E0=B8=A1=20=E0=B9=80?= =?UTF-8?q?=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88?= =?UTF-8?q?=E0=B8=B3=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88?= =?UTF-8?q?=E0=B8=87=20=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=84=E0=B9=88?= =?UTF-8?q?=E0=B8=B2=E0=B8=95=E0=B8=AD=E0=B8=9A=E0=B9=81=E0=B8=97=E0=B8=99?= =?UTF-8?q?=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B9=80=E0=B8=94=E0=B8=B7?= =?UTF-8?q?=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EXCEL/eva_salary_cylinder.xlsx | Bin 10771 -> 10915 bytes ...08074957_Updatesalary_cylinder.Designer.cs | 1075 +++++++++++++++++ .../20210708074957_Updatesalary_cylinder.cs | 31 + Migrations/DataContextModelSnapshot.cs | 4 + .../eva_salary_cylinderEntity.cs | 2 + .../eva_salary_cylinderInputModel.cs | 4 + .../eva_salary_cylinderService.cs | 68 +- .../eva_salary_cylinderViewModel.cs | 4 + .../eva_salary_cylinder.cshtml | 25 +- .../eva_adjust_postponement_normal.js | 4 + .../eva_salary_cylinder.js | 48 +- 11 files changed, 1209 insertions(+), 56 deletions(-) create mode 100644 Migrations/20210708074957_Updatesalary_cylinder.Designer.cs create mode 100644 Migrations/20210708074957_Updatesalary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soft.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"