Browse Source

EOS验收单收货时间修改

集成Redis
lvzb 2 years ago
parent
commit
59f8744466
  1. 16
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
  2. 5
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs

16
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 IObjectMapper _objectMapper;
private readonly IInventoryLabelAppService _inventoryLabelAppService; private readonly IInventoryLabelAppService _inventoryLabelAppService;
public ArriveConverter( public ArriveConverter(
IOutgoingFromWmsManager outgoingFromWmsManager IOutgoingFromWmsManager outgoingFromWmsManager
, IOutgoingToExternalManager outgoingToExternalManager , IOutgoingToExternalManager outgoingToExternalManager
, ISupplierAsnAppService supplierAsnAppService , ISupplierAsnAppService supplierAsnAppService
, IObjectMapper objectMapper , IObjectMapper objectMapper
, IInventoryLabelAppService inventoryLabelAppService , IInventoryLabelAppService inventoryLabelAppService
) )
{ {
_inventoryLabelAppService = inventoryLabelAppService; _inventoryLabelAppService = inventoryLabelAppService;
@ -71,6 +71,20 @@ public class ArriveConverter : IOutgoingConverter
{ {
arrive.ShipBillNo = label.AsnNumber; 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); outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive);
outgoingToExternalList.Add(outgoingToExternal); outgoingToExternalList.Add(outgoingToExternal);

5
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveNoteWriter.cs

@ -1,8 +1,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; 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; namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent;
@ -21,7 +23,8 @@ public class ArriveNoteWriter : IWriter
public virtual async Task WriteAsync(List<OutgoingToExternal> outgoingDataList) public virtual async Task WriteAsync(List<OutgoingToExternal> 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 //写Arrive数据到EOS
await _arriveNoteNoteManager.PostListAsync(arriveNotes).ConfigureAwait(false); await _arriveNoteNoteManager.PostListAsync(arriveNotes).ConfigureAwait(false);

Loading…
Cancel
Save