fix : Add RevisionId For Insignia Period
Some checks failed
release-dev / release-dev (push) Failing after 13s
Some checks failed
release-dev / release-dev (push) Failing after 13s
This commit is contained in:
parent
722a1e33a8
commit
689c425acb
10 changed files with 18272 additions and 63 deletions
|
|
@ -1,5 +1,8 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Domain.Models.Insignias;
|
||||
using BMA.EHR.Domain.Shared;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
|
@ -85,7 +88,13 @@ namespace BMA.EHR.Infrastructure.MessageQueue
|
|||
var userRepo = scope.ServiceProvider.GetRequiredService<UserProfileRepository>();
|
||||
var insigniaRepo = scope.ServiceProvider.GetRequiredService<InsigniaPeriodsRepository>();
|
||||
|
||||
var organizations = await userRepo.GetActiveRootAsync(AccessToken);
|
||||
var selectPeriod = await _insigniaPeriodsRepository.GetByIdAsync(periodId);
|
||||
if (selectPeriod == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.InsigniaPeriodNotFound);
|
||||
}
|
||||
|
||||
var organizations = await userRepo.GetActiveRootAsync(AccessToken, selectPeriod.RevisionId);
|
||||
|
||||
foreach (var organization in organizations)
|
||||
{
|
||||
|
|
@ -108,7 +117,7 @@ namespace BMA.EHR.Infrastructure.MessageQueue
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
@ -117,7 +126,7 @@ namespace BMA.EHR.Infrastructure.MessageQueue
|
|||
|
||||
protected override Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
|
||||
|
||||
Console.WriteLine("ExecuteAsync started."); // Log ตรวจสอบ
|
||||
var consumer = new EventingBasicConsumer(_channel);
|
||||
consumer.Received += (model, ea) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue