|
@ -1071,7 +1071,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
} |
|
|
} |
|
|
if (invoiceMap.Count > 0) |
|
|
if (invoiceMap.Count > 0) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var groupList = new List<INVOICE_MAP_GROUP>(); |
|
|
var groupList = new List<INVOICE_MAP_GROUP>(); |
|
|
var notDetialList = new List<INVOICE_NOT_SETTLE>(); |
|
|
var notDetialList = new List<INVOICE_NOT_SETTLE>(); |
|
|
var detailList = new List<INVOICE_WAIT_DETAIL>(); |
|
|
var detailList = new List<INVOICE_WAIT_DETAIL>(); |
|
@ -1082,7 +1081,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
{ |
|
|
{ |
|
|
var key = group.Key;//发票票号
|
|
|
var key = group.Key;//发票票号
|
|
|
var ls = group.Value;//发票明细
|
|
|
var ls = group.Value;//发票明细
|
|
|
|
|
|
|
|
|
//反向查找结算数据
|
|
|
//反向查找结算数据
|
|
|
var query = from itm in dtos |
|
|
var query = from itm in dtos |
|
|
join itm1 in ls |
|
|
join itm1 in ls |
|
@ -1102,15 +1100,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
on new { itm.LU, itm.PartCode, itm.BeginDate, itm.EndDate } equals new { itm1.LU, itm1.PartCode, itm1.BeginDate, itm1.EndDate } |
|
|
on new { itm.LU, itm.PartCode, itm.BeginDate, itm.EndDate } equals new { itm1.LU, itm1.PartCode, itm1.BeginDate, itm1.EndDate } |
|
|
join itm2 in p_ajdlist on new { itm.PartCode, itm.PN, itm.SettleDate } equals new { itm2.PartCode, itm2.PN, itm2.SettleDate } |
|
|
join itm2 in p_ajdlist on new { itm.PartCode, itm.PN, itm.SettleDate } equals new { itm2.PartCode, itm2.PN, itm2.SettleDate } |
|
|
select itm2; |
|
|
select itm2; |
|
|
|
|
|
|
|
|
foreach (var itm in query1) |
|
|
foreach (var itm in query1) |
|
|
{ |
|
|
{ |
|
|
itm.InvBillNum = key; |
|
|
itm.InvBillNum = key; |
|
|
adjlist.Add(itm); |
|
|
adjlist.Add(itm); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>(); |
|
|
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>(); |
|
|
foreach (var detail in ls) |
|
|
foreach (var detail in ls) |
|
|
{ |
|
|
{ |
|
@ -1184,8 +1179,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
); |
|
|
); |
|
|
invlist.Add(invbill); |
|
|
invlist.Add(invbill); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
await _repository.DbContext.BulkInsertAsync(groupList); |
|
|
await _repository.DbContext.BulkInsertAsync(groupList); |
|
|
await _repository.DbContext.BulkInsertAsync(detailList); |
|
|
await _repository.DbContext.BulkInsertAsync(detailList); |
|
@ -1197,7 +1190,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
{ |
|
|
{ |
|
|
await _repository.DbContext.BulkUpdateAsync(adjlist); |
|
|
await _repository.DbContext.BulkUpdateAsync(adjlist); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//await _repository.DbContext.BulkInsertAsync(notDetialList);
|
|
|
//await _repository.DbContext.BulkInsertAsync(notDetialList);
|
|
|
_invls = invlist.Select(p => p.InvbillNum).ToList(); |
|
|
_invls = invlist.Select(p => p.InvbillNum).ToList(); |
|
|
} |
|
|
} |
|
|