Browse Source

线边仓退料汇总传给tyrp

dev_DY_CC
lvzb 1 year ago
parent
commit
a36cf8ac1d
  1. 5
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ProductionReturnNoteConverter.cs
  2. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs

5
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/ProductionReturnNoteConverter.cs

@ -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;
@ -59,9 +60,9 @@ public class ProductionReturnNoteConverter : IOutgoingConverter
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNote);
outgoingToExternalList.Add(outgoingToExternal);
#endregion
var sumDetails = wmsReceipt.Details.GroupBy(r => new { r.ItemCode, r.FromLocationErpCode, r.ToLocationErpCode }).Select(p => new ProductionReturnNoteDetailDTO { ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode, ToLocationErpCode = p.Key.ToLocationErpCode, Qty = p.Sum(x => x.Qty) }).ToList();
#region 明细
foreach (var detail in wmsReceipt.Details)
foreach (var detail in sumDetails)
{
var outgoingDetailToExternal = new OutgoingToExternal()
{

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs

@ -95,7 +95,7 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
#endregion
#region 线边仓退料单 ProductionReturn scontrol
Logger.LogInformation($"Write ProductionReturnNote");//线边仓退料单
Logger.LogInformation($"Write ProductionReturnNote");//线边仓退料单(汇总)
var productionReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService<ProductionReturnNoteConverter>();
var productionReturnNoteList = await productionReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(productionReturnNoteList).ConfigureAwait(false);

Loading…
Cancel
Save