เพิ่มวันประการศผลสอบ
This commit is contained in:
parent
2f01961dc5
commit
be27aa4d33
14 changed files with 1994 additions and 260 deletions
|
|
@ -1018,9 +1018,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime>("AnnouncementDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(5)
|
||||
.HasComment("วันประกาศผลสอบ");
|
||||
|
||||
b.Property<DateTime>("AnnouncementEndDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(6)
|
||||
.HasColumnOrder(7)
|
||||
.HasComment("วันสิ้นสุดประกาศ");
|
||||
|
||||
b.Property<bool>("AnnouncementExam")
|
||||
|
|
@ -1029,7 +1034,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
|
||||
b.Property<DateTime>("AnnouncementStartDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(5)
|
||||
.HasColumnOrder(6)
|
||||
.HasComment("วันเริ่มประกาศ");
|
||||
|
||||
b.Property<string>("Category")
|
||||
|
|
@ -1102,7 +1107,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("varchar(150)")
|
||||
.HasColumnOrder(7)
|
||||
.HasColumnOrder(8)
|
||||
.HasComment("ชื่อการสอบ");
|
||||
|
||||
b.Property<string>("Note")
|
||||
|
|
@ -1151,7 +1156,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
|
||||
b.Property<int?>("Round")
|
||||
.HasColumnType("int")
|
||||
.HasColumnOrder(8)
|
||||
.HasColumnOrder(9)
|
||||
.HasComment("รอบการสอบ");
|
||||
|
||||
b.Property<bool>("SetSeat")
|
||||
|
|
|
|||
1564
Migrations/20230428044121_update table candidate add anouncementDate.Designer.cs
generated
Normal file
1564
Migrations/20230428044121_update table candidate add anouncementDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,138 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetablecandidateaddanouncementDate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Round",
|
||||
table: "PeriodExams",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "รอบการสอบ",
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true,
|
||||
oldComment: "รอบการสอบ")
|
||||
.Annotation("Relational:ColumnOrder", 9)
|
||||
.OldAnnotation("Relational:ColumnOrder", 8);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "PeriodExams",
|
||||
type: "varchar(150)",
|
||||
maxLength: 150,
|
||||
nullable: false,
|
||||
comment: "ชื่อการสอบ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(150)",
|
||||
oldMaxLength: 150,
|
||||
oldComment: "ชื่อการสอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 8)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 7);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "AnnouncementStartDate",
|
||||
table: "PeriodExams",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
comment: "วันเริ่มประกาศ",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "วันเริ่มประกาศ")
|
||||
.Annotation("Relational:ColumnOrder", 6)
|
||||
.OldAnnotation("Relational:ColumnOrder", 5);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "AnnouncementEndDate",
|
||||
table: "PeriodExams",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
comment: "วันสิ้นสุดประกาศ",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "วันสิ้นสุดประกาศ")
|
||||
.Annotation("Relational:ColumnOrder", 7)
|
||||
.OldAnnotation("Relational:ColumnOrder", 6);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "AnnouncementDate",
|
||||
table: "PeriodExams",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
comment: "วันประกาศผลสอบ")
|
||||
.Annotation("Relational:ColumnOrder", 5);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AnnouncementDate",
|
||||
table: "PeriodExams");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Round",
|
||||
table: "PeriodExams",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "รอบการสอบ",
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true,
|
||||
oldComment: "รอบการสอบ")
|
||||
.Annotation("Relational:ColumnOrder", 8)
|
||||
.OldAnnotation("Relational:ColumnOrder", 9);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "PeriodExams",
|
||||
type: "varchar(150)",
|
||||
maxLength: 150,
|
||||
nullable: false,
|
||||
comment: "ชื่อการสอบ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(150)",
|
||||
oldMaxLength: 150,
|
||||
oldComment: "ชื่อการสอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.Annotation("Relational:ColumnOrder", 7)
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("Relational:ColumnOrder", 8);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "AnnouncementStartDate",
|
||||
table: "PeriodExams",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
comment: "วันเริ่มประกาศ",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "วันเริ่มประกาศ")
|
||||
.Annotation("Relational:ColumnOrder", 5)
|
||||
.OldAnnotation("Relational:ColumnOrder", 6);
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "AnnouncementEndDate",
|
||||
table: "PeriodExams",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
comment: "วันสิ้นสุดประกาศ",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "วันสิ้นสุดประกาศ")
|
||||
.Annotation("Relational:ColumnOrder", 6)
|
||||
.OldAnnotation("Relational:ColumnOrder", 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
{
|
||||
public class PeriodExam : EntityBase
|
||||
{
|
||||
[Required, MaxLength(150), Column(Order = 7), Comment("ชื่อการสอบ")]
|
||||
[Required, MaxLength(150), Column(Order = 8), Comment("ชื่อการสอบ")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ตรวจสอบเอกสารหลังประกาศผลสอบ")]
|
||||
|
|
@ -15,7 +15,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
[Required, Comment("คนพิการ")]
|
||||
public bool CheckDisability { get; set; } = false;
|
||||
|
||||
[Column(Order = 8), Comment("รอบการสอบ")]
|
||||
[Column(Order = 9), Comment("รอบการสอบ")]
|
||||
public int? Round { get; set; }
|
||||
|
||||
[Comment("ปีงบประมาณ")]
|
||||
|
|
@ -36,10 +36,13 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
[Required, Column(Order = 4), Comment("วันสิ้นสุดชำระเงิน")]
|
||||
public DateTime PaymentEndDate { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Column(Order = 5), Comment("วันเริ่มประกาศ")]
|
||||
[Required, Column(Order = 5), Comment("วันประกาศผลสอบ")]
|
||||
public DateTime AnnouncementDate { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Column(Order = 6), Comment("วันเริ่มประกาศ")]
|
||||
public DateTime AnnouncementStartDate { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Column(Order = 6), Comment("วันสิ้นสุดประกาศ")]
|
||||
[Required, Column(Order = 7), Comment("วันสิ้นสุดประกาศ")]
|
||||
public DateTime AnnouncementEndDate { get; set; } = DateTime.Now.Date;
|
||||
|
||||
[Required, Comment("วันที่สอบ")]
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public string? PointC { get; set; }
|
||||
public string? ResultC { get; set; }
|
||||
public string? Pass { get; set; }
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public DateTime PaymentEndDate { get; set; } = DateTime.Now.Date;
|
||||
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 Guid? OrganizationCodeId { get; set; }
|
||||
public string? OrganizationCodeName { get; set; }
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public class RequestPositionName
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Round { get; set; }
|
||||
public int? Year { get; set; }
|
||||
public PositionExam? Posiiton { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public class RequestStatusExam
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Round { get; set; }
|
||||
public int? Year { get; set; }
|
||||
public bool Status { get; set; }
|
||||
public bool SetSeat { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
public string? Start { get; set; }
|
||||
public string? End { get; set; }
|
||||
public string? ExamDate { get; set; }
|
||||
public string? Announcement_date { get; set; }
|
||||
public string? Announcement_startDate { get; set; }
|
||||
public string? Announcement_endDate { get; set; }
|
||||
public bool? AnnouncementExam { get; set; }
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Response
|
|||
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 Guid? OrganizationCodeId { get; set; }
|
||||
public string? OrganizationCodeName { get; set; }
|
||||
|
|
|
|||
|
|
@ -365,6 +365,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
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"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
|
|
@ -409,6 +410,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
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"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
|
|
@ -453,6 +455,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
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"),
|
||||
Announcement_startDate = x.AnnouncementStartDate.ToString("yyyy-MM-dd"),
|
||||
Announcement_endDate = x.AnnouncementEndDate.ToString("yyyy-MM-dd"),
|
||||
AnnouncementExam = x.AnnouncementExam,
|
||||
|
|
|
|||
|
|
@ -1898,6 +1898,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PointC = candidate.PointC,
|
||||
ResultC = candidate.ResultC,
|
||||
Pass = candidate.Pass,
|
||||
AnnouncementDate = exam.AnnouncementDate.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
};
|
||||
}
|
||||
|
|
@ -1906,6 +1907,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.ProfileImg)
|
||||
.Include(x => x.PeriodExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(candidateId));
|
||||
|
||||
if (candidate == null)
|
||||
|
|
@ -1927,6 +1929,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PointC = candidate.PointC,
|
||||
ResultC = candidate.ResultC,
|
||||
Pass = candidate.Pass,
|
||||
AnnouncementDate = candidate.PeriodExam?.AnnouncementDate.AddYears(2),
|
||||
Id = candidate.Id,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
ExamDate = x.ExamDate,
|
||||
AnnouncementEndDate = x.AnnouncementEndDate,
|
||||
AnnouncementStartDate = x.AnnouncementStartDate,
|
||||
AnnouncementDate = x.AnnouncementDate,
|
||||
CheckDisability = x.CheckDisability,
|
||||
CheckDocument = x.CheckDocument,
|
||||
Detail = x.Detail,
|
||||
|
|
@ -100,6 +101,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
ExamDate = x.ExamDate,
|
||||
AnnouncementEndDate = x.AnnouncementEndDate,
|
||||
AnnouncementStartDate = x.AnnouncementStartDate,
|
||||
AnnouncementDate = x.AnnouncementDate,
|
||||
CheckDisability = x.CheckDisability,
|
||||
CheckDocument = x.CheckDocument,
|
||||
Detail = x.Detail,
|
||||
|
|
@ -188,6 +190,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
return new RequestStatusExam
|
||||
{
|
||||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Status = DateTime.Now > periodExam.PaymentEndDate,
|
||||
SetSeat = periodExam.SetSeat,
|
||||
};
|
||||
|
|
@ -207,6 +211,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
return new RequestPositionName
|
||||
{
|
||||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Posiiton = periodExam.PositionExam.FirstOrDefault(x => x.Id == Guid.Parse(positionId) && x.PeriodExam == periodExam),
|
||||
};
|
||||
}
|
||||
|
|
@ -215,6 +221,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
return new RequestPositionName
|
||||
{
|
||||
Name = periodExam.Name,
|
||||
Round = periodExam.Round,
|
||||
Year = periodExam.Year,
|
||||
Posiiton = null,
|
||||
};
|
||||
}
|
||||
|
|
@ -235,6 +243,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PaymentStartDate = inserted.PaymentStartDate,
|
||||
PaymentEndDate = inserted.PaymentEndDate,
|
||||
AnnouncementStartDate = inserted.AnnouncementStartDate,
|
||||
AnnouncementDate = inserted.AnnouncementDate,
|
||||
ExamDate = inserted.ExamDate,
|
||||
AnnouncementEndDate = inserted.AnnouncementEndDate,
|
||||
OrganizationCodeId = inserted.OrganizationCodeId,
|
||||
|
|
@ -324,6 +333,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
periodExam.PaymentStartDate = updated.PaymentStartDate;
|
||||
periodExam.PaymentEndDate = updated.PaymentEndDate;
|
||||
periodExam.AnnouncementStartDate = updated.AnnouncementStartDate;
|
||||
periodExam.AnnouncementDate = updated.AnnouncementDate;
|
||||
periodExam.ExamDate = updated.ExamDate;
|
||||
periodExam.AnnouncementEndDate = updated.AnnouncementEndDate;
|
||||
periodExam.OrganizationCodeId = updated.OrganizationCodeId;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue