fix : Change some Error SalaryCondition
This commit is contained in:
parent
a2615c7b52
commit
08ea6d1253
1 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
_documentService = documentService;
|
||||
_userProfileRepository = userProfileRepository;
|
||||
|
||||
_insigniaLists = _dbContext.Set<Insignia>().Include(x => x.InsigniaType).ToList();
|
||||
_insigniaLists = _dbContext.Set<Insignia>().AsNoTracking().Include(x => x.InsigniaType).ToList();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<InsigniaPeriod>> FindByNameAsync(string name)
|
||||
|
|
@ -2308,8 +2308,8 @@ namespace BMA.EHR.Application.Repositories
|
|||
GetInsigniaById(p.ProfileInsignia.Where(x => x.InsigniaId.Value != GetInsigniaByName("เหรียญจักรพรรดิมาลา").Id).OrderByDescending(x => x.Year).FirstOrDefault().InsigniaId.Value).Id,
|
||||
Salary = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? null : p.ProfileSalary.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
|
||||
SalaryCondition = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? 0 :
|
||||
p.ProfileSalary.Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault() != null ?
|
||||
p.ProfileSalary.Where(x => x.Date.Value <= new DateTime(period.Year, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount :
|
||||
p.ProfileSalary.Where(x => x.Date.Value <= new DateTime(period.Year - 5, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault() != null ?
|
||||
p.ProfileSalary.Where(x => x.Date.Value <= new DateTime(period.Year - 5, 4, 29)).OrderByDescending(x => x.Order).FirstOrDefault().Amount :
|
||||
p.ProfileSalary.OrderBy(x => x.Order).FirstOrDefault().Amount,
|
||||
|
||||
PosNo = p.ProfileSalary == null || p.ProfileSalary.Count == 0 ? "" : p.ProfileSalary!.OrderByDescending(x => x.Order).FirstOrDefault()!.PosNo,
|
||||
|
|
@ -5288,7 +5288,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
|
||||
var result_candidate = new List<InsigniaResultSet>();
|
||||
|
||||
//if (ocId != Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3")) return result_candidate;
|
||||
if (ocId != Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3")) return result_candidate;
|
||||
|
||||
var type_coin = await GetCoinCandidate(periodId, ocId);
|
||||
var employee_type1 = await GetEmployeeInsignia_Type1(periodId, ocId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue