fix: Change Code
This commit is contained in:
parent
8902080336
commit
89ef146c19
4 changed files with 114 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BMA.EHR.Infrastructure.MessageQueue
|
||||
{
|
||||
|
|
@ -6,6 +7,8 @@ namespace BMA.EHR.Infrastructure.MessageQueue
|
|||
{
|
||||
private readonly RabbitMQConnection _connection;
|
||||
|
||||
private const string INSIGNIA_QUEUE = "bma_insignia_request";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
@ -36,5 +39,31 @@ namespace BMA.EHR.Infrastructure.MessageQueue
|
|||
basicProperties: null,
|
||||
body: body);
|
||||
}
|
||||
|
||||
public void CalculateInsignia(Guid periodId)
|
||||
{
|
||||
var channel = _connection.GetChannel();
|
||||
|
||||
channel.QueueDeclare(queue: INSIGNIA_QUEUE,
|
||||
durable: false,
|
||||
exclusive: false,
|
||||
autoDelete: false,
|
||||
arguments: null);
|
||||
|
||||
// var req = new InsigniaRequestPeriod
|
||||
// {
|
||||
// PeriodId = periodId
|
||||
// };
|
||||
|
||||
// var serializedObject = JsonConvert.SerializeObject(req);
|
||||
|
||||
var body = Encoding.UTF8.GetBytes(periodId.ToString("D"));
|
||||
|
||||
channel.BasicPublish(exchange: "",
|
||||
routingKey: INSIGNIA_QUEUE,
|
||||
mandatory: false,
|
||||
basicProperties: null,
|
||||
body: body);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue