Merge branch 'develop' into working
Some checks failed
release-dev / release-dev (push) Failing after 11s
Some checks failed
release-dev / release-dev (push) Failing after 11s
# Conflicts: # BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs
This commit is contained in:
commit
26ee5e476a
1 changed files with 0 additions and 50 deletions
|
|
@ -1036,15 +1036,11 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("11asd1112");
|
||||
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
|
||||
|
||||
Console.WriteLine("11asd1112z");
|
||||
if (period == null)
|
||||
throw new Exception(GlobalMessages.CoinPeriodNotFound);
|
||||
Console.WriteLine("11asdz111qwe2");
|
||||
var CurrentRetireDate = new DateTime(period.Year, 9, 30);
|
||||
Console.WriteLine("11asdz1cad112");
|
||||
var inst_profile = allProfilesByRoot
|
||||
.Select(p => new
|
||||
{
|
||||
|
|
@ -1094,16 +1090,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
Root = p.Root,
|
||||
});
|
||||
|
||||
Console.WriteLine("11asdz1qweqwdgfafs112");
|
||||
Console.WriteLine(inst_profile);
|
||||
Console.WriteLine("11asdz1qweqwdgfafs1112");
|
||||
Console.WriteLine(allProfilesByRoot);
|
||||
Console.WriteLine("11asdz1qweqwdgfafs1212");
|
||||
Console.WriteLine(JsonConvert.SerializeObject(allProfilesByRoot));
|
||||
Console.WriteLine("11asdz1qweqwdgfafs3112");
|
||||
Console.WriteLine(JsonConvert.SerializeObject(inst_profile));
|
||||
Console.WriteLine("11asdz1qweqwdgfafs1412");
|
||||
Console.WriteLine("11asdz1112");
|
||||
// check วันที่บรรจะต้องน้อยกว่า 29/5/ปี-5
|
||||
var s1 = ((from p in inst_profile
|
||||
where p.ProfileDateAppoint <= new DateTime(period.Year - 5, 5, 29)
|
||||
|
|
@ -1149,7 +1135,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
})).ToList();
|
||||
|
||||
Console.WriteLine("11ased1112");
|
||||
var s2 = (from p in allProfilesByRoot
|
||||
where p.PosType == "ทั่วไป"
|
||||
&& p.PosLevel == "ปฏิบัติงาน"
|
||||
|
|
@ -1259,7 +1244,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
})
|
||||
.ToList();
|
||||
|
||||
Console.WriteLine("11atsd1112");
|
||||
var s3 = (from p in allProfilesByRoot
|
||||
where p.PosType == "ทั่วไป"
|
||||
&& p.PosLevel == "ปฏิบัติงาน"
|
||||
|
|
@ -1368,7 +1352,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
})
|
||||
.ToList();
|
||||
|
||||
Console.WriteLine("11hasd1112");
|
||||
var s4 = (from p in allProfilesByRoot
|
||||
where p.PosType == "ทั่วไป"
|
||||
&& p.PosLevel == "ปฏิบัติงาน"
|
||||
|
|
@ -1485,10 +1468,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
.ToList();
|
||||
|
||||
|
||||
Console.WriteLine("11asd1fs112");
|
||||
var result_candidate = new List<InsigniaResultSet>();
|
||||
|
||||
Console.WriteLine("11aqfassd1112");
|
||||
foreach (var r in s4)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
@ -1507,7 +1488,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("11asdxcd1112");
|
||||
foreach (var r in s3)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
@ -1526,7 +1506,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("11asdqwfds1112");
|
||||
foreach (var r in s2)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
@ -1545,7 +1524,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("11aszxcsdd1112");
|
||||
foreach (var r in s1)
|
||||
{
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
|
@ -1564,7 +1542,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("11asqgtyud1112");
|
||||
return result_candidate;
|
||||
}
|
||||
catch
|
||||
|
|
@ -6557,35 +6534,21 @@ namespace BMA.EHR.Application.Repositories
|
|||
(await _userProfileRepository.GetEmployeeProfileByRootIdAsync(ocId, AccessToken));
|
||||
|
||||
var type_coin = await GetCoinCandidate(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111112");
|
||||
var type1_level1 = await GetInsigniaCandidate_Type1_Level1(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111113");
|
||||
var type1_level2 = await GetInsigniaCandidate_Type1_Level2(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111114");
|
||||
var type1_level3 = await GetInsigniaCandidate_Type1_Level3(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111115");
|
||||
var type1_level4 = await GetInsigniaCandidate_Type1_Level4(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111116");
|
||||
var type2_level5 = await GetInsigniaCandidate_Type2_Level5(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111117");
|
||||
var type2_level6 = await GetInsigniaCandidate_Type2_Level6(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111118");
|
||||
var type2_level7 = await GetInsigniaCandidate_Type2_Level7(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111119");
|
||||
var type2_level8 = await GetInsigniaCandidate_Type2_Level8(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111110");
|
||||
var type2_level9_1 =
|
||||
await GetInsigniaCandidate_Type2_Level9_1(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("1111111");
|
||||
var type2_level9_2 =
|
||||
await GetInsigniaCandidate_Type2_Level9_2(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("a1111112");
|
||||
var type3_level10 = await GetInsigniaCandidate_Type3_Level10(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111s1113");
|
||||
var type3_level11 = await GetInsigniaCandidate_Type3_Level11(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("111s1114");
|
||||
var type4_level10 = await GetInsigniaCandidate_Type4_Level10(periodId, ocId, allOfficerProfilesByRoot);
|
||||
Console.WriteLine("1d111115");
|
||||
var type4_level11 = await GetInsigniaCandidate_Type4_Level11(periodId, ocId, allOfficerProfilesByRoot);
|
||||
|
||||
|
||||
|
|
@ -6734,14 +6697,11 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("2222222");
|
||||
var period = await _dbContext.Set<InsigniaPeriod>().FirstOrDefaultAsync(p => p.Id == periodId);
|
||||
|
||||
Console.WriteLine("22222221");
|
||||
if (period == null)
|
||||
throw new Exception(GlobalMessages.CoinPeriodNotFound);
|
||||
|
||||
Console.WriteLine("22222223");
|
||||
var inst_profile = allProfilesByRoot.Where(x => x.DateAppoint != null)
|
||||
.Select(p => new
|
||||
{
|
||||
|
|
@ -6787,8 +6747,6 @@ namespace BMA.EHR.Application.Repositories
|
|||
PositionSalaryAmount = p.PositionSalaryAmount,
|
||||
});
|
||||
|
||||
Console.WriteLine("22222224");
|
||||
Console.WriteLine(JsonConvert.SerializeObject(inst_profile));
|
||||
// check วันที่บรรจะต้องมากกว่า 25 ปี
|
||||
var result = ((from p in inst_profile
|
||||
where p.ProfileDateAppoint <= new DateTime(period.Year - 25, 5, 29)
|
||||
|
|
@ -6820,33 +6778,25 @@ namespace BMA.EHR.Application.Repositories
|
|||
MatchingConditions = new List<MatchingCondition>(),
|
||||
})).ToList();
|
||||
|
||||
Console.WriteLine("22222225");
|
||||
var result_candidate = new List<InsigniaResultSet>();
|
||||
|
||||
Console.WriteLine("22222226");
|
||||
foreach (var r in result)
|
||||
{
|
||||
Console.WriteLine("22222228");
|
||||
var old = result_candidate.FirstOrDefault(x => x.ProfileId == r.ProfileId);
|
||||
|
||||
Console.WriteLine("22222220");
|
||||
// Check ได้รับหรือเคยยื่นขอไปในปีที่แล้วหรือไม่?
|
||||
if (!CanRequestInsignia(r.ProfileId, period.Year))
|
||||
continue;
|
||||
|
||||
Console.WriteLine("22222229");
|
||||
// Check ว่าชั้นที่ขอสูงกว่าชั้นที่เคยได้รับแล้วหรือไม่?
|
||||
if (!IsHigherLevel2(r.LastInsignia, r.RequestInsignia.Name))
|
||||
continue;
|
||||
|
||||
Console.WriteLine("222222212");
|
||||
if (old == null)
|
||||
{
|
||||
result_candidate.Add(r);
|
||||
}
|
||||
Console.WriteLine("222222243");
|
||||
}
|
||||
Console.WriteLine("22222227");
|
||||
|
||||
return result_candidate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue