Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s
This commit is contained in:
commit
cef699cef0
26 changed files with 9730 additions and 16 deletions
|
|
@ -818,6 +818,35 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เจ้าหน้าอัพเดตสถานะ เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ
|
||||
/// </summary>
|
||||
/// <param name="candidateId">รหัสใบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อเจ้าหน้าที่ตรวจคุณสมบัติผู้สมัครสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("check-showExamInfo")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> CheckShowExamInfoService(RequestApproves item)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (item.CandidateId != null)
|
||||
{
|
||||
await _candidateService.AdminCheckShowExamInfoService(item.CandidateId);
|
||||
}
|
||||
|
||||
return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เจ้าหน้าที่ย้อนสถานะเป็นตรวจสอบข้อมูล
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
[ApiController]
|
||||
[Produces("application/json")]
|
||||
[AllowAnonymous]
|
||||
// [Authorize]
|
||||
[Authorize]
|
||||
[SwaggerTag("จัดการข้อมูลรอบการสอบ เพื่อนำไปใช้งานในระบบ")]
|
||||
public class PeriodExamController : BaseController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,5 +25,7 @@
|
|||
public const string CMSNotFound = "ไม่พบข้อมูล CMS";
|
||||
public const string OrganizationNotFound = "ไม่พบข้อมูลสังกัด";
|
||||
public const string CitizanDupicate = "เลขบัตรประชาชนนี้ได้ทำการสมัครไว้แล้ว";
|
||||
public const string CitizenIncomplete = "กรุณากรอกข้อมูลรหัสบัตรประจำตัวประชาชนให้ครบ 13 หลัก";
|
||||
public const string CitizenIncorrect = "ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -500,6 +500,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnOrder(1)
|
||||
.HasComment("ชื่อจริง");
|
||||
|
||||
b.Property<bool>("IsShowExamInfo")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("สถานะ เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ");
|
||||
|
||||
b.Property<string>("Knowledge")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ความสามารถพิเศษ");
|
||||
|
|
@ -624,8 +628,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่งปัจจุบัน ประเภทราชการ");
|
||||
|
||||
b.Property<int?>("OccupationSalary")
|
||||
.HasColumnType("int")
|
||||
b.Property<double?>("OccupationSalary")
|
||||
.HasColumnType("double")
|
||||
.HasComment("ตำแหน่งปัจจุบัน เงินเดือน");
|
||||
|
||||
b.Property<string>("OccupationTelephone")
|
||||
|
|
@ -2284,6 +2288,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("float")
|
||||
.HasComment("ค่าธรรมเนียม");
|
||||
|
||||
b.Property<int?>("GraduationYearLock")
|
||||
.HasColumnType("int")
|
||||
.HasComment("ล็อกวันที่สำเร็จการศึกษา (ปี)");
|
||||
|
||||
b.Property<Guid?>("ImportFileId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -2673,6 +2681,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("EducationLevel")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)")
|
||||
.HasComment("ขีดจำกัดวุฒิการศึกษา");
|
||||
|
||||
b.Property<bool>("HighDegree")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.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: "ตำแหน่งปัจจุบัน เงินเดือน");
|
||||
}
|
||||
}
|
||||
}
|
||||
3147
Migrations/20251118032550_update_table_candidate_add_field_IsShowExamInfo.Designer.cs
generated
Normal file
3147
Migrations/20251118032550_update_table_candidate_add_field_IsShowExamInfo.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,30 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update_table_candidate_add_field_IsShowExamInfo : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsShowExamInfo",
|
||||
table: "Candidates",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "สถานะ เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsShowExamInfo",
|
||||
table: "Candidates");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
||||
public string? OccupationGroup { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
||||
public int? OccupationSalary { get; set; }
|
||||
public double? OccupationSalary { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
||||
public string? OccupationPosition { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
||||
|
|
@ -315,6 +315,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
|
||||
[Comment("โทรศัพท์ บุคคลที่สามารถติดต่อได้")]
|
||||
public string? ContactTel { get; set; }
|
||||
|
||||
[Comment("สถานะ เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ")]
|
||||
public bool IsShowExamInfo { get; set; } = false;
|
||||
public virtual List<Education> Educations { get; set; } = new List<Education>();
|
||||
public virtual List<Career> Careers { get; set; } = new List<Career>();
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
public string? AuthName { get; set; }
|
||||
public string? AuthPosition { get; set; }
|
||||
|
||||
[Comment("ล็อกวันที่สำเร็จการศึกษา (ปี)")]
|
||||
public int? GraduationYearLock { get; set; } = 3;
|
||||
|
||||
[Comment("รายชื่อคนสม้ครในรอบ")]
|
||||
public List<Candidate> Candidate { get; set; } = new List<Candidate>();
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ namespace BMA.EHR.Domain.Models.Placement
|
|||
[Comment("ตำแหน่งปัจจุบัน กลุ่ม/ฝ่าย")]
|
||||
public string? OccupationGroup { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน เงินเดือน")]
|
||||
public int? OccupationSalary { get; set; }
|
||||
public double? OccupationSalary { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน สังกัด")]
|
||||
public string? OccupationPosition { get; set; }
|
||||
[Comment("ตำแหน่งปัจจุบัน ประเภทราชการ")]
|
||||
|
|
|
|||
|
|
@ -34,5 +34,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
|
||||
[Comment("รหัสประจำตำแหน่งที่สอบ")]
|
||||
public string? Code { get; set; }
|
||||
|
||||
[Comment("ขีดจำกัดวุฒิการศึกษา"), MaxLength(50)]
|
||||
public string? EducationLevel { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,5 +39,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? HighDegree { get; set; }
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public bool? IsShowExamInfo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? CompanyCode { get; set; }
|
||||
public string? Reason { get; set; }
|
||||
public string? RefNo1 { get; set; }
|
||||
|
||||
public int? GraduationYearLock { get; set; }
|
||||
public List<FormFile>? Doc { get; set; }
|
||||
public List<FormFile>? Image { get; set; }
|
||||
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? TypeId { get; set; }
|
||||
public string? TypeName { get; set; }
|
||||
public string? EducationLevel { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public int? Year { get; set; }
|
||||
public string? Position { get; set; }
|
||||
public string? PositionLevel { get; set; }
|
||||
public string? EducationLevel { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public PositionExam? PositionExam { get; set; }
|
||||
public DateTime? RegisterEndDate { get; set; }
|
||||
public DateTime? RegisterStartDate { get; set; }
|
||||
public int? graduationYearLock { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public class CandidateContactResponseItem
|
||||
{
|
||||
public Guid? ContactPrefixId { get; set; }
|
||||
public string? ContactPrefix { get; set; }
|
||||
public string? ContactFirstname { get; set; }
|
||||
public string? ContactLastname { 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? OccupationPile { get; set; }
|
||||
public string? OccupationGroup { get; set; }
|
||||
public int? OccupationSalary { get; set; }
|
||||
public double? OccupationSalary { get; set; }
|
||||
public string? OccupationPosition { get; set; }
|
||||
public string? OccupationPositionType { get; set; }
|
||||
public string? OccupationTelephone { get; set; }
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public DateTime? DateOfBirth { get; set; }
|
||||
// public Models.Relationship? Relationship { 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? CitizenId { get; set; } = string.Empty;
|
||||
// public Models.Province? CitizenProvince { get; set; }
|
||||
|
|
@ -73,7 +73,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public string? OccupationOrg { get; set; }
|
||||
public string? OccupationPile { get; set; }
|
||||
public string? OccupationGroup { get; set; }
|
||||
public int? OccupationSalary { get; set; }
|
||||
public double? OccupationSalary { get; set; }
|
||||
public string? OccupationPosition { get; set; }
|
||||
public string? OccupationPositionType { 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? ContactPrefixId { get; set; }
|
||||
public string? ContactPrefixName { get; set; }
|
||||
public string? ContactFirstname { get; set; }
|
||||
public string? ContactLastname { get; set; }
|
||||
public string? ContactRelations { get; set; }
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public string? Status { get; set; }
|
||||
|
||||
public string? RejectDetail { get; set; }
|
||||
|
||||
public bool? IsShowExamInfo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public string? CompanyCode { get; set; }
|
||||
public string? Reason { 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.PositionExam> PositionExam { get; set; } = new List<Models.PositionExam>();
|
||||
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
|
||||
{
|
||||
ContactPrefixId = x.ContactPrefixId,
|
||||
ContactPrefix = x.ContactPrefixName,
|
||||
ContactFirstname = x.ContactFirstname,
|
||||
ContactLastname = x.ContactLastname,
|
||||
ContactRelations = x.ContactRelations,
|
||||
|
|
@ -358,6 +359,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Select(x => new CandidateContactResponseItem
|
||||
{
|
||||
ContactPrefixId = x.ContactPrefixId,
|
||||
ContactPrefix = x.ContactPrefixName,
|
||||
ContactFirstname = x.ContactFirstname,
|
||||
ContactLastname = x.ContactLastname,
|
||||
ContactRelations = x.ContactRelations,
|
||||
|
|
@ -665,6 +667,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null ? true : DateOnly.FromDateTime(exam.RegisterStartDate.Value) <= DateOnly.FromDateTime(DateTime.Now) && DateOnly.FromDateTime(exam.RegisterEndDate.Value) >= DateOnly.FromDateTime(DateTime.Now),
|
||||
RegisterEndDate = exam.RegisterEndDate,
|
||||
RegisterStartDate = exam.RegisterStartDate,
|
||||
graduationYearLock = exam.GraduationYearLock,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -749,6 +752,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.PrefixId = prefix.Id;
|
||||
candidate.PrefixName = prefix.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||
{
|
||||
candidate.PrefixName = updated.Prefix;
|
||||
}
|
||||
|
||||
if (updated.ContactPrefixId != null)
|
||||
{
|
||||
|
|
@ -761,6 +768,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.ContactPrefixId = prefix.Id;
|
||||
candidate.ContactPrefixName = prefix.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.ContactPrefixName))
|
||||
{
|
||||
candidate.ContactPrefixName = updated.ContactPrefixName;
|
||||
}
|
||||
|
||||
if (updated.ReligionId != null)
|
||||
{
|
||||
|
|
@ -773,6 +784,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.ReligionId = religion.Id;
|
||||
candidate.ReligionName = religion.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.ReligionName))
|
||||
{
|
||||
candidate.ReligionName = updated.ReligionName;
|
||||
}
|
||||
|
||||
if (updated.RegistProvinceId != null)
|
||||
{
|
||||
|
|
@ -973,6 +988,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.PrefixId = prefix.Id;
|
||||
candidate.PrefixName = prefix.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||
{
|
||||
candidate.PrefixName = updated.Prefix;
|
||||
}
|
||||
|
||||
if (updated.ContactPrefixId != null)
|
||||
{
|
||||
|
|
@ -985,6 +1004,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.ContactPrefixId = prefix.Id;
|
||||
candidate.ContactPrefixName = prefix.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.ContactPrefixName))
|
||||
{
|
||||
candidate.ContactPrefixName = updated.ContactPrefixName;
|
||||
}
|
||||
|
||||
if (updated.ReligionId != null)
|
||||
{
|
||||
|
|
@ -997,6 +1020,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.ReligionId = religion.Id;
|
||||
candidate.ReligionName = religion.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.ReligionName))
|
||||
{
|
||||
candidate.ReligionName = updated.ReligionName;
|
||||
}
|
||||
|
||||
if (updated.RegistProvinceId != null)
|
||||
{
|
||||
|
|
@ -1197,6 +1224,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate.PrefixId = prefix.Id;
|
||||
candidate.PrefixName = prefix.name;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(updated.Prefix))
|
||||
{
|
||||
candidate.PrefixName = updated.Prefix;
|
||||
}
|
||||
|
||||
if (updated.RelationshipId != null)
|
||||
{
|
||||
|
|
@ -1936,7 +1967,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
return new CandidateStatusResponse { Status = candidate.Status, RejectDetail = candidate.RejectDetail };
|
||||
return new CandidateStatusResponse { Status = candidate.Status, RejectDetail = candidate.RejectDetail, IsShowExamInfo = candidate.IsShowExamInfo };
|
||||
}
|
||||
|
||||
public async Task UserCheckCandidateService(string examId, string positionId, string status)
|
||||
|
|
@ -2147,6 +2178,41 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
public async Task AdminCheckShowExamInfoService(string[] candidateId)
|
||||
{
|
||||
//var _num = 0;
|
||||
foreach (var _candidateId in candidateId)
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PeriodExam)
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(_candidateId));
|
||||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
if (candidate.Status.Trim().ToUpper() != "CHECKREGISTER")
|
||||
continue;
|
||||
|
||||
if (candidate.PeriodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
var periodExam = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == candidate.PeriodExam)
|
||||
.Where(x => x.PositionExam == candidate.PositionExam)
|
||||
.Where(x => x.ExamIdenNumber != null)
|
||||
.Where(x => x.Status != "register")
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.ToListAsync();
|
||||
|
||||
if (periodExam == null)
|
||||
throw new Exception(GlobalMessages.ExamNotFound);
|
||||
|
||||
candidate.IsShowExamInfo = true;
|
||||
//++_num;
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
public async Task AdminRejectToCheckCandidateService(Guid candidateId, string? reason)
|
||||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
|
|
@ -2299,6 +2365,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Position = positionName,
|
||||
PositionLevel = positionLevelName,
|
||||
HighDegree = highDegree,
|
||||
IsShowExamInfo = candidate.IsShowExamInfo,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -2447,6 +2514,35 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (exam == null)
|
||||
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")
|
||||
{
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
|
|
@ -2456,18 +2552,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
throw new Exception(GlobalMessages.PositionExamNotFound);
|
||||
|
||||
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();
|
||||
if (candidate1 != null)
|
||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||
return;
|
||||
}
|
||||
|
||||
var candidate2 = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
||||
.FirstOrDefaultAsync();
|
||||
if (candidate2 != null)
|
||||
throw new Exception(GlobalMessages.CitizanDupicate);
|
||||
//var candidate2 = await _context.Candidates.AsQueryable()
|
||||
// .Where(x => x.PeriodExam == exam && x.UserId != UserId && x.CitizenId == citizenId)
|
||||
// .FirstOrDefaultAsync();
|
||||
//if (candidate2 != null)
|
||||
// throw new Exception(GlobalMessages.CitizanDupicate);
|
||||
}
|
||||
|
||||
public async Task GetExamCandidateAsync(Guid id)
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Round = x.Round,
|
||||
SetSeat = x.SetSeat,
|
||||
Year = x.Year,
|
||||
GraduationYearLock = x.GraduationYearLock,
|
||||
BankExam = x.BankExam.OrderBy(o => o.CreatedAt).Select(b => new BankExam
|
||||
{
|
||||
Id = b.Id,
|
||||
|
|
@ -203,6 +204,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelName = b.PositionLevelName,
|
||||
HighDegree = b.HighDegree,
|
||||
Code = b.Code,
|
||||
EducationLevel = b.EducationLevel,
|
||||
}).ToList(),
|
||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||
{
|
||||
|
|
@ -317,6 +319,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Year = periodExam.Year,
|
||||
Position = positionExam.PositionName,
|
||||
PositionLevel = positionExam.PositionLevelName,
|
||||
EducationLevel = positionExam.EducationLevel,
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
@ -328,6 +331,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Year = periodExam.Year,
|
||||
Position = null,
|
||||
PositionLevel = null,
|
||||
EducationLevel = positionExam.EducationLevel,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -364,6 +368,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CompanyCode = inserted.CompanyCode,
|
||||
Reason = inserted.Reason,
|
||||
RefNo1 = inserted.RefNo1,
|
||||
GraduationYearLock = inserted.GraduationYearLock ?? 3,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
|
|
@ -406,6 +411,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
EducationLevel = position.EducationLevel,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
|
|
@ -464,6 +470,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
periodExam.CompanyCode = updated.CompanyCode;
|
||||
periodExam.Reason = updated.Reason;
|
||||
periodExam.RefNo1 = updated.RefNo1;
|
||||
periodExam.GraduationYearLock = updated.GraduationYearLock;
|
||||
periodExam.LastUpdatedAt = DateTime.Now;
|
||||
periodExam.LastUpdateUserId = UserId ?? "";
|
||||
periodExam.LastUpdateFullName = FullName ?? "";
|
||||
|
|
@ -539,6 +546,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
position.Code = positionData.Code;
|
||||
position.TypeId = positionData.TypeId;
|
||||
position.TypeName = positionData.TypeName;
|
||||
position.EducationLevel = positionData.EducationLevel;
|
||||
position.LastUpdatedAt = DateTime.Now;
|
||||
position.LastUpdateUserId = UserId ?? "";
|
||||
position.LastUpdateFullName = FullName ?? "";
|
||||
|
|
@ -573,6 +581,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
EducationLevel = position.EducationLevel,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
|
|
@ -799,6 +808,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Status = x.Status,
|
||||
PositionLevelName = x.PositionExam == null ? null : x.PositionExam.PositionLevelName,
|
||||
PositionName = x.PositionExam == null ? null : x.PositionExam.PositionName,
|
||||
IsShowExamInfo = x.IsShowExamInfo,
|
||||
})
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
|
|
@ -880,6 +890,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Status = x.Status,
|
||||
PositionLevelName = x.PositionExam == null ? null : x.PositionExam.PositionLevelName,
|
||||
PositionName = x.PositionExam == null ? null : x.PositionExam.PositionName,
|
||||
IsShowExamInfo = x.IsShowExamInfo,
|
||||
})
|
||||
.ToListAsync();
|
||||
var _candidate = await _context.Candidates.AsQueryable()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue