เพิ่มรหัสตำแหน่ง
This commit is contained in:
parent
60eee3711d
commit
20b031c29f
8 changed files with 3023 additions and 6 deletions
|
|
@ -2519,6 +2519,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Data.Migrations
|
|||
.HasComment("PrimaryKey")
|
||||
.HasAnnotation("Relational:JsonPropertyName", "id");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รหัสประจำตำแหน่งที่สอบ");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
|
|
|
|||
2964
Migrations/20231004044601_Update Table Careers add code.Designer.cs
generated
Normal file
2964
Migrations/20231004044601_Update Table Careers add code.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
30
Migrations/20231004044601_Update Table Careers add code.cs
Normal file
30
Migrations/20231004044601_Update Table Careers add code.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateTableCareersaddcode : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Code",
|
||||
table: "PositionExams",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "รหัสประจำตำแหน่งที่สอบ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Code",
|
||||
table: "PositionExams");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -31,5 +31,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Models
|
|||
|
||||
[Comment("ปริญญาบัตรขึ้นไป")]
|
||||
public bool HighDegree { get; set; }
|
||||
|
||||
[Comment("รหัสประจำตำแหน่งที่สอบ")]
|
||||
public string? Code { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public Guid? PositionLevelId { get; set; }
|
||||
public string? PositionLevelName { get; set; }
|
||||
public bool HighDegree { get; set; }
|
||||
public string? Code { get; set; }
|
||||
public string? TypeId { get; set; }
|
||||
public string? TypeName { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ namespace BMA.EHR.Recurit.Exam.Service.Request
|
|||
public bool Position { get; set; }
|
||||
public bool Bank { get; set; }
|
||||
public bool Payment { get; set; }
|
||||
public bool CanRegister { get; set; }
|
||||
public string? Status { get; set; }
|
||||
public string? EditorCondition { get; set; }
|
||||
public string? EditorConfirm { get; set; }
|
||||
public PositionExam? PositionExam { get; set; }
|
||||
public DateTime? RegisterEndDate { get; set; }
|
||||
public DateTime? RegisterStartDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -617,7 +617,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
Payment = exam.Fee > 0,
|
||||
EditorCondition = exam.EditorCondition,
|
||||
EditorConfirm = exam.EditorConfirm,
|
||||
Position = candidatePosition == null ? false : true
|
||||
Position = candidatePosition == null ? false : true,
|
||||
CanRegister = exam.RegisterStartDate == null || exam.RegisterEndDate == null ? true : exam.RegisterStartDate.Value.Date <= DateTime.Now.Date && exam.RegisterEndDate.Value.Date >= DateTime.Now.Date,
|
||||
RegisterEndDate = exam.RegisterEndDate,
|
||||
RegisterStartDate = exam.RegisterStartDate,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1772,7 +1775,7 @@ 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.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
if (candidate.RegisterDate == null)
|
||||
candidate.RegisterDate = DateTime.Now;
|
||||
}
|
||||
|
|
@ -1780,7 +1783,7 @@ 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.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
}
|
||||
candidate.Status = status;
|
||||
|
||||
|
|
@ -1791,6 +1794,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
var candidate = await _context.Candidates.AsQueryable()
|
||||
.Include(x => x.PeriodExam)
|
||||
.Include(x => x.PositionExam)
|
||||
.FirstOrDefaultAsync(x => x.Id == Guid.Parse(candidateId));
|
||||
|
||||
if (candidate == null)
|
||||
|
|
@ -1831,7 +1835,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.Status = "checkSeat";
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
}
|
||||
else if (status == "payment" && candidate.PeriodExam.Fee != 0)
|
||||
{
|
||||
|
|
@ -1845,7 +1849,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
var body = candidate.FirstName + " " + candidate.LastName + " สถานะการสมัครสอบ: รอเจ้าหน้าที่จัดที่นั่งสอบ";
|
||||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
var num = periodExam.Count() + 1;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
candidate.PaymentDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
|
@ -1866,10 +1870,14 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
{
|
||||
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);
|
||||
|
||||
|
|
@ -1889,7 +1897,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
if (candidate.Email != null && candidate.Email != "") _mailService.SendMailToUser(subject, body, candidate.Email);
|
||||
candidate.Status = "checkSeat";
|
||||
var num = periodExam.Count() + 1 + _num;
|
||||
candidate.ExamIdenNumber = "CDC-" + num;
|
||||
candidate.ExamIdenNumber = candidate.PositionExam == null ? num.ToString() : candidate.PositionExam.Code + num;
|
||||
}
|
||||
else if (candidate.PeriodExam.Fee != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = b.PositionLevelId,
|
||||
PositionLevelName = b.PositionLevelName,
|
||||
HighDegree = b.HighDegree,
|
||||
Code = b.Code,
|
||||
}).ToList(),
|
||||
Documents = x.PeriodExamDocuments.OrderBy(o => o.CreatedAt).Select(b => new FileListResponse
|
||||
{
|
||||
|
|
@ -401,6 +402,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -529,6 +531,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
position.PositionLevelId = positionData.PositionLevelId;
|
||||
position.PositionLevelName = positionData.PositionLevelName;
|
||||
position.HighDegree = positionData.HighDegree;
|
||||
position.Code = positionData.Code;
|
||||
position.TypeId = positionData.TypeId;
|
||||
position.TypeName = positionData.TypeName;
|
||||
position.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -562,6 +565,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Services
|
|||
PositionLevelId = position.PositionLevelId,
|
||||
PositionLevelName = position.PositionLevelName,
|
||||
HighDegree = position.HighDegree,
|
||||
Code = position.Code,
|
||||
TypeId = position.TypeId,
|
||||
TypeName = position.TypeName,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue