diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 194c5836..83b65a9a 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -13559,7 +13559,7 @@ namespace Myshipping.Application 3、是合票的,找到主票和其他分票,并返回当前订单的完整详情。 */ var orderList = await _rep.AsQueryable().Filter(null, true) - .Where(a => (a.MBLNO == mblNo || a.CUSTNO == mblNo) && a.IsDeleted == false).ToListAsync(); + .Where(a => (a.MBLNO == mblNo || a.CUSTNO == mblNo) && a.IsDeleted == false && (a.ParentId == null || a.ParentId == 0)).ToListAsync(); var currOrder = orderList.FirstOrDefault(a => a.MBLNO == mblNo); @@ -13583,7 +13583,7 @@ namespace Myshipping.Application //找到所有相关的分票 var list = await _rep.AsQueryable().Filter(null, true) - .Where(a => a.CUSTNO == mblNo && a.IsDeleted == false && a.Id != currOrder.Id).ToListAsync(); + .Where(a => a.CUSTNO == mblNo && a.IsDeleted == false && a.Id != currOrder.Id && (a.ParentId == null || a.ParentId == 0)).ToListAsync(); model.otherOrderList = list.Select(b => new SeaExportOrderExtensionSubInfo { @@ -13606,7 +13606,7 @@ namespace Myshipping.Application //找到所有相关的分票 var list = await _rep.AsQueryable().Filter(null, true) - .Where(a => a.HBLNO == currOrder.HBLNO && a.IsDeleted == false && a.Id != currOrder.Id).ToListAsync(); + .Where(a => a.HBLNO == currOrder.HBLNO && a.IsDeleted == false && a.Id != currOrder.Id && (a.ParentId == null || a.ParentId == 0)).ToListAsync(); model.otherOrderList = list.Select(b => new SeaExportOrderExtensionSubInfo { diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 525df08c..3e7e83a8 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -970,6 +970,8 @@ namespace Myshipping.Application dto.DataObj.Adapt(model); + model.Id = id; + // 1.判断新的舱位信息的7个库存统计维度是否发生变化 // 2.如果有变化,则需要更新旧的库存信息 bool isNeedUpdateOldStock = false; @@ -982,7 +984,13 @@ namespace Myshipping.Application { isNeedUpdateOldStock = true; } - await _repBase.UpdateAsync(model); + //await _repBase.UpdateAsync(model); + + await _repBase.AsUpdateable(model).IgnoreColumns(x => new { + x.CreatedUserId, + x.CreatedTime, + x.CreatedUserName + }).ExecuteCommandAsync(); if (isNeedUpdateOldStock) {