|
|
@ -237,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedsaInvs1).ConfigureAwait(false); |
|
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
|
_repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
//await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false);
|
|
|
@ -330,28 +330,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
{ |
|
|
|
await SubmitToQadHongChongAsync(invoiceGrp.ParentInvbillNum).ConfigureAwait(false); |
|
|
|
} |
|
|
|
//await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false);
|
|
|
|
//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 _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
|
_repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
// await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false);
|
|
|
|
// var retryPolicyAsync = Policy.Handle<Exception>().WaitAndRetryAsync(new[] {
|
|
|
|
// TimeSpan.FromSeconds(1),
|
|
|
|
// TimeSpan.FromSeconds(5),
|
|
|
|
// TimeSpan.FromSeconds(5),
|
|
|
|
// TimeSpan.FromSeconds(5)
|
|
|
|
//}, (exception, timeSpan, retryCount, context) =>
|
|
|
|
//{
|
|
|
|
// _logger.LogError($"提交到QAD,修改发票状态执行失败,第 {retryCount} 次重试");
|
|
|
|
//});
|
|
|
|
// await retryPolicyAsync.ExecuteAsync(async () => await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false)).ConfigureAwait(false);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -477,7 +463,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedsaInvs1).ConfigureAwait(false); |
|
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
|
_repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
@ -549,7 +535,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
|
invoiceGrp.State = SettleBillState.已提交QAD; |
|
|
|
_repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); |
|
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
} |
|
|
|