Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67253337a9 | ||
|
|
b5567b5459 | ||
|
|
853b5c59f6 | ||
|
|
5752f35712 |
12 changed files with 3385 additions and 17 deletions
|
|
@ -96,6 +96,9 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value;
|
private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value;
|
||||||
|
|
||||||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||||
|
|
||||||
|
private string? RootDnaId => _httpContextAccessor?.HttpContext?.User?.FindFirst("orgRootDnaId")?.Value;
|
||||||
|
|
||||||
private string? token => _httpContextAccessor.HttpContext.Request.Headers["Authorization"];
|
private string? token => _httpContextAccessor.HttpContext.Request.Headers["Authorization"];
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -477,16 +480,21 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
PaymentEndDate = req.PaymentEndDate,
|
PaymentEndDate = req.PaymentEndDate,
|
||||||
Note = req.Note,
|
Note = req.Note,
|
||||||
AnnouncementDate = req.AnnouncementDate,
|
AnnouncementDate = req.AnnouncementDate,
|
||||||
|
ScoreExpireDate = req.ScoreExpireDate,
|
||||||
|
OrganizationId = req.rootDnaId,
|
||||||
CreatedAt = DateTime.Now,
|
CreatedAt = DateTime.Now,
|
||||||
CreatedUserId = UserId ?? "",
|
CreatedUserId = UserId ?? "",
|
||||||
CreatedFullName = FullName ?? "System Administrator",
|
CreatedFullName = FullName ?? "System Administrator",
|
||||||
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
LastUpdateUserId = UserId ?? "",
|
||||||
|
LastUpdateFullName = FullName ?? "System Administrator",
|
||||||
};
|
};
|
||||||
|
|
||||||
var apiUrl = $"{_configuration["API"]}/org/find/head/officer";
|
var apiUrl = $"{_configuration["API"]}/org/find/head/officer";
|
||||||
using (var client = new HttpClient())
|
using (var client = new HttpClient())
|
||||||
{
|
{
|
||||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||||
var _res = await client.SendAsync(_req);
|
var _res = await client.SendAsync(_req);
|
||||||
var _result = await _res.Content.ReadAsStringAsync();
|
var _result = await _res.Content.ReadAsStringAsync();
|
||||||
|
|
@ -554,6 +562,11 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
data.ExamDate = req.ExamDate;
|
data.ExamDate = req.ExamDate;
|
||||||
data.Note = req.Note;
|
data.Note = req.Note;
|
||||||
data.AnnouncementDate = req.AnnouncementDate;
|
data.AnnouncementDate = req.AnnouncementDate;
|
||||||
|
if (req.ScoreExpireDate.HasValue)
|
||||||
|
data.ScoreExpireDate = req.ScoreExpireDate;
|
||||||
|
data.LastUpdatedAt = DateTime.Now;
|
||||||
|
data.LastUpdateUserId = UserId ?? "";
|
||||||
|
data.LastUpdateFullName = FullName ?? "System Administrator";
|
||||||
|
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
@ -644,7 +657,14 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
{
|
{
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
|
string role = jsonData["result"]?.ToString() ?? string.Empty;
|
||||||
|
string rootDnaId = string.Empty;
|
||||||
|
if (role != "OWNER")
|
||||||
|
{
|
||||||
|
rootDnaId = RootDnaId?.ToString() ?? "";
|
||||||
|
}
|
||||||
var data = await _context.RecruitImports.AsQueryable()
|
var data = await _context.RecruitImports.AsQueryable()
|
||||||
|
.Where(x => string.IsNullOrEmpty(rootDnaId) || x.OrganizationId == Guid.Parse(rootDnaId))
|
||||||
.Include(x => x.ImportFile)
|
.Include(x => x.ImportFile)
|
||||||
.Include(x => x.Recruits)
|
.Include(x => x.Recruits)
|
||||||
.Include(x => x.ScoreImport)
|
.Include(x => x.ScoreImport)
|
||||||
|
|
@ -669,7 +689,7 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
ImportYear = x.ScoreImport.Year,
|
ImportYear = x.ScoreImport.Year,
|
||||||
ImportDate = x.CreatedAt.Date.ToThaiShortDate(),
|
ImportDate = x.CreatedAt.Date.ToThaiShortDate(),
|
||||||
ScoreCount = x.ScoreImport.Scores.Count(),
|
ScoreCount = x.ScoreImport.Scores.Count(),
|
||||||
ResultCount = x.ScoreImport.Scores.Count(x => !string.IsNullOrEmpty(x.Number))
|
ResultCount = x.ScoreImport.Scores.Count(x => x.ExamStatus == "ผ่าน" && !string.IsNullOrEmpty(x.Number))
|
||||||
},
|
},
|
||||||
x.CreatedUserId,
|
x.CreatedUserId,
|
||||||
})
|
})
|
||||||
|
|
@ -1520,6 +1540,9 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
case "notpass":
|
case "notpass":
|
||||||
queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน");
|
queryWithScores = queryWithScores.Where(x => x.score != null && x.score.ExamStatus == "ไม่ผ่าน");
|
||||||
break;
|
break;
|
||||||
|
case "other":
|
||||||
|
queryWithScores = queryWithScores.Where(x => x.score != null && !new[] { "ขส.", "ผ่าน", "ไม่ผ่าน" }.Contains(x.score.ExamStatus));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1803,11 +1826,15 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
Score = score == null ? 0.0 : score.TotalScore,
|
Score = score == null ? 0.0 : score.TotalScore,
|
||||||
Number = score == null ? "" : score.Number,
|
Number = score == null ? "" : score.Number,
|
||||||
ExamCount = _recruitService.GetExamCount(recruit.CitizenId),
|
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.ScoreExpireDate.Value.ToThaiShortDate(),
|
||||||
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate()
|
|
||||||
: "",
|
|
||||||
typeTest = recruit.typeTest,
|
typeTest = recruit.typeTest,
|
||||||
ScoreResult = score == null ? null : new
|
ScoreResult = score == null ? null : new
|
||||||
{
|
{
|
||||||
|
|
@ -2634,11 +2661,15 @@ namespace BMA.EHR.Recruit.Controllers
|
||||||
T = score != null && score.TotalScore != null ? score.TotalScore.ToString().ToThaiNumber() : "",
|
T = score != null && score.TotalScore != null ? score.TotalScore.ToString().ToThaiNumber() : "",
|
||||||
Result = score == null ? "" : score.ExamStatus,
|
Result = score == null ? "" : score.ExamStatus,
|
||||||
Number = score != null && score.Number != null ? score.Number.ToString().ToThaiNumber() : "",
|
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.ScoreExpireDate.Value.ToThaiShortDate().ToString().ToThaiNumber(),
|
||||||
? recruit.RecruitImport.AnnouncementDate.Value.AddYears(2).ToThaiShortDate().ToString().ToThaiNumber()
|
|
||||||
: "",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = new
|
var result = new
|
||||||
|
|
|
||||||
1609
Migrations/20260610063317_update_RecruitImport_add_OrganizationId.Designer.cs
generated
Normal file
1609
Migrations/20260610063317_update_RecruitImport_add_OrganizationId.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Recruit.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class update_RecruitImport_add_OrganizationId : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "RecruitImports",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
comment: "DnaId หน่วยงาน",
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "OrganizationId",
|
||||||
|
table: "RecruitImports");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1614
Migrations/20260701102418_update_RecruitImport_add_ScoreExpireDate.Designer.cs
generated
Normal file
1614
Migrations/20260701102418_update_RecruitImport_add_ScoreExpireDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Recruit.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class update_RecruitImport_add_ScoreExpireDate : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "ScoreExpireDate",
|
||||||
|
table: "RecruitImports",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true,
|
||||||
|
comment: "วันหมดอายุบัญชี")
|
||||||
|
.Annotation("Relational:ColumnOrder", 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ScoreExpireDate",
|
||||||
|
table: "RecruitImports");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -704,6 +704,10 @@ namespace BMA.EHR.Recruit.Migrations
|
||||||
.HasColumnOrder(3)
|
.HasColumnOrder(3)
|
||||||
.HasComment("ครั้งที่");
|
.HasComment("ครั้งที่");
|
||||||
|
|
||||||
|
b.Property<Guid?>("OrganizationId")
|
||||||
|
.HasColumnType("char(36)")
|
||||||
|
.HasComment("DnaId หน่วยงาน");
|
||||||
|
|
||||||
b.Property<DateTime?>("PaymentEndDate")
|
b.Property<DateTime?>("PaymentEndDate")
|
||||||
.HasColumnType("datetime(6)")
|
.HasColumnType("datetime(6)")
|
||||||
.HasColumnOrder(9)
|
.HasColumnOrder(9)
|
||||||
|
|
@ -724,6 +728,11 @@ namespace BMA.EHR.Recruit.Migrations
|
||||||
.HasColumnOrder(10)
|
.HasColumnOrder(10)
|
||||||
.HasComment("วันเริ่มสมัครสอบ");
|
.HasComment("วันเริ่มสมัครสอบ");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ScoreExpireDate")
|
||||||
|
.HasColumnType("datetime(6)")
|
||||||
|
.HasColumnOrder(15)
|
||||||
|
.HasComment("วันหมดอายุบัญชี");
|
||||||
|
|
||||||
b.Property<int>("Year")
|
b.Property<int>("Year")
|
||||||
.HasColumnType("int")
|
.HasColumnType("int")
|
||||||
.HasColumnOrder(1)
|
.HasColumnOrder(1)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ namespace BMA.EHR.MetaData.Service.Models
|
||||||
[Required, MaxLength(150), Column(Order = 1), Comment("เขต/อำเภอ")]
|
[Required, MaxLength(150), Column(Order = 1), Comment("เขต/อำเภอ")]
|
||||||
public string name { get; set; } = string.Empty;
|
public string name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Column(Order = 2), Comment("รหัสอ้างอิงจังหวัด")]
|
||||||
|
public Guid? provinceId { get; set; } = null;
|
||||||
|
|
||||||
// [Column(Order = 2), Comment("สถานะการใช้งาน")]
|
// [Column(Order = 2), Comment("สถานะการใช้งาน")]
|
||||||
// public bool IsActive { get; set; } = true;
|
// public bool IsActive { get; set; } = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ namespace BMA.EHR.MetaData.Service.Models
|
||||||
[MaxLength(10), Column(Order = 2), Comment("รหัสไปรษณีย์")]
|
[MaxLength(10), Column(Order = 2), Comment("รหัสไปรษณีย์")]
|
||||||
public string? zipCode { get; set; } = null;
|
public string? zipCode { get; set; } = null;
|
||||||
|
|
||||||
|
[Column(Order = 3), Comment("รหัสอ้างอิงอำเภอ")]
|
||||||
|
public Guid? districtId { get; set; } = null;
|
||||||
|
|
||||||
// [Column(Order = 3), Comment("สถานะการใช้งาน")]
|
// [Column(Order = 3), Comment("สถานะการใช้งาน")]
|
||||||
// public bool IsActive { get; set; } = true;
|
// public bool IsActive { get; set; } = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@ namespace BMA.EHR.Recruit.Models.Recruits
|
||||||
[Column(Order = 14), Comment("วันที่ประกาศผลสอบ")]
|
[Column(Order = 14), Comment("วันที่ประกาศผลสอบ")]
|
||||||
public DateTime? AnnouncementDate { get; set; }
|
public DateTime? AnnouncementDate { get; set; }
|
||||||
|
|
||||||
|
[Column(Order = 15), Comment("วันหมดอายุบัญชี")]
|
||||||
|
public DateTime? ScoreExpireDate { get; set; }
|
||||||
|
|
||||||
public Document ImportFile { get; set; } = new Document();
|
public Document ImportFile { get; set; } = new Document();
|
||||||
|
|
||||||
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
public List<Recruit> Recruits { get; set; } = new List<Recruit>();
|
||||||
|
|
@ -57,6 +60,9 @@ namespace BMA.EHR.Recruit.Models.Recruits
|
||||||
public string? AuthName { get; set; }
|
public string? AuthName { get; set; }
|
||||||
public string? AuthPosition { get; set; }
|
public string? AuthPosition { get; set; }
|
||||||
|
|
||||||
|
[Comment("DnaId หน่วยงาน")]
|
||||||
|
public Guid? OrganizationId { get; set; }
|
||||||
|
|
||||||
public List<RecruitImportHistory> ImportHostories { get; set; } = new List<RecruitImportHistory>();
|
public List<RecruitImportHistory> ImportHostories { get; set; } = new List<RecruitImportHistory>();
|
||||||
|
|
||||||
[Comment("รูป")]
|
[Comment("รูป")]
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ namespace BMA.EHR.Recruit.Services
|
||||||
using (var client = new HttpClient())
|
using (var client = new HttpClient())
|
||||||
{
|
{
|
||||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", ""));
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", AccessToken.Replace("Bearer ", ""));
|
||||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
client.DefaultRequestHeaders.Add("api-key", _configuration["API_KEY"]);
|
||||||
var req = await client.GetAsync(apiPath);
|
var req = await client.GetAsync(apiPath);
|
||||||
var res = await req.Content.ReadAsStringAsync();
|
var res = await req.Content.ReadAsStringAsync();
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
|
|
@ -82,5 +82,15 @@ namespace BMA.EHR.Recruit.Requests.Recruits
|
||||||
/// วันที่ประกาศผลสอบ
|
/// วันที่ประกาศผลสอบ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? AnnouncementDate { get; set; }
|
public DateTime? AnnouncementDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// วันหมดอายุบัญชี
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ScoreExpireDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// รหัส DNA หน่วยงาน
|
||||||
|
/// </summary>
|
||||||
|
public Guid? rootDnaId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,27 @@ namespace BMA.EHR.Recruit.Services
|
||||||
{
|
{
|
||||||
positionNameWithoutLevel = positionNameWithoutLevel.Replace(posLevelName, "").Trim();
|
positionNameWithoutLevel = positionNameWithoutLevel.Replace(posLevelName, "").Trim();
|
||||||
}
|
}
|
||||||
|
// lookup province, district, subDistrict IDs with parent filtering
|
||||||
|
var registProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province)?.Id;
|
||||||
|
var registDistrictId = districtsCache.FirstOrDefault(x => x.name == firstAddress?.Amphur && x.provinceId == registProvinceId)?.Id;
|
||||||
|
var registSubDistrictId = subDistrictsCache.FirstOrDefault(x => x.name == firstAddress?.District && x.districtId == registDistrictId)?.Id;
|
||||||
|
var currentProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province1)?.Id;
|
||||||
|
var currentDistrictId = districtsCache.FirstOrDefault(x => x.name == firstAddress?.Amphur1 && x.provinceId == currentProvinceId)?.Id;
|
||||||
|
var currentSubDistrictId = subDistrictsCache.FirstOrDefault(x => x.name == firstAddress?.District1 && x.districtId == currentDistrictId)?.Id;
|
||||||
|
|
||||||
|
// log warning when address lookup fails
|
||||||
|
if (registProvinceId == null && !string.IsNullOrWhiteSpace(firstAddress?.Province))
|
||||||
|
Console.WriteLine($"[WARN] Regist province not found: {firstAddress?.Province}");
|
||||||
|
if (registDistrictId == null && !string.IsNullOrWhiteSpace(firstAddress?.Amphur))
|
||||||
|
Console.WriteLine($"[WARN] Regist district not found: {firstAddress?.Amphur}, Province: {firstAddress?.Province}");
|
||||||
|
if (registSubDistrictId == null && !string.IsNullOrWhiteSpace(firstAddress?.District))
|
||||||
|
Console.WriteLine($"[WARN] Regist subdistrict not found: {firstAddress?.District}, District: {firstAddress?.Amphur}");
|
||||||
|
if (currentProvinceId == null && !string.IsNullOrWhiteSpace(firstAddress?.Province1))
|
||||||
|
Console.WriteLine($"[WARN] Current province not found: {firstAddress?.Province1}");
|
||||||
|
if (currentDistrictId == null && !string.IsNullOrWhiteSpace(firstAddress?.Amphur1))
|
||||||
|
Console.WriteLine($"[WARN] Current district not found: {firstAddress?.Amphur1}, Province: {firstAddress?.Province1}");
|
||||||
|
if (currentSubDistrictId == null && !string.IsNullOrWhiteSpace(firstAddress?.District1))
|
||||||
|
Console.WriteLine($"[WARN] Current subdistrict not found: {firstAddress?.District1}, District: {firstAddress?.Amphur1}");
|
||||||
|
|
||||||
var placementProfile = new PlacementProfile
|
var placementProfile = new PlacementProfile
|
||||||
{
|
{
|
||||||
|
|
@ -363,15 +384,15 @@ namespace BMA.EHR.Recruit.Services
|
||||||
Telephone = firstAddress?.Telephone ?? "",
|
Telephone = firstAddress?.Telephone ?? "",
|
||||||
MobilePhone = firstAddress?.Mobile ?? "",
|
MobilePhone = firstAddress?.Mobile ?? "",
|
||||||
RegistAddress = registAddress ?? "",
|
RegistAddress = registAddress ?? "",
|
||||||
RegistProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province)?.Id,
|
RegistProvinceId = registProvinceId,
|
||||||
RegistDistrictId = districtsCache.FirstOrDefault(x => x.name == firstAddress?.Amphur)?.Id,
|
RegistDistrictId = registDistrictId,
|
||||||
RegistSubDistrictId = subDistrictsCache.FirstOrDefault(x => x.name == firstAddress?.District)?.Id,
|
RegistSubDistrictId = registSubDistrictId,
|
||||||
RegistZipCode = firstAddress?.ZipCode ?? "",
|
RegistZipCode = firstAddress?.ZipCode ?? "",
|
||||||
RegistSame = false,
|
RegistSame = false,
|
||||||
CurrentAddress = currentAddress,
|
CurrentAddress = currentAddress,
|
||||||
CurrentProvinceId = provincesCache.FirstOrDefault(x => x.name == firstAddress?.Province1)?.Id,
|
CurrentProvinceId = currentProvinceId,
|
||||||
CurrentDistrictId = districtsCache.FirstOrDefault(x => x.name == firstAddress?.Amphur1)?.Id,
|
CurrentDistrictId = currentDistrictId,
|
||||||
CurrentSubDistrictId = subDistrictsCache.FirstOrDefault(x => x.name == firstAddress?.District1)?.Id,
|
CurrentSubDistrictId = currentSubDistrictId,
|
||||||
CurrentZipCode = firstAddress?.ZipCode1,
|
CurrentZipCode = firstAddress?.ZipCode1,
|
||||||
Marry = candidate.Marry?.Contains("สมรส") ?? false,
|
Marry = candidate.Marry?.Contains("สมรส") ?? false,
|
||||||
OccupationPositionType = "other",
|
OccupationPositionType = "other",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue