|
|
|
@ -44,6 +44,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<BookingSlotCtn> _repCtn;
|
|
|
|
|
private readonly SqlSugarRepository<BookingSlotStock> _repStock;
|
|
|
|
|
private readonly SqlSugarRepository<BookingSlotAllocation> _repAllocation;
|
|
|
|
|
private readonly SqlSugarRepository<BookingLabelAllocation> _repLabelAllocation;
|
|
|
|
|
private readonly SqlSugarRepository<BookingSlotAllocationCtn> _repAllocationCtn;
|
|
|
|
|
private readonly SqlSugarRepository<BookingFile> _bookingFileRepository;
|
|
|
|
|
private readonly SqlSugarRepository<BookingSlotCompare> _bookingSlotCompareRepository;
|
|
|
|
@ -90,7 +91,8 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<BookingOrderContact> bookingOrderContactRepository,
|
|
|
|
|
INamedServiceProvider<IBookingOrderService> namedBookingOrderServiceProvider,
|
|
|
|
|
IBookingValueAddedService bookingValueAddedService,
|
|
|
|
|
SqlSugarRepository<BookingOrder> repBookingOrder)
|
|
|
|
|
SqlSugarRepository<BookingOrder> repBookingOrder,
|
|
|
|
|
SqlSugarRepository<BookingLabelAllocation> repLabelAllocation)
|
|
|
|
|
{
|
|
|
|
|
_repBase = repBase;
|
|
|
|
|
_repCtn = repCtn;
|
|
|
|
@ -112,6 +114,7 @@ namespace Myshipping.Application
|
|
|
|
|
_bookingOrderContactRepository = bookingOrderContactRepository;
|
|
|
|
|
_bookingValueAddedService = bookingValueAddedService;
|
|
|
|
|
_repBookingOrder = repBookingOrder;
|
|
|
|
|
_repLabelAllocation = repLabelAllocation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 舱位
|
|
|
|
@ -243,13 +246,13 @@ namespace Myshipping.Application
|
|
|
|
|
x.UpdatedTime,
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
//Parallel.For(0, 1, (n) =>
|
|
|
|
|
//{
|
|
|
|
|
Parallel.For(0, 1, (n) =>
|
|
|
|
|
{
|
|
|
|
|
bookingOrderService.SaveLog(bookingOrder, oldBookingOrder, "舱位关联更新");
|
|
|
|
|
|
|
|
|
|
// 推送东胜
|
|
|
|
|
bookingOrderService.SendBookingOrder(new long[] { allocation.BOOKING_ID });
|
|
|
|
|
//});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_repAllocation.CurrentCommitTran();
|
|
|
|
|
}
|
|
|
|
@ -262,12 +265,12 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
//Parallel.For(0, 1, (n) =>
|
|
|
|
|
//{
|
|
|
|
|
InsLog("Update", model.Id, typeof(BookingSlotBaseSaveInput), oldObj, input,
|
|
|
|
|
Parallel.For(0, 1, (n) =>
|
|
|
|
|
{
|
|
|
|
|
_ = InsLog("Update", model.Id, typeof(BookingSlotBaseSaveInput), oldObj, input,
|
|
|
|
|
nameof(BookingSlotBaseApiSaveDto.CtnList),
|
|
|
|
|
nameof(BookingSlotBaseApiSaveDto.BookingSlotSaleInfoList));
|
|
|
|
|
//});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -984,7 +987,8 @@ namespace Myshipping.Application
|
|
|
|
|
var fieldName = descriptor.Name;
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(descriptor.Description))
|
|
|
|
|
{
|
|
|
|
|
fieldName = descriptor.Description;
|
|
|
|
|
//fieldName = descriptor.Description;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
waitInsertLogList.Add(new BookingLogDetail
|
|
|
|
|
{
|
|
|
|
@ -1368,6 +1372,8 @@ namespace Myshipping.Application
|
|
|
|
|
input.WEEK_AT = "W" + input.WEEK_AT;
|
|
|
|
|
}
|
|
|
|
|
ISugarQueryable<BookingSlotBase> select = null;
|
|
|
|
|
|
|
|
|
|
// 箱型筛选
|
|
|
|
|
string[] ctnCodeArr = null;
|
|
|
|
|
if (!string.IsNullOrEmpty(input.CTN_STAT))
|
|
|
|
|
{
|
|
|
|
@ -1403,13 +1409,21 @@ namespace Myshipping.Application
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.BOOKING_SLOT_TYPE), u => u.BOOKING_SLOT_TYPE == input.BOOKING_SLOT_TYPE)
|
|
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.LANENAME), u => u.LANENAME.Contains(input.LANENAME))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.WEEK_AT), u => u.WEEK_AT == input.WEEK_AT);
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.WEEK_AT), u => u.WEEK_AT == input.WEEK_AT)
|
|
|
|
|
|
|
|
|
|
// 标签筛选
|
|
|
|
|
.WhereIF(input.LabelIdArray != null && input.LabelIdArray.Length > 0,
|
|
|
|
|
u => SqlFunc.Subqueryable<BookingLabelAllocation>()
|
|
|
|
|
.Where(x => x.BusinessId == u.Id && input.LabelIdArray.Contains(x.LabelId))
|
|
|
|
|
.Any());
|
|
|
|
|
|
|
|
|
|
if (ctnCodeArr != null && ctnCodeArr.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
var tempSelect = select as ISugarQueryable<BookingSlotBase, BookingSlotCtn>;
|
|
|
|
|
tempSelect.Where((u, c) => ctnCodeArr.Contains(c.CTNCODE));
|
|
|
|
|
}
|
|
|
|
|
//var sql = select.OrderByDescending(u => u.CreatedTime).ToSqlString();
|
|
|
|
|
|
|
|
|
|
var entities = await select.OrderByDescending(u => u.CreatedTime)
|
|
|
|
|
.ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|