|
|
@ -340,7 +340,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA> |
|
|
|
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<BBAC_SA> |
|
|
|
#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<BBAC_SA> |
|
|
|
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<BBAC_SA> |
|
|
|
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<BBAC_SA> |
|
|
|
List<BBAC_CAN_SA_DETAIL> bbacCanSaDetails = new List<BBAC_CAN_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) |
|
|
|
{ |
|
|
|
//结算单据
|
|
|
|