diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs index a8d5409e5..7c71a5729 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/DeliverNoteConverter.cs @@ -54,7 +54,7 @@ public class DeliverNoteConverter : IOutgoingConverter 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 item= _salePriceSheetAppService.GetByItemCodeAndCustomerCode(detail.ItemCode, wmsReceipt.CustomerCode); + var item= await _salePriceSheetAppService.GetByItemCodeAndCustomerCode(detail.ItemCode, wmsReceipt.CustomerCode); if (item==null) { flag = false; @@ -105,7 +105,11 @@ public class DeliverNoteConverter : IOutgoingConverter outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(purchaseOrder); outgoingToExternalList.Add(outgoingToExternal); outgoingFromWmsToTyrp.Add(outgoingFromWms);//加入到待传列表 - } + } + else + { + outgoingToExternalList.RemoveAll(r => r.SourceDataGroupCode == wmsReceipt.Number); + } #endregion } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/IssueNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/IssueNoteConverter.cs index 76cdbecb8..8817630e3 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/IssueNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/IssueNoteConverter.cs @@ -111,10 +111,6 @@ public class IssueNoteConverter : IOutgoingConverter scontrol_type = billtype, scontrol_id = 0,//明细中最大scmsend_id }; - if (ret.scontrol_nbr.Length > 10) - { - ret.scontrol_nbr = "SN23" + ret.scontrol_nbr.Substring(5, 6); - } return ret; } /// @@ -141,10 +137,6 @@ public class IssueNoteConverter : IOutgoingConverter scmsend_wipd_loc = exchangeDetailOrder.ToLocationErpCode, scmsend_userid = "WMS" }; - if (ret.scmsend_nbr.Length > 10) - { - ret.scmsend_nbr = "SN23" + ret.scmsend_nbr.Substring(5, 6); - } return ret; } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PurchaseOrderConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PurchaseOrderConverter.cs index df28af930..891858f68 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PurchaseOrderConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PurchaseOrderConverter.cs @@ -118,12 +118,6 @@ public class PurchaseOrderConverter : IOutgoingConverter scontrol_type = billtype, scontrol_id = 0,//明细中最大scmsend_id }; - - - if (ret.scontrol_nbr.Length > 10) - { - ret.scontrol_nbr = "PO23" + ret.scontrol_nbr.Substring(5, 6); - } return ret; } /// @@ -150,10 +144,6 @@ public class PurchaseOrderConverter : IOutgoingConverter scmsend_wipd_loc = "", scmsend_userid = "WMS" }; - if (ret.scmsend_nbr.Length > 10) - { - ret.scmsend_nbr = "PO23" + ret.scmsend_nbr.Substring(5, 6); - } return ret; } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PutawayNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PutawayNoteConverter.cs index 6cc4573c7..250884fd7 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PutawayNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/PutawayNoteConverter.cs @@ -129,10 +129,6 @@ public class PutawayNoteConverter : IOutgoingConverter scontrol_type = billtype, scontrol_id = 0,//明细中最大scmsend_id }; - if (ret.scontrol_nbr == "YS24000076") - { - ret.scontrol_nbr = "YS23000002"; - } return ret; } /// @@ -159,11 +155,6 @@ public class PutawayNoteConverter : IOutgoingConverter scmsend_wipd_loc = "", scmsend_userid = "WMS" }; - if (ret.scmsend_nbr == "YS24000076") - { - ret.scmsend_nbr = "YS23000002"; - ret.scmsend_orderno = "PO23000011"; - } return ret; } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs index a2e751d05..aee24654d 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TransferNoteConverter.cs @@ -114,7 +114,7 @@ public class TransferNoteConverter : IOutgoingConverter var putawayNoteWmsoutm = BuildWmsoutmDataInterface(departmentCode, dt_w, tyrpNumber, location, stat); outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(putawayNoteWmsoutm); - WipDetails = details.GroupBy(r => new { r.Number, r.ItemCode, r.FromLocationErpCode }).Select(p => new TransferNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode }).ToList(); + WipDetails = details.GroupBy(r => new { r.Number, r.ItemCode, r.FromLocationErpCode, r.ToLocationErpCode }).Select(p => new TransferNoteDetailExchangeDto { Qty = p.Sum(itm => itm.Qty), Number = p.Key.Number, ItemCode = p.Key.ItemCode, FromLocationErpCode = p.Key.FromLocationErpCode, ToLocationErpCode = p.Key.ToLocationErpCode }).ToList(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs index f5c6929a5..376a0e72a 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs @@ -64,6 +64,7 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase int wmsoutm_count = 0; //wmsoutm插入条数 int mesout_asd_count = 0; //mesout_asd插入条数 + #region 采购单 PurchaseOrder scontrol Logger.LogInformation($"传出采购单 PurchaseOrder");//采购单 var purchaseOrderConvert = workerContext.ServiceProvider.GetRequiredService(); @@ -267,7 +268,7 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase await countadjustWriter.WriteAsync(ItemTransformNoteList).ConfigureAwait(false); Logger.LogInformation($"回收料调整单-Item_Transform处理{ItemTransformNoteList.Count}条"); if (ItemTransformNoteList.Count > 0) - { + { mesout_asd_count += ItemTransformNoteList.Count; } #endregion @@ -300,6 +301,8 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase #endregion + + Logger.LogInformation($"提交: 执行 {Outgoing}"); }