|
|
@ -199,7 +199,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
|
invoiceGrp.State = SettleBillState.已提交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); |
|
|
|
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<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); |
|
|
|
//构建发票同步Qad状态表数据
|
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode, "").ConfigureAwait(false); |
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 构建发票同步Qad状态表数据
|
|
|
|
/// </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) |
|
|
|
{ |
|
|
|
TableName = teaTaskSub.TableName, |
|
|
|
Domain = teaTaskSub.Domain, |
|
|
|
Site = teaTaskSub.Site, |
|
|
|
Customer = customer, |
|
|
|
Voucher = voucher |
|
|
|
Customer = customer |
|
|
|
}; |
|
|
|
await _settleAccountDbContext.Set<InvoiceSyncQad>().AddAsync(invoiceSyncQad).ConfigureAwait(false); |
|
|
|
} |
|
|
|