|
@ -1429,12 +1429,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
} |
|
|
} |
|
|
if (p_notlist != null && p_notlist.Count > 0) |
|
|
if (p_notlist != null && p_notlist.Count > 0) |
|
|
{ |
|
|
{ |
|
|
|
|
|
var innotls1 = new List<INVOICE_NOT_SETTLE>(); |
|
|
var groupnum = itm.Value; |
|
|
var groupnum = itm.Value; |
|
|
var notls = p_notlist.Where(p => groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }) |
|
|
var notls = p_notlist.Where(p => groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }) |
|
|
.Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = itm.Key }); |
|
|
.Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = itm.Key }); |
|
|
foreach (var nitm in notls) |
|
|
foreach (var nitm in notls) |
|
|
{ |
|
|
{ |
|
|
innotls.Add(new INVOICE_NOT_SETTLE( |
|
|
innotls1.Add(new INVOICE_NOT_SETTLE( |
|
|
guid: GuidGenerator.Create(), |
|
|
guid: GuidGenerator.Create(), |
|
|
version: p_version, |
|
|
version: p_version, |
|
|
invGroupNum: p_InvGroupNum, |
|
|
invGroupNum: p_InvGroupNum, |
|
@ -1449,7 +1450,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
} |
|
|
} |
|
|
if (innotls.Count > 0) |
|
|
if (innotls.Count > 0) |
|
|
{ |
|
|
{ |
|
|
notDetialList.AddRange(innotls); |
|
|
notDetialList.AddRange(innotls1); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
var invbill = new INVOICE_GRP |
|
|
var invbill = new INVOICE_GRP |
|
@ -1477,7 +1478,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
if (salist.Count > 0) |
|
|
if (salist.Count > 0) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
await _repository.DbContext.BulkUpdateAsync(salist,new BulkConfig() { BatchSize=10000 }); |
|
|
await _repository.DbContext.BulkUpdateAsync(salist); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|