|
|
|
@ -56,6 +56,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly IEventPublisher _publisher;
|
|
|
|
|
private readonly SqlSugarRepository<DjyApiAuth> _repApiAuth;
|
|
|
|
|
private readonly SqlSugarRepository<DjyMessage> _repMessage;
|
|
|
|
|
private readonly IBookingOrderService bookingOrderService;
|
|
|
|
|
|
|
|
|
|
public BookingCustomerOrderService(SqlSugarRepository<BookingCustomerOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
|
|
|
|
|
ILogger<BookingOrderService> logger, ISysCacheService cache, SqlSugarRepository<BookingFile> repFile,
|
|
|
|
@ -63,7 +64,7 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<BookingOrder> repOrder, SqlSugarRepository<BookingStatusLogDetail> repStatuslogDetail,
|
|
|
|
|
SqlSugarRepository<BookingCustomerOrderTemplate> repOrderTempl,
|
|
|
|
|
SqlSugarRepository<BookingEDIExt> repEdiExt, SqlSugarRepository<BookingGoodsStatus> goodsStatus, SqlSugarRepository<BookingGoodsStatusConfig> goodsStatusConfig,
|
|
|
|
|
IEventPublisher publisher, SqlSugarRepository<DjyApiAuth> repApiAuth, SqlSugarRepository<DjyMessage> repMessage)
|
|
|
|
|
IEventPublisher publisher, SqlSugarRepository<DjyApiAuth> repApiAuth, SqlSugarRepository<DjyMessage> repMessage, IBookingOrderService bookingOrderService)
|
|
|
|
|
{
|
|
|
|
|
this._logger = logger;
|
|
|
|
|
this._rep = rep;
|
|
|
|
@ -81,6 +82,7 @@ namespace Myshipping.Application
|
|
|
|
|
this._publisher = publisher;
|
|
|
|
|
this._repApiAuth = repApiAuth;
|
|
|
|
|
this._repMessage = repMessage;
|
|
|
|
|
this.bookingOrderService = bookingOrderService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 订舱草稿及附件
|
|
|
|
@ -876,9 +878,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingCustomerOrder/RecBookingFeedback"), AllowAnonymous, ApiUser(ApiCode = "RecBookingFeedback")]
|
|
|
|
|
public async Task<dynamic> RecBookingFeedback(string feedbackType, string jsonContent)
|
|
|
|
|
public async Task<dynamic> RecBookingFeedback(string feedbackType, string jsonContent, string syncType)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"收到订舱回推数据,feedbackType:{feedbackType},jsonContent:{jsonContent}");
|
|
|
|
|
_logger.LogInformation($"收到订舱回推数据,feedbackType:{feedbackType},jsonContent:{jsonContent},syncType:{syncType}");
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(feedbackType) || string.IsNullOrEmpty(jsonContent))
|
|
|
|
|
{
|
|
|
|
@ -1134,7 +1136,14 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BookingOrderSyncTypeEnum syncTypeEnum = syncType switch
|
|
|
|
|
{
|
|
|
|
|
"ALL" => BookingOrderSyncTypeEnum.ALL,
|
|
|
|
|
"BC" => BookingOrderSyncTypeEnum.BC,
|
|
|
|
|
_ => BookingOrderSyncTypeEnum.ALL,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
await bookingOrderService.SendBookingOrder(new long[] { dbOrder.Id }, syncTypeEnum);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|