|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text.Json; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
@ -65,7 +66,9 @@ public class DeliverNoteConverter : IOutgoingConverter |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 明细
|
|
|
|
foreach (var detail in wmsReceipt.Details) |
|
|
|
var WipDetails = wmsReceipt.Details.GroupBy(r=>new { r.Number,r.ItemCode,r.FromLocationErpCode}).Select(p => new DeliverNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode }); |
|
|
|
|
|
|
|
foreach (var detail in WipDetails) |
|
|
|
{ |
|
|
|
var outgoingDetailToExternal = new OutgoingToExternal() |
|
|
|
{ |
|
|
@ -73,7 +76,7 @@ public class DeliverNoteConverter : IOutgoingConverter |
|
|
|
TableType = EnumExchangeTableType.DetailTable, |
|
|
|
DataAction = outgoingFromWms.DataAction, |
|
|
|
SourceSystem = EnumSystemType.WMS.ToString(), |
|
|
|
SourceDataId = detail.Id.ToString(), |
|
|
|
SourceDataId = detail.Number.ToString(), |
|
|
|
SourceDataGroupCode = wmsReceipt.Number, |
|
|
|
SourceDataDetailCode = detail.ItemCode, |
|
|
|
Writer = nameof(TyrpOutgoingBackgroundWorker), |
|
|
@ -81,9 +84,8 @@ public class DeliverNoteConverter : IOutgoingConverter |
|
|
|
DestinationDataId = "", |
|
|
|
}; |
|
|
|
outgoingDetailToExternal.SetEffectiveDate(outgoingFromWms.EffectiveDate); |
|
|
|
var exchangeReceiptDetail = _objectMapper.Map<DeliverNoteDetailDTO, DeliverNoteDetailExchangeDto>(detail); |
|
|
|
outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceiptDetail); |
|
|
|
var purchaseOrderDetail = BuildDataInterfaceDetail(exchangeReceipt, exchangeReceiptDetail); |
|
|
|
outgoingDetailToExternal.SourceDataContent = JsonSerializer.Serialize(detail); |
|
|
|
var purchaseOrderDetail = BuildDataInterfaceDetail(exchangeReceipt, detail); |
|
|
|
outgoingDetailToExternal.DestinationDataContent = JsonSerializer.Serialize(purchaseOrderDetail); |
|
|
|
outgoingToExternalList.Add(outgoingDetailToExternal); |
|
|
|
} |
|
|
@ -108,7 +110,7 @@ public class DeliverNoteConverter : IOutgoingConverter |
|
|
|
{ |
|
|
|
wmsoutm_nbr = exchangeOrder.Number, |
|
|
|
wmsoutm_type = billtype, |
|
|
|
wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"), |
|
|
|
wmsoutm_dt_w = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"), |
|
|
|
wmsoutm_stat = "Y", |
|
|
|
wmsoutm_tyrp_dt = "", |
|
|
|
wmsoutm_user = "WMS", |
|
|
|