|
|
@ -1,8 +1,10 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text.Json; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
|
using Win_in.Sfs.Label.Application.Contracts; |
|
|
|
using Win_in.Sfs.Wms.DataExchange.Domain; |
|
|
|
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; |
|
|
|
using Win_in.Sfs.Wms.DataExchange.Domain.Shared; |
|
|
@ -17,6 +19,7 @@ public class ArriveConverter : IOutgoingConverter |
|
|
|
private readonly IOutgoingToExternalManager _outgoingToExternalManager; |
|
|
|
private readonly ISupplierAsnAppService _supplierAsnAppService; |
|
|
|
private readonly IObjectMapper _objectMapper; |
|
|
|
private readonly IInventoryLabelAppService _inventoryLabelAppService; |
|
|
|
|
|
|
|
|
|
|
|
public ArriveConverter( |
|
|
@ -24,8 +27,10 @@ public class ArriveConverter : IOutgoingConverter |
|
|
|
, IOutgoingToExternalManager outgoingToExternalManager |
|
|
|
, ISupplierAsnAppService supplierAsnAppService |
|
|
|
, IObjectMapper objectMapper |
|
|
|
, IInventoryLabelAppService inventoryLabelAppService |
|
|
|
) |
|
|
|
{ |
|
|
|
_inventoryLabelAppService = inventoryLabelAppService; |
|
|
|
_outgoingFromWmsManager = outgoingFromWmsManager; |
|
|
|
_outgoingToExternalManager = outgoingToExternalManager; |
|
|
|
_supplierAsnAppService = supplierAsnAppService; |
|
|
@ -60,6 +65,12 @@ public class ArriveConverter : IOutgoingConverter |
|
|
|
var exchangeReceipt = await BuildPutawayExchangeDtoAsync(wmsReceipt, detail).ConfigureAwait(false); |
|
|
|
outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt); |
|
|
|
var arrive = BuildArrive(exchangeReceipt); |
|
|
|
|
|
|
|
var label = await _inventoryLabelAppService.GetByCodeAsync(arrive.DetailMatNo).ConfigureAwait(false); |
|
|
|
if (label != null) |
|
|
|
{ |
|
|
|
arrive.ShipBillNo = label.AsnNumber; |
|
|
|
} |
|
|
|
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); |
|
|
|
|
|
|
|
outgoingToExternalList.Add(outgoingToExternal); |
|
|
@ -87,7 +98,7 @@ public class ArriveConverter : IOutgoingConverter |
|
|
|
DocNo = exchangeReceipt.Number, |
|
|
|
DetailMatNo = detail.ToPackingCode, |
|
|
|
ERP = detail.ItemCode, |
|
|
|
Qty = detail.ShippedQty, |
|
|
|
Qty = detail.Qty, |
|
|
|
HgQty = detail.Qty, |
|
|
|
ProductDate = detail.ProduceDate, |
|
|
|
ProductBatch = detail.ToLot, |
|
|
|