ไม่ validate วันที่สมัครสอบ
This commit is contained in:
parent
a207e5077c
commit
c11b3b68ae
17 changed files with 3276 additions and 312 deletions
|
|
@ -1686,7 +1686,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Number = sr == null ? "" : sr.Number,
|
||||
CitizenId = p.CitizenId,
|
||||
ExamCount = 0,
|
||||
ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.AddYears(2).ToThaiShortDate(),
|
||||
ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate(),
|
||||
ScoreResult = sr == null ? null : new
|
||||
{
|
||||
ScoreAFull = sr.FullA,
|
||||
|
|
@ -1736,11 +1736,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
announcement_startDate = r.AnnouncementStartDate == null ? "" : r.AnnouncementStartDate.ToString("yyyy-mm-dd"),
|
||||
announcement_endDate = r.AnnouncementEndDate == null ? "" : r.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
announcementExam = true,
|
||||
register_startDate = r.RegisterStartDate == null ? "" : r.RegisterStartDate.ToString("yyyy-MM-dd"),
|
||||
register_endDate = r.RegisterEndDate == null ? "" : r.RegisterEndDate.ToString("yyyy-MM-dd"),
|
||||
payment_startDate = r.PaymentStartDate == null ? "" : r.PaymentStartDate.ToString("yyyy-MM-dd"),
|
||||
payment_endDate = r.PaymentEndDate == null ? "" : r.PaymentEndDate.ToString("yyyy-MM-dd"),
|
||||
exam_date = r.ExamDate == null ? "" : r.ExamDate.ToString("yyyy-MM-dd")
|
||||
register_startDate = r.RegisterStartDate == null ? "" : r.RegisterStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
register_endDate = r.RegisterEndDate == null ? "" : r.RegisterEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
payment_startDate = r.PaymentStartDate == null ? "" : r.PaymentStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
payment_endDate = r.PaymentEndDate == null ? "" : r.PaymentEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
exam_date = r.ExamDate == null ? "" : r.ExamDate.Value.ToString("yyyy-MM-dd")
|
||||
|
||||
})
|
||||
.ToList();
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Year = p.PeriodExam.Year.Value.ToThaiYear(),
|
||||
FullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
|
||||
ExamResult = sr == null ? "" : sr.ExamStatus,
|
||||
EndDate = p.PeriodExam.RegisterEndDate.ToThaiFullDate3(),
|
||||
EndDate = p.PeriodExam.RegisterEndDate == null ? null : p.PeriodExam.RegisterEndDate.Value.ToThaiFullDate3(),
|
||||
AuthName = "นายณัฐพงศ์ ดิษยบุตร",
|
||||
AuthPosition = "หัวหน้าสำนักงาน ก.ก."
|
||||
})
|
||||
|
|
@ -181,7 +181,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Number = sr == null ? "" : sr.Number,
|
||||
// ExamCount = 10,
|
||||
// ExamCount = GetExamCountTes(p.CitizenId),
|
||||
ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.AddYears(2).ToThaiShortDate(),
|
||||
ScoreExpire = p.PeriodExam.AnnouncementDate == null ? "" : p.PeriodExam.AnnouncementDate.Value.AddYears(2).ToThaiShortDate(),
|
||||
FullA = sr == null ? 0 : sr.FullA,
|
||||
SumA = sr == null ? 0 : sr.SumA,
|
||||
FullB = sr == null ? 0 : sr.FullB,
|
||||
|
|
|
|||
|
|
@ -704,6 +704,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("varchar(10)")
|
||||
.HasComment("รหัสไปรษณีย์ที่อยู่ตามทะเบียนบ้าน");
|
||||
|
||||
b.Property<DateTime?>("RegisterDate")
|
||||
.HasMaxLength(40)
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สมัคร");
|
||||
|
||||
b.Property<string>("RejectDetail")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("เหตุผลการไม่อนุมัติ");
|
||||
|
|
@ -2128,7 +2133,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("AnnouncementDate")
|
||||
b.Property<DateTime?>("AnnouncementDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(5)
|
||||
.HasComment("วันประกาศผลสอบ");
|
||||
|
|
@ -2182,7 +2188,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดสมัครสอบ");
|
||||
|
||||
b.Property<DateTime>("ExamDate")
|
||||
b.Property<DateTime?>("ExamDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("วันที่สอบ");
|
||||
|
||||
|
|
@ -2243,7 +2250,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ชื่อหน่วยงาน");
|
||||
|
||||
b.Property<DateTime>("PaymentEndDate")
|
||||
b.Property<DateTime?>("PaymentEndDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(4)
|
||||
.HasComment("วันสิ้นสุดชำระเงิน");
|
||||
|
|
@ -2252,17 +2260,20 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ชำระเงินผ่านกรุงไทย");
|
||||
|
||||
b.Property<DateTime>("PaymentStartDate")
|
||||
b.Property<DateTime?>("PaymentStartDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(3)
|
||||
.HasComment("วันเริ่มชำระเงิน");
|
||||
|
||||
b.Property<DateTime>("RegisterEndDate")
|
||||
b.Property<DateTime?>("RegisterEndDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(2)
|
||||
.HasComment("วันสิ้นสุดสมัครสอบ");
|
||||
|
||||
b.Property<DateTime>("RegisterStartDate")
|
||||
b.Property<DateTime?>("RegisterStartDate")
|
||||
.IsRequired()
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(1)
|
||||
.HasComment("วันเริ่มสมัครสอบ");
|
||||
|
|
@ -2449,6 +2460,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<bool>("HighDegree")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasComment("ปริญญาขึ้นไป");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasColumnOrder(106)
|
||||
|
|
|
|||
2869
Migrations/20230601050043_update table candidate add high degree.Designer.cs
generated
Normal file
2869
Migrations/20230601050043_update table candidate add high degree.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablecandidateaddhighdegree : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "HighDegree",
|
||||
table: "PositionExams",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false,
|
||||
comment: "ปริญญาขึ้นไป");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "RegisterDate",
|
||||
table: "Candidates",
|
||||
type: "datetime(6)",
|
||||
maxLength: 40,
|
||||
nullable: true,
|
||||
comment: "วันที่สมัคร");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HighDegree",
|
||||
table: "PositionExams");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RegisterDate",
|
||||
table: "Candidates");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -252,5 +252,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
[Comment("ข้อแนะนำ")]
|
||||
public string? Review { get; set; }
|
||||
|
||||
[MaxLength(40), Comment("วันที่สมัคร")]
|
||||
public DateTime? RegisterDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,19 +27,19 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
public float? Fee { get; set; } = 0;
|
||||
|
||||
[Required, Column(Order = 1), Comment("วันเริ่มสมัครสอบ")]
|
||||
public DateTime RegisterStartDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? RegisterStartDate { get; set; }
|
||||
|
||||
[Required, Column(Order = 2), Comment("วันสิ้นสุดสมัครสอบ")]
|
||||
public DateTime RegisterEndDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? RegisterEndDate { get; set; }
|
||||
|
||||
[Required, Column(Order = 3), Comment("วันเริ่มชำระเงิน")]
|
||||
public DateTime PaymentStartDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? PaymentStartDate { get; set; }
|
||||
|
||||
[Required, Column(Order = 4), Comment("วันสิ้นสุดชำระเงิน")]
|
||||
public DateTime PaymentEndDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? PaymentEndDate { get; set; }
|
||||
|
||||
[Required, Column(Order = 5), Comment("วันประกาศผลสอบ")]
|
||||
public DateTime AnnouncementDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
|
||||
[Required, Column(Order = 6), Comment("วันเริ่มประกาศ")]
|
||||
public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date;
|
||||
|
|
@ -48,7 +48,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
public DateTime AnnouncementEndDate { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Comment("วันที่สอบ")]
|
||||
public DateTime ExamDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? ExamDate { get; set; }
|
||||
|
||||
[Comment("Id รหัสส่วนราชการ")]
|
||||
public Guid? OrganizationCodeId { get; set; }
|
||||
|
|
|
|||
|
|
@ -21,5 +21,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
|
||||
[Comment("ชื่อประเภทแบบฟอร์ม")]
|
||||
public string? TypeName { get; set; }
|
||||
|
||||
[Comment("ปริญญาขึ้นไป")]
|
||||
public bool HighDegree { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? Number { get; set; }
|
||||
public int? ReviewPoint { get; set; }
|
||||
public string? Review { get; set; }
|
||||
public string? Position { get; set; }
|
||||
public string? HighDegree { get; set; }
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public int? Round { get; set; }
|
||||
public int? Year { get; set; }
|
||||
public float? Fee { get; set; } = 0;
|
||||
public DateTime RegisterStartDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime RegisterEndDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime PaymentStartDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime PaymentEndDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? RegisterStartDate { get; set; }
|
||||
public DateTime? RegisterEndDate { get; set; }
|
||||
public DateTime? PaymentStartDate { get; set; }
|
||||
public DateTime? PaymentEndDate { get; set; }
|
||||
public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime AnnouncementEndDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime AnnouncementDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime ExamDate { get; set; } = DateTime.Now.Date;
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
public DateTime? ExamDate { get; set; }
|
||||
public Guid? OrganizationCodeId { get; set; }
|
||||
public string? OrganizationCodeName { get; set; }
|
||||
public Guid? OrganizationId { get; set; }
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public Guid? Id { get; set; }
|
||||
public Guid? PositionId { get; set; }
|
||||
public string? PositionName { get; set; }
|
||||
public bool HighDegree { get; set; }
|
||||
public string? TypeId { get; set; }
|
||||
public string? TypeName { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public string? Url { get; set; }
|
||||
public string? Id { get; set; }
|
||||
public string? Path { get; set; }
|
||||
public string? HighDegree { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public Guid? OcId { get; set; }
|
||||
public string CreatedUserId { get; set; }
|
||||
public float? Fee { get; set; }
|
||||
public DateTime RegisterStartDate { get; set; }
|
||||
public DateTime RegisterEndDate { get; set; }
|
||||
public DateTime PaymentStartDate { get; set; }
|
||||
public DateTime PaymentEndDate { get; set; }
|
||||
public DateTime? RegisterStartDate { get; set; }
|
||||
public DateTime? RegisterEndDate { get; set; }
|
||||
public DateTime? PaymentStartDate { get; set; }
|
||||
public DateTime? PaymentEndDate { get; set; }
|
||||
public DateTime AnnouncementStartDate { get; set; }
|
||||
public DateTime AnnouncementEndDate { get; set; }
|
||||
public DateTime AnnouncementDate { get; set; }
|
||||
public DateTime ExamDate { get; set; }
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
public DateTime? ExamDate { get; set; }
|
||||
public Guid? OrganizationCodeId { get; set; }
|
||||
public string? OrganizationCodeName { get; set; }
|
||||
public Guid? OrganizationId { get; set; }
|
||||
|
|
|
|||
|
|
@ -362,17 +362,17 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Id = x.Id.ToString(),
|
||||
Category = GetNameCategory(x.Category),
|
||||
CategoryId = x.Category,
|
||||
Start = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
End = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate.ToString("yyyy-MM-dd"),
|
||||
Start = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
End = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate == null ? null : x.AnnouncementDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
Register_startDate = x.RegisterStartDate.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate.ToString("yyyy-MM-dd"),
|
||||
Register_startDate = x.RegisterStartDate == null ? null : x.RegisterStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate == null ? null : x.RegisterEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate == null ? null : x.PaymentStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate == null ? null : x.PaymentEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Title = x.Name,
|
||||
Image = x.PeriodExamImages.OrderBy(o => o.CreatedAt).FirstOrDefault() == null ?
|
||||
"" :
|
||||
|
|
@ -407,17 +407,17 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Id = x.Id.ToString(),
|
||||
Category = GetNameCategory(x.Category),
|
||||
CategoryId = x.Category,
|
||||
Start = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
End = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate.ToString("yyyy-MM-dd"),
|
||||
Start = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
End = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate == null ? null : x.AnnouncementDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
Register_startDate = x.RegisterStartDate.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate.ToString("yyyy-MM-dd"),
|
||||
Register_startDate = x.RegisterStartDate == null ? null : x.RegisterStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate == null ? null : x.RegisterEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate == null ? null : x.PaymentStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate == null ? null : x.PaymentEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Title = x.Name,
|
||||
Image = x.PeriodExamImages.OrderBy(o => o.CreatedAt).FirstOrDefault() == null ?
|
||||
"" :
|
||||
|
|
@ -454,15 +454,15 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
CategoryId = x.Category,
|
||||
Start = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
End = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate.ToString("yyyy-MM-dd"),
|
||||
ExamDate = x.ExamDate == null ? null : x.ExamDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_date = x.AnnouncementDate == null ? null : x.AnnouncementDate.Value.ToString("yyyy-MM-dd"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
Register_startDate = x.RegisterStartDate.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate.ToString("yyyy-MM-dd"),
|
||||
Register_startDate = x.RegisterStartDate == null ? null : x.RegisterStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Register_endDate = x.RegisterEndDate == null ? null : x.RegisterEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_startDate = x.PaymentStartDate == null ? null : x.PaymentStartDate.Value.ToString("yyyy-MM-dd"),
|
||||
Payment_endDate = x.PaymentEndDate == null ? null : x.PaymentEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
Title = x.Name,
|
||||
Detail = x.Detail,
|
||||
Images = x.PeriodExamImages.OrderBy(x => x.CreatedAt).Select(s => new HomePageLinkResponseItem
|
||||
|
|
@ -479,6 +479,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
Id = s.Id.ToString(),
|
||||
Title = s.PositionName == null ? x.Name : s.PositionName,
|
||||
HighDegree = s.HighDegree == true ? "ปริญญาขึ้นไป" : "ต่ำกว่าปริญญาตรี",
|
||||
Path = $"{x.Id}/{s.Id}",
|
||||
}).ToList(),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
var candidatePosition = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId && x.Status != "register" && x.Status != "rejectRegister");
|
||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId && x.RegisterDate != null && x.Status != "register" && x.Status != "rejectRegister");
|
||||
|
||||
return new RequestStatusRegistry
|
||||
{
|
||||
|
|
@ -1731,6 +1731,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var subject = "แจ้งผลการสมัครสอบคัดเลือก " + exam.Name;
|
||||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่ตรวจสอบข้อมูล";
|
||||
_mailService.SendMailToUser(subject, body, "ananda@frappet.com");
|
||||
if (candidate.RegisterDate == null)
|
||||
candidate.RegisterDate = DateTime.Now;
|
||||
}
|
||||
if (status == "checkPayment")
|
||||
{
|
||||
|
|
@ -1883,6 +1885,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
.Where(x => x.PeriodExam == exam && x.UserId == UserId)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
var positionName = "";
|
||||
var highDegree = "";
|
||||
if (positionId != "00000000-0000-0000-0000-000000000000")
|
||||
{
|
||||
var position = await _context.PositionExams.AsQueryable()
|
||||
|
|
@ -1894,6 +1898,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
candidate = await _context.Candidates.AsQueryable()
|
||||
.Where(x => x.PeriodExam == exam && x.UserId == UserId && x.PositionExam == position)
|
||||
.FirstOrDefaultAsync();
|
||||
positionName = position.PositionName;
|
||||
highDegree = position.HighDegree == true ? "ปริญญาขึ้นไป" : "ต่ำกว่าปริญญาตรี";
|
||||
}
|
||||
|
||||
if (candidate == null)
|
||||
|
|
@ -1918,8 +1924,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Number = candidate.Number,
|
||||
ReviewPoint = candidate.ReviewPoint,
|
||||
Review = candidate.Review,
|
||||
AnnouncementDate = exam.AnnouncementDate.AddYears(2),
|
||||
AnnouncementDate = exam.AnnouncementDate?.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
Position = positionName,
|
||||
HighDegree = highDegree,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1933,6 +1941,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate == null)
|
||||
throw new Exception(GlobalMessages.CandidateNotFound);
|
||||
|
||||
var positionName = "";
|
||||
var highDegree = "";
|
||||
if (candidate.PositionExam != null)
|
||||
{
|
||||
positionName = candidate.PositionExam.PositionName;
|
||||
highDegree = candidate.PositionExam.HighDegree == true ? "ปริญญาขึ้นไป" : "ต่ำกว่าปริญญาตรี";
|
||||
}
|
||||
|
||||
return new RequestCardCandidate
|
||||
{
|
||||
Avatar = candidate.ProfileImg == null ? "" : _minioService.ImagesPath(candidate.ProfileImg.Id).Result,
|
||||
|
|
@ -1952,8 +1968,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Number = candidate.Number,
|
||||
ReviewPoint = candidate.ReviewPoint,
|
||||
Review = candidate.Review,
|
||||
AnnouncementDate = candidate.PeriodExam?.AnnouncementDate.AddYears(2),
|
||||
AnnouncementDate = candidate.PeriodExam?.AnnouncementDate?.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
Position = positionName,
|
||||
HighDegree = highDegree,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
TypeName = b.TypeName,
|
||||
PositionId = b.PositionId,
|
||||
PositionName = b.PositionName,
|
||||
HighDegree = b.HighDegree,
|
||||
}).ToList(),
|
||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||
{
|
||||
|
|
@ -281,7 +282,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Status = DateTime.Now > periodExam.PaymentEndDate,
|
||||
Status = periodExam.PaymentEndDate == null ? true : DateTime.Now > periodExam.PaymentEndDate,
|
||||
SetSeat = periodExam.SetSeat,
|
||||
};
|
||||
}
|
||||
|
|
@ -380,6 +381,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PeriodExam = periodExam,
|
||||
PositionId = position.PositionId,
|
||||
PositionName = position.PositionName,
|
||||
HighDegree = position.HighDegree,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -503,6 +505,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
position.PositionId = positionData.PositionId;
|
||||
position.PositionName = positionData.PositionName;
|
||||
position.HighDegree = positionData.HighDegree;
|
||||
position.TypeId = positionData.TypeId;
|
||||
position.TypeName = positionData.TypeName;
|
||||
position.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -533,6 +536,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PeriodExam = periodExam,
|
||||
PositionId = position.PositionId,
|
||||
PositionName = position.PositionName,
|
||||
HighDegree = position.HighDegree,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -655,7 +659,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.ProfileImg)
|
||||
.OrderByDescending(d => d.CreatedAt)
|
||||
.Where(x => x.PeriodExam == periodExam && x.Status != "register" && x.Status != "rejectRegister")
|
||||
.Where(x => x.PeriodExam == periodExam && x.RegisterDate != null && x.Status != "register" && x.Status != "rejectRegister")
|
||||
.ToListAsync();
|
||||
if (candidate.Where(x => x.Status == "done").FirstOrDefault() != null)
|
||||
candidate = candidate.OrderBy(x => Convert.ToInt32(x.Number)).ToList();
|
||||
|
|
@ -918,7 +922,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
foreach (var candidate in candidates)
|
||||
{
|
||||
var item = items.FirstOrDefault(x => x.CitizenId == candidate.CitizenId && x.ExamIdenNumber.Trim().ToUpper() == candidate.ExamIdenNumber.Trim().ToUpper());
|
||||
if (candidate.ExamIdenNumber == null || candidate.CitizenId == null)
|
||||
continue;
|
||||
var item = items.FirstOrDefault(x => x.CitizenId == candidate.CitizenId && x.ExamIdenNumber == candidate.ExamIdenNumber);
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
|
|
@ -974,6 +980,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
|
||||
foreach (var candidate in candidates)
|
||||
{
|
||||
if (candidate.ExamIdenNumber == null || candidate.CitizenId == null)
|
||||
continue;
|
||||
var item = items.FirstOrDefault(x => x.CitizenId == candidate.CitizenId && x.ExamIdenNumber == candidate.ExamIdenNumber);
|
||||
|
||||
if (item != null)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue