You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Furion;
|
|
|
|
|
using Furion.EventBus;
|
|
|
|
|
using Furion.Logging;
|
|
|
|
|
using Myshipping.Application.Service.BookingOrder.Dto;
|
|
|
|
|
using Myshipping.Core;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Application.Helper
|
|
|
|
|
{
|
|
|
|
|
public static class CustomerBookingSyncHelper
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 推送订舱数据到客户订舱系统
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="syncType"></param>
|
|
|
|
|
public async static void SendCustomerBookingSync(long id, string syncType = null)
|
|
|
|
|
{
|
|
|
|
|
Log.Information($"发送推送订舱数据到客户订舱系统事件:{id}");
|
|
|
|
|
var evtPub = App.GetService<IEventPublisher>();
|
|
|
|
|
var param = new
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
SyncType = syncType
|
|
|
|
|
};
|
|
|
|
|
await evtPub.PublishAsync(new ChannelEventSource("SendToCustomer:Book", param));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 推送货物状态到客户订舱系统
|
|
|
|
|
/// </summary>
|
|
|
|
|
public async static void SyncBookingGoodsStatus(GoodsStatusSyncDto dto)
|
|
|
|
|
{
|
|
|
|
|
Log.Information($"推送货物状态到客户订舱系统:{dto.ToJsonString()}");
|
|
|
|
|
var evtPub = App.GetService<IEventPublisher>();
|
|
|
|
|
await evtPub.PublishAsync(new ChannelEventSource("SyncGoodStatus:Book", dto));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 推送订舱批量订舱编号到客户订舱系统
|
|
|
|
|
/// </summary>
|
|
|
|
|
public async static void SendCustomerMultiCustNOSync(BookingCustomerMultiCustNODto dto)
|
|
|
|
|
{
|
|
|
|
|
Log.Information($"发送推送订舱批量订舱编号到客户订舱系统系统事件:{dto.ToJsonString()}");
|
|
|
|
|
var evtPub = App.GetService<IEventPublisher>();
|
|
|
|
|
await evtPub.PublishDelayAsync(new ChannelEventSource("SendToCustomer:MultiCustNO", dto), 2000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|