From 3e7fc994ed8298231ca908cee42ddf5776507314 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 26 Apr 2023 09:09:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EosAgentModule.cs | 2 +- .../Incoming/EosIncomingBackgroundWorker.cs | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs index d1ed0e792..43fc043db 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs @@ -166,7 +166,7 @@ public class EosAgentModule : AbpModule { context.AddBackgroundWorkerAsync(); - //context.AddBackgroundWorkerAsync(); + context.AddBackgroundWorkerAsync(); } } diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs index 48f9cbd07..8b13c38dd 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs @@ -35,13 +35,13 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase return; } - //Logger.LogInformation($"Read Plan"); - //var planReader = workerContext.ServiceProvider.GetRequiredService(); - //var planConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保存Plan - //var plansFromExternalList = await planReader.ReadAsync().ConfigureAwait(false); - ////转换Plan - //await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read Plan"); + var planReader = workerContext.ServiceProvider.GetRequiredService(); + var planConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保存Plan + var plansFromExternalList = await planReader.ReadAsync().ConfigureAwait(false); + //转换Plan + await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Read Ship"); var shipHandleService = workerContext.ServiceProvider.GetRequiredService(); @@ -51,13 +51,13 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase //转换Ship await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); - //Logger.LogInformation($"Read Product"); - //var productHandleService = workerContext.ServiceProvider.GetRequiredService(); - //var productConverter = workerContext.ServiceProvider.GetRequiredService(); - ////读取并保持Product - //var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); - //// 转换Product - //await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); + Logger.LogInformation($"Read Product"); + var productHandleService = workerContext.ServiceProvider.GetRequiredService(); + var productConverter = workerContext.ServiceProvider.GetRequiredService(); + //读取并保持Product + var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false); + // 转换Product + await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false); Logger.LogInformation($"Completed: Handling {Incoming}"); }