migrate add ScoreExpireDate
All checks were successful
Build & Deploy on Dev / build (push) Successful in 48s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 48s
This commit is contained in:
parent
853b5c59f6
commit
b5567b5459
6 changed files with 1680 additions and 8 deletions
|
|
@ -480,6 +480,7 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
PaymentEndDate = req.PaymentEndDate,
|
||||
Note = req.Note,
|
||||
AnnouncementDate = req.AnnouncementDate,
|
||||
ScoreExpireDate = req.ScoreExpireDate,
|
||||
OrganizationId = req.rootDnaId,
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
@ -561,6 +562,8 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
data.ExamDate = req.ExamDate;
|
||||
data.Note = req.Note;
|
||||
data.AnnouncementDate = req.AnnouncementDate;
|
||||
if (req.ScoreExpireDate.HasValue)
|
||||
data.ScoreExpireDate = req.ScoreExpireDate;
|
||||
data.LastUpdatedAt = DateTime.Now;
|
||||
data.LastUpdateUserId = UserId ?? "";
|
||||
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
|
|
@ -1537,6 +1540,9 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
case "notpass":
|
||||
queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน");
|
||||
break;
|
||||
case "other":
|
||||
queryWithScores = queryWithScores.Where(x => x.score != null && !new[] { "ขส.", "ผ่าน", "ไม่ผ่าน" }.Contains(x.score.ExamStatus));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1820,11 +1826,15 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
Score = score == null ? 0.0 : score.TotalScore,
|
||||
Number = score == null ? "" : score.Number,
|
||||
ExamCount = _recruitService.GetExamCount(recruit.CitizenId),
|
||||
ScoreExpire = recruit.RecruitImport.AnnouncementDate == null
|
||||
// เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า)
|
||||
//ScoreExpire = recruit.RecruitImport.AnnouncementDate == null
|
||||
// ? ""
|
||||
// : recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||
// ? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate()
|
||||
// : "",
|
||||
ScoreExpire = recruit.RecruitImport.ScoreExpireDate == null
|
||||
? ""
|
||||
: recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate()
|
||||
: "",
|
||||
: recruit.RecruitImport.ScoreExpireDate.Value.ToThaiShortDate(),
|
||||
typeTest = recruit.typeTest,
|
||||
ScoreResult = score == null ? null : new
|
||||
{
|
||||
|
|
@ -2651,11 +2661,15 @@ namespace BMA.EHR.Recruit.Controllers
|
|||
T = score != null && score.TotalScore != null ? score.TotalScore.ToString().ToThaiNumber() : "",
|
||||
Result = score == null ? "" : score.ExamStatus,
|
||||
Number = score != null && score.Number != null ? score.Number.ToString().ToThaiNumber() : "",
|
||||
Expire = recruit.RecruitImport.AnnouncementDate == null
|
||||
// เดิมคำนวณวันหมดอายุจาก AnnouncementDate + 2 ปี (เก็บไว้สำหรับอ้างอิงข้อมูลเก่า)
|
||||
//Expire = recruit.RecruitImport.AnnouncementDate == null
|
||||
// ? ""
|
||||
// : recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||
// ? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber()
|
||||
// : "",
|
||||
Expire = recruit.RecruitImport.ScoreExpireDate == null
|
||||
? ""
|
||||
: recruit.RecruitImport.AnnouncementDate != DateTime.MinValue
|
||||
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber()
|
||||
: "",
|
||||
: recruit.RecruitImport.ScoreExpireDate.Value.ToThaiShortDate().ToString().ToThaiNumber(),
|
||||
};
|
||||
|
||||
var result = new
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue