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