แก้ list พ้น
This commit is contained in:
parent
bebd9620a5
commit
817f7a91ac
8 changed files with 92 additions and 77 deletions
|
|
@ -994,12 +994,12 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
var insigniaPeriods = await _dbContext.Set<InsigniaPeriod>()
|
||||
.AsQueryable()
|
||||
.Include(x => x.InsigniaRequests)
|
||||
.Include(x => x.ReliefDoc)
|
||||
.Include(x => x.InsigniaRequests)
|
||||
.Include(x => x.ReliefDoc)
|
||||
.ToListAsync();
|
||||
foreach (var insigniaPeriod in insigniaPeriods)
|
||||
{
|
||||
if (insigniaPeriod.EndDate.Date.AddDays(5) < DateTime.Now.Date)
|
||||
if (insigniaPeriod.EndDate.Date.AddDays(5) > DateTime.Now.Date)
|
||||
continue;
|
||||
insigniaPeriod.IsLock = true;
|
||||
var insigniaNote = await _dbContext.Set<InsigniaNote>()
|
||||
|
|
@ -1103,14 +1103,15 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
.ToListAsync();
|
||||
foreach (var insigniaPeriod in insigniaPeriods)
|
||||
{
|
||||
if (insigniaPeriod.StartDate == DateTime.Now.Date)
|
||||
if (insigniaPeriod.StartDate >= DateTime.Now.Date)
|
||||
continue;
|
||||
//var organizationType = await _dbContext.Set<OrganizationType>().Where(x => x.Name == "หน่วยงาน").FirstOrDefaultAsync();
|
||||
//if (organizationType == null)
|
||||
// continue;
|
||||
//var organizations = await _dbContext.Set<OrganizationEntity>().Where(x => x.OrganizationType == organizationType).ToListAsync();
|
||||
var organizations = await _userProfileRepository.GetActiveRootLatestAsync(AccessToken);
|
||||
Console.WriteLine(JsonConvert.SerializeObject(organizations));
|
||||
var organizations = await _userProfileRepository.GetActiveRootLatestAsync(null);
|
||||
if(organizations == null)
|
||||
continue;
|
||||
foreach (var organization in organizations)
|
||||
{
|
||||
if (organization == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue