เพิ่มฟิลที่นั่งสอบ
This commit is contained in:
parent
5c7a655a66
commit
a93dcbbd20
10 changed files with 1285 additions and 15 deletions
|
|
@ -270,6 +270,16 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
||||||
b.Property<Guid?>("RelationshipId")
|
b.Property<Guid?>("RelationshipId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<string>("SeatNumber")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("เลขที่นั่งสอบ");
|
||||||
|
|
||||||
|
b.Property<string>("Status")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("varchar(20)")
|
||||||
|
.HasComment("สถานะผู้สมัคร");
|
||||||
|
|
||||||
b.Property<string>("Telephone")
|
b.Property<string>("Telephone")
|
||||||
.HasMaxLength(20)
|
.HasMaxLength(20)
|
||||||
.HasColumnType("varchar(20)")
|
.HasColumnType("varchar(20)")
|
||||||
|
|
@ -281,12 +291,6 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
||||||
.HasColumnType("varchar(40)")
|
.HasColumnType("varchar(40)")
|
||||||
.HasComment("User Id ผู้สมัคร");
|
.HasComment("User Id ผู้สมัคร");
|
||||||
|
|
||||||
b.Property<string>("status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(20)
|
|
||||||
.HasColumnType("varchar(20)")
|
|
||||||
.HasComment("สถานะผู้สมัคร");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("CitizenDistrictId");
|
b.HasIndex("CitizenDistrictId");
|
||||||
|
|
|
||||||
1220
Migrations/20230329044404_Update table Candidate add seatnumber.Designer.cs
generated
Normal file
1220
Migrations/20230329044404_Update table Candidate add seatnumber.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 UpdatetableCandidateaddseatnumber : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "status",
|
||||||
|
table: "Candidates",
|
||||||
|
newName: "Status");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "SeatNumber",
|
||||||
|
table: "Candidates",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "เลขที่นั่งสอบ")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "SeatNumber",
|
||||||
|
table: "Candidates");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Status",
|
||||||
|
table: "Candidates",
|
||||||
|
newName: "status");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -14,6 +14,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
||||||
|
|
||||||
[Required, MaxLength(20), Comment("สถานะผู้สมัคร")]
|
[Required, MaxLength(20), Comment("สถานะผู้สมัคร")]
|
||||||
public string Status { get; set; } = "register";
|
public string Status { get; set; } = "register";
|
||||||
|
[Comment("เลขที่นั่งสอบ")]
|
||||||
|
public string? SeatNumber { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
||||||
public int? Round { get; set; }
|
public int? Round { get; set; }
|
||||||
|
|
||||||
[Comment("ค่าธรรมเนียม")]
|
[Comment("ค่าธรรมเนียม")]
|
||||||
public float? Fee { get; set; }
|
public float? Fee { get; set; } = 0;
|
||||||
|
|
||||||
[Comment("ปีงบประมาณ")]
|
[Comment("ปีงบประมาณ")]
|
||||||
public int? Year { get; set; }
|
public int? Year { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "https://localhost:7007;http://localhost:5261",
|
"applicationUrl": "https://localhost:7007;http://localhost:5262",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"applicationUrl": "http://localhost:5261"
|
"applicationUrl": "http://localhost:5262"
|
||||||
},
|
},
|
||||||
"https": {
|
"https": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
|
|
@ -28,13 +28,13 @@
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"applicationUrl": "https://localhost:7007;http://localhost:5261"
|
"applicationUrl": "https://localhost:7007;http://localhost:5262"
|
||||||
},
|
},
|
||||||
"https-api": {
|
"https-api": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "https://localhost:7007;http://localhost:5261",
|
"applicationUrl": "https://localhost:7007;http://localhost:5262",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
if (exam == null)
|
if (exam == null)
|
||||||
throw new Exception(GlobalMessages.ExamNotFound);
|
throw new Exception(GlobalMessages.ExamNotFound);
|
||||||
|
|
||||||
|
var _candidateNumber = await _context.Candidates.AsQueryable()
|
||||||
|
.CountAsync(x => x.PeriodExam == exam);
|
||||||
|
|
||||||
var _candidate = await _context.Candidates.AsQueryable()
|
var _candidate = await _context.Candidates.AsQueryable()
|
||||||
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId);
|
.FirstOrDefaultAsync(x => x.PeriodExam == exam && x.UserId == UserId);
|
||||||
if (_candidate == null)
|
if (_candidate == null)
|
||||||
|
|
@ -257,6 +260,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
||||||
CreatedFullName = FullName ?? "",
|
CreatedFullName = FullName ?? "",
|
||||||
LastUpdateFullName = FullName ?? "",
|
LastUpdateFullName = FullName ?? "",
|
||||||
UserId = UserId ?? "",
|
UserId = UserId ?? "",
|
||||||
|
SeatNumber = "CDC-" + (_candidateNumber + 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
await _context.Candidates.AddAsync(candidate);
|
await _context.Candidates.AddAsync(candidate);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
},
|
},
|
||||||
"Jwt": {
|
"Jwt": {
|
||||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||||
"Issuer": "https://identity.frappet.com/realms/bma-ehr-exam"
|
"Issuer": "https://identity.frappet.com/realms/bma-ehr"
|
||||||
},
|
},
|
||||||
"EPPlus": {
|
"EPPlus": {
|
||||||
"ExcelPackage": {
|
"ExcelPackage": {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
},
|
},
|
||||||
"Jwt": {
|
"Jwt": {
|
||||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||||
"Issuer": "https://identity.frappet.com/realms/bma-ehr-exam"
|
"Issuer": "https://identity.frappet.com/realms/bma-ehr"
|
||||||
},
|
},
|
||||||
"EPPlus": {
|
"EPPlus": {
|
||||||
"ExcelPackage": {
|
"ExcelPackage": {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"realm": "bma-ehr-exam",
|
"realm": "bma-ehr",
|
||||||
"auth-server-url": "https://identity.frappet.com",
|
"auth-server-url": "https://identity.frappet.com",
|
||||||
"ssl-required": "external",
|
"ssl-required": "external",
|
||||||
"resource": "bma-ehr-exam",
|
"resource": "bma-ehr",
|
||||||
"public-client": true
|
"public-client": true
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue