diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs index e09404ba..601054cb 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs @@ -2632,6 +2632,7 @@ namespace Myshipping.Application if (bcOrder.BOOKING_ORDER_ID != null && bcOrder.BOOKING_ORDER_ID.HasValue && bcOrder.BOOKING_ORDER_ID.Value > 0) { + /* SaveBookingOrderInput bkModel = new SaveBookingOrderInput { MBLNO = bcOrder.MBL_NO.ToUpper().Trim(), @@ -2689,7 +2690,7 @@ namespace Myshipping.Application else { _logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID"); - } + }*/ } else { diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs index 2ea5f233..b83ab3b8 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageRollingNominationService.cs @@ -1120,6 +1120,23 @@ namespace Myshipping.Application if (fromEntity.Count > 0) model.From = fromEntity.Select(p => p.Adapt()).ToList(); + + model.LoadDetailList = list.Select(a => a.Adapt()).ToList(); + + if (model.From != null && model.From.Count > 0) + { + var firstLoadDetail = model.LoadDetailList.FirstOrDefault(); + + if (model.From.Any(t => string.IsNullOrWhiteSpace(t.Port))) + { + model.From = model.From.Where(a => a.Terminal.Contains(firstLoadDetail.LoadPortName?.Trim())).ToList(); + } + else + { + model.From = model.From.Where(a => a.Port.Equals(firstLoadDetail.LoadPortName?.Trim(),StringComparison.OrdinalIgnoreCase)).ToList(); + } + } + var toEntity = shipList.Where(a => Regex.IsMatch(a.SHIP_TYPE, "To(\\s+[0-9]+)?" , RegexOptions.IgnoreCase)).ToList(); @@ -1180,8 +1197,6 @@ namespace Myshipping.Application List> tuples = new List>(); - model.LoadDetailList = list.Select(a => a.Adapt()).ToList(); - model.FromToList = new List(); if (model.LoadDetailList.Count > 0)