Add API
ส่งออกข้อมูลผู้มิสิทธื์สอบ ส่งออกข้อมูลผู้สอบผ่านภาค ก.
This commit is contained in:
parent
b8109e80ac
commit
b1f8c78ced
34 changed files with 5935 additions and 8 deletions
|
|
@ -58,4 +58,13 @@
|
|||
<Folder Include="Controllers\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Templates\ExamList.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Templates\PassAExamList.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ using Sentry;
|
|||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Data;
|
||||
using System.Net;
|
||||
using System.Net.WebSockets;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
|
||||
|
|
@ -396,6 +397,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
PaymentStartDate = req.PaymentStartDate,
|
||||
PaymentEndDate = req.PaymentEndDate,
|
||||
Note = req.Note,
|
||||
AnnouncementDate = req.AnnouncementDate,
|
||||
});
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -445,6 +447,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
data.PaymentStartDate = req.PaymentStartDate;
|
||||
data.ExamDate = req.ExamDate;
|
||||
data.Note = req.Note;
|
||||
data.AnnouncementDate = req.AnnouncementDate;
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
|
|
@ -662,6 +665,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
r.CitizenCardIssuer = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardIssue)]?.GetValue<string>();
|
||||
r.CitizenCardExpireDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardExpireDate)]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-"));
|
||||
r.ApplyDate = (DateTime)workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ApplyDate)]?.GetValue<DateTime>();
|
||||
r.PositionName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PositionName)]?.GetValue<string>().IsNull("");
|
||||
|
||||
|
||||
// address
|
||||
|
|
@ -975,7 +979,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
r.CitizenCardIssuer = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardIssue)]?.GetValue<string>();
|
||||
r.CitizenCardExpireDate = Convert.ToDateTime(workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PersonalCardExpireDate)]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-"));
|
||||
r.ApplyDate = (DateTime)workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.ApplyDate)]?.GetValue<DateTime>();
|
||||
|
||||
r.PositionName = workSheet?.Cells[row, GetColumnIndex(cols, CandidateFileHeader.PositionName)]?.GetValue<string>().IsNull("");
|
||||
|
||||
// address
|
||||
r.Addresses.Add(new RecruitAddress()
|
||||
|
|
@ -1169,10 +1173,12 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
r.FullA = (int)workSheet?.Cells[7, 7]?.GetValue<string>().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger();
|
||||
r.SumA = workSheet?.Cells[row, 7]?.GetValue<string>() == "ขส." ? 0 : (int)workSheet?.Cells[row, 7]?.GetValue<string>().Replace(".00", "").ToInteger();
|
||||
r.PercentageA = workSheet?.Cells[row, 8]?.GetValue<string>() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 8]?.GetValue<double>();
|
||||
r.AStatus = workSheet?.Cells[row, 9]?.GetValue<string>();
|
||||
|
||||
r.FullB = (int)workSheet?.Cells[7, 12]?.GetValue<string>().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger();
|
||||
r.SumB = workSheet?.Cells[row, 12]?.GetValue<string>() == "ขส." ? 0 : (int)workSheet?.Cells[row, 12]?.GetValue<string>().Replace(".00", "").ToInteger();
|
||||
r.PercentageB = workSheet?.Cells[row, 13]?.GetValue<string>() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 13]?.GetValue<double>();
|
||||
r.BStatus = workSheet?.Cells[row, 14]?.GetValue<string>();
|
||||
|
||||
r.SumAB = workSheet?.Cells[row, 15]?.GetValue<string>() == "ขส." ? 0 : (int)workSheet?.Cells[row, 15]?.GetValue<string>().Replace(".00", "").ToInteger();
|
||||
r.ABStatus = workSheet?.Cells[row, 17]?.GetValue<string>();
|
||||
|
|
@ -1180,6 +1186,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
r.FullC = (int)workSheet?.Cells[7, 20]?.GetValue<string>().Replace("(", "").Replace(")", "").Replace("คะแนน", "").Trim().ToInteger();
|
||||
r.SumC = workSheet?.Cells[row, 20]?.GetValue<string>() == "ขส." ? 0 : (int)workSheet?.Cells[row, 20]?.GetValue<string>().Replace(".00", "").ToInteger();
|
||||
r.PercentageC = workSheet?.Cells[row, 21]?.GetValue<string>() == "ขส." ? 0.0 : (double)workSheet?.Cells[row, 21]?.GetValue<double>();
|
||||
r.CStatus = workSheet?.Cells[row, 22]?.GetValue<string>();
|
||||
|
||||
r.ExamStatus = workSheet?.Cells[row, 24]?.GetValue<string>();
|
||||
r.Major = workSheet.Name;
|
||||
|
|
@ -1434,6 +1441,226 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
|
||||
#endregion
|
||||
|
||||
#region " For CMS "
|
||||
|
||||
[HttpGet("competitive")]
|
||||
[AllowAnonymous]
|
||||
public IActionResult GetPeriodForCMS()
|
||||
{
|
||||
try
|
||||
{
|
||||
var periods = _context.RecruitImports.AsQueryable()
|
||||
.Select(r => new
|
||||
{
|
||||
id = r.Id,
|
||||
title = $"{r.Name} ครั้งที่ {r.Order}/{r.Year.ToThaiYear()}",
|
||||
category = "สำนักงาน ก.ก.",
|
||||
category_id = 1,
|
||||
announcement_startDate = r.AnnouncementStartDate == null ? "" : r.AnnouncementStartDate.Value.ToString("yyyy-mm-dd"),
|
||||
announcement_endDate = r.AnnouncementEndDate == null ? "" : r.AnnouncementEndDate.Value.ToString("yyyy-MM-dd"),
|
||||
announcementExam = true,
|
||||
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();
|
||||
|
||||
return Ok(periods);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return StatusCode(500, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Export Excel "
|
||||
|
||||
[HttpGet("export/exam/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> ExportExamAsync(Guid id)
|
||||
{
|
||||
var data = await _context.RecruitImports.AsQueryable()
|
||||
.Include(x => x.Recruits)
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (data == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
|
||||
var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}";
|
||||
|
||||
var template_dir = Path.Combine(_webHostEnvironment.ContentRootPath, "Templates");
|
||||
|
||||
var template_file = Path.Combine(template_dir, "ExamList.xlsx");
|
||||
|
||||
var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp");
|
||||
if (!Directory.Exists(tmpDir))
|
||||
Directory.CreateDirectory(tmpDir);
|
||||
|
||||
var exportFile = Path.Combine(tmpDir, $"ExamList_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx");
|
||||
try
|
||||
{
|
||||
// copy template
|
||||
System.IO.File.Copy(template_file, exportFile);
|
||||
|
||||
using (var excel = new ExcelPackage(new FileInfo(exportFile)))
|
||||
{
|
||||
var workSheet = excel.Workbook.Worksheets[0];
|
||||
|
||||
|
||||
workSheet.Cells[1, 2].Value = header;
|
||||
var recruits = data.Recruits.OrderBy(x => x.ExamId).ToList();
|
||||
|
||||
var row = 4; // start at row 4
|
||||
foreach (var item in recruits)
|
||||
{
|
||||
workSheet.Cells[row, 1].Value = item.ExamId;
|
||||
workSheet.Cells[row, 2].Value = item.CitizenId;
|
||||
workSheet.Cells[row, 3].Value = $"{item.Prefix}{item.FirstName} {item.LastName}";
|
||||
workSheet.Cells[row, 4].Value = item.PositionName;
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
excel.Save();
|
||||
|
||||
using (FileStream fs = new FileStream(exportFile, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
byte[] bytes = System.IO.File.ReadAllBytes(exportFile);
|
||||
fs.Read(bytes, 0, System.Convert.ToInt32(fs.Length));
|
||||
fs.Close();
|
||||
|
||||
var fname = Path.GetFileName(exportFile);
|
||||
|
||||
Response.Headers["Content-Disposition"] = $"inline; filename={fname}";
|
||||
|
||||
var ret = new FileContentResult(bytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
FileDownloadName = fname
|
||||
};
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex, "ไม่สามารถส่งออกรายชื่อผู้มีสิทธิ์สอบได้!!");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (System.IO.File.Exists(exportFile))
|
||||
System.IO.File.Delete(exportFile);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("export/pass-exam/{id:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> ExportPassExamAsync(Guid id)
|
||||
{
|
||||
var data = await _context.RecruitImports.AsQueryable()
|
||||
.Include(x => x.Recruits)
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
var data_pass = await _context.RecruitImports.AsQueryable()
|
||||
.Include(x => x.ScoreImport)
|
||||
.ThenInclude(x => x.Scores)
|
||||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (data == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
|
||||
if(data_pass == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
|
||||
var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}";
|
||||
|
||||
var template_dir = Path.Combine(_webHostEnvironment.ContentRootPath, "Templates");
|
||||
|
||||
var template_file = Path.Combine(template_dir, "PassAExamList.xlsx");
|
||||
|
||||
var tmpDir = Path.Combine(_webHostEnvironment.ContentRootPath, "tmp");
|
||||
if (!Directory.Exists(tmpDir))
|
||||
Directory.CreateDirectory(tmpDir);
|
||||
|
||||
var exportFile = Path.Combine(tmpDir, $"PassExamList_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx");
|
||||
|
||||
try
|
||||
{
|
||||
var result = (from r in data.Recruits.ToList()
|
||||
join s in data_pass.ScoreImport.Scores.Where(x => x.AStatus == "ผ่าน").ToList() on r.ExamId equals s.ExamId
|
||||
select new
|
||||
{
|
||||
r.ExamId,
|
||||
r.CitizenId,
|
||||
r.Prefix,
|
||||
r.FirstName,
|
||||
r.LastName,
|
||||
s.FullA,
|
||||
s.SumA,
|
||||
s.AStatus
|
||||
}).ToList();
|
||||
|
||||
// copy template
|
||||
System.IO.File.Copy(template_file, exportFile);
|
||||
|
||||
using (var excel = new ExcelPackage(new FileInfo(exportFile)))
|
||||
{
|
||||
var workSheet = excel.Workbook.Worksheets[0];
|
||||
|
||||
|
||||
workSheet.Cells[1, 2].Value = header;
|
||||
var recruits = data.Recruits.OrderBy(x => x.ExamId).ToList();
|
||||
|
||||
var row = 4; // start at row 4
|
||||
foreach (var item in result)
|
||||
{
|
||||
workSheet.Cells[row, 1].Value = item.ExamId;
|
||||
workSheet.Cells[row, 2].Value = item.CitizenId;
|
||||
workSheet.Cells[row, 3].Value = $"{item.Prefix}{item.FirstName} {item.LastName}";
|
||||
workSheet.Cells[row, 4].Value = item.FullA;
|
||||
workSheet.Cells[row, 5].Value = item.SumA;
|
||||
workSheet.Cells[row, 6].Value = "";
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
excel.Save();
|
||||
|
||||
using (FileStream fs = new FileStream(exportFile, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
byte[] bytes = System.IO.File.ReadAllBytes(exportFile);
|
||||
fs.Read(bytes, 0, System.Convert.ToInt32(fs.Length));
|
||||
fs.Close();
|
||||
|
||||
var fname = Path.GetFileName(exportFile);
|
||||
|
||||
Response.Headers["Content-Disposition"] = $"inline; filename={fname}";
|
||||
|
||||
var ret = new FileContentResult(bytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
FileDownloadName = fname
|
||||
};
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex, "ไม่สามารถส่งออกรายชื่อผู้สอบผ่านได้!!");
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (System.IO.File.Exists(exportFile))
|
||||
System.IO.File.Delete(exportFile);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
1338
Migrations/20230424015003_Add Field PositionName.Designer.cs
generated
Normal file
1338
Migrations/20230424015003_Add Field PositionName.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
29
Migrations/20230424015003_Add Field PositionName.cs
Normal file
29
Migrations/20230424015003_Add Field PositionName.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddFieldPositionName : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionName",
|
||||
table: "Recruits",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionName",
|
||||
table: "Recruits");
|
||||
}
|
||||
}
|
||||
}
|
||||
1353
Migrations/20230424053822_Add Field Exam Part Result.Designer.cs
generated
Normal file
1353
Migrations/20230424053822_Add Field Exam Part Result.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
57
Migrations/20230424053822_Add Field Exam Part Result.cs
Normal file
57
Migrations/20230424053822_Add Field Exam Part Result.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddFieldExamPartResult : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AStatus",
|
||||
table: "RecruitScores",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BStatus",
|
||||
table: "RecruitScores",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CStatus",
|
||||
table: "RecruitScores",
|
||||
type: "varchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AStatus",
|
||||
table: "RecruitScores");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BStatus",
|
||||
table: "RecruitScores");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CStatus",
|
||||
table: "RecruitScores");
|
||||
}
|
||||
}
|
||||
}
|
||||
1353
Migrations/20230425031716_Add Field AnnouncementDate.Designer.cs
generated
Normal file
1353
Migrations/20230425031716_Add Field AnnouncementDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
22
Migrations/20230425031716_Add Field AnnouncementDate.cs
Normal file
22
Migrations/20230425031716_Add Field AnnouncementDate.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddFieldAnnouncementDate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1358
Migrations/20230425050104_Add Field AnnouncementDate2.Designer.cs
generated
Normal file
1358
Migrations/20230425050104_Add Field AnnouncementDate2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
31
Migrations/20230425050104_Add Field AnnouncementDate2.cs
Normal file
31
Migrations/20230425050104_Add Field AnnouncementDate2.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recruit.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddFieldAnnouncementDate2 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "AnnouncementDate",
|
||||
table: "RecruitImports",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "วันที่ประกาศผลสอบ")
|
||||
.Annotation("Relational:ColumnOrder", 14);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AnnouncementDate",
|
||||
table: "RecruitImports");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +161,9 @@ namespace BMA.EHR.Recruit.Service.Migrations
|
|||
.HasMaxLength(200)
|
||||
.HasColumnType("varchar(200)");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
|
|
@ -593,6 +596,11 @@ namespace BMA.EHR.Recruit.Service.Migrations
|
|||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<DateTime?>("AnnouncementDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(14)
|
||||
.HasComment("วันที่ประกาศผลสอบ");
|
||||
|
||||
b.Property<DateTime?>("AnnouncementEndDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(7)
|
||||
|
|
@ -1002,6 +1010,21 @@ namespace BMA.EHR.Recruit.Service.Migrations
|
|||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("AStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("BStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<string>("CStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("varchar(50)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
|
|
|
|||
|
|
@ -75,5 +75,7 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
|
|||
public DateTime ModifiedDate { get; set; }
|
||||
|
||||
public DateTime ApplyDate { get; set; }
|
||||
|
||||
public string? PositionName { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
|
|||
[Column(Order = 13, TypeName = "text"), Comment("หมายเหตุ")]
|
||||
public string? Note { get; set; }
|
||||
|
||||
[Column(Order = 14), Comment("วันที่ประกาศผลสอบ")]
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
|
||||
public Document ImportFile { get; set; } = new Document();
|
||||
|
||||
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
||||
|
|
|
|||
|
|
@ -13,12 +13,18 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
|
|||
|
||||
public double PercentageA { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string AStatus { get; set; }
|
||||
|
||||
public int SumB { get; set; }
|
||||
|
||||
public int FullB { get; set; }
|
||||
|
||||
public double PercentageB { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string BStatus { get; set; }
|
||||
|
||||
public int SumAB { get; set; }
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
|
|
@ -30,6 +36,9 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
|
|||
|
||||
public double PercentageC { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string CStatus { get; set; }
|
||||
|
||||
[Required, MaxLength(50)]
|
||||
public string ExamStatus { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
public static string PersonalCardIssue = "CusIDFrom";
|
||||
public static string PersonalCardExpireDate = "CusIDExpireDate";
|
||||
public static string ApplyDate = "DateTime";
|
||||
public static string PositionName = "PositionName";
|
||||
|
||||
// Address
|
||||
public static string Address = "Address";
|
||||
|
|
|
|||
|
|
@ -77,5 +77,10 @@ namespace BMA.EHR.Recruit.Service.Requests.Recruits
|
|||
/// หมายเหตุ
|
||||
/// </summary>
|
||||
public string? Note { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// วันที่ประกาศผลสอบ
|
||||
/// </summary>
|
||||
public DateTime? AnnouncementDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
Templates/ExamList.xlsx
Normal file
BIN
Templates/ExamList.xlsx
Normal file
Binary file not shown.
BIN
Templates/PassAExamList.xlsx
Normal file
BIN
Templates/PassAExamList.xlsx
Normal file
Binary file not shown.
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MongoConnection": "mongodb://127.0.0.1:27017",
|
||||
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
|
||||
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -257,6 +257,54 @@
|
|||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldtoRecruitImportTableforSupportCMS.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Requests.Recruits.PostRecruitImportRequest">
|
||||
<summary>
|
||||
ตัวแปรสำหรับสร้างข้อมูลการสอบแข่งขัน
|
||||
|
|
@ -327,6 +375,11 @@
|
|||
หมายเหตุ
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:BMA.EHR.Recruit.Service.Requests.Recruits.PostRecruitImportRequest.AnnouncementDate">
|
||||
<summary>
|
||||
วันที่ประกาศผลสอบ
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:BMA.EHR.Recruit.Service.Requests.Recruits.RecruitExamRequest.ExamAttribute">
|
||||
<summary>
|
||||
ข้อมูลคุณสมบัติของผู้เข้าสอบ โดยส่งมาจากหน้าจอ 'มีคุณสมบัติ' 'ขาดคุณสมบัติ'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MongoConnection": "mongodb://127.0.0.1:27017",
|
||||
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"MongoConnection": "mongodb://admin:adminVM123@127.0.0.1:27017",
|
||||
"DefaultConnection": "server=127.0.0.1;user=root;password=P@ssw0rd;port=3308;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.9;user=root;password=adminVM123;port=3306;database=bma_recruit;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
64f21d3b57f158bdc0838033ac2cfe760996c5e9
|
||||
b52ef2e214d5bf58c54319b97ef5fd93e089c214
|
||||
|
|
|
|||
|
|
@ -898,3 +898,5 @@ D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\obj\Debug\net7.0\BMA.EHR.Recru
|
|||
D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\obj\Debug\net7.0\BMA.EHR.Recruit.Service.pdb
|
||||
D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\obj\Debug\net7.0\BMA.EHR.Recruit.Service.genruntimeconfig.cache
|
||||
D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\obj\Debug\net7.0\ref\BMA.EHR.Recruit.Service.dll
|
||||
D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\bin\Debug\net7.0\Templates\ExamList.xlsx
|
||||
D:\Develop\Source\BMA-EHR\BMA-EHR-Recruit-Service\bin\Debug\net7.0\Templates\PassAExamList.xlsx
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -257,6 +257,54 @@
|
|||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldtoRecruitImportTableforSupportCMS.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldPositionName.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldExamPartResult.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.Up(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.Down(Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:BMA.EHR.Recruit.Service.Migrations.AddFieldAnnouncementDate2.BuildTargetModel(Microsoft.EntityFrameworkCore.ModelBuilder)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:BMA.EHR.Recruit.Service.Requests.Recruits.PostRecruitImportRequest">
|
||||
<summary>
|
||||
ตัวแปรสำหรับสร้างข้อมูลการสอบแข่งขัน
|
||||
|
|
@ -327,6 +375,11 @@
|
|||
หมายเหตุ
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:BMA.EHR.Recruit.Service.Requests.Recruits.PostRecruitImportRequest.AnnouncementDate">
|
||||
<summary>
|
||||
วันที่ประกาศผลสอบ
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:BMA.EHR.Recruit.Service.Requests.Recruits.RecruitExamRequest.ExamAttribute">
|
||||
<summary>
|
||||
ข้อมูลคุณสมบัติของผู้เข้าสอบ โดยส่งมาจากหน้าจอ 'มีคุณสมบัติ' 'ขาดคุณสมบัติ'
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
BIN
tmp/รายชื่อผู้สอบผ่านภาค_ก.xlsx
Normal file
BIN
tmp/รายชื่อผู้สอบผ่านภาค_ก.xlsx
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue