แก้ไขข้อมูล อกก
This commit is contained in:
parent
cfaf90cb01
commit
15d0af2f23
9 changed files with 16453 additions and 13 deletions
|
|
@ -6503,9 +6503,9 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Double MonthSalaryAmount = 0;
|
||||
if (profile != null && profile.Salaries.Count() > 0)
|
||||
{
|
||||
SalaryAmount = placementProfile.Amount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value : 0;
|
||||
PositionSalaryAmount = placementProfile.PositionSalaryAmount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount.Value : 0;
|
||||
MonthSalaryAmount = placementProfile.MouthSalaryAmount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().MouthSalaryAmount.Value : 0;
|
||||
SalaryAmount = cmdReceiver.Amount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value : 0;
|
||||
PositionSalaryAmount = cmdReceiver.PositionSalaryAmount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount.Value : 0;
|
||||
MonthSalaryAmount = cmdReceiver.MouthSalaryAmount == null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().MouthSalaryAmount.Value : 0;
|
||||
}
|
||||
|
||||
return new PlacementSalaryResponse
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
p.IsActive == true &&
|
||||
p.IsLeave == false &&
|
||||
p.DateAppoint != null &&
|
||||
|
||||
|
||||
p.ProfileType == "employee" &&
|
||||
p.EmployeeClass == "perm"
|
||||
)
|
||||
|
|
@ -259,7 +259,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.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,
|
||||
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 ? null : p.Salaries.Where(x => x.Date <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount,
|
||||
PostionSalaryAmount = p.Salaries.Count() == 0 ? null : p.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount,
|
||||
//FirstRecvInsigniaYear1 = p.Insignias.Count == 0 ? 0 :
|
||||
// p.Insignias.Where(x => x.Insignia.Name == "เบญจมาภรณ์มงกุฎไทย").OrderBy(x => x.Year).FirstOrDefault() == null ? 0 :
|
||||
|
|
@ -273,8 +273,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
var s1 = ((from p in inst_profile
|
||||
where p.ProfileDateAppoint <= new DateTime(period.Year - 8, 5, 29)
|
||||
&& p.LastInsigniaId == Guid.Parse("00000000-0000-0000-0000-000000000000")
|
||||
&& (p.SalaryCondition >= 8340
|
||||
&& p.SalaryCondition < 15050 )
|
||||
&& (p.SalaryCondition >= 8340
|
||||
&& p.SalaryCondition < 15050)
|
||||
select p)
|
||||
.ToList()
|
||||
.Select(p => new InsigniaResultSet
|
||||
|
|
@ -891,6 +891,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
p.IsLeave == false &&
|
||||
p.DateAppoint != null &&
|
||||
p.PositionType != null &&
|
||||
p.ProfileType == "officer" &&
|
||||
p.PositionType.Name == "ทั่วไป" //
|
||||
)
|
||||
.Select(p => new
|
||||
|
|
@ -962,6 +963,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("เบญจมาภรณ์ช้างเผือก")
|
||||
|
|
@ -1036,6 +1038,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป1
|
||||
&& p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน1
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("จัตุรถาภรณ์มงกุฎไทย")
|
||||
|
|
@ -1104,6 +1107,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป1
|
||||
&& p.PositionLevel.Name == "ปฏิบัติงาน" // ปฏิบัติงาน1
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("จัตุรถาภรณ์ช้างเผือก")
|
||||
|
|
@ -1285,6 +1289,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& p.PositionLevel.Name == "ชำนาญงาน" // ชำนาญงาน
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ตริตาภรณ์มงกุฎไทย")
|
||||
|
|
@ -1357,6 +1362,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& p.PositionLevel.Name == "ชำนาญงาน" // ชำนาญงาน
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ตริตาภรณ์ช้างเผือก")
|
||||
|
|
@ -1501,6 +1507,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& p.PositionLevel.Name == "อาวุโส" // อาวุโส
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์มงกุฎไทย")
|
||||
|
|
@ -1573,6 +1580,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& p.PositionLevel.Name == "อาวุโส" // อาวุโส
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -1718,6 +1726,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& (p.PositionLevel.Name == "อาวุโส" || p.PositionLevel.Name == "อาวุโส (เฉพาะสายงาน)") // อาวุโส
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -1790,6 +1799,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& (p.PositionLevel.Name == "อาวุโส" || p.PositionLevel.Name == "อาวุโส (เฉพาะสายงาน)") // อาวุโส
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -1868,6 +1878,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "ทั่วไป" // ทั่วไป
|
||||
&& (p.PositionLevel.Name == "อาวุโส" || p.PositionLevel.Name == "อาวุโส (เฉพาะสายงาน)") // อาวุโส
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
|
|
@ -2035,7 +2046,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
p.IsLeave == false &&
|
||||
p.DateAppoint != null &&
|
||||
p.PositionType != null &&
|
||||
p.PositionType.Name == "วิชาการ" // ประเภทวิชาการ
|
||||
p.PositionType.Name == "วิชาการ" && // ประเภทวิชาการ
|
||||
p.ProfileType == "officer"
|
||||
)
|
||||
.Select(p => new
|
||||
{
|
||||
|
|
@ -2160,6 +2172,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการ" // ชำนาญการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ตริตาภรณ์ช้างเผือก")
|
||||
|
|
@ -2230,6 +2243,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการ" // ชำนาญการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์มงกุฎไทย")
|
||||
|
|
@ -2301,6 +2315,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการ" // ชำนาญการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -2461,6 +2476,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการพิเศษ" // ชำนาญการพิเศษ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -2531,6 +2547,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการพิเศษ" // ชำนาญการพิเศษ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -2683,6 +2700,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ" // เชี่ยวชสญ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -2753,6 +2771,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ" // เชี่ยวชาญ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -2828,6 +2847,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ" // เชี่ยวชาญ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
|
|
@ -2991,6 +3011,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
|
|
@ -3074,6 +3095,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
|
|
@ -3159,6 +3181,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
|
|
@ -3332,6 +3355,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
|
|
@ -3414,6 +3438,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
|
|
@ -3498,6 +3523,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionType != null
|
||||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.ProfileType == "officer"
|
||||
&& (p.PositionLevel.Name == "ทรงคุณวุฒิ" || p.PositionLevel.Name == "ทรงคุณวุฒิ (เฉพาะสายงาน)") // ทรงคุณวุฒิ
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
|
|
@ -3668,6 +3694,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "อำนวยการ" // อำนวยการ
|
||||
&& p.PositionLevel.Name == "ต้น" // ต้น
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
|
|
@ -3738,6 +3765,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "วิชาการ" // วิชาการ
|
||||
&& p.PositionLevel.Name == "ชำนาญการพิเศษ" // ชำนาญการพิเศษ
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -3883,6 +3911,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "อำนวยการ" // อำนวยการ
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -3957,6 +3986,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "อำนวยการ" // อำนวยการ
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
|
|
@ -4031,6 +4061,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "อำนวยการ" // อำนวยการ
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
|
||||
|
|
@ -4193,6 +4224,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "ต้น" // ต้น
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
|
|
@ -4267,6 +4299,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "ต้น" // ต้น
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
|
|
@ -4341,6 +4374,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "ต้น" // ต้น
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
|
||||
|
|
@ -4475,6 +4509,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
|
|
@ -4557,6 +4592,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
|
||||
|
|
@ -4639,6 +4675,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.PositionLevel != null
|
||||
&& p.PositionType.Name == "บริหาร" // บริหาร
|
||||
&& p.PositionLevel.Name == "สูง" // สูง
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา"))
|
||||
.OrderByDescending(x => x.Year)
|
||||
.FirstOrDefault().Insignia.Name.Contains("มหาปรมาภรณ์ช้างเผือก")
|
||||
|
|
@ -4788,6 +4825,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
allOc.Contains(p.OcId == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.OcId.Value) &&
|
||||
p.IsActive == true &&
|
||||
p.IsLeave == false &&
|
||||
p.ProfileType == "officer" &&
|
||||
p.DateAppoint != null
|
||||
)
|
||||
.Select(p => new
|
||||
|
|
@ -4841,6 +4879,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "ชำนาญการ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ตริตาภรณ์ช้างเผือก")
|
||||
select new
|
||||
{
|
||||
|
|
@ -4891,6 +4930,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "ชำนาญการ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์มงกุฎไทย")
|
||||
select new
|
||||
{
|
||||
|
|
@ -4940,6 +4980,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "ชำนาญการ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
select new
|
||||
{
|
||||
|
|
@ -4989,6 +5030,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& allOc.Contains(p.OcId == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.OcId.Value)
|
||||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ทวีติยาภรณ์ช้างเผือก")
|
||||
select p)
|
||||
.ToList()
|
||||
|
|
@ -5023,6 +5065,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "ชำนาญการพิเศษ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
select new
|
||||
{
|
||||
|
|
@ -5074,6 +5117,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์มงกุฎไทย")
|
||||
select new
|
||||
{
|
||||
|
|
@ -5124,6 +5168,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("ประถมาภรณ์ช้างเผือก")
|
||||
select new
|
||||
{
|
||||
|
|
@ -5174,6 +5219,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
&& p.IsLeave == false
|
||||
&& p.DateAppoint != null
|
||||
&& p.PositionLevel.Name == "เชี่ยวชาญ"
|
||||
&& p.ProfileType == "officer"
|
||||
&& !p.Insignias.Where(x => !x.Insignia.Name.Contains("เหรียญจักรพรรดิมาลา")).OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name.Contains("มหาวชิรมงกุฎ")
|
||||
select new
|
||||
{
|
||||
|
|
@ -5261,6 +5307,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
var result_candidate = new List<InsigniaResultSet>();
|
||||
|
||||
var employee_type1 = await GetEmployeeInsignia_Type1(periodId, ocId);
|
||||
var employee_type2 = await GetEmployeeInsignia_Type2(periodId, ocId);
|
||||
var type1_level1 = await GetInsigniaCandidate_Type1_Level1(periodId, ocId);
|
||||
var type1_level2 = await GetInsigniaCandidate_Type1_Level2(periodId, ocId);
|
||||
var type1_level3 = await GetInsigniaCandidate_Type1_Level3(periodId, ocId);
|
||||
|
|
@ -5362,6 +5410,18 @@ namespace BMA.EHR.Application.Repositories
|
|||
if (old == null)
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
foreach (var r in employee_type2)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
if (old == null)
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
foreach (var r in employee_type1)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
if (old == null)
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
foreach (var r in type_coin)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue