From 1d391addac3b679d1133cbefaa27db690c3bbbc7 Mon Sep 17 00:00:00 2001 From: "mingliang.tang" Date: Thu, 29 Jun 2023 08:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Incoming/ShipReader.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs index 18dac4fa1..50912c74a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipReader.cs @@ -19,18 +19,20 @@ public class ShipReader : IReader private readonly IIncomingFromExternalManager _incomingFromExternalManager; private readonly ILogger _logger; private readonly ISupplierItemAppService _supplierItemAppService; - + private readonly ISupplierAppService _supplierAppService; public ShipReader( IShipManager shipManager , IIncomingFromExternalManager incomingFromExternalManager , ILogger logger, - ISupplierItemAppService supplierItemAppService + ISupplierItemAppService supplierItemAppService, + ISupplierAppService supplierAppService ) { _shipManager = shipManager; _incomingFromExternalManager = incomingFromExternalManager; _logger = logger; _supplierItemAppService = supplierItemAppService; + _supplierAppService = supplierAppService; } public virtual async Task> ReadAsync() @@ -103,10 +105,12 @@ public class ShipReader : IReader continue; } var supplierItemDTO = await _supplierItemAppService.GetBySupplierCodeAndItemCodeAsync(item.SupplierCode, item.ERP).ConfigureAwait(false); - if (supplierItemDTO == null) + var supplierDto = await _supplierAppService.GetByCodeAsync(item.SupplierCode).ConfigureAwait(false); + if (supplierItemDTO == null||supplierDto==null) { shipbillno.Add(item.ShipBillNo); - } + } + } return shipbillno; }