diff --git a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs index 3bb279c2..95c910b2 100644 --- a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs +++ b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs @@ -951,7 +951,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }xxx1", + Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }", Result = $"วันที่บรรจุเข้ารับราชการ { p.ProfileDateAppoint.ToThaiFullDate3() }" } } @@ -1021,7 +1021,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือนน้อยกว่า 10,190 บาท)xxx2", + Condition = $"1.ได้รับเงินเดือนต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือนน้อยกว่า 10,190 บาท)", Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท" }, new MatchingCondition @@ -1096,7 +1096,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)xxx3", + Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)", Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท" } } @@ -1167,7 +1167,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)xxx4", + Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญงาน (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 10,190 บาทขึ้นไป)", Result = $"ได้รับเงินเดือน { p.SalaryCondition } บาท" }, new MatchingCondition @@ -1350,7 +1350,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับชำนาญงานxxx5", + Condition = $"1.เป็นระดับชำนาญงาน", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -1427,7 +1427,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับชำนาญงาน ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})xxx6", + 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()) }" }, @@ -1570,7 +1570,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับอาวุโสxxx7", + Condition = $"1.เป็นระดับอาวุโส", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -1648,7 +1648,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ดำรงตำแหน่งมาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (เป็นระดับอาวุโส ก่อนวันที่ {(new DateTime(period.Year - 5, 5, 29)).ToThaiFullDate3()})xxx8", + 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()) }" }, @@ -1791,7 +1791,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับทักษะพิเศษxxx9", + Condition = $"1.เป็นระดับทักษะพิเศษ", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -1871,7 +1871,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้รับ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})xxx10", + Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้รับ ท.ช. ก่อนวันที่ {(new DateTime(period.Year - 3, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -1951,7 +1951,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ ป.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})xxx11", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้รับ ป.ม. ก่อนวันที่ {(new DateTime(period.Year - 5, 7, 28)).ToThaiFullDate3()})", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear }" }, @@ -2117,7 +2117,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }xxx12", + Condition = $"1.รับราชการก่อน { new DateTime(period.Year - 5, 5, 29).ToThaiFullDate3() }", Result = $"วันที่บรรจุเข้ารับราชการ { p.ProfileDateAppoint.ToThaiFullDate3() }" } } @@ -2241,7 +2241,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับชำนาญการxxx13", + Condition = $"1.เป็นระดับชำนาญการ", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -2314,7 +2314,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษ (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 22,140 บาท)xxx14", + Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษ (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 22,140 บาท)", Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท" }, @@ -2387,7 +2387,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษมาแล้วไม่น้อยกว่า 5 ปี (เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } 22,140 บาท)xxx15", + Condition = $"1.ได้รับเงินเดือนไม่ต่ำกว่าขั้นต่ำของระดับชำนาญการพิเศษมาแล้วไม่น้อยกว่า 5 ปี (เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } 22,140 บาท)", Result = $"เงินเดือนก่อนวันที่ { (new DateTime(period.Year-5, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท" }, @@ -2548,7 +2548,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับชำนาญการพิเศษxxx16", + Condition = $"1.เป็นระดับชำนาญการพิเศษ", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -2625,7 +2625,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)xxx17", + Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)", Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท" }, new MatchingCondition @@ -2774,7 +2774,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับเชี่ยวชาญxxx18", + Condition = $"1.เป็นระดับเชี่ยวชาญ", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -2851,7 +2851,7 @@ namespace BMA.EHR.Application.Repositories new MatchingCondition { - Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx19", + Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -2928,7 +2928,7 @@ namespace BMA.EHR.Application.Repositories new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })xxx20", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ท.ช. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -3098,7 +3098,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx21", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3184,7 +3184,7 @@ namespace BMA.EHR.Application.Repositories new MatchingCondition { - Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx22", + Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3270,7 +3270,7 @@ namespace BMA.EHR.Application.Repositories new MatchingCondition { - Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })xxx23", + Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-5, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3444,7 +3444,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx24", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3530,7 +3530,7 @@ namespace BMA.EHR.Application.Repositories new MatchingCondition { - Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx25", + Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3614,7 +3614,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })xxx26", + Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ม.ว.ม. ก่อนวันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() })", Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -3777,7 +3777,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.เป็นระดับอำนวยการ/ต้นxxx27", + Condition = $"1.เป็นระดับอำนวยการ/ต้น", Result = $"ตำแหน่ง { p.Position } ประเภท { p.PositionType } ระดับ { p.PositionLevel }" }, @@ -3854,7 +3854,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)xxx28", + Condition = $"1.ได้รับเงินเดือนขั้นสูง (เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } 58,390 บาท)", Result = $"เงินเดือน ณ วันที่ { (new DateTime(period.Year, 4, 29)).ToThaiFullDate3() } เป็นเงิน { p.SalaryCondition } บาท" }, new MatchingCondition @@ -4000,7 +4000,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx29", + Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4076,7 +4076,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx30", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4152,7 +4152,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx31", + Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4316,7 +4316,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx32", + Condition = $"1.ได้ ท.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ท.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ท.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4392,7 +4392,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx33", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4468,7 +4468,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx34", + Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, @@ -4608,7 +4608,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx35", + Condition = $"1.ได้ ป.ม. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -4692,7 +4692,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx36", + Condition = $"1.ได้ ป.ช. มาแล้วไม่น้อยกว่า 3 ปี บริบูรณ์ (ได้ ป.ช. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ป.ช. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition @@ -4776,7 +4776,7 @@ namespace BMA.EHR.Application.Repositories { new MatchingCondition { - Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)xxx37", + Condition = $"1.ได้ ม.ว.ม. มาแล้วไม่น้อยกว่า 5 ปี บริบูรณ์ (ได้ ม.ว.ม. วันที่ { (new DateTime(period.Year-3, 7, 28)).ToThaiFullDate3() } หรือก่อนหน้านั้น)", Result = $"ได้รับ ม.ว.ม. ในปี { p.FirstRecvInsigniaYear.ToThaiYear() }" }, new MatchingCondition diff --git a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs index 7bd8858f..28d486b7 100644 --- a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs @@ -158,6 +158,7 @@ namespace BMA.EHR.Application.Repositories.Reports Position = r.Position == null ? "-" : r.Position.Name, OCName = r.OcId == null ? "-" : _organizationCommonRepository.GetOrganizationNameFullPath(r.OcId.Value, false, false), BirthDate = r.BirthDate.ToThaiFullDate().ToString().ToThaiNumber(), + DateAppoint = !string.IsNullOrEmpty(r.DateAppoint.ToString()) ? DateTime.Parse(r.DateAppoint.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : string.Empty, }) .FirstOrDefault(); if (profile == null) @@ -737,16 +738,18 @@ namespace BMA.EHR.Application.Repositories.Reports { Gendor = x.Profile.Gender == null ? null : x.Profile.Gender.Name, RequestInsigniaName = x.RequestInsignia.Name, + InsigniaInitial = $"{x.RequestInsignia.Name}({x.RequestInsignia.ShortName})", OcId = x.Request.Organization.Id }) .ToListAsync(); var insignia = (from r in data_insignia - group r by new { OcId = r.OcId } into g + group r by new { OcId = r.OcId, InsigniaInitial = r.InsigniaInitial } into g select new { RowNo = 1, DepartmentName = _organizationCommonRepository.GetOrganizationNameFullPath(g.Key.OcId, false, false), + InsigniaInitial = g.Key.InsigniaInitial, G1Male = g.Sum(x => x.Gendor == "ชาย" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(), G1Female = g.Sum(x => x.Gendor == "หญิง" && x.RequestInsigniaName == "เหรียญจักรพรรดิมาลา" ? 1 : 0).ToString().ToThaiNumber(), G2Male = g.Sum(x => x.Gendor == "ชาย" ? 1 : 0).ToString().ToThaiNumber(), diff --git a/BMA.EHR.Report.Service/Controllers/InsigniaReportController.cs b/BMA.EHR.Report.Service/Controllers/InsigniaReportController.cs index 3e88e8f0..52fdaec3 100644 --- a/BMA.EHR.Report.Service/Controllers/InsigniaReportController.cs +++ b/BMA.EHR.Report.Service/Controllers/InsigniaReportController.cs @@ -1,12 +1,8 @@ using BMA.EHR.Application.Repositories.Reports; using BMA.EHR.Domain.Common; using BMA.EHR.Domain.Extensions; -using BMA.EHR.Domain.Models.Insignias; -using DocumentFormat.OpenXml.Drawing; -using DocumentFormat.OpenXml.EMMA; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.FileProviders; using Swashbuckle.AspNetCore.Annotations; using Telerik.Reporting; using Telerik.Reporting.Processing; @@ -453,6 +449,7 @@ namespace BMA.EHR.Report.Service.Controllers { RowNo = (_Khr6List.Count + 1).ToString().ToThaiNumber(), DepartmentName = _data.GetType().GetProperty("DepartmentName").GetValue(_data), + InsigniaInitial = _data.GetType().GetProperty("InsigniaInitial").GetValue(_data), G1Male = _data.GetType().GetProperty("G1Male").GetValue(_data), G1Female = _data.GetType().GetProperty("G1Female").GetValue(_data), G2Male = _data.GetType().GetProperty("G2Male").GetValue(_data), @@ -496,6 +493,7 @@ namespace BMA.EHR.Report.Service.Controllers { try { + //Guid ids = Guid.Parse(id); var data = await _repository.GetCoinReport(id); var YearInsignalPeriod = await _repository.GetYearInsigniaPeriod(id); var mimeType = ""; @@ -535,7 +533,7 @@ namespace BMA.EHR.Report.Service.Controllers { status = status, row = detailList.Count + 1, - Number = (detailList.Count + 1).ToString().ToThaiNumber(), + //Number = (detailList.Count + 1).ToString().ToThaiNumber(), InsigniaName = dataList[i].GetType().GetProperty("InsigniaName").GetValue(dataList[i]), FullName = dataList[i].GetType().GetProperty("FullName").GetValue(dataList[i]), InsigniaInitial = dataList[i].GetType().GetProperty("InsigniaInitial").GetValue(dataList[i]), @@ -559,20 +557,54 @@ namespace BMA.EHR.Report.Service.Controllers var left = detailList.Where(x => x.status == false); var right = detailList.Where(x => x.status == true); var mergeList = new List(); + var InsigniaName = string.Empty; + var range = string.Empty; + var male = 0; + var female = 0; + var start = 0; + var stop = 0; + var colLeft = 0; + var colRight = 0; for (int i = 0; i < detailList.Count / 2; i++) { + if (InsigniaName != (string)left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i))) + { + InsigniaName = (string)left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i)); + male = left.Count(x => x.Male == 1 && x.InsigniaName == InsigniaName) + right.Count(x => x.Male == 1 && x.InsigniaName == InsigniaName); + female = left.Count(x => x.Female == 1 && x.InsigniaName == InsigniaName) + right.Count(x => x.Female == 1 && x.InsigniaName == InsigniaName); + //find coin group range + var countGroup = detailList.Count(x => x.InsigniaName == InsigniaName); + var countGroupTemp = detailList.Count(x => x.InsigniaName == InsigniaName && x.FullName == ""); + start = i == 0 ? (mergeList.Count + 1) : (stop + 1); + stop = i == 0 ? (mergeList.Count) + (countGroup - countGroupTemp) : (countGroup - countGroupTemp) == 1 ? start : start + (countGroup - countGroupTemp); + range = countGroup - countGroupTemp != 1 ? $"{start} - {stop}" : $"{start}"; + //set column left and right when start + colLeft = start; + colRight = start + 25; + } mergeList.Add(new { row = mergeList.Count + 1, - RowLeft = left.ElementAt(i).GetType().GetProperty("Number").GetValue(left.ElementAt(i)), + //RowLeft = left.ElementAt(i).GetType().GetProperty("Number").GetValue(left.ElementAt(i)), + ColLeft = colLeft.ToString().ToThaiNumber(), NameLeft = left.ElementAt(i).GetType().GetProperty("FullName").GetValue(left.ElementAt(i)), - RowRight = right.ElementAt(i).GetType().GetProperty("Number").GetValue(right.ElementAt(i)), + //RowRight = right.ElementAt(i).GetType().GetProperty("Number").GetValue(right.ElementAt(i)), + ColRight = colRight.ToString().ToThaiNumber(), NameRight = right.ElementAt(i).GetType().GetProperty("FullName").GetValue(right.ElementAt(i)), InsigniaInitial = left.ElementAt(i).GetType().GetProperty("InsigniaInitial").GetValue(left.ElementAt(i)), InsigniaName = left.ElementAt(i).GetType().GetProperty("InsigniaName").GetValue(left.ElementAt(i)), - Male = left.ElementAt(i).GetType().GetProperty("Male").GetValue(left.ElementAt(i)) + right.ElementAt(i).GetType().GetProperty("Male").GetValue(right.ElementAt(i)), - Female = left.ElementAt(i).GetType().GetProperty("Female").GetValue(left.ElementAt(i)) + right.ElementAt(i).GetType().GetProperty("Female").GetValue(right.ElementAt(i)), + Range = range.ToThaiNumber(), + Male = male.ToString().ToThaiNumber(), + Female = female.ToString().ToThaiNumber(), }); + if (mergeList.Count % 25 == 0) + { + //set column when new page + colLeft = colRight; + colRight = colLeft + 25; + } + colLeft++; + colRight++; } report.DataSource = mergeList; } @@ -634,6 +666,7 @@ namespace BMA.EHR.Report.Service.Controllers report.ReportParameters["Position"].Value = profile.GetType().GetProperty("Position").GetValue(profile); report.ReportParameters["OCName"].Value = profile.GetType().GetProperty("OCName").GetValue(profile); report.ReportParameters["BirthDate"].Value = profile.GetType().GetProperty("BirthDate").GetValue(profile); + report.ReportParameters["DateAppoint"].Value = profile.GetType().GetProperty("DateAppoint").GetValue(profile); var historysalary = new List(); foreach (var _data in data) diff --git a/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp b/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp index 57a8f780..85e94066 100644 Binary files a/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp and b/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา-1.trdp b/BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา-1.trdp index d6a7e9b9..09e1c363 100644 Binary files a/BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา-1.trdp and b/BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา-1.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/46-ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา.trdp b/BMA.EHR.Report.Service/Reports/46-ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา.trdp index bafebdb0..7d077428 100644 Binary files a/BMA.EHR.Report.Service/Reports/46-ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา.trdp and b/BMA.EHR.Report.Service/Reports/46-ประวัติสำหรับการเสนอขอพระราชทานเหรียญจักรพรรดิมาลา.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา.trdp b/BMA.EHR.Report.Service/Reports/Old/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา.trdp similarity index 100% rename from BMA.EHR.Report.Service/Reports/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา.trdp rename to BMA.EHR.Report.Service/Reports/Old/45-บัญชีแสดงรายชื่อผู้ขอพระราชทานเหรียญจักรพรรดิมาลา.trdp