Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
35c2285a89
  1. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  2. 51
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs

@ -74,8 +74,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[UnitOfWork(false)]
[HttpPost]
//[Route("generateinvoice")]
public async override Task<IActionResult> GenerateInvoice([FromBody] string invbillnum)
{

51
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -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();
}

Loading…
Cancel
Save