From 14dca4bb659224719373f916620a2357ab39298e Mon Sep 17 00:00:00 2001 From: sanji Date: Tue, 14 Nov 2023 18:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B8=E5=8D=97=E4=BA=A7=E5=93=81GOI?= =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2=E5=8E=BB=E6=8E=89=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=8E=A8=E5=B9=BF=E7=9A=84sku?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SiNan.Business/GOIBusiness.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SiNan.Business/GOIBusiness.cs b/SiNan.Business/GOIBusiness.cs index 6337ae2..652aeed 100644 --- a/SiNan.Business/GOIBusiness.cs +++ b/SiNan.Business/GOIBusiness.cs @@ -327,6 +327,16 @@ namespace SiNan.Business productGoi.TotalCost = productGoi.ProductSkuGOIList.Sum(x => x.TotalCost); productGoi.TotalDeficit = productGoi.ProductSkuGOIList.Sum(x => x.TotalDeficit); + + for (var i = 0; i < productGoi.ProductSkuGOIList.Count(); i++) + { + var productSku = productGoi.ProductSkuGOIList[i]; + if (productSku.TotalCost == 0) + { + productGoi.ProductSkuGOIList.RemoveAt(i); + i--; + } + } } return new ListResponse()