migrate + ปรับระบบสรรหาสอบคัดเลือก
This commit is contained in:
parent
577c7b289e
commit
f20abe032d
19 changed files with 6470 additions and 15 deletions
|
|
@ -16,7 +16,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Produces("application/json")]
|
[Produces("application/json")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
// [Authorize]
|
[Authorize]
|
||||||
[SwaggerTag("จัดการข้อมูลรอบการสอบ เพื่อนำไปใช้งานในระบบ")]
|
[SwaggerTag("จัดการข้อมูลรอบการสอบ เพื่อนำไปใช้งานในระบบ")]
|
||||||
public class PeriodExamController : BaseController
|
public class PeriodExamController : BaseController
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,5 +25,7 @@
|
||||||
public const string CMSNotFound = "ไม่พบข้อมูล CMS";
|
public const string CMSNotFound = "ไม่พบข้อมูล CMS";
|
||||||
public const string OrganizationNotFound = "ไม่พบข้อมูลสังกัด";
|
public const string OrganizationNotFound = "ไม่พบข้อมูลสังกัด";
|
||||||
public const string CitizanDupicate = "เลขบัตรประชาชนนี้ได้ทำการสมัครไว้แล้ว";
|
public const string CitizanDupicate = "เลขบัตรประชาชนนี้ได้ทำการสมัครไว้แล้ว";
|
||||||
|
public const string CitizenIncomplete = "กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก";
|
||||||
|
public const string CitizenIncorrect = "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -624,8 +624,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
||||||
.HasColumnType("longtext")
|
.HasColumnType("longtext")
|
||||||
.HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ");
|
.HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ");
|
||||||
|
|
||||||
b.Property<int?>("OccupationSalary")
|
b.Property<double?>("OccupationSalary")
|
||||||
.HasColumnType("int")
|
.HasColumnType("double")
|
||||||
.HasComment("ตำแหน่งปัจจุบัน เงินเดือน");
|
.HasComment("ตำแหน่งปัจจุบัน เงินเดือน");
|
||||||
|
|
||||||
b.Property<string>("OccupationTelephone")
|
b.Property<string>("OccupationTelephone")
|
||||||
|
|
@ -2284,6 +2284,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
||||||
.HasColumnType("float")
|
.HasColumnType("float")
|
||||||
.HasComment("ค่าธรรมเนียม");
|
.HasComment("ค่าธรรมเนียม");
|
||||||
|
|
||||||
|
b.Property<int?>("GraduationYearLock")
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasComment("ล็อกวันที่สำเร็จการศึกษา (ปี)");
|
||||||
|
|
||||||
b.Property<Guid?>("ImportFileId")
|
b.Property<Guid?>("ImportFileId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
|
@ -2673,6 +2677,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
||||||
.HasColumnOrder(101)
|
.HasColumnOrder(101)
|
||||||
.HasComment("User Id ที่สร้างข้อมูล");
|
.HasComment("User Id ที่สร้างข้อมูล");
|
||||||
|
|
||||||
|
b.Property<string>("EducationLevel")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("varchar(50)")
|
||||||
|
.HasComment("ขีดจำกัดวุฒิการศึกษา");
|
||||||
|
|
||||||
b.Property<bool>("HighDegree")
|
b.Property<bool>("HighDegree")
|
||||||
.HasColumnType("tinyint(1)")
|
.HasColumnType("tinyint(1)")
|
||||||
.HasComment("ปริญญาบัตรขึ้นไป");
|
.HasComment("ปริญญาบัตรขึ้นไป");
|
||||||
|
|
|
||||||
3143
Migrations/20251117070048_update_tables_periodExam_and_positionExam.Designer.cs
generated
Normal file
3143
Migrations/20251117070048_update_tables_periodExam_and_positionExam.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,42 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class update_tables_periodExam_and_positionExam : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "EducationLevel",
|
||||||
|
table: "PositionExams",
|
||||||
|
type: "varchar(50)",
|
||||||
|
maxLength: 50,
|
||||||
|
nullable: true,
|
||||||
|
comment: "ขีดจำกัดวุฒิการศึกษา")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "GraduationYearLock",
|
||||||
|
table: "PeriodExams",
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ล็อกวันที่สำเร็จการศึกษา (ปี)");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "EducationLevel",
|
||||||
|
table: "PositionExams");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GraduationYearLock",
|
||||||
|
table: "PeriodExams");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
3143
Migrations/20251117080701_update_tables_candidates_change_datatype.Designer.cs
generated
Normal file
3143
Migrations/20251117080701_update_tables_candidates_change_datatype.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,40 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class update_tables_candidates_change_datatype : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<double>(
|
||||||
|
name: "OccupationSalary",
|
||||||
|
table: "Candidates",
|
||||||
|
type: "double",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่งปัจจุบัน เงินเดือน",
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "ตำแหน่งปัจจุบัน เงินเดือน");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "OccupationSalary",
|
||||||
|
table: "Candidates",
|
||||||
|
type: "int",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่งปัจจุบัน เงินเดือน",
|
||||||
|
oldClrType: typeof(double),
|
||||||
|
oldType: "double",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "ตำแหน่งปัจจุบัน เงินเดือน");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -266,7 +266,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
||||||
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
||||||
public string? OccupationGroup { get; set; }
|
public string? OccupationGroup { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
||||||
public int? OccupationSalary { get; set; }
|
public double? OccupationSalary { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
||||||
public string? OccupationPosition { get; set; }
|
public string? OccupationPosition { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
||||||
public string? AuthName { get; set; }
|
public string? AuthName { get; set; }
|
||||||
public string? AuthPosition { get; set; }
|
public string? AuthPosition { get; set; }
|
||||||
|
|
||||||
|
[Comment("ล็อกวันที่สำเร็จการศึกษา (ปี)")]
|
||||||
|
public int? GraduationYearLock { get; set; } = 3;
|
||||||
|
|
||||||
[Comment("รายชื่อคนสม้ครในรอบ")]
|
[Comment("รายชื่อคนสม้ครในรอบ")]
|
||||||
public List<Candidate> Candidate { get; set; } = new List<Candidate>();
|
public List<Candidate> Candidate { get; set; } = new List<Candidate>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ namespace BMA.EHR.Domain.Models.Placement
|
||||||
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
||||||
public string? OccupationGroup { get; set; }
|
public string? OccupationGroup { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
||||||
public int? OccupationSalary { get; set; }
|
public double? OccupationSalary { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
||||||
public string? OccupationPosition { get; set; }
|
public string? OccupationPosition { get; set; }
|
||||||
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
||||||
|
|
||||||
[Comment("รหัสประจำตำแหน่งที่สอบ")]
|
[Comment("รหัสประจำตำแหน่งที่สอบ")]
|
||||||
public string? Code { get; set; }
|
public string? Code { get; set; }
|
||||||
|
|
||||||
|
[Comment("ขีดจำกัดวุฒิการศึกษา"), MaxLength(50)]
|
||||||
|
public string? EducationLevel { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
||||||
public string? CompanyCode { get; set; }
|
public string? CompanyCode { get; set; }
|
||||||
public string? Reason { get; set; }
|
public string? Reason { get; set; }
|
||||||
public string? RefNo1 { get; set; }
|
public string? RefNo1 { get; set; }
|
||||||
|
public int? GraduationYearLock { get; set; }
|
||||||
public List<FormFile>? Doc { get; set; }
|
public List<FormFile>? Doc { get; set; }
|
||||||
public List<FormFile>? Image { get; set; }
|
public List<FormFile>? Image { get; set; }
|
||||||
public List<RequestBankExam> BankExam { get; set; } = new();
|
public List<RequestBankExam> BankExam { get; set; } = new();
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
||||||
public string? Code { get; set; }
|
public string? Code { get; set; }
|
||||||
public string? TypeId { get; set; }
|
public string? TypeId { get; set; }
|
||||||
public string? TypeName { get; set; }
|
public string? TypeName { get; set; }
|
||||||
|
public string? EducationLevel { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public class CandidateContactResponseItem
|
public class CandidateContactResponseItem
|
||||||
{
|
{
|
||||||
public Guid? ContactPrefixId { get; set; }
|
public Guid? ContactPrefixId { get; set; }
|
||||||
|
public string? ContactPrefix { get; set; }
|
||||||
public string? ContactFirstname { get; set; }
|
public string? ContactFirstname { get; set; }
|
||||||
public string? ContactLastname { get; set; }
|
public string? ContactLastname { get; set; }
|
||||||
public string? ContactRelations { get; set; }
|
public string? ContactRelations { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public string? OccupationOrg { get; set; }
|
public string? OccupationOrg { get; set; }
|
||||||
public string? OccupationPile { get; set; }
|
public string? OccupationPile { get; set; }
|
||||||
public string? OccupationGroup { get; set; }
|
public string? OccupationGroup { get; set; }
|
||||||
public int? OccupationSalary { get; set; }
|
public double? OccupationSalary { get; set; }
|
||||||
public string? OccupationPosition { get; set; }
|
public string? OccupationPosition { get; set; }
|
||||||
public string? OccupationPositionType { get; set; }
|
public string? OccupationPositionType { get; set; }
|
||||||
public string? OccupationTelephone { get; set; }
|
public string? OccupationTelephone { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public DateTime? DateOfBirth { get; set; }
|
public DateTime? DateOfBirth { get; set; }
|
||||||
// public Models.Relationship? Relationship { get; set; }
|
// public Models.Relationship? Relationship { get; set; }
|
||||||
public string? ReligionId { get; set; }
|
public string? ReligionId { get; set; }
|
||||||
// public string? Religion { get; set; }
|
public string? ReligionName { get; set; }
|
||||||
public string? Email { get; set; } = string.Empty;
|
public string? Email { get; set; } = string.Empty;
|
||||||
public string? CitizenId { get; set; } = string.Empty;
|
public string? CitizenId { get; set; } = string.Empty;
|
||||||
// public Models.Province? CitizenProvince { get; set; }
|
// public Models.Province? CitizenProvince { get; set; }
|
||||||
|
|
@ -73,7 +73,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public string? OccupationOrg { get; set; }
|
public string? OccupationOrg { get; set; }
|
||||||
public string? OccupationPile { get; set; }
|
public string? OccupationPile { get; set; }
|
||||||
public string? OccupationGroup { get; set; }
|
public string? OccupationGroup { get; set; }
|
||||||
public int? OccupationSalary { get; set; }
|
public double? OccupationSalary { get; set; }
|
||||||
public string? OccupationPosition { get; set; }
|
public string? OccupationPosition { get; set; }
|
||||||
public string? OccupationPositionType { get; set; }
|
public string? OccupationPositionType { get; set; }
|
||||||
public string? OccupationTelephone { get; set; }
|
public string? OccupationTelephone { get; set; }
|
||||||
|
|
@ -88,6 +88,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public Guid? EducationLevelHighId { get; set; }
|
public Guid? EducationLevelHighId { get; set; }
|
||||||
|
|
||||||
public Guid? ContactPrefixId { get; set; }
|
public Guid? ContactPrefixId { get; set; }
|
||||||
|
public string? ContactPrefixName { get; set; }
|
||||||
public string? ContactFirstname { get; set; }
|
public string? ContactFirstname { get; set; }
|
||||||
public string? ContactLastname { get; set; }
|
public string? ContactLastname { get; set; }
|
||||||
public string? ContactRelations { get; set; }
|
public string? ContactRelations { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
||||||
public string? CompanyCode { get; set; }
|
public string? CompanyCode { get; set; }
|
||||||
public string? Reason { get; set; }
|
public string? Reason { get; set; }
|
||||||
public string? RefNo1 { get; set; }
|
public string? RefNo1 { get; set; }
|
||||||
|
public int? GraduationYearLock { get; set; }
|
||||||
public List<Models.Candidate> Candidate { get; set; } = new List<Models.Candidate>();
|
public List<Models.Candidate> Candidate { get; set; } = new List<Models.Candidate>();
|
||||||
public List<Models.PositionExam> PositionExam { get; set; } = new List<Models.PositionExam>();
|
public List<Models.PositionExam> PositionExam { get; set; } = new List<Models.PositionExam>();
|
||||||
public List<Models.BankExam> BankExam { get; set; } = new List<Models.BankExam>();
|
public List<Models.BankExam> BankExam { get; set; } = new List<Models.BankExam>();
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
.Select(x => new CandidateContactResponseItem
|
.Select(x => new CandidateContactResponseItem
|
||||||
{
|
{
|
||||||
ContactPrefixId = x.ContactPrefixId,
|
ContactPrefixId = x.ContactPrefixId,
|
||||||
|
ContactPrefix = x.ContactPrefixName,
|
||||||
ContactFirstname = x.ContactFirstname,
|
ContactFirstname = x.ContactFirstname,
|
||||||
ContactLastname = x.ContactLastname,
|
ContactLastname = x.ContactLastname,
|
||||||
ContactRelations = x.ContactRelations,
|
ContactRelations = x.ContactRelations,
|
||||||
|
|
@ -358,6 +359,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
.Select(x => new CandidateContactResponseItem
|
.Select(x => new CandidateContactResponseItem
|
||||||
{
|
{
|
||||||
ContactPrefixId = x.ContactPrefixId,
|
ContactPrefixId = x.ContactPrefixId,
|
||||||
|
ContactPrefix = x.ContactPrefixName,
|
||||||
ContactFirstname = x.ContactFirstname,
|
ContactFirstname = x.ContactFirstname,
|
||||||
ContactLastname = x.ContactLastname,
|
ContactLastname = x.ContactLastname,
|
||||||
ContactRelations = x.ContactRelations,
|
ContactRelations = x.ContactRelations,
|
||||||
|
|
@ -749,6 +751,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.PrefixId = prefix.Id;
|
candidate.PrefixId = prefix.Id;
|
||||||
candidate.PrefixName = prefix.name;
|
candidate.PrefixName = prefix.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||||
|
{
|
||||||
|
candidate.PrefixName = updated.Prefix;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.ContactPrefixId != null)
|
if (updated.ContactPrefixId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -761,6 +767,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.ContactPrefixId = prefix.Id;
|
candidate.ContactPrefixId = prefix.Id;
|
||||||
candidate.ContactPrefixName = prefix.name;
|
candidate.ContactPrefixName = prefix.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.ContactPrefixName))
|
||||||
|
{
|
||||||
|
candidate.ContactPrefixName = updated.ContactPrefixName;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.ReligionId != null)
|
if (updated.ReligionId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -773,6 +783,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.ReligionId = religion.Id;
|
candidate.ReligionId = religion.Id;
|
||||||
candidate.ReligionName = religion.name;
|
candidate.ReligionName = religion.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.ReligionName))
|
||||||
|
{
|
||||||
|
candidate.ReligionName = updated.ReligionName;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.RegistProvinceId != null)
|
if (updated.RegistProvinceId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -973,6 +987,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.PrefixId = prefix.Id;
|
candidate.PrefixId = prefix.Id;
|
||||||
candidate.PrefixName = prefix.name;
|
candidate.PrefixName = prefix.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||||
|
{
|
||||||
|
candidate.PrefixName = updated.Prefix;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.ContactPrefixId != null)
|
if (updated.ContactPrefixId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -985,6 +1003,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.ContactPrefixId = prefix.Id;
|
candidate.ContactPrefixId = prefix.Id;
|
||||||
candidate.ContactPrefixName = prefix.name;
|
candidate.ContactPrefixName = prefix.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.ContactPrefixName))
|
||||||
|
{
|
||||||
|
candidate.ContactPrefixName = updated.ContactPrefixName;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.ReligionId != null)
|
if (updated.ReligionId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -997,6 +1019,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.ReligionId = religion.Id;
|
candidate.ReligionId = religion.Id;
|
||||||
candidate.ReligionName = religion.name;
|
candidate.ReligionName = religion.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.ReligionName))
|
||||||
|
{
|
||||||
|
candidate.ReligionName = updated.ReligionName;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.RegistProvinceId != null)
|
if (updated.RegistProvinceId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -1197,6 +1223,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
candidate.PrefixId = prefix.Id;
|
candidate.PrefixId = prefix.Id;
|
||||||
candidate.PrefixName = prefix.name;
|
candidate.PrefixName = prefix.name;
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||||
|
{
|
||||||
|
candidate.PrefixName = updated.Prefix;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated.RelationshipId != null)
|
if (updated.RelationshipId != null)
|
||||||
{
|
{
|
||||||
|
|
@ -2447,6 +2477,35 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
if (exam == null)
|
if (exam == null)
|
||||||
throw new Exception(GlobalMessages.ExamNotFound);
|
throw new Exception(GlobalMessages.ExamNotFound);
|
||||||
|
|
||||||
|
if (citizenId.Length != 13)
|
||||||
|
throw new Exception(GlobalMessages.CitizenIncomplete);
|
||||||
|
|
||||||
|
int[] citizenIdDigits = citizenId.Select(c => int.Parse(c.ToString())).ToArray();
|
||||||
|
int cal =
|
||||||
|
citizenIdDigits[0] * 13 +
|
||||||
|
citizenIdDigits[1] * 12 +
|
||||||
|
citizenIdDigits[2] * 11 +
|
||||||
|
citizenIdDigits[3] * 10 +
|
||||||
|
citizenIdDigits[4] * 9 +
|
||||||
|
citizenIdDigits[5] * 8 +
|
||||||
|
citizenIdDigits[6] * 7 +
|
||||||
|
citizenIdDigits[7] * 6 +
|
||||||
|
citizenIdDigits[8] * 5 +
|
||||||
|
citizenIdDigits[9] * 4 +
|
||||||
|
citizenIdDigits[10] * 3 +
|
||||||
|
citizenIdDigits[11] * 2;
|
||||||
|
|
||||||
|
int calStp2 = cal % 11;
|
||||||
|
int chkDigit = 11 - calStp2;
|
||||||
|
|
||||||
|
if (chkDigit == 10)
|
||||||
|
chkDigit = 1;
|
||||||
|
else if (chkDigit == 11)
|
||||||
|
chkDigit = chkDigit % 10;
|
||||||
|
|
||||||
|
if (citizenIdDigits[12] != chkDigit)
|
||||||
|
throw new Exception(GlobalMessages.CitizenIncorrect);
|
||||||
|
|
||||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||||
{
|
{
|
||||||
var position = await _context.PositionExams.AsQueryable()
|
var position = await _context.PositionExams.AsQueryable()
|
||||||
|
|
@ -2456,18 +2515,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
throw new Exception(GlobalMessages.PositionExamNotFound);
|
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||||
|
|
||||||
var candidate1 = await _context.Candidates.AsQueryable()
|
var candidate1 = await _context.Candidates.AsQueryable()
|
||||||
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.PositionExam == position && x.CitizenId == citizenId)
|
.Where(x => x.PeriodExam == exam && x.UserId != UserId /*&& x.PositionExam == position*/ && x.CitizenId == citizenId)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
if (candidate1 != null)
|
if (candidate1 != null)
|
||||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var candidate2 = await _context.Candidates.AsQueryable()
|
//var candidate2 = await _context.Candidates.AsQueryable()
|
||||||
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
// .Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
||||||
.FirstOrDefaultAsync();
|
// .FirstOrDefaultAsync();
|
||||||
if (candidate2 != null)
|
//if (candidate2 != null)
|
||||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
// throw new Exception(GlobalMessages.CitizanDupicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task GetExamCandidateAsync(Guid id)
|
public async Task GetExamCandidateAsync(Guid id)
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
Round = x.Round,
|
Round = x.Round,
|
||||||
SetSeat = x.SetSeat,
|
SetSeat = x.SetSeat,
|
||||||
Year = x.Year,
|
Year = x.Year,
|
||||||
|
GraduationYearLock = x.GraduationYearLock,
|
||||||
BankExam = x.BankExam.OrderBy(o => o.CreatedAt).Select(b => new BankExam
|
BankExam = x.BankExam.OrderBy(o => o.CreatedAt).Select(b => new BankExam
|
||||||
{
|
{
|
||||||
Id = b.Id,
|
Id = b.Id,
|
||||||
|
|
@ -203,6 +204,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
PositionLevelName = b.PositionLevelName,
|
PositionLevelName = b.PositionLevelName,
|
||||||
HighDegree = b.HighDegree,
|
HighDegree = b.HighDegree,
|
||||||
Code = b.Code,
|
Code = b.Code,
|
||||||
|
EducationLevel = b.EducationLevel,
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||||
{
|
{
|
||||||
|
|
@ -364,6 +366,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
CompanyCode = inserted.CompanyCode,
|
CompanyCode = inserted.CompanyCode,
|
||||||
Reason = inserted.Reason,
|
Reason = inserted.Reason,
|
||||||
RefNo1 = inserted.RefNo1,
|
RefNo1 = inserted.RefNo1,
|
||||||
|
GraduationYearLock = inserted.GraduationYearLock,
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
@ -406,6 +409,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
Code = position.Code,
|
Code = position.Code,
|
||||||
TypeId = position.TypeId,
|
TypeId = position.TypeId,
|
||||||
TypeName = position.TypeName,
|
TypeName = position.TypeName,
|
||||||
|
EducationLevel = position.EducationLevel,
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
@ -464,6 +468,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
periodExam.CompanyCode = updated.CompanyCode;
|
periodExam.CompanyCode = updated.CompanyCode;
|
||||||
periodExam.Reason = updated.Reason;
|
periodExam.Reason = updated.Reason;
|
||||||
periodExam.RefNo1 = updated.RefNo1;
|
periodExam.RefNo1 = updated.RefNo1;
|
||||||
|
periodExam.GraduationYearLock = updated.GraduationYearLock;
|
||||||
periodExam.LastUpdatedAt = DateTime.Now;
|
periodExam.LastUpdatedAt = DateTime.Now;
|
||||||
periodExam.LastUpdateUserId = UserId ?? "";
|
periodExam.LastUpdateUserId = UserId ?? "";
|
||||||
periodExam.LastUpdateFullName = FullName ?? "";
|
periodExam.LastUpdateFullName = FullName ?? "";
|
||||||
|
|
@ -539,6 +544,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
position.Code = positionData.Code;
|
position.Code = positionData.Code;
|
||||||
position.TypeId = positionData.TypeId;
|
position.TypeId = positionData.TypeId;
|
||||||
position.TypeName = positionData.TypeName;
|
position.TypeName = positionData.TypeName;
|
||||||
|
position.EducationLevel = positionData.EducationLevel;
|
||||||
position.LastUpdatedAt = DateTime.Now;
|
position.LastUpdatedAt = DateTime.Now;
|
||||||
position.LastUpdateUserId = UserId ?? "";
|
position.LastUpdateUserId = UserId ?? "";
|
||||||
position.LastUpdateFullName = FullName ?? "";
|
position.LastUpdateFullName = FullName ?? "";
|
||||||
|
|
@ -573,6 +579,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
Code = position.Code,
|
Code = position.Code,
|
||||||
TypeId = position.TypeId,
|
TypeId = position.TypeId,
|
||||||
TypeName = position.TypeName,
|
TypeName = position.TypeName,
|
||||||
|
EducationLevel = position.EducationLevel,
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue