|
@ -199,7 +199,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
//构建发票同步Qad状态表数据
|
|
|
//构建发票同步Qad状态表数据
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode, "").ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false); |
|
|
var retryPolicyAsync = Policy.Handle<Exception>().WaitAndRetryAsync(new[] { |
|
|
var retryPolicyAsync = Policy.Handle<Exception>().WaitAndRetryAsync(new[] { |
|
@ -280,22 +280,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
//构建发票同步Qad状态表数据
|
|
|
//构建发票同步Qad状态表数据
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode, "").ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 构建发票同步Qad状态表数据
|
|
|
/// 构建发票同步Qad状态表数据
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private async Task BindInvoiceSyncQadAsync(TEA_TASK_SUB teaTaskSub, string invoiceNumber, string sasInvoiceNumber, string customer, string voucher) |
|
|
private async Task BindInvoiceSyncQadAsync(TEA_TASK_SUB teaTaskSub, string invoiceNumber, string sasInvoiceNumber, string customer) |
|
|
{ |
|
|
{ |
|
|
var invoiceSyncQad = new InvoiceSyncQad(teaTaskSub.TaskID, invoiceNumber, sasInvoiceNumber) |
|
|
var invoiceSyncQad = new InvoiceSyncQad(teaTaskSub.TaskID, invoiceNumber, sasInvoiceNumber) |
|
|
{ |
|
|
{ |
|
|
TableName = teaTaskSub.TableName, |
|
|
TableName = teaTaskSub.TableName, |
|
|
Domain = teaTaskSub.Domain, |
|
|
Domain = teaTaskSub.Domain, |
|
|
Site = teaTaskSub.Site, |
|
|
Site = teaTaskSub.Site, |
|
|
Customer = customer, |
|
|
Customer = customer |
|
|
Voucher = voucher |
|
|
|
|
|
}; |
|
|
}; |
|
|
await _settleAccountDbContext.Set<InvoiceSyncQad>().AddAsync(invoiceSyncQad).ConfigureAwait(false); |
|
|
await _settleAccountDbContext.Set<InvoiceSyncQad>().AddAsync(invoiceSyncQad).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|