fix : defect
This commit is contained in:
parent
54661ffbcb
commit
8ed5dc5805
34 changed files with 942 additions and 714 deletions
|
|
@ -1506,12 +1506,12 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
.Include(x => x.RecruitImport)
|
||||
.Include(x => x.Documents)
|
||||
.ThenInclude(x => x.DocumentFile)
|
||||
.Where(x => x.RecruitImport.Id == id)
|
||||
.Where(x => x.RecruitImport!.Id == id)
|
||||
.Where(x => x.ExamId == examId)
|
||||
.Join(_context.RecruitScores.AsQueryable()
|
||||
.Include(x => x.ScoreImport),
|
||||
rc => new { rc.RecruitImport.Year, rc.ExamId },
|
||||
sc => new { sc.ScoreImport.Year, sc.ExamId },
|
||||
rc => new { rc.RecruitImport!.Id, rc.ExamId },
|
||||
sc => new { Id = sc.ScoreImport!.RecruitImportId, sc.ExamId },
|
||||
(p, sr) => new
|
||||
{
|
||||
ExamID = p.ExamId,
|
||||
|
|
@ -1530,7 +1530,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
Remark = p.Remark,
|
||||
University = p.Educations.First().University,
|
||||
PositionName = p.PositionName,
|
||||
ExamName = p.RecruitImport.Name,
|
||||
ExamName = p.RecruitImport!.Name,
|
||||
ExamOrder = p.RecruitImport.Order,
|
||||
ExamYear = p.RecruitImport.Year.ToThaiYear(),
|
||||
Score = sr == null ? 0 : sr.SumA + sr.SumB + sr.SumC,
|
||||
|
|
@ -1846,10 +1846,13 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (data == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status500InternalServerError);
|
||||
|
||||
if (data_pass == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status500InternalServerError);
|
||||
|
||||
if (data_pass!.ScoreImport == null)
|
||||
return Error(GlobalMessages.InvalidExamScore, StatusCodes.Status500InternalServerError);
|
||||
|
||||
var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}";
|
||||
|
||||
|
|
@ -1950,10 +1953,13 @@ namespace BMA.EHR.Recruit.Service.Controllers
|
|||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (data == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status500InternalServerError);
|
||||
|
||||
if (data_pass == null)
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status500InternalServerError);
|
||||
|
||||
if (data_pass!.ScoreImport == null)
|
||||
return Error(GlobalMessages.InvalidExamScore, StatusCodes.Status500InternalServerError);
|
||||
|
||||
var header = $"{data.Name} ครั้งที่ {data.Order}/{data.Year.ToThaiYear()}";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue