diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index 16172d2e..b2cbf4e0 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -179,8 +179,11 @@ namespace Myshipping.Application var longContainerStatus = result.resultData.containerInfoList.FirstOrDefault(a => a.containerNo.Equals(ctnNo, StringComparison.OrdinalIgnoreCase)); - var longContainerStatusList = longContainerStatus.containerStatusInfoList; + if(longContainerStatus != null) + { + var longContainerStatusList = longContainerStatus.containerStatusInfoList; + } var takeList = result.resultData.containerInfoList.SelectMany(p => p.containerStatusInfoList).GroupBy(a => a.statusCd).Select(a => { @@ -262,7 +265,7 @@ namespace Myshipping.Application if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)) currStatus.isSplitEnd = true; - if (!string.IsNullOrWhiteSpace(longContainerStatus.currentNodeCd) && longContainerStatus.currentNodeCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase)) + if (longContainerStatus != null && !string.IsNullOrWhiteSpace(longContainerStatus.currentNodeCd) && longContainerStatus.currentNodeCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase)) { currStatus.isCurrentStatus = true; } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs index 79d40824..fd4ae7a7 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs @@ -2731,9 +2731,6 @@ namespace Myshipping.Application _logger.LogInformation($"taskPKId={taskPKId} 更新订舱详情失败没有对应舱位ID"); } - - - //如果值是ENABLE表示可以自动发送 if (paramConfig != null && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase)) {