|
@ -186,16 +186,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
_globalConfigOptions.IsSyncInvoiceQadState = true; |
|
|
_globalConfigOptions.IsSyncInvoiceQadState = true; |
|
|
|
|
|
|
|
|
var invoiceGrps1 = _settleAccountDbContext.Set<INVOICE_GRP>() |
|
|
var invoiceGrps1 = _settleAccountDbContext.Set<INVOICE_GRP>() |
|
|
.Where(t => invbillNums.Contains(t.InvbillNum) && t.State == SettleBillState.已扣减); |
|
|
.Where(t => invbillNums.Contains(t.InvbillNum) && t.State == SettleBillState.红冲发票); |
|
|
foreach (var itm in invoiceGrps1) |
|
|
foreach (var itm in invoiceGrps1) |
|
|
{ |
|
|
{ |
|
|
itm.State = SettleBillState.发票同步中; |
|
|
itm.State = SettleBillState.提交QAD退回到财务审核中; |
|
|
} |
|
|
} |
|
|
await _settleAccountDbContext.BulkUpdateAsync(invoiceGrps1.ToList()).ConfigureAwait(false); |
|
|
await _settleAccountDbContext.BulkUpdateAsync(invoiceGrps1.ToList()).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var invoiceGrps = _settleAccountDbContext.Set<INVOICE_GRP>() |
|
|
var invoiceGrps = _settleAccountDbContext.Set<INVOICE_GRP>() |
|
|
.Where(t => invbillNums.Contains(t.InvbillNum) && t.State == SettleBillState.发票同步中); |
|
|
.Where(t => invbillNums.Contains(t.InvbillNum) && t.State == SettleBillState.提交QAD退回到财务审核中); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var invoiceBBACGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisBBAC); |
|
|
var invoiceBBACGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisBBAC); |
|
@ -1171,7 +1171,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
// 批量插入TED_SAS_INVOICE记录
|
|
|
// 批量插入TED_SAS_INVOICE记录
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
// 设置发票状态为"已提交QAD"
|
|
|
// 设置发票状态为"已提交QAD"
|
|
|
invoice.State = SettleBillState.已提交QAD; |
|
|
invoice.State = SettleBillState.已开票; |
|
|
// 批量更新INVOICE_GRP记录
|
|
|
// 批量更新INVOICE_GRP记录
|
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
// 异步绑定发票与QAD同步
|
|
|
// 异步绑定发票与QAD同步
|
|
@ -1284,7 +1284,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
invoice.State = SettleBillState.已提交QAD; |
|
|
invoice.State = SettleBillState.已开票; |
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoice.RealnvBillNum, invoice.InvbillNum, invoice.ClientCode, invoice.CreationTime).ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoice.RealnvBillNum, invoice.InvbillNum, invoice.ClientCode, invoice.CreationTime).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
@ -1376,7 +1376,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
} |
|
|
} |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); |
|
|
invoice.State = SettleBillState.已提交QAD; |
|
|
invoice.State = SettleBillState.已开票; |
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoice }).ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoice.RealnvBillNum, invoice.InvbillNum, invoice.ClientCode, invoice.CreationTime).ConfigureAwait(false); |
|
|
await BindInvoiceSyncQadAsync(teaTaskSub, invoice.RealnvBillNum, invoice.InvbillNum, invoice.ClientCode, invoice.CreationTime).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|