|
|
|
@ -74,6 +74,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly IEventPublisher _publisher;
|
|
|
|
|
private readonly INamedServiceProvider<IBookingOrderService> _namedBookingOrderServiceProvider;
|
|
|
|
|
private readonly INamedServiceProvider<ITaskManageService> _namedTaskManageServiceProvider;
|
|
|
|
|
private readonly INamedServiceProvider<IBookingLabelService> _namedBookingLabelServiceProvider;
|
|
|
|
|
|
|
|
|
|
private readonly IDjyCustomerService _djyCustomerService;
|
|
|
|
|
private readonly IBookingValueAddedService _bookingValueAddedService;
|
|
|
|
@ -81,6 +82,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly IDjyTenantParamService _djyTenantParamService;
|
|
|
|
|
private readonly ISysDataUserMenu _sysDataUserMenuService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const string CONST_BC_FILE_CODE = "bc";
|
|
|
|
|
const string CONST_BC_FILE_NAME = "Booking Confirmation";
|
|
|
|
|
|
|
|
|
@ -112,7 +114,7 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<BookingSlotCompare> bookingSlotCompareRepository,
|
|
|
|
|
SqlSugarRepository<BookingOrderContact> bookingOrderContactRepository,
|
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
|
|
|
|
|
|
INamedServiceProvider<IBookingLabelService> namedBookingLabelServiceProvider,
|
|
|
|
|
IBookingValueAddedService bookingValueAddedService,
|
|
|
|
|
SqlSugarRepository<BookingOrder> repBookingOrder,
|
|
|
|
|
SqlSugarRepository<BookingLabelAllocation> repLabelAllocation,
|
|
|
|
@ -152,6 +154,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
_djyTenantParamService = djyTenantParamService;
|
|
|
|
|
_sysDataUserMenuService = sysDataUserMenuService;
|
|
|
|
|
_namedBookingLabelServiceProvider = namedBookingLabelServiceProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 舱位
|
|
|
|
@ -860,6 +863,9 @@ namespace Myshipping.Application
|
|
|
|
|
CONST_BC_NOTICE_FILE_CODE, CONST_BC_NOTICE_FILE_NAME).GetAwaiter();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//触发标签自动绑定
|
|
|
|
|
await GenerateSlotLabel(dto, id);
|
|
|
|
|
}
|
|
|
|
|
else if (dto.OpType == "update")
|
|
|
|
|
{
|
|
|
|
@ -1019,6 +1025,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//一般更新数据指的是Booking Amendment,需要与舱位进行数据比对
|
|
|
|
|
await PushCompareBCInfo(bcSrcDto, bcTargetDto, id, dto.BatchNo);
|
|
|
|
|
|
|
|
|
|
//触发标签自动绑定
|
|
|
|
|
await GenerateSlotLabel(dto,id);
|
|
|
|
|
}
|
|
|
|
|
else if (dto.OpType == "del")
|
|
|
|
|
{
|
|
|
|
@ -3892,10 +3901,12 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
userIdList.Add(bookingInfo.CreatedUserId.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bookingSlotInfo != null)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
userIdList.Add(bookingSlotInfo.CreatedUserId.Value);
|
|
|
|
|
if (bookingSlotInfo != null)
|
|
|
|
|
{
|
|
|
|
|
userIdList.Add(bookingSlotInfo.CreatedUserId.Value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
userIdList = userIdList.Distinct().ToList();
|
|
|
|
@ -4092,7 +4103,7 @@ namespace Myshipping.Application
|
|
|
|
|
.Select(a => $"{a.Key}*{a.Sum(b => b.CTNNUM)}").ToArray());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (slotList.Any(a => string.IsNullOrWhiteSpace(a.LOAD_GUARANTEE_FLAG)))
|
|
|
|
|
if (slotList.Any(a => !string.IsNullOrWhiteSpace(a.LOAD_GUARANTEE_FLAG)))
|
|
|
|
|
{
|
|
|
|
|
rlt.importantNotes = string.Join(";", slotList.Where(a => !string.IsNullOrWhiteSpace(a.LOAD_GUARANTEE_FLAG))
|
|
|
|
|
.GroupBy(a => a.LOAD_GUARANTEE_FLAG_NAME)
|
|
|
|
@ -4244,8 +4255,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// 自动生成舱位标签
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dto">舱位详情</param>
|
|
|
|
|
/// <param name="id">舱位ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private async Task GenerateSlotLabel(BookingSlotBaseApiDto dto)
|
|
|
|
|
private async Task GenerateSlotLabel(BookingSlotBaseApiDto dto,long id)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -4417,7 +4429,20 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (ruleList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
//_namedBookingLabelServiceServiceProvider.
|
|
|
|
|
var name = _namedBookingLabelServiceProvider
|
|
|
|
|
.GetService<ITransient>(nameof(BookingLabelService));
|
|
|
|
|
|
|
|
|
|
var bindModel = new BindLabelDto
|
|
|
|
|
{
|
|
|
|
|
BusinessIdArray = new[] { id },
|
|
|
|
|
LabelIdArray = ruleList.Select(a => a.Id.Value).ToArray()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"标签绑定请求,{JSON.Serialize(bindModel)}");
|
|
|
|
|
|
|
|
|
|
await name.SetLabel(bindModel);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"标签绑定请求完成");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|