From 325e69dab3df3f1626c6ffe31d64b31a0503935a Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 20 May 2024 15:21:51 +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 --- .../EmbedTraceProductService.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index b2cbf4e0..2bacc864 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -185,7 +185,8 @@ namespace Myshipping.Application var longContainerStatusList = longContainerStatus.containerStatusInfoList; } - var takeList = result.resultData.containerInfoList.SelectMany(p => p.containerStatusInfoList).GroupBy(a => a.statusCd).Select(a => + var takeList = result.resultData.containerInfoList.SelectMany(p => p.containerStatusInfoList) + .GroupBy(a => a.statusCd).Select(a => { var currArg = a.ToList(); @@ -222,8 +223,12 @@ namespace Myshipping.Application var APODtotal = takeList.Where(p => p.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)).ToList(); + bool isMoreAPOD = false; + if (APODtotal.Count > 1 && APODtotal.Any(p => p.isComplete)) { + isMoreAPOD = true; + takeList = takeList.Select(a => { if (a.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !a.isComplete) @@ -298,7 +303,8 @@ namespace Myshipping.Application return null; } - if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !c.isEst.Equals("N", StringComparison.OrdinalIgnoreCase)) + if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) + && !c.isEst.Equals("N", StringComparison.OrdinalIgnoreCase) && isMoreAPOD) { return null; }