|
@ -34,7 +34,7 @@ public static class IncomingToWmsExtensions |
|
|
{ |
|
|
{ |
|
|
var Dict = JsonSerializer.Deserialize<DictEditInput>(incomingConverted.DataContent); |
|
|
var Dict = JsonSerializer.Deserialize<DictEditInput>(incomingConverted.DataContent); |
|
|
var DictBasicAppService = workerContext.ServiceProvider.GetRequiredService<IDictAppService>(); |
|
|
var DictBasicAppService = workerContext.ServiceProvider.GetRequiredService<IDictAppService>(); |
|
|
await DictBasicAppService.UpdateAsync(Dict).ConfigureAwait(false); |
|
|
await DictBasicAppService.UpdateAsync(Dict).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
public static async Task HandleUsersAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) |
|
|
public static async Task HandleUsersAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) |
|
|
{ |
|
|
{ |
|
@ -55,27 +55,34 @@ public static class IncomingToWmsExtensions |
|
|
var item = JsonSerializer.Deserialize<ItemBasicEditInput>(incomingConverted.DataContent); |
|
|
var item = JsonSerializer.Deserialize<ItemBasicEditInput>(incomingConverted.DataContent); |
|
|
var itemBasicAppService = workerContext.ServiceProvider.GetRequiredService<IItemBasicAppService>(); |
|
|
var itemBasicAppService = workerContext.ServiceProvider.GetRequiredService<IItemBasicAppService>(); |
|
|
await itemBasicAppService.UpsertAsyncByInterface(item).ConfigureAwait(false); |
|
|
await itemBasicAppService.UpsertAsyncByInterface(item).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
//try
|
|
|
|
|
|
//{
|
|
|
|
|
|
// Thread thread = new Thread(thead);
|
|
|
|
|
|
|
|
|
|
|
|
// thread.Start();
|
|
|
|
|
|
// var BalanceAppService = workerContext.ServiceProvider.GetRequiredService<IBalanceAppService>();
|
|
|
|
|
|
// BalanceUpdateItemBasicInfoDto balan = new BalanceUpdateItemBasicInfoDto();
|
|
|
|
|
|
// List<BalanceUpdateItemBasicInfo> bala = new List<BalanceUpdateItemBasicInfo>();
|
|
|
|
|
|
// 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<IBalanceAppService>(); |
|
|
|
|
|
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) |
|
|
public static async Task HandleErpLocationsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext) |
|
|
{ |
|
|
{ |
|
|
var erpLocation = JsonSerializer.Deserialize<ErpLocationEditInput>(incomingConverted.DataContent); |
|
|
var erpLocation = JsonSerializer.Deserialize<ErpLocationEditInput>(incomingConverted.DataContent); |
|
|