Browse Source

代码合并

集成Redis
lvzb 2 years ago
parent
commit
3e7fc994ed
  1. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs
  2. 28
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs

@ -166,7 +166,7 @@ public class EosAgentModule : AbpModule
{
context.AddBackgroundWorkerAsync<EosIncomingBackgroundWorker>();
//context.AddBackgroundWorkerAsync<EosOutgoingBackgroundWorker>();
context.AddBackgroundWorkerAsync<EosOutgoingBackgroundWorker>();
}
}

28
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<PlanReader>();
//var planConverter = workerContext.ServiceProvider.GetRequiredService<PlanConverter>();
////读取并保存Plan
//var plansFromExternalList = await planReader.ReadAsync().ConfigureAwait(false);
////转换Plan
//await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Plan");
var planReader = workerContext.ServiceProvider.GetRequiredService<PlanReader>();
var planConverter = workerContext.ServiceProvider.GetRequiredService<PlanConverter>();
//读取并保存Plan
var plansFromExternalList = await planReader.ReadAsync().ConfigureAwait(false);
//转换Plan
await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Ship");
var shipHandleService = workerContext.ServiceProvider.GetRequiredService<ShipReader>();
@ -51,13 +51,13 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
//转换Ship
await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false);
//Logger.LogInformation($"Read Product");
//var productHandleService = workerContext.ServiceProvider.GetRequiredService<ProductReader>();
//var productConverter = workerContext.ServiceProvider.GetRequiredService<ProductConverter>();
////读取并保持Product
//var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false);
//// 转换Product
//await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Product");
var productHandleService = workerContext.ServiceProvider.GetRequiredService<ProductReader>();
var productConverter = workerContext.ServiceProvider.GetRequiredService<ProductConverter>();
//读取并保持Product
var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false);
// 转换Product
await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Completed: Handling {Incoming}");
}

Loading…
Cancel
Save