fix 临时调整代码

This commit is contained in:
2024-11-25 11:58:03 +08:00
parent bbaf7aa3be
commit f49404f938
13 changed files with 81 additions and 102 deletions

View File

@@ -17,14 +17,14 @@ public class SyncBusinessTripJob : BaseJob
/// <inheritdoc />
protected override async Task RunAsync(IServiceProvider serviceProvider)
{
var sapBusinessTripService = serviceProvider.GetService<ISapBusinessTripService>();
var identityDbContext = DbContext.ChangeDb("identity");
var factories = await identityDbContext.Queryable<TenantEntity>().Where(x => !SqlFunc.IsNullOrEmpty(x.PCode)).ToListAsync();
foreach (var factory in factories)
{
await sapBusinessTripService.HandlerBusinessTripsByFactoryAsync(factory.Code);
}
// var sapBusinessTripService = serviceProvider.GetService<ISapBusinessTripService>();
//
// var identityDbContext = DbContext.ChangeDb("identity");
// var factories = await identityDbContext.Queryable<TenantEntity>().Where(x => !SqlFunc.IsNullOrEmpty(x.PCode)).ToListAsync();
//
// foreach (var factory in factories)
// {
// await sapBusinessTripService.HandlerBusinessTripsByFactoryAsync(factory.Code);
// }
}
}