ให้ออกลูกจ้าง
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
kittapath 2025-01-27 10:14:54 +07:00
parent 8a3baab88f
commit 87e8c17309
9 changed files with 19456 additions and 68 deletions

View file

@ -243,6 +243,7 @@ namespace BMA.EHR.Application.Repositories
{
try
{
Console.WriteLine(ocId);
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
if (period == null)
@ -293,7 +294,6 @@ namespace BMA.EHR.Application.Repositories
Root = p.Root,
});
// check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-8 ขอ บม.
var s1 = ((from p in inst_profile
where p.ProfileDateAppoint <= new DateTime(period.Year - 8, 5, 29)
@ -340,7 +340,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"2.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับปฏิบัติการ (8,340) แต่ไม่ถึงขั้นต่ำของอัตราเงินเดือนข้าราชการพลเรือนระดับชำนาญการ (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
}
})).ToList();
@ -445,7 +445,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"1.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับปฏิบัติการ (8,340) แต่ไม่ถึงขั้นต่ำของอัตราเงินเดือนข้าราชการพลเรือนระดับชำนาญการ (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
new MatchingCondition
{
@ -548,7 +548,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"1.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับปฏิบัติการ (8,340) แต่ไม่ถึงขั้นต่ำของอัตราเงินเดือนข้าราชการพลเรือนระดับชำนาญการ (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
new MatchingCondition
{
@ -734,7 +734,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"2.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับชำนาญการขึ้นไป (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
}
})).ToList();
@ -841,7 +841,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"1.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับชำนาญการขึ้นไป (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
new MatchingCondition
{
@ -945,7 +945,7 @@ namespace BMA.EHR.Application.Repositories
{
Condition =
$"1.ได้รับอัตราค่าจ้างตั้งแต่อัตราเงินเดือนขั้นต่ำของข้าราขการพลเรือนระดับชำนาญการขึ้นไป (15,050)",
Result = $"อัตราค่าจ้าง {p.SalaryCondition.Value.ToString("#,##0")}"
Result = $"อัตราค่าจ้าง {p?.SalaryCondition?.ToString("#,##0")??""}"
},
new MatchingCondition
{
@ -6535,30 +6535,30 @@ namespace BMA.EHR.Application.Repositories
if (period != null && period.InsigniaEmployees != null)
{
allEmployeeProfileByRoot =
(await _userProfileRepository.GetEmployeeProfileByPositionAsync(period.InsigniaEmployees.Select(x => x.RefId), AccessToken));
(await _userProfileRepository.GetEmployeeProfileByPositionAsync(ocId, period.InsigniaEmployees.Select(x => x.RefId), AccessToken));
}
var type_coin = await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot);
var type1_level1 = await GetInsigniaCandidate_Type1_Level1(periodId, ocId, allOfficerProfilesByRoot);
var type1_level2 = await GetInsigniaCandidate_Type1_Level2(periodId, ocId, allOfficerProfilesByRoot);
var type1_level3 = await GetInsigniaCandidate_Type1_Level3(periodId, ocId, allOfficerProfilesByRoot);
var type1_level4 = await GetInsigniaCandidate_Type1_Level4(periodId, ocId, allOfficerProfilesByRoot);
var type2_level5 = await GetInsigniaCandidate_Type2_Level5(periodId, ocId, allOfficerProfilesByRoot);
var type2_level6 = await GetInsigniaCandidate_Type2_Level6(periodId, ocId, allOfficerProfilesByRoot);
var type2_level7 = await GetInsigniaCandidate_Type2_Level7(periodId, ocId, allOfficerProfilesByRoot);
var type2_level8 = await GetInsigniaCandidate_Type2_Level8(periodId, ocId, allOfficerProfilesByRoot);
var type_coin = allOfficerProfilesByRoot.Count() > 0 ? await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type1_level1 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level1(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type1_level2 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level2(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type1_level3 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level3(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type1_level4 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type1_Level4(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level5 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level5(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level6 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level6(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level7 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level7(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level8 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level8(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level9_1 =
await GetInsigniaCandidate_Type2_Level9_1(periodId, ocId, allOfficerProfilesByRoot);
allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level9_1(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type2_level9_2 =
await GetInsigniaCandidate_Type2_Level9_2(periodId, ocId, allOfficerProfilesByRoot);
var type3_level10 = await GetInsigniaCandidate_Type3_Level10(periodId, ocId, allOfficerProfilesByRoot);
var type3_level11 = await GetInsigniaCandidate_Type3_Level11(periodId, ocId, allOfficerProfilesByRoot);
var type4_level10 = await GetInsigniaCandidate_Type4_Level10(periodId, ocId, allOfficerProfilesByRoot);
var type4_level11 = await GetInsigniaCandidate_Type4_Level11(periodId, ocId, allOfficerProfilesByRoot);
allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type2_Level9_2(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type3_level10 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type3_Level10(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type3_level11 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type3_Level11(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type4_level10 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type4_Level10(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var type4_level11 = allOfficerProfilesByRoot.Count() > 0 ? await GetInsigniaCandidate_Type4_Level11(periodId, ocId, allOfficerProfilesByRoot) : new List<InsigniaResultSet>();
var employee_type1 = await GetEmployeeInsignia_Type1(periodId, ocId, allEmployeeProfileByRoot);
var employee_type2 = await GetEmployeeInsignia_Type2(periodId, ocId, allEmployeeProfileByRoot);
var employee_type1 = allEmployeeProfileByRoot.Count() > 0 ? await GetEmployeeInsignia_Type1(periodId, ocId, allEmployeeProfileByRoot) : new List<InsigniaResultSet>();
var employee_type2 = allEmployeeProfileByRoot.Count() > 0 ? await GetEmployeeInsignia_Type2(periodId, ocId, allEmployeeProfileByRoot) : new List<InsigniaResultSet>();
// union result
foreach (var r in type_coin)

View file

@ -129,7 +129,7 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByRootIdDto>> GetEmployeeProfileByPositionAsync(dynamic empPosId, string? accessToken)
public async Task<List<GetProfileByRootIdDto>> GetEmployeeProfileByPositionAsync(Guid rootId, dynamic empPosId, string? accessToken)
{
try
{
@ -138,6 +138,7 @@ namespace BMA.EHR.Application.Repositories
var body = new
{
rootId,
empPosId
};