diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs index 207931f9a..e3f5cbadb 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs @@ -21,13 +21,13 @@ public class ArriveConverter : IOutgoingConverter private readonly IObjectMapper _objectMapper; private readonly IInventoryLabelAppService _inventoryLabelAppService; - public ArriveConverter( IOutgoingFromWmsManager outgoingFromWmsManager , IOutgoingToExternalManager outgoingToExternalManager , ISupplierAsnAppService supplierAsnAppService , IObjectMapper objectMapper , IInventoryLabelAppService inventoryLabelAppService + ) { _inventoryLabelAppService = inventoryLabelAppService; @@ -71,6 +71,20 @@ public class ArriveConverter : IOutgoingConverter { arrive.ShipBillNo = label.AsnNumber; } + try + { + //通过发货单号获取发货时间 + var supplierAsnDTO=await _supplierAsnAppService.GetByNumberAsync(label.AsnNumber).ConfigureAwait(false); + if (supplierAsnDTO != null) + { + arrive.ShipDate = supplierAsnDTO.ShipDate; + } + } + catch (Exception ex) + { + outgoingToExternal.SetError(EnumExchangeDataErrorCode.Exception, ex.InnerException == null ? ex.Message : ex.InnerException.Message, ex.ToString()); + } + outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); outgoingToExternalList.Add(outgoingToExternal); diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs index d31e68eb1..a513f50f5 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs @@ -1,8 +1,10 @@ using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading.Tasks; using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; +using Win_in.Sfs.Wms.DataExchange.Domain.Shared; namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent; @@ -21,7 +23,8 @@ public class ArriveNoteWriter : IWriter public virtual async Task WriteAsync(List outgoingDataList) { - var arriveNotes = await BuildArriveNotesAsync(outgoingDataList).ConfigureAwait(false); + var outarrive = outgoingDataList.Where(r => r.Status != EnumExchangeDataStatus.Error).ToList() ; + var arriveNotes = await BuildArriveNotesAsync(outarrive).ConfigureAwait(false); //写Arrive数据到EOS await _arriveNoteNoteManager.PostListAsync(arriveNotes).ConfigureAwait(false);