|
|
@ -26,6 +26,7 @@ using Volo.Abp.Json; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Win.Sfs.SettleAccount.Bases; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Temp; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
|
|
using Win.Sfs.SettleAccount.Entities.CodeSettings; |
|
|
|
using Win.Sfs.SettleAccount.Entities.Prices; |
|
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
@ -1345,7 +1346,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
adjdetails.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID,p.LU }) |
|
|
|
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU }) |
|
|
|
.Select(itm => new |
|
|
|
{ |
|
|
|
PartCode = itm.Key.PartCode, |
|
|
@ -1474,25 +1475,37 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invbill.CreationTime = DateTime.Now; |
|
|
|
invlist.Add(invbill); |
|
|
|
} |
|
|
|
//using (var transaction = _repository.DbContext.Database.BeginTransaction())
|
|
|
|
//{
|
|
|
|
// try
|
|
|
|
// {
|
|
|
|
// 执行批量数据操作
|
|
|
|
if (salist.Count > 0) |
|
|
|
{ |
|
|
|
await _repository.DbContext.BulkUpdateAsync(salist); |
|
|
|
} |
|
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
|
await _repository.DbContext.BulkInsertAsync(groupList); |
|
|
|
await _repository.DbContext.BulkInsertAsync(detailList); |
|
|
|
|
|
|
|
if (salist.Count > 0) |
|
|
|
{ |
|
|
|
|
|
|
|
await _repository.DbContext.BulkUpdateAsync(salist); |
|
|
|
} |
|
|
|
|
|
|
|
await _repository.DbContext.BulkInsertAsync(invlist); |
|
|
|
await _repository.DbContext.BulkInsertAsync(groupList); |
|
|
|
await _repository.DbContext.BulkInsertAsync(detailList); |
|
|
|
|
|
|
|
if (adjlist.Count > 0) |
|
|
|
{ |
|
|
|
await _repository.DbContext.BulkUpdateAsync(adjlist); |
|
|
|
} |
|
|
|
if (notDetialList.Count > 0) |
|
|
|
{ |
|
|
|
await _repository.DbContext.BulkInsertAsync(notDetialList); |
|
|
|
} |
|
|
|
if (adjlist.Count > 0) |
|
|
|
{ |
|
|
|
await _repository.DbContext.BulkUpdateAsync(adjlist); |
|
|
|
} |
|
|
|
if (notDetialList.Count > 0) |
|
|
|
{ |
|
|
|
await _repository.DbContext.BulkInsertAsync(notDetialList); |
|
|
|
} |
|
|
|
// 提交事务
|
|
|
|
// transaction.Commit();
|
|
|
|
// }
|
|
|
|
// catch (Exception)
|
|
|
|
// {
|
|
|
|
// // 回滚事务
|
|
|
|
// transaction.Rollback();
|
|
|
|
// throw;
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
_invls = invlist.Select(p => p.InvbillNum).ToList(); |
|
|
|
} |
|
|
|
|
|
|
|