diff --git a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs
index 9eff337d..169c97ca 100644
--- a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs
+++ b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs
@@ -200,7 +200,7 @@ namespace BMA.EHR.Application.Repositories
#region " ทั่วไป "
///
- /// Gets the insignia candidate ประเภททั่วไป ระดับปฎิบัติงาน.
+ /// Gets the insignia candidate ประเภททั่วไป ระดับปฏิบัติงาน.
///
/// The period identifier.
/// The oc identifier.
@@ -240,31 +240,31 @@ namespace BMA.EHR.Application.Repositories
p.PositionType.Name == "ทั่วไป" //
)
.Select(p => new
- {
- ProfileId = p.Id,
- Prefix = p.Prefix == null ? null : p.Prefix.Name,
- FullName = $"{p.FirstName} {p.LastName}",
- Position = p.Position == null ? null : p.Position.Name,
- Rank = p.PositionLevel.Name,
- ProfileDateAppoint = p.DateAppoint.Value,
- GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
- PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
- PositionLevelId = p.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionLevel.Id,
- PositionLevelName = p.PositionLevel == null ? null : p.PositionLevel.Name,
- PositionTypeId = p.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionType.Id,
- PositionTypeName = p.PositionType == null ? null : p.PositionType.Name,
- Gender = p.Gender == null ? null : p.Gender.Name,
- LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
- LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
- Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- PostionSalaryAmount = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount
- });
+ {
+ ProfileId = p.Id,
+ Prefix = p.Prefix == null ? null : p.Prefix.Name,
+ FullName = $"{p.FirstName} {p.LastName}",
+ Position = p.Position == null ? null : p.Position.Name,
+ Rank = p.PositionLevel.Name,
+ ProfileDateAppoint = p.DateAppoint.Value,
+ GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
+ PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
+ PositionLevelId = p.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionLevel.Id,
+ PositionLevelName = p.PositionLevel == null ? null : p.PositionLevel.Name,
+ PositionTypeId = p.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionType.Id,
+ PositionTypeName = p.PositionType == null ? null : p.PositionType.Name,
+ Gender = p.Gender == null ? null : p.Gender.Name,
+ LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
+ LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
+ Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ PostionSalaryAmount = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount
+ });
// check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-5
var s1 = ((from p in inst_profile
where p.ProfileDateAppoint <= new DateTime(period.Year - 5, 5, 29)
- && p.LastInsigniaId == Guid.Parse("00000000-0000-0000-0000-000000000000")
- && p.PositionLevelName == "ปฏิบัติงาน" // ปฎิบัติงาน
+ && p.LastInsigniaId == Guid.Parse("00000000-0000-0000-0000-000000000000")
+ && p.PositionLevelName == "ปฏิบัติงาน" // ปฏิบัติงาน
select p)
.ToList()
.Select(p => new InsigniaResultSet
@@ -286,7 +286,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }",
+ Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }xxx1",
Result = $"วันที่บรรจุเข้ารับราชการ { p.ProfileDateAppoint.ToThaiFullDate3() }"
}
}
@@ -307,7 +307,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ปฎิบัติงาน" // ปฎิบัติงาน
+ && p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("เบญจมาภรณ์ช้างเผือก")
@@ -354,7 +354,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือนน้อยกว่า 10,190 บาท)",
+ Condition = $"1.ได้รับเงินเดือนต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือนน้อยกว่า 10,190 บาท)xxx2",
Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท"
},
new MatchingCondition
@@ -381,7 +381,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป1
- && p.PositionLevel.Name == "ปฎิบัติงาน" // ปฎิบัติงาน1
+ && p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน1
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("จัตุรถาภรณ์มงกุฎไทย")
@@ -427,7 +427,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)",
+ Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)xxx3",
Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท"
}
}
@@ -449,7 +449,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป1
- && p.PositionLevel.Name == "ปฎิบัติงาน" // ปฎิบัติงาน1
+ && p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน1
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("จัตุรถาภรณ์ช้างเผือก")
@@ -496,7 +496,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)",
+ Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)xxx4",
Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท"
},
new MatchingCondition
@@ -677,7 +677,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับชำนาญงาน",
+ Condition = $"1.เป็นระดับชำนาญงานxxx5",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -728,11 +728,11 @@ namespace BMA.EHR.Application.Repositories
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name,
"ตริตาภรณ์ช้างเผือก"),
- // FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
- // p.Salaries.Where(x => x.SalaryPositionLevel.PositionLevel.Id == 2).OrderBy(p => p.SalaryDateAnnounce).FirstOrDefault().SalaryDateAnnounce
+ FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
+ p.Salaries.Where(x => x.PositionLevel.Name == "ชำนาญงาน").OrderBy(p => p.Date).FirstOrDefault().Date
})
.ToList()
- // .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29))
+ .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29))
.Select(p => new InsigniaResultSet
{
ProfileId = p.ProfileId,
@@ -752,8 +752,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับชำนาญงาน ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})",
- // Result = $"ดำรงตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel } ตั้งแต่วันที่ { (p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3()) }"
+ Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับชำนาญงาน ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})xxx6",
+ Result = $"ดำรงตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel } ตั้งแต่วันที่ { (p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3()) }"
},
}
@@ -893,7 +893,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับอาวุโส",
+ Condition = $"1.เป็นระดับอาวุโสxxx7",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -945,11 +945,11 @@ namespace BMA.EHR.Application.Repositories
.FirstOrDefault().Insignia.Name,
"ทวีติยาภรณ์ช้างเผือก"),
- // FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
- // p.Salaries.Where(x => x.SalaryPositionLevel.PositionLevel.Id == 3).OrderBy(p => p.SalaryDateAnnounce).FirstOrDefault().SalaryDateAnnounce
+ FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
+ p.Salaries.Where(x => x.PositionLevel.Name == "อาวุโส").OrderBy(p => p.Date).FirstOrDefault().Date
})
.ToList()
- // .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29))
+ .Where(x => x.FirstPositonLevelDate < new DateTime(period.Year - 5, 5, 29))
.Select(p => new InsigniaResultSet
{
ProfileId = p.ProfileId,
@@ -969,8 +969,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับอาวุโส ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})",
- // Result = $"ดำรงตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel } ตั้งแต่วันที่ { (p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3()) }"
+ Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับอาวุโส ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})xxx8",
+ Result = $"ดำรงตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel } ตั้งแต่วันที่ { (p.FirstPositonLevelDate == null ? "-" : p.FirstPositonLevelDate.Value.ToThaiFullDate3()) }"
},
}
@@ -1110,7 +1110,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับทักษะพิเศษ",
+ Condition = $"1.เป็นระดับทักษะพิเศษxxx9",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -1164,11 +1164,11 @@ namespace BMA.EHR.Application.Repositories
FirstRecvInsigniaYear = p.Insignias.Count == 0 ? 0 :
p.Insignias.Where(x => x.Insignia.Name == "ทวีติยาภรณ์ช้างเผือก").OrderBy(x => x.Year).FirstOrDefault() == null ? 0 :
p.Insignias.Where(x => x.Insignia.Name == "ทวีติยาภรณ์ช้างเผือก").OrderBy(x => x.Year).FirstOrDefault().Year,
- // FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
- // p.Salaries.Where(x => x.SalaryPositionLevel.PositionLevel.Id == 3).OrderBy(p => p.SalaryDateAnnounce).FirstOrDefault().SalaryDateAnnounce
+ FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
+ p.Salaries.Where(x => x.PositionLevel.Name == "อาวุโส").OrderBy(p => p.Date).FirstOrDefault().Date
})
.ToList()
- // .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 3)
+ .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 3)
.Select(p => new InsigniaResultSet
{
ProfileId = p.ProfileId,
@@ -1188,7 +1188,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้รับ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})",
+ Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้รับ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})xxx10",
Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -1242,11 +1242,11 @@ namespace BMA.EHR.Application.Repositories
FirstRecvInsigniaYear = p.Insignias.Count == 0 ? 0 :
p.Insignias.Where(x => x.Insignia.Name == "ประถมาภรณ์มงกุฎไทย").OrderBy(x => x.Year).FirstOrDefault() == null ? 0 :
p.Insignias.Where(x => x.Insignia.Name == "ประถมาภรณ์มงกุฎไทย").OrderBy(x => x.Year).FirstOrDefault().Year,
- // FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
- // p.Salaries.Where(x => x.SalaryPositionLevel.PositionLevel.Id == 3).OrderBy(p => p.SalaryDateAnnounce).FirstOrDefault().SalaryDateAnnounce
+ FirstPositonLevelDate = p.Salaries.Count == 0 ? null :
+ p.Salaries.Where(x => x.PositionLevel.Name == "อาวุโส").OrderBy(p => p.Date).FirstOrDefault().Date
})
.ToList()
- // .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 5)
+ .Where(x => x.FirstRecvInsigniaYear != 0 && x.FirstRecvInsigniaYear <= period.Year - 5)
.Select(p => new InsigniaResultSet
{
ProfileId = p.ProfileId,
@@ -1266,7 +1266,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ ป.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ ป.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})xxx11",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear }"
},
@@ -1344,7 +1344,7 @@ namespace BMA.EHR.Application.Repositories
///
- /// Gets the insignia candidate ประเภทวิชาการ ระดับปฎิบัติการ.
+ /// Gets the insignia candidate ประเภทวิชาการ ระดับปฏิบัติการ.
///
/// The period identifier.
/// The oc identifier.
@@ -1384,31 +1384,31 @@ namespace BMA.EHR.Application.Repositories
p.PositionType.Name == "วิชาการ" // ประเภทวิชาการ
)
.Select(p => new
- {
- ProfileId = p.Id,
- Prefix = p.Prefix == null ? null : p.Prefix.Name,
- FullName = $"{p.FirstName} {p.LastName}",
- Position = p.Position.Name,
- Rank = p.PositionLevel.Name,
- ProfileDateAppoint = p.DateAppoint.Value,
- GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
- PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
- PositionLevelId = p.PositionLevel.Id,
- PositionLevelName = p.PositionLevel.Name,
- PositionTypeId = p.PositionType.Id,
- PositionTypeName = p.PositionType.Name,
- Gender = p.Gender == null ? null : p.Gender.Name,
- LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
- LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
- Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- PostionSalaryAmount = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount
- });
+ {
+ ProfileId = p.Id,
+ Prefix = p.Prefix == null ? null : p.Prefix.Name,
+ FullName = $"{p.FirstName} {p.LastName}",
+ Position = p.Position.Name,
+ Rank = p.PositionLevel.Name,
+ ProfileDateAppoint = p.DateAppoint.Value,
+ GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
+ PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
+ PositionLevelId = p.PositionLevel.Id,
+ PositionLevelName = p.PositionLevel.Name,
+ PositionTypeId = p.PositionType.Id,
+ PositionTypeName = p.PositionType.Name,
+ Gender = p.Gender == null ? null : p.Gender.Name,
+ LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
+ LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
+ Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ PostionSalaryAmount = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount
+ });
// check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-5
var s1 = ((from p in inst_profile
where p.ProfileDateAppoint <= new DateTime(period.Year - 5, 5, 29)
&& p.LastInsigniaId == Guid.Parse("00000000-0000-0000-0000-000000000000")
- && p.PositionLevelName == "ปฎิบัติการ" // ปฎิบัติการ
+ && p.PositionLevelName == "ปฏิบัติการ" // ปฏิบัติการ
select p)
.ToList()
.Select(p => new InsigniaResultSet
@@ -1430,7 +1430,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }",
+ Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }xxx12",
Result = $"วันที่บรรจุเข้ารับราชการ { p.ProfileDateAppoint.ToThaiFullDate3() }"
}
}
@@ -1552,7 +1552,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับชำนาญการ",
+ Condition = $"1.เป็นระดับชำนาญการxxx13",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -1593,7 +1593,7 @@ namespace BMA.EHR.Application.Repositories
LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
LastInsigniaId = p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- SalaryCondition = p.Salaries.Count() == 0 ? null : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ SalaryCondition = p.Salaries.Count() == 0 ? 0 : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
Gender = p.Gender == null ? null : p.Gender.Name,
IsHigherLevel = IsHigherLevel(p.Insignias
@@ -1623,8 +1623,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษ (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 22,140 บาท)",
- // Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition.ToNumericText() } บาท"
+ Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษ (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 22,140 บาท)xxx14",
+ Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท"
},
}
@@ -1664,7 +1664,7 @@ namespace BMA.EHR.Application.Repositories
LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
LastInsigniaId = p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- SalaryCondition = p.Salaries.Count() == 0 ? null : p.Salaries.Where(x => x.Date < new DateTime(period.Year - 5, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ SalaryCondition = p.Salaries.Count() == 0 ? 0 : p.Salaries.Where(x => x.Date < new DateTime(period.Year - 5, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
Gender = p.Gender == null ? null : p.Gender.Name,
IsHigherLevel = IsHigherLevel(p.Insignias
@@ -1694,8 +1694,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษมาแล้วไม่น้อยกว่า 5 ปี (เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } 22,140 บาท)",
- // Result = $"เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition.ToNumericText() } บาท"
+ Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษมาแล้วไม่น้อยกว่า 5 ปี (เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } 22,140 บาท)xxx15",
+ Result = $"เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท"
},
}
@@ -1853,7 +1853,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับชำนาญการพิเศษ",
+ Condition = $"1.เป็นระดับชำนาญการพิเศษxxx16",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -1894,7 +1894,7 @@ namespace BMA.EHR.Application.Repositories
LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
LastInsigniaId = p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- SalaryCondition = p.Salaries.Count() == 0 ? null : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ SalaryCondition = p.Salaries.Count() == 0 ? 0 : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
Gender = p.Gender == null ? null : p.Gender.Name,
IsHigherLevel = IsHigherLevel(p.Insignias
@@ -1928,8 +1928,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)",
- // Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition.ToNumericText() } บาท"
+ Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)xxx17",
+ Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท"
},
new MatchingCondition
{
@@ -2075,7 +2075,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับเชี่ยวชาญ",
+ Condition = $"1.เป็นระดับเชี่ยวชาญxxx18",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -2150,7 +2150,7 @@ namespace BMA.EHR.Application.Repositories
new MatchingCondition
{
- Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx19",
Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -2225,7 +2225,7 @@ namespace BMA.EHR.Application.Repositories
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })xxx20",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -2393,13 +2393,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx21",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -2477,13 +2477,13 @@ namespace BMA.EHR.Application.Repositories
new MatchingCondition
{
- Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx22",
Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
@@ -2561,13 +2561,13 @@ namespace BMA.EHR.Application.Repositories
new MatchingCondition
{
- Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })xxx23",
Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 13,000 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
@@ -2733,13 +2733,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx24",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -2817,13 +2817,13 @@ namespace BMA.EHR.Application.Repositories
new MatchingCondition
{
- Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx25",
Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -2899,13 +2899,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })",
+ Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx26",
Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 15,600 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -3013,7 +3013,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับต้น" // ระดับต้น
+ && p.PositionLevel.Name == "ต้น" // ต้น
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
@@ -3060,7 +3060,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.เป็นระดับอำนวยการ/ต้น",
+ Condition = $"1.เป็นระดับอำนวยการ/ต้นxxx27",
Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }"
},
@@ -3101,7 +3101,7 @@ namespace BMA.EHR.Application.Repositories
LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
LastInsigniaId = p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- SalaryCondition = p.Salaries.Count() == 0 ? null : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ SalaryCondition = p.Salaries.Count() == 0 ? 0 : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
Gender = p.Gender == null ? null : p.Gender.Name,
IsHigherLevel = IsHigherLevel(p.Insignias
@@ -3135,8 +3135,8 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)",
- // Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition.ToNumericText() } บาท"
+ Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)xxx28",
+ Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท"
},
new MatchingCondition
{
@@ -3228,7 +3228,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
@@ -3279,7 +3279,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx29",
Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3302,7 +3302,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
@@ -3353,7 +3353,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx30",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3376,7 +3376,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
@@ -3427,7 +3427,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx31",
Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3538,7 +3538,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับต้น" // ระดับต้น
+ && p.PositionLevel.Name == "ต้น" // ต้น
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
@@ -3589,7 +3589,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx32",
Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3612,7 +3612,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับต้น" // ระดับต้น
+ && p.PositionLevel.Name == "ต้น" // ต้น
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
@@ -3663,7 +3663,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx33",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3686,7 +3686,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับต้น" // ระดับต้น
+ && p.PositionLevel.Name == "ต้น" // ต้น
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
@@ -3737,7 +3737,7 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx34",
Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
@@ -3820,7 +3820,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
@@ -3875,13 +3875,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx35",
Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -3902,7 +3902,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
@@ -3957,13 +3957,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx36",
Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -3984,7 +3984,7 @@ namespace BMA.EHR.Application.Repositories
&& p.PositionType != null
&& p.PositionLevel != null
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
- && p.PositionLevel.Name == "ระดับสูง" // ระดับสูง
+ && p.PositionLevel.Name == "สูง" // สูง
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
.OrderByDescending(x => x.Year)
.FirstOrDefault().Insignia.Name.Contains("มหาปรมาภรณ์ช้างเผือก")
@@ -4039,13 +4039,13 @@ namespace BMA.EHR.Application.Repositories
{
new MatchingCondition
{
- Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)",
+ Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx37",
Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }"
},
new MatchingCondition
{
Condition = $"ได้รับเงินประจำตำแหน่ง 14,500 บาท",
- // Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition.ToNumericText() } บาท"
+ Result = $"ได้รับเงินประจำตำแหน่ง { p.SalaryPosition } บาท"
}
}
})
@@ -4136,20 +4136,20 @@ namespace BMA.EHR.Application.Repositories
p.DateAppoint != null
)
.Select(p => new
- {
- ProfileId = p.Id,
- Prefix = p.Prefix == null ? null : p.Prefix.Name,
- FullName = $"{p.FirstName} {p.LastName}",
- Position = p.Position == null ? null : p.Position.Name,
- Rank = p.PositionLevel.Name,
- ProfileDateAppoint = p.DateAppoint.Value,
- GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
- PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
- Gender = p.Gender == null ? null : p.Gender.Name,
- LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
- LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
- Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
- });
+ {
+ ProfileId = p.Id,
+ Prefix = p.Prefix == null ? null : p.Prefix.Name,
+ FullName = $"{p.FirstName} {p.LastName}",
+ Position = p.Position == null ? null : p.Position.Name,
+ Rank = p.PositionLevel.Name,
+ ProfileDateAppoint = p.DateAppoint.Value,
+ GovAge = p.DateAppoint.Value.CalculateGovAgeStr(0, 0),
+ PosNo = p.PosNo == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PosNo.Id,
+ Gender = p.Gender == null ? null : p.Gender.Name,
+ LastInsignia = p.Insignias.Count == 0 ? "" : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name,
+ LastInsigniaId = p.Insignias.Count == 0 ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Id,
+ Salary = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
+ });
// check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-5
var s1 = ((from p in inst_profile
@@ -4613,22 +4613,91 @@ namespace BMA.EHR.Application.Repositories
var type4_level10 = await GetInsigniaCandidate_Type4_Level10(periodId, ocId);
var type4_level11 = await GetInsigniaCandidate_Type4_Level11(periodId, ocId);
-
// union result
- result_candidate.AddRange(type1_level1);
- result_candidate.AddRange(type1_level2);
- result_candidate.AddRange(type1_level3);
- result_candidate.AddRange(type1_level4);
- result_candidate.AddRange(type2_level5);
- result_candidate.AddRange(type2_level6);
- result_candidate.AddRange(type2_level7);
- result_candidate.AddRange(type2_level8);
- result_candidate.AddRange(type2_level9_1);
- result_candidate.AddRange(type2_level9_2);
- result_candidate.AddRange(type3_level10);
- result_candidate.AddRange(type3_level11);
- result_candidate.AddRange(type4_level10);
- result_candidate.AddRange(type4_level11);
+ foreach (var r in type4_level11)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type4_level10)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type3_level11)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type3_level10)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level9_2)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level9_1)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level8)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level7)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level6)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type2_level5)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type1_level4)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type1_level3)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type1_level2)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
+ foreach (var r in type1_level1)
+ {
+ var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
+ if (old == null)
+ result_candidate.Add(r);
+ }
return result_candidate.OrderBy(x => x.Seq).ThenBy(x => x.Gender).ThenBy(x => x.ProfileId).ToList();
}
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs
index a8758988..19e492c0 100644
--- a/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs
+++ b/BMA.EHR.Domain/Models/Placement/PlacementAppointment.cs
@@ -57,6 +57,8 @@ namespace BMA.EHR.Domain.Models.Placement
[Comment("Id ระดับ")]
public PositionLevel? PositionLevel { get; set; }
+ [Comment("เงินเดือน")]
+ public double? Amount { get; set; }
[Comment("เหตุผลที่รับย้ายราชการ")]
public string? Reason { get; set; }
[Comment("วุฒิ/สาขาเดิม")]
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs
index 1479f104..952bc625 100644
--- a/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs
+++ b/BMA.EHR.Domain/Models/Placement/PlacementReceive.cs
@@ -36,6 +36,8 @@ namespace BMA.EHR.Domain.Models.Placement
public string Status { get; set; } = "WAITTING";
[Comment("Id เลขที่ตำแหน่ง")]
public OrganizationPositionEntity? OrganizationPosition { get; set; }
+ [Comment("เงินเดือน")]
+ public double? Amount { get; set; }
[Comment("วันที่บรรจุ")]
public DateTime? RecruitDate { get; set; }
diff --git a/BMA.EHR.Domain/Models/Placement/PlacementRelocation.cs b/BMA.EHR.Domain/Models/Placement/PlacementRelocation.cs
index b06b0f32..7a4ca5c9 100644
--- a/BMA.EHR.Domain/Models/Placement/PlacementRelocation.cs
+++ b/BMA.EHR.Domain/Models/Placement/PlacementRelocation.cs
@@ -36,6 +36,8 @@ namespace BMA.EHR.Domain.Models.Placement
public string Status { get; set; } = "WAITTING";
[Comment("Id เลขที่ตำแหน่ง")]
public OrganizationPositionEntity? OrganizationPosition { get; set; }
+ [Comment("เงินเดือน")]
+ public double? Amount { get; set; }
[Comment("วันที่บรรจุ")]
public DateTime? RecruitDate { get; set; }
diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs
index d10ae801..75359e78 100644
--- a/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs
+++ b/BMA.EHR.Domain/Models/Retirement/RetirementOther.cs
@@ -10,16 +10,62 @@ namespace BMA.EHR.Domain.Models.Retirement
{
public class RetirementOther : EntityBase
{
- [Required, Comment("Id User")]
- public Profile Profile { get; set; }
- [Comment("หน่วยงานที่อื่นๆไป")]
- public string? Organization { get; set; } = string.Empty;
- [Comment("เหตุผล")]
- public string? Reason { get; set; } = string.Empty;
- [Comment("สังกัด")]
+ [Required, MaxLength(20), Comment("เลขประจำตัวประชาชน")]
+ public string? CitizenId { get; set; }
+ [Required, Comment("คำนำหน้า")]
+ public Prefix? Prefix { get; set; }
+ [Required, Comment("ชื่อ")]
+ public string? Firstname { get; set; }
+ [Required, Comment("นามสกุล")]
+ public string? Lastname { get; set; }
+ [MaxLength(40), Comment("วันเกิด")]
+ public DateTime DateOfBirth { get; set; }
+ [Comment("Id เพศ")]
+ public Gender? Gender { get; set; }
+ [MaxLength(100), Comment("สัญชาติ")]
+ public string? Nationality { get; set; }
+ [MaxLength(100), Comment("เชื้อชาติ")]
+ public string? Race { get; set; }
+ [Comment("Id ศาสนา")]
+ public Religion? Religion { get; set; }
+ [Comment("Id กลุ่มเลือด")]
+ public BloodGroup? BloodGroup { get; set; }
+ [Comment("Id สถานะภาพ")]
+ public Relationship? Relationship { get; set; }
+ [MaxLength(50), Comment("เบอร์โทร")]
+ public string? TelephoneNumber { get; set; }
+ [Comment("สถานะคำขอ")]
+ public string Status { get; set; } = "WAITTING";
+ [Comment("Id เลขที่ตำแหน่ง")]
+ public OrganizationPositionEntity? OrganizationPosition { get; set; }
+ [Comment("วันที่บรรจุ")]
+ public DateTime? RecruitDate { get; set; }
+
+ [Comment("Id ตำแหน่งเลขที่")]
+ public PositionNumberEntity? PositionNumber { get; set; }
+
+ [Comment("Id ตำแหน่ง")]
+ public PositionPath? PositionPath { get; set; }
+
+ [Comment("Id ด้าน/สาขา")]
+ public PositionPathSide? PositionPathSide { get; set; }
+
+ [Comment("Id ประเภทตำแหน่ง")]
+ public PositionType? PositionType { get; set; }
+
+ [Comment("Id สายงาน")]
+ public PositionLine? PositionLine { get; set; }
+
+ [Comment("Id ระดับ")]
+ public PositionLevel? PositionLevel { get; set; }
+ [Comment("เงินเดือน")]
+ public double? Amount { get; set; }
+ [Comment("เหตุผลที่รับย้ายราชการ")]
+ public string? Reason { get; set; }
+ [Comment("วุฒิ/สาขาเดิม")]
+ public string? EducationOld { get; set; }
+ [Comment("สังกัดเดิม")]
public string? OrganizationPositionOld { get; set; }
- [Comment("ตั้งแต่วันที่")]
- public DateTime? Date { get; set; }
[Comment("ข้อมูลหน่วยงานเดิม ตำแหน่งประเภท")]
public string? PositionTypeOld { get; set; }
[Comment("ข้อมูลหน่วยงานเดิม ระดับ")]
@@ -28,11 +74,12 @@ namespace BMA.EHR.Domain.Models.Retirement
public string? PositionNumberOld { get; set; }
[Comment("ข้อมูลหน่วยงานเดิม เงินเดือน")]
public double? AmountOld { get; set; }
- [Comment("สถานะคำขอ")]
- public string Status { get; set; } = "WAITTING";
[Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
[Comment("ประเภทคำสั่ง")]
public CommandType? CommandType { get; set; }
+ [Comment("ดำรงตำแหน่งในระดับปัจจุบันเมื่อ")]
+ public DateTime? PositionDate { get; set; }
+ public virtual List RetirementOtherDocs { get; set; } = new List();
}
}
diff --git a/BMA.EHR.Domain/Models/Retirement/RetirementOtherDoc.cs b/BMA.EHR.Domain/Models/Retirement/RetirementOtherDoc.cs
new file mode 100644
index 00000000..d09507b3
--- /dev/null
+++ b/BMA.EHR.Domain/Models/Retirement/RetirementOtherDoc.cs
@@ -0,0 +1,15 @@
+using BMA.EHR.Domain.Models.Base;
+using BMA.EHR.Domain.Models.Documents;
+using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
+
+namespace BMA.EHR.Domain.Models.Retirement
+{
+ public class RetirementOtherDoc : EntityBase
+ {
+ [Required, Comment("อ้างอิงรหัสเอกสาร")]
+ public Document Document { get; set; }
+ [Required, Comment("อ้างอิงรับย้าย")]
+ public virtual RetirementOther RetirementOther { get; set; }
+ }
+}
diff --git a/BMA.EHR.Infrastructure/Migrations/20230815185856_update table PlacementAppointments add Amount.Designer.cs b/BMA.EHR.Infrastructure/Migrations/20230815185856_update table PlacementAppointments add Amount.Designer.cs
new file mode 100644
index 00000000..6a653988
--- /dev/null
+++ b/BMA.EHR.Infrastructure/Migrations/20230815185856_update table PlacementAppointments add Amount.Designer.cs
@@ -0,0 +1,14518 @@
+//
+using System;
+using BMA.EHR.Infrastructure.Persistence;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace BMA.EHR.Infrastructure.Migrations
+{
+ [DbContext(typeof(ApplicationDBContext))]
+ [Migration("20230815185856_update table PlacementAppointments add Amount")]
+ partial class updatetablePlacementAppointmentsaddAmount
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.9")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.Command", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("AuthorizedPosition")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่งผู้มีอำนาจลงนาม");
+
+ b.Property("AuthorizedUserFullName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ชื่อผู้มีอำนาจลงนาม");
+
+ b.Property("AuthorizedUserId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงผู้มีอำนาจลงนาม");
+
+ b.Property("CommandAffectDate")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่คำสั่งมีผล");
+
+ b.Property("CommandExcecuteDate")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่ออกคำสั่ง");
+
+ b.Property("CommandNo")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("varchar(10)")
+ .HasComment("เลขที่คำสั่ง");
+
+ b.Property("CommandStatusId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงสถานะคำสั่ง");
+
+ b.Property("CommandSubject")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)")
+ .HasComment("คำสั่งเรื่อง");
+
+ b.Property("CommandTypeId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงประเภทคำสั่ง");
+
+ b.Property("CommandYear")
+ .IsRequired()
+ .HasMaxLength(4)
+ .HasColumnType("varchar(4)")
+ .HasComment("ปีที่ออกคำสั่ง");
+
+ b.Property("ConclusionRegisterDate")
+ .HasColumnType("datetime(6)")
+ .HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
+
+ b.Property("ConclusionRegisterNo")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)");
+
+ b.Property("ConclusionResultDate")
+ .HasColumnType("datetime(6)")
+ .HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
+
+ b.Property("ConclusionResultNo")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("IssuerOrganizationId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงหน่วยงานที่ออกคำสั่ง");
+
+ b.Property("IssuerOrganizationName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("หน่วยงานที่ออกคำสั่ง");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("OwnerGovId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสส่วนราชการผู้ออกคำสั่ง");
+
+ b.Property("PlacementId")
+ .HasColumnType("char(36)")
+ .HasComment("อ้างอิงรอบการสอบ");
+
+ b.Property("PositionName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่งที่บรรจุ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CommandStatusId");
+
+ b.HasIndex("CommandTypeId");
+
+ b.HasIndex("PlacementId");
+
+ b.ToTable("Commands");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDeployment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CitizenId")
+ .IsRequired()
+ .HasMaxLength(13)
+ .HasColumnType("varchar(13)")
+ .HasComment("เลขประจำตัวประชาชน");
+
+ b.Property("CommandId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงคำสั่ง");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อ");
+
+ b.Property("IsSendInbox")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ส่งกล่องข้อความหรือไม่?");
+
+ b.Property("IsSendMail")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ส่งอีเมล์หรือไม่?");
+
+ b.Property("IsSendNotification")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ส่งแจ้งเตือนหรือไม่?");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("OrganizationName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง");
+
+ b.Property("PositionName")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง");
+
+ b.Property("Prefix")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("คำนำหน้านาม");
+
+ b.Property("ReceiveUserId")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("รหัสอ้างอิงผู้ใช้งานระบบ");
+
+ b.Property("Sequence")
+ .HasColumnType("int")
+ .HasComment("ลำดับ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CommandId");
+
+ b.ToTable("CommandDeployments");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandDocument", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("Category")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("ประเภทเอกสาร");
+
+ b.Property("CommandId")
+ .HasColumnType("char(36)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DocumentId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CommandId");
+
+ b.HasIndex("DocumentId");
+
+ b.ToTable("CommandDocuments");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandReceiver", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CitizenId")
+ .IsRequired()
+ .HasMaxLength(13)
+ .HasColumnType("varchar(13)")
+ .HasComment("เลขประจำตัวประชาชน");
+
+ b.Property("CommandId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงคำสั่ง");
+
+ b.Property("Comment")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasComment("หมายเหตุ");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อ");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Prefix")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("คำนำหน้านาม");
+
+ b.Property("RefPlacementProfileId")
+ .HasColumnType("char(36)")
+ .HasComment("รหัสอ้างอิงไปยังข้อมูลผู้บรรจุ");
+
+ b.Property("Sequence")
+ .HasColumnType("int")
+ .HasComment("ลำดับในบัญชีแนบท้าย");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CommandId");
+
+ b.ToTable("CommandReceivers");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandStatus", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("สถานะของคำสั่ง");
+
+ b.Property("Sequence")
+ .HasColumnType("int")
+ .HasComment("ลำดับการทำงาน");
+
+ b.HasKey("Id");
+
+ b.ToTable("CommandStatuses");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.CommandType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("Category")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ประเภทคำสั่ง");
+
+ b.Property("CommandCode")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasComment("รหัสของประเภทคำสั่ง");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("ชื่อคำสั่ง");
+
+ b.HasKey("Id");
+
+ b.ToTable("CommandTypes");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Commands.Core.DeploymentChannel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("IsSendEmail")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsSendInbox")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.HasKey("Id");
+
+ b.ToTable("DeploymentChannels");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.Documents.Document", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Detail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("FileSize")
+ .HasColumnType("int");
+
+ b.Property("FileType")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ObjectRefId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Documents");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitLeave", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("Name")
+ .HasColumnType("longtext")
+ .HasComment("ยังไม่ชัวใช้อะไรเป็นkey");
+
+ b.HasKey("Id");
+
+ b.ToTable("LimitLeaves");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.HR.LimitTypeLeave", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("LimitLeaveId")
+ .HasColumnType("char(36)");
+
+ b.Property("NumLeave")
+ .HasColumnType("double")
+ .HasComment("จำนวนที่ลาได้");
+
+ b.Property("TypeLeaveId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LimitLeaveId");
+
+ b.HasIndex("TypeLeaveId");
+
+ b.ToTable("LimitTypeLeaves");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.HR.Profile", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("Ability")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("AvatarId")
+ .HasColumnType("char(36)");
+
+ b.Property("AvatarRef")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.Property("BirthDate")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันเกิด");
+
+ b.Property("BloodGroupId")
+ .HasColumnType("char(36)")
+ .HasComment("Id กลุ่มเลือด");
+
+ b.Property("CitizenId")
+ .HasMaxLength(13)
+ .HasColumnType("varchar(13)")
+ .HasComment("รหัสบัตรประชาชน");
+
+ b.Property("Couple")
+ .HasColumnType("tinyint(1)")
+ .HasComment("คู่สมรส");
+
+ b.Property("CoupleCareer")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("อาชีพคู่สมรส");
+
+ b.Property("CoupleFirstName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อคู่สมรส");
+
+ b.Property("CoupleLastName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุลคู่สมรส");
+
+ b.Property("CoupleLastNameOld")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุลคู่สมรส(เดิม)");
+
+ b.Property("CouplePrefixId")
+ .HasColumnType("char(36)")
+ .HasComment("Id คำนำหน้าคู่สมรส");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUser")
+ .IsRequired()
+ .HasMaxLength(250)
+ .HasColumnType("varchar(250)");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("CurrentAddress")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("ที่อยู่ปัจจุบัน");
+
+ b.Property("CurrentDistrictId")
+ .HasColumnType("char(36)")
+ .HasComment("Id เขตปัจจุบัน");
+
+ b.Property("CurrentProvinceId")
+ .HasColumnType("char(36)")
+ .HasComment("Id จังหวัดปัจจุบัน");
+
+ b.Property("CurrentSubDistrictId")
+ .HasColumnType("char(36)")
+ .HasComment("Id แขวงปัจจุบัน");
+
+ b.Property("CurrentZipCode")
+ .HasMaxLength(5)
+ .HasColumnType("varchar(5)")
+ .HasComment("รหัสไปรษณีย์ปัจจุบัน");
+
+ b.Property("DateAppoint")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DateRetire")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DateStart")
+ .HasColumnType("datetime(6)");
+
+ b.Property("EmployeeClass")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("ประเภทลูกจ้าง");
+
+ b.Property("EmployeeType")
+ .HasMaxLength(20)
+ .HasColumnType("varchar(20)")
+ .HasComment("ประเภทการจ้าง");
+
+ b.Property("EntryStatus")
+ .IsRequired()
+ .HasMaxLength(5)
+ .HasColumnType("varchar(5)");
+
+ b.Property("FatherCareer")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("อาชีพบิดา");
+
+ b.Property("FatherFirstName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อบิดา");
+
+ b.Property("FatherLastName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุลบิดา");
+
+ b.Property("FatherPrefixId")
+ .HasColumnType("char(36)")
+ .HasComment("Id คำนำหน้าบิดา");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อ");
+
+ b.Property("FirstNameOld")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อ(เดิม)");
+
+ b.Property("GenderId")
+ .HasColumnType("char(36)");
+
+ b.Property("GovAgeAbsent")
+ .HasColumnType("int");
+
+ b.Property("GovAgePlus")
+ .HasColumnType("int");
+
+ b.Property("GovernmentCode")
+ .HasColumnType("longtext");
+
+ b.Property("IsActive")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsLeave")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsProbation")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsTransfer")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsVerified")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("KeycloakId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุล");
+
+ b.Property("LastNameOld")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุล(เดิม)");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("LeaveDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LeaveDateOrder")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LeaveDetail")
+ .HasColumnType("longtext");
+
+ b.Property("LeaveNumberOrder")
+ .HasColumnType("longtext");
+
+ b.Property("LeaveReason")
+ .HasMaxLength(1000)
+ .HasColumnType("varchar(1000)");
+
+ b.Property("LimitLeaveId")
+ .HasColumnType("char(36)");
+
+ b.Property("ModifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("MotherCareer")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("อาชีพมารดา");
+
+ b.Property("MotherFirstName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("ชื่อมารดา");
+
+ b.Property("MotherLastName")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("นามสกุลมารดา");
+
+ b.Property("MotherPrefixId")
+ .HasColumnType("char(36)")
+ .HasComment("Id คำนำหน้ามารดา");
+
+ b.Property("Nationality")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("สัญชาติ");
+
+ b.Property("Oc")
+ .HasColumnType("longtext")
+ .HasComment("สังกัด");
+
+ b.Property("OcId")
+ .HasColumnType("char(36)")
+ .HasComment("Id สังกัด");
+
+ b.Property("OrganizationOrganization")
+ .HasColumnType("longtext");
+
+ b.Property("OrganizationOrganizationId")
+ .HasColumnType("char(36)");
+
+ b.Property("OrganizationShortName")
+ .HasColumnType("longtext");
+
+ b.Property("OrganizationShortNameId")
+ .HasColumnType("char(36)");
+
+ b.Property("Physical")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("สถานภาพทางกาย");
+
+ b.Property("PosNoEmployee")
+ .HasColumnType("longtext")
+ .HasComment("เลขที่ตำแหน่งลูกจ้าง");
+
+ b.Property("PosNoId")
+ .HasColumnType("char(36)");
+
+ b.Property("PositionEmployeeGroup")
+ .HasColumnType("longtext")
+ .HasComment("กลุ่มงาน");
+
+ b.Property("PositionEmployeeGroupId")
+ .HasColumnType("char(36)")
+ .HasComment("Id กลุ่มงาน");
+
+ b.Property("PositionEmployeeLevel")
+ .HasColumnType("longtext")
+ .HasComment("ระดับชั้นงาน");
+
+ b.Property("PositionEmployeeLevelId")
+ .HasColumnType("char(36)")
+ .HasComment(" Id ระดับชั้นงาน");
+
+ b.Property("PositionEmployeePosition")
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่ง");
+
+ b.Property("PositionEmployeePositionId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ตำแหน่ง");
+
+ b.Property("PositionEmployeePositionSide")
+ .HasColumnType("longtext")
+ .HasComment("ด้านของตำแหน่ง");
+
+ b.Property("PositionEmployeePositionSideId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ด้านของตำแหน่ง");
+
+ b.Property("PositionExecutive")
+ .HasColumnType("longtext")
+ .HasComment("ตำแหน่งทางการบริหาร");
+
+ b.Property("PositionExecutiveId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ตำแหน่งทางการบริหาร");
+
+ b.Property("PositionExecutiveSide")
+ .HasColumnType("longtext")
+ .HasComment("ด้านทางการบริหาร");
+
+ b.Property("PositionExecutiveSideId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ด้านทางการบริหาร");
+
+ b.Property("PositionId")
+ .HasColumnType("char(36)");
+
+ b.Property("PositionLevelId")
+ .HasColumnType("char(36)");
+
+ b.Property("PositionLine")
+ .HasColumnType("longtext")
+ .HasComment("สายงาน");
+
+ b.Property("PositionLineId")
+ .HasColumnType("char(36)")
+ .HasComment("Id สายงาน");
+
+ b.Property("PositionPathSide")
+ .HasColumnType("longtext")
+ .HasComment("ด้าน/สาขา");
+
+ b.Property("PositionPathSideId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ด้าน/สาขา");
+
+ b.Property("PositionTypeId")
+ .HasColumnType("char(36)");
+
+ b.Property("PrefixId")
+ .HasColumnType("char(36)");
+
+ b.Property("PrefixOldId")
+ .HasColumnType("char(36)")
+ .HasComment("Id คำนำหน้า(เดิม)");
+
+ b.Property("ProfileType")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("Race")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasComment("เชื้อชาติ");
+
+ b.Property("ReasonSameDate")
+ .HasColumnType("longtext");
+
+ b.Property("RegistrationAddress")
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasComment("Id แขวงตามทะเบียนบ้าน");
+
+ b.Property("RegistrationDistrictId")
+ .HasColumnType("char(36)")
+ .HasComment("Id เขตตามทะเบียนบ้าน");
+
+ b.Property("RegistrationProvinceId")
+ .HasColumnType("char(36)")
+ .HasComment("Id จังหวัดตามทะเบียนบ้าน");
+
+ b.Property("RegistrationSame")
+ .HasColumnType("tinyint(1)")
+ .HasComment("ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้านหรือไม่");
+
+ b.Property("RegistrationSubDistrictId")
+ .HasColumnType("char(36)")
+ .HasComment("แขวงตามทะเบียนบ้าน");
+
+ b.Property("RegistrationZipCode")
+ .HasMaxLength(5)
+ .HasColumnType("varchar(5)")
+ .HasComment("รหัสไปรษณีย์ตามทะเบียนบ้าน");
+
+ b.Property("RelationshipId")
+ .HasColumnType("char(36)")
+ .HasComment("Id สถานะภาพ");
+
+ b.Property("ReligionId")
+ .HasColumnType("char(36)")
+ .HasComment("Id ศาสนา");
+
+ b.Property("TelephoneNumber")
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)")
+ .HasComment("เบอร์โทร");
+
+ b.Property("TransferDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("VerifiedDate")
+ .HasColumnType("datetime(6)");
+
+ b.Property("VerifiedUser")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AvatarId");
+
+ b.HasIndex("GenderId");
+
+ b.HasIndex("LimitLeaveId");
+
+ b.HasIndex("PosNoId");
+
+ b.HasIndex("PositionId");
+
+ b.HasIndex("PositionLevelId");
+
+ b.HasIndex("PositionTypeId");
+
+ b.HasIndex("PrefixId");
+
+ b.ToTable("Profiles");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbility", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DateEnd")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สิ้นสุด");
+
+ b.Property("DateStart")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่เริ่มต้น");
+
+ b.Property("Detail")
+ .HasColumnType("longtext")
+ .HasComment("รายละเอียด");
+
+ b.Property("Field")
+ .HasColumnType("longtext")
+ .HasComment("ด้าน");
+
+ b.Property("LastUpdateFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(105)
+ .HasComment("ชื่อ User ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdateUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(103)
+ .HasComment("User Id ที่แก้ไขข้อมูลล่าสุด");
+
+ b.Property("LastUpdatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(102)
+ .HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
+
+ b.Property("ProfileId")
+ .HasColumnType("char(36)");
+
+ b.Property("Reference")
+ .HasColumnType("longtext")
+ .HasComment("เอกสารอ้างอิง");
+
+ b.Property("Remark")
+ .HasColumnType("longtext")
+ .HasComment("หมายเหตุ");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProfileId");
+
+ b.ToTable("ProfileAbilitys");
+ });
+
+ modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileAbilityHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)")
+ .HasColumnOrder(0)
+ .HasComment("PrimaryKey")
+ .HasAnnotation("Relational:JsonPropertyName", "id");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)")
+ .HasColumnOrder(100)
+ .HasComment("สร้างข้อมูลเมื่อ");
+
+ b.Property("CreatedFullName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("varchar(200)")
+ .HasColumnOrder(104)
+ .HasComment("ชื่อ User ที่สร้างข้อมูล");
+
+ b.Property("CreatedUserId")
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnOrder(101)
+ .HasComment("User Id ที่สร้างข้อมูล");
+
+ b.Property("DateEnd")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่สิ้นสุด");
+
+ b.Property("DateStart")
+ .HasColumnType("datetime(6)")
+ .HasComment("วันที่เริ่มต้น");
+
+ b.Property("Detail")
+ .HasColumnType("longtext")
+ .HasComment("รายละเอียด");
+
+ b.Property("Field")
+ .HasColumnType("longtext")
+ .HasComment("ด้าน");
+
+ b.Property