From d80ca27af1e76635180e0ac46a221c21b7ef0937 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 17 May 2024 15:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B8=AA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmbedProjectGoodsStatus/EmbedTraceProductService.cs | 7 +++++-- .../Service/TaskManagePlat/TaskManageBCService.cs | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) 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)) {