change column 9999 to null
This commit is contained in:
parent
3080eaca49
commit
eda64c053a
1 changed files with 20 additions and 20 deletions
|
|
@ -1281,18 +1281,18 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
r.LastName = workSheet?.Cells[row, 8]?.GetValue<string>() ?? "";
|
||||
r.Gendor = workSheet?.Cells[row, 98]?.GetValue<string>() ?? "";
|
||||
r.National = workSheet?.Cells[row, 9]?.GetValue<string>() ?? "";
|
||||
r.Race = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.Race = "";//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.Religion = workSheet?.Cells[row, 10]?.GetValue<string>() ?? "";
|
||||
r.DateOfBirth = !string.IsNullOrWhiteSpace(workSheet?.Cells[row, 11]?.GetValue<string>()) ? _disableService.CheckDateTime(workSheet?.Cells[row, 11]?.GetValue<string>() ?? "", "dd/MM/yyyy") : DateTime.MinValue;
|
||||
r.CitizenId = workSheet?.Cells[row, 12]?.GetValue<string>() ?? "";
|
||||
r.typeTest = workSheet?.Cells[row, 13]?.GetValue<string>() ?? "";
|
||||
r.Marry = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.Marry = "";//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.Isspecial = "N";
|
||||
r.CitizenCardIssuer = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.CitizenCardExpireDate = Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-"));
|
||||
r.CitizenCardIssuer = "";//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.CitizenCardExpireDate = DateTime.MinValue;//Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-"));
|
||||
r.ApplyDate = !string.IsNullOrWhiteSpace(workSheet?.Cells[row, 87]?.GetValue<string>()) ? _disableService.CheckDateTime(workSheet?.Cells[row, 87]?.GetValue<string>() ?? "", "dd/MM/yyyy") : DateTime.MinValue;
|
||||
r.PositionType = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.PositionLevel = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.PositionType = "";//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
r.PositionLevel = "";//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "";
|
||||
|
||||
r.CreatedAt = DateTime.Now;
|
||||
r.CreatedUserId = UserId ?? "";
|
||||
|
|
@ -1306,11 +1306,11 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
{
|
||||
Degree = workSheet?.Cells[row, 18]?.GetValue<string>() ?? "",
|
||||
Major = workSheet?.Cells[row, 19]?.GetValue<string>() == "อื่น ๆ" ? workSheet?.Cells[row, 20]?.GetValue<string>() ?? "" : workSheet?.Cells[row, 19]?.GetValue<string>() ?? "",
|
||||
MajorGroupId = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
MajorGroupName = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
MajorGroupId = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
MajorGroupName = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
University = workSheet?.Cells[row, 21]?.GetValue<string>() == "อื่น ๆ" ? workSheet?.Cells[row, 22]?.GetValue<string>() ?? "" : workSheet?.Cells[row, 21]?.GetValue<string>() ?? "",
|
||||
GPA = (double)workSheet?.Cells[row, 26]?.GetValue<double>(),
|
||||
Specialist = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Specialist = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
HighDegree = workSheet?.Cells[row, 27]?.GetValue<string>() ?? "",
|
||||
BachelorDate = !string.IsNullOrWhiteSpace(workSheet?.Cells[row, 25]?.GetValue<string>()) ? _disableService.CheckDateTime(workSheet?.Cells[row, 11]?.GetValue<string>() ?? "", "dd/MM/yyyy") : DateTime.MinValue,
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -1327,8 +1327,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Occupation = workSheet?.Cells[row, 33]?.GetValue<string>() == "อื่น ๆ" ? workSheet?.Cells[row, 34]?.GetValue<string>() ?? "" : workSheet?.Cells[row, 33]?.GetValue<string>() ?? "",
|
||||
Position = workSheet?.Cells[row, 37]?.GetValue<string>() ?? "",
|
||||
Workplace = $"{(workSheet?.Cells[row, 36]?.GetValue<string>() ?? "")} {(workSheet?.Cells[row, 35]?.GetValue<string>() ?? "")}",
|
||||
Telephone = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
WorkAge = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Telephone = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
WorkAge = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
|
|
@ -1349,7 +1349,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Province = workSheet?.Cells[row, 56]?.GetValue<string>() ?? "",
|
||||
ZipCode = workSheet?.Cells[row, 57]?.GetValue<string>() ?? "",
|
||||
Telephone = workSheet?.Cells[row, 58]?.GetValue<string>() ?? "",
|
||||
Mobile = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Mobile = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Address1 = $"{(workSheet?.Cells[row, 61]?.GetValue<string>() ?? "")} {(workSheet?.Cells[row, 62]?.GetValue<string>() ?? "")}",
|
||||
Moo1 = workSheet?.Cells[row, 63]?.GetValue<string>() ?? "",
|
||||
Soi1 = workSheet?.Cells[row, 64]?.GetValue<string>() ?? "",
|
||||
|
|
@ -1396,10 +1396,10 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
// certificate
|
||||
r.Certificates.Add(new DisableCertificate()
|
||||
{
|
||||
CertificateNo = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Description = workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
IssueDate = Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-")),
|
||||
ExpiredDate = Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-")),
|
||||
CertificateNo = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
Description = "",//workSheet?.Cells[row, 9999]?.GetValue<string>() ?? "",
|
||||
IssueDate = DateTime.MinValue,//Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-")),
|
||||
ExpiredDate = DateTime.MinValue,//Convert.ToDateTime(workSheet?.Cells[row, 9999]?.GetValue<string>().ToDateTime(DateTimeFormat.Ymd, "-")),
|
||||
CreatedAt = DateTime.Now,
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
|
|
@ -1661,9 +1661,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
imported.Scores.Add(r);
|
||||
|
||||
}
|
||||
|
||||
|
||||
row++;
|
||||
|
||||
|
||||
} // end of sheet loop
|
||||
} // end of all file loop
|
||||
}
|
||||
|
|
@ -2028,7 +2028,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
CertificateNo = p.Certificates.Count > 0
|
||||
? p.Certificates.First().CertificateNo ?? ""
|
||||
: "",
|
||||
CertificateIssueDate = p.Certificates.Count > 0
|
||||
CertificateIssueDate = p.Certificates.Count > 0
|
||||
? p.Certificates.First().IssueDate != DateTime.MinValue
|
||||
? p.Certificates.First().IssueDate.ToThaiShortDate()
|
||||
: ""
|
||||
|
|
@ -2334,7 +2334,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
Major = p.Educations.First().Major,
|
||||
University = p.Educations.First().University,
|
||||
PositionName = p.PositionName,
|
||||
ExamName = $"{p.PeriodExam!.Name} ครั้งที่ {p.PeriodExam.Round}/{(p.PeriodExam.Year > 2500 ? p.PeriodExam.Year : (p.PeriodExam.Year+543))}".ToThaiNumber(),
|
||||
ExamName = $"{p.PeriodExam!.Name} ครั้งที่ {p.PeriodExam.Round}/{(p.PeriodExam.Year > 2500 ? p.PeriodExam.Year : (p.PeriodExam.Year + 543))}".ToThaiNumber(),
|
||||
|
||||
ExamCount = _disableService.GetExamCount(p.CitizenId).ToString().ToThaiNumber(),
|
||||
type = p.typeTest == "bangkok" ? "กทม." : p.typeTest == "ocsc" ? "ก.พ." : "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue