แก้ไขข้อมูล อกก
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);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ namespace BMA.EHR.Domain.Models.Retirement
|
|||
public string Type { get; set; } = string.Empty;
|
||||
[Comment("เอกสารประกาศ")]
|
||||
public Document? Document { get; set; }
|
||||
[Comment("รายละเอียดมติ อกก")]
|
||||
public string Detail { get; set; } = "มาตรา ๑๖ และมาตรา ๒๑ แห่งพระราชบัญญัตบำเหน็จบำนาญข้าราชการส่วนท้องถิ่น พ.ศ.๒๕๗๗ มาตรา ๘ แห่งพระราชบัญญัติบัเหน็จบำนาญข้าราชการกรุงเทพมหานคร พ.ศ.๒๕๕๔ ประกอบกับมติ ก.ก. ครั้งที่๑๑/๒๕๕๕ เมื่อวันที่ ๑๕ พฤศจิกายน ๒๕๕๕และมติ อ.ก.ก. สามัญข้ารายการสามัญครั้งที่ ๑/๒๕๖๕ เมื่อวันที่ ๒๑ กุมภาพันธ์ ๒๕๖๕";
|
||||
public virtual List<RetirementPeriodHistory> RetirementPeriodHistorys { get; set; } = new List<RetirementPeriodHistory>();
|
||||
public virtual List<RetirementProfile> RetirementProfiles { get; set; } = new List<RetirementProfile>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ namespace BMA.EHR.Domain.Models.Retirement
|
|||
public string ProfileFile { get; set; }
|
||||
[Comment("เอกสารประกาศ")]
|
||||
public Document? Document { get; set; }
|
||||
[Comment("รายละเอียดมติ อกก")]
|
||||
public string Detail { get; set; } = "มาตรา ๑๖ และมาตรา ๒๑ แห่งพระราชบัญญัตบำเหน็จบำนาญข้าราชการส่วนท้องถิ่น พ.ศ.๒๕๗๗ มาตรา ๘ แห่งพระราชบัญญัติบัเหน็จบำนาญข้าราชการกรุงเทพมหานคร พ.ศ.๒๕๕๔ ประกอบกับมติ ก.ก. ครั้งที่๑๑/๒๕๕๕ เมื่อวันที่ ๑๕ พฤศจิกายน ๒๕๕๕และมติ อ.ก.ก. สามัญข้ารายการสามัญครั้งที่ ๑/๒๕๖๕ เมื่อวันที่ ๒๑ กุมภาพันธ์ ๒๕๖๕";
|
||||
public RetirementPeriod RetirementPeriod { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
16281
BMA.EHR.Infrastructure/Migrations/20230913075447_update table retirementperiod add detail.Designer.cs
generated
Normal file
16281
BMA.EHR.Infrastructure/Migrations/20230913075447_update table retirementperiod add detail.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableretirementperiodadddetail : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Detail",
|
||||
table: "RetirementPeriods",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "รายละเอียดมติ อกก")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Detail",
|
||||
table: "RetirementPeriodHistorys",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "รายละเอียดมติ อกก")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Detail",
|
||||
table: "RetirementPeriods");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Detail",
|
||||
table: "RetirementPeriodHistorys");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13466,6 +13466,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดมติ อกก");
|
||||
|
||||
b.Property<Guid?>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
@ -13540,6 +13545,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<string>("Detail")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("รายละเอียดมติ อกก");
|
||||
|
||||
b.Property<Guid?>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
Round = x.Round,
|
||||
Total = x.Total,
|
||||
TypeReport = x.TypeReport,
|
||||
Detail = x.Detail,
|
||||
Json = true,
|
||||
Document = x.Document == null ? false : true,
|
||||
})
|
||||
|
|
@ -188,6 +189,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
Round = retire.Round,
|
||||
Total = retire.RetirementProfiles.Count(),
|
||||
TypeReport = retire.TypeReport,
|
||||
Detail = retire.Detail,
|
||||
Json = false,
|
||||
Document = retire.Document == null ? false : true,
|
||||
});
|
||||
|
|
@ -306,6 +308,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
RetirementPeriod = retire,
|
||||
Round = retire.Round,
|
||||
TypeReport = retire.TypeReport,
|
||||
Detail = retire.Detail,
|
||||
Year = retire.Year,
|
||||
Type = retire.Type,
|
||||
Document = retire.Document,
|
||||
|
|
@ -429,7 +432,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
posNoEmployee = x.Profile.PosNoEmployee,
|
||||
})
|
||||
.ToListAsync();
|
||||
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, profile = profile_new });
|
||||
return Success(new { retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.Detail, profile = profile_new });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -464,7 +467,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var responseTask = client.GetAsync(url);
|
||||
var results = responseTask.Result;
|
||||
var filehis = profileHistorys.Document == null ? null : await _documentService.ImagesPath(profileHistorys.Document.Id);
|
||||
return Success(new { Json = true, profileHistorys.Id, profileHistorys.CreatedAt, profileHistorys.Year, profileHistorys.Round, profileHistorys.Type, profileHistorys.TypeReport, profile = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ProfileJsonRequest>>(results.Content.ReadAsStringAsync().Result), File = filehis });
|
||||
return Success(new { Json = true, profileHistorys.Id, profileHistorys.CreatedAt, profileHistorys.Year, profileHistorys.Round, profileHistorys.Type, profileHistorys.TypeReport, profileHistorys.Detail, profile = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ProfileJsonRequest>>(results.Content.ReadAsStringAsync().Result), File = filehis });
|
||||
}
|
||||
}
|
||||
var profile_new = await _context.RetirementProfiles
|
||||
|
|
@ -492,7 +495,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
})
|
||||
.ToListAsync();
|
||||
var file = retire.Document == null ? null : await _documentService.ImagesPath(retire.Document.Id);
|
||||
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, profile = profile_new, File = file });
|
||||
return Success(new { Json = false, retire.Id, retire.CreatedAt, retire.Year, retire.Round, retire.Type, retire.TypeReport, retire.Detail, profile = profile_new, File = file });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -709,7 +712,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
var retire = await _context.RetirementPeriods
|
||||
.FirstOrDefaultAsync(x => x.Id == retireId);
|
||||
if (retire == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
return Error(GlobalMessages.RetirementNotFound, 404);
|
||||
if (Request.Form.Files != null && Request.Form.Files.Count != 0)
|
||||
{
|
||||
var file = Request.Form.Files[0];
|
||||
|
|
@ -744,10 +747,40 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.Include(x => x.Document)
|
||||
.FirstOrDefaultAsync(x => x.Id == retireId);
|
||||
if (retire == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
return Error(GlobalMessages.RetirementNotFound, 404);
|
||||
if (retire.Document == null)
|
||||
return Success(false);
|
||||
return Success(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// แก้ไขข้อความมติ อ.ก.ก.
|
||||
/// </summary>
|
||||
/// <param name="retireId">Id ประกาศ</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("detail/{retireId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateDetailRetirement([FromForm] RetirementDetailRequest req, Guid retireId)
|
||||
{
|
||||
var retire = await _context.RetirementPeriods
|
||||
.FirstOrDefaultAsync(x => x.Id == retireId);
|
||||
if (retire == null)
|
||||
{
|
||||
var retireHistory = await _context.RetirementPeriodHistorys
|
||||
.FirstOrDefaultAsync(x => x.Id == retireId);
|
||||
if (retireHistory == null)
|
||||
return Error(GlobalMessages.RetirementNotFound, 404);
|
||||
retireHistory.Detail = req.Detail;
|
||||
}
|
||||
else
|
||||
{
|
||||
retire.Detail = req.Detail;
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
return Success(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace BMA.EHR.Retirement.Service.Requests
|
||||
{
|
||||
public class RetirementDetailRequest
|
||||
{
|
||||
public string Detail { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue