diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs index cbaa74062..c7d239e71 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsExtensions.cs @@ -34,7 +34,7 @@ public static class IncomingToWmsExtensions { var Dict = JsonSerializer.Deserialize(incomingConverted.DataContent); var DictBasicAppService = workerContext.ServiceProvider.GetRequiredService(); - await DictBasicAppService.UpdateAsync(Dict).ConfigureAwait(false); + await DictBasicAppService.UpdateAsync(Dict).ConfigureAwait(false); } public static async Task HandleUsersAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) { @@ -55,27 +55,34 @@ public static class IncomingToWmsExtensions var item = JsonSerializer.Deserialize(incomingConverted.DataContent); var itemBasicAppService = workerContext.ServiceProvider.GetRequiredService(); await itemBasicAppService.UpsertAsyncByInterface(item).ConfigureAwait(false); + + //try + //{ + // Thread thread = new Thread(thead); + + // thread.Start(); + // var BalanceAppService = workerContext.ServiceProvider.GetRequiredService(); + // BalanceUpdateItemBasicInfoDto balan = new BalanceUpdateItemBasicInfoDto(); + // List bala = new List(); + // BalanceUpdateItemBasicInfo ba = new BalanceUpdateItemBasicInfo(); + // ba.ItemCode = item.Code; + // ba.ItemDesc1 = item.Desc1; + // ba.ItemDesc2 = item.Desc2; + // ba.ItemName = item.Name; + // bala.Add(ba); + // balan.BalanceUpdateItemBasicInfos = bala; + // await BalanceAppService.UpdateItemBasicInfoAsync(balan).ConfigureAwait(false); + //} + //catch (Exception ex) + //{ + + //} - try - { - - var BalanceAppService = workerContext.ServiceProvider.GetRequiredService(); - BalanceUpdateItemBasicInfoDto balan = new BalanceUpdateItemBasicInfoDto(); - BalanceUpdateItemBasicInfo bala = new BalanceUpdateItemBasicInfo(); - bala.ItemCode = item.Code; - bala.ItemDesc1 = item.Desc1; - bala.ItemDesc2 = item.Desc2; - balan.BalanceUpdateItemBasicInfos.Add(bala); - await BalanceAppService.UpdateItemBasicInfoAsync(balan).ConfigureAwait(false); - } - catch (Exception e) - { - - - } - } + public static void thead() + { + } public static async Task HandleErpLocationsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) { var erpLocation = JsonSerializer.Deserialize(incomingConverted.DataContent); diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs index 3ccb99a71..59e37b895 100644 --- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs +++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/IncomingToWmsWorker.cs @@ -41,7 +41,7 @@ public class IncomingToWmsWorker : AsyncPeriodicBackgroundWorkerBase } private async Task HandleIncomingDataAsync(PeriodicBackgroundWorkerContext workerContext) - { + { //Resolve dependencies var incomingToWmsManager = workerContext.ServiceProvider.GetRequiredService(); //Do the work