|
@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Http; |
|
|
using Microsoft.AspNetCore.Http; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.Extensions.Logging; |
|
|
using Microsoft.Extensions.Logging; |
|
|
|
|
|
using Microsoft.Extensions.Options; |
|
|
using Polly; |
|
|
using Polly; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using Shouldly; |
|
|
using Shouldly; |
|
@ -31,6 +32,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Managers; |
|
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
|
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
|
|
using Win.Sfs.SettleAccount.ExcelImporter; |
|
|
using Win.Sfs.SettleAccount.ExcelImporter; |
|
|
using Win.Sfs.SettleAccount.ExportReports; |
|
|
using Win.Sfs.SettleAccount.ExportReports; |
|
|
|
|
|
using Win.Sfs.SettleAccount.Options; |
|
|
using Win.Sfs.Shared.Filter; |
|
|
using Win.Sfs.Shared.Filter; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
|
|
|
|
|
@ -49,6 +51,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
/// 数据中心数据上下文
|
|
|
/// 数据中心数据上下文
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private readonly ExChangeCenterDbContext _exChangeCenterDbContext; |
|
|
private readonly ExChangeCenterDbContext _exChangeCenterDbContext; |
|
|
|
|
|
private readonly GlobalConfigOptions _globalConfigOptions; |
|
|
|
|
|
|
|
|
private readonly INormalEfCoreRepository<INVOICE_GRP, Guid> _repository; |
|
|
private readonly INormalEfCoreRepository<INVOICE_GRP, Guid> _repository; |
|
|
private readonly INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> _wRepository; |
|
|
private readonly INormalEfCoreRepository<INVOICE_WAIT_DETAIL, Guid> _wRepository; |
|
@ -64,6 +67,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
ILogger<BASE_SERVICE> logger, |
|
|
ILogger<BASE_SERVICE> logger, |
|
|
SettleAccountDbContext settleAccountDbContext, |
|
|
SettleAccountDbContext settleAccountDbContext, |
|
|
ExChangeCenterDbContext exChangeCenterDbContext, |
|
|
ExChangeCenterDbContext exChangeCenterDbContext, |
|
|
|
|
|
IOptions<GlobalConfigOptions> options, |
|
|
IExcelImportAppService excelImportService, |
|
|
IExcelImportAppService excelImportService, |
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
ICommonManager commonManager, |
|
|
ICommonManager commonManager, |
|
@ -83,6 +87,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
_logger = logger; |
|
|
_logger = logger; |
|
|
_settleAccountDbContext = settleAccountDbContext; |
|
|
_settleAccountDbContext = settleAccountDbContext; |
|
|
_exChangeCenterDbContext = exChangeCenterDbContext; |
|
|
_exChangeCenterDbContext = exChangeCenterDbContext; |
|
|
|
|
|
_globalConfigOptions = options.Value; |
|
|
_baseservice = baseservice; |
|
|
_baseservice = baseservice; |
|
|
_repository = repository; |
|
|
_repository = repository; |
|
|
_wRepository = wRepository; |
|
|
_wRepository = wRepository; |
|
@ -109,6 +114,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
public virtual async Task<IActionResult> SubmitToQad(List<string> invbillNums) |
|
|
public virtual async Task<IActionResult> SubmitToQad(List<string> invbillNums) |
|
|
{ |
|
|
{ |
|
|
|
|
|
_globalConfigOptions.IsSyncInvoiceQadState = true; |
|
|
for (var i = 0; i < invbillNums.Count; i++) |
|
|
for (var i = 0; i < invbillNums.Count; i++) |
|
|
{ |
|
|
{ |
|
|
await SubmitToQadSingle(invbillNums[i]).ConfigureAwait(false); |
|
|
await SubmitToQadSingle(invbillNums[i]).ConfigureAwait(false); |
|
|