diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs index 64b353b1..98f9a181 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs @@ -340,7 +340,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase var bbacSa = new BBAC_SA() { BillNum = bbacSaBillNum, - State = "1", + State = "0", BusinessType = _businessType, Site = Site }; @@ -408,8 +408,8 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase #endregion #region 添加入库 - await _bbacSaRepository.InsertAsync(bbacSa); - await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails); + await _bbacSaRepository.InsertAsync(bbacSa).ConfigureAwait(false); + await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails).ConfigureAwait(false); if (bbacCanSaDetails.Count > 0) { bbacCanSaDetails.ForEach(bbacCanSaDetail => @@ -418,8 +418,8 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase bbacCanSaDetail.BusinessType = _businessType; }); - await _bbacCanSaRepository.InsertAsync(bbacCanSa); - await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails); + await _bbacCanSaRepository.InsertAsync(bbacCanSa).ConfigureAwait(false); + await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails).ConfigureAwait(false); } if (bbacNotSaDetails.Count > 0) { @@ -428,7 +428,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase bbacNotSaDetail.BusinessType = _businessType; }); - await _bbacNotSaDetailRepository.InsertManyAsync(bbacNotSaDetails); + await _bbacNotSaDetailRepository.DbContext.BulkInsertAsync(bbacNotSaDetails).ConfigureAwait(false); } if (materialRelationships.Count > 0) { @@ -452,8 +452,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase List bbacCanSaDetails = new List(); //不可结算 List bbacNotSaDetails = new List(); - 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) { //结算单据