mahao 1 year ago
parent
commit
88554f8921
  1. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

15
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -340,7 +340,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
var bbacSa = new BBAC_SA() var bbacSa = new BBAC_SA()
{ {
BillNum = bbacSaBillNum, BillNum = bbacSaBillNum,
State = "1", State = "0",
BusinessType = _businessType, BusinessType = _businessType,
Site = Site Site = Site
}; };
@ -408,8 +408,8 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
#endregion #endregion
#region 添加入库 #region 添加入库
await _bbacSaRepository.InsertAsync(bbacSa); await _bbacSaRepository.InsertAsync(bbacSa).ConfigureAwait(false);
await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails); await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails).ConfigureAwait(false);
if (bbacCanSaDetails.Count > 0) if (bbacCanSaDetails.Count > 0)
{ {
bbacCanSaDetails.ForEach(bbacCanSaDetail => bbacCanSaDetails.ForEach(bbacCanSaDetail =>
@ -418,8 +418,8 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
bbacCanSaDetail.BusinessType = _businessType; bbacCanSaDetail.BusinessType = _businessType;
}); });
await _bbacCanSaRepository.InsertAsync(bbacCanSa); await _bbacCanSaRepository.InsertAsync(bbacCanSa).ConfigureAwait(false);
await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails); await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails).ConfigureAwait(false);
} }
if (bbacNotSaDetails.Count > 0) if (bbacNotSaDetails.Count > 0)
{ {
@ -428,7 +428,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
bbacNotSaDetail.BusinessType = _businessType; bbacNotSaDetail.BusinessType = _businessType;
}); });
await _bbacNotSaDetailRepository.InsertManyAsync(bbacNotSaDetails); await _bbacNotSaDetailRepository.DbContext.BulkInsertAsync(bbacNotSaDetails).ConfigureAwait(false);
} }
if (materialRelationships.Count > 0) if (materialRelationships.Count > 0)
{ {
@ -452,8 +452,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
List<BBAC_CAN_SA_DETAIL> bbacCanSaDetails = new List<BBAC_CAN_SA_DETAIL>(); List<BBAC_CAN_SA_DETAIL> bbacCanSaDetails = new List<BBAC_CAN_SA_DETAIL>();
//不可结算 //不可结算
List<BBAC_NOT_SA_DETAIL> bbacNotSaDetails = new List<BBAC_NOT_SA_DETAIL>(); List<BBAC_NOT_SA_DETAIL> bbacNotSaDetails = new List<BBAC_NOT_SA_DETAIL>();
var bbacSaEntity = await _bbacSaRepository.FirstOrDefaultAsync(t => t.Id.Equals(id)).ConfigureAwait(false); var bbacSaEntity = await _bbacSaRepository.FindAsync(id).ConfigureAwait(false);
//var bbacSaEntity = await _bbacSaRepository.FindAsync(id).ConfigureAwait(false);
if (bbacSaEntity != null) if (bbacSaEntity != null)
{ {
//结算单据 //结算单据

Loading…
Cancel
Save