Browse Source

更新版本

master
zhaoxinyu 6 months ago
parent
commit
eaf05a4fd3
  1. 46
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

46
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -144,19 +144,29 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var invoiceGrps = _settleAccountDbContext.Set<INVOICE_GRP>()
.Where(t => invbillNums.Contains(t.InvbillNum));
var invoiceBBACGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisBBAC).Where(t => t.State == SettleBillState.);
foreach (var itm in invoiceGrps)
{
itm.State = SettleBillState.;
}
await _settleAccountDbContext.BulkUpdateAsync(invoiceGrps.ToList()).ConfigureAwait(false);
var invoiceBBACGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisBBAC).Where(t => t.State == SettleBillState.);
var invoicePubGrps = invoiceGrps.Where(p => p.BusinessType != EnumBusinessType.JisBBAC && p.BusinessType != EnumBusinessType.JisHBPO)
.Where(t => t.State == SettleBillState.);
var invoiceHbpoGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisHBPO).Where(t => t.State == SettleBillState.);
.Where(t => t.State == SettleBillState.);
var invoiceHbpoGrps = invoiceGrps.Where(p => p.BusinessType == EnumBusinessType.JisHBPO).Where(t => t.State == SettleBillState.);
if (invoiceBBACGrps.Any())
{
var invlist = await invoiceBBACGrps.ToListAsync().ConfigureAwait(false);
foreach (var itm in invlist)
{
itm.State = SettleBillState.;
}
await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
//foreach (var itm in invlist)
//{
// itm.State = SettleBillState.发票同步中;
//}
//await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
var billinvs=invlist.Select(p => p.InvbillNum).ToList();
@ -165,11 +175,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (invoicePubGrps.Any())
{
var invlist = await invoicePubGrps.ToListAsync().ConfigureAwait(false);
foreach (var itm in invlist)
{
itm.State = SettleBillState.;
}
await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
//foreach (var itm in invlist)
//{
// itm.State = SettleBillState.发票同步中;
//}
//await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
var billinvs = invlist.Select(p => p.InvbillNum).ToList();
@ -178,11 +188,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (invoiceHbpoGrps.Any())
{
var invlist = await invoiceHbpoGrps.ToListAsync().ConfigureAwait(false);
foreach (var itm in invlist)
{
itm.State = SettleBillState.;
}
await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
//foreach (var itm in invlist)
//{
// itm.State = SettleBillState.发票同步中;
//}
//await _settleAccountDbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
var billinvs = invlist.Select(p => p.InvbillNum).ToList();
await CreateHBPOTaskAsync(billinvs).ConfigureAwait(false);

Loading…
Cancel
Save