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