mahao
1 year ago
9 changed files with 192 additions and 98 deletions
@ -0,0 +1,55 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Threading.Tasks; |
|||
using DocumentFormat.OpenXml.Wordprocessing; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using SettleAccount.Job.Services.Report; |
|||
using TaskJob.EventArgs; |
|||
using TaskJob.Interfaces; |
|||
using Volo.Abp.Application.Services; |
|||
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
|||
|
|||
/// <summary>
|
|||
/// 手动同步
|
|||
/// </summary>
|
|||
[AllowAnonymous] |
|||
[Route("api/settleaccount/[controller]/[action]")]
|
|||
public class HomeAppService : ApplicationService |
|||
{ |
|||
private readonly IServiceProvider _applicationServices; |
|||
|
|||
public HomeAppService(IHost host) |
|||
{ |
|||
_applicationServices = host.Services; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 同步
|
|||
/// </summary>
|
|||
[HttpPost] |
|||
public async Task<string> SyncAsync(JobRequestDto jobRequestDto) |
|||
{ |
|||
await Task.CompletedTask.ConfigureAwait(false); |
|||
return "ddd"; |
|||
//using var scope = this._applicationServices.CreateScope();
|
|||
//IExportJob exportJob = jobDto.businessType switch
|
|||
//{
|
|||
// EnumBusinessType.JisBBAC => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.JisHBPO => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.MaiDanJianBBAC => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.MaiDanJianHBPO => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.ZhiGongJianBBAC => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.ZhiGongJianHBPO => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.BeiJian => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// EnumBusinessType.YinDuJian => scope.ServiceProvider.GetRequiredService<JisBBACEdiSeCompareExportService>(),
|
|||
// _ => throw new ArgumentOutOfRangeException(nameof(jobDto.businessType), $"Not expected direction value: {jobDto.businessType}"),
|
|||
//};
|
|||
//exportJob.ExportFile(jobDto.Id, jobDto.ExportName, jobDto.Propert);
|
|||
} |
|||
} |
Loading…
Reference in new issue