|
|
@ -98,9 +98,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
_entity.SetId(Guid.NewGuid()); |
|
|
|
_entity.BillNum = billNumber; |
|
|
|
_entity.InvGroupNum = billNumber; |
|
|
|
_entity.Version = int.Parse(DateTime.Now.ToString("yyyymm")); |
|
|
|
_entity.Version = int.Parse(DateTime.Now.ToString("yyyyMM")); |
|
|
|
_entity.State = SettleBillState.未结状态; |
|
|
|
_entity.SettleBillNum = string.Empty; |
|
|
|
_entity.BusinessType = first.BusinessType; |
|
|
|
var _entityList = new List<PUB_CAN_SA_DETAIL>(); |
|
|
|
foreach (var itm in notlist) |
|
|
|
{ |
|
|
@ -126,7 +127,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
|
|
|
|
_entityList.Add(_detailEntity); |
|
|
|
} |
|
|
|
await _notRepository.DbContext.BulkDeleteAsync(p_list); |
|
|
|
await _repository.DbContext.BulkDeleteAsync(p_list); |
|
|
|
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity }); |
|
|
|
await _repository.DbContext.BulkInsertAsync(_entityList); |
|
|
|
|
|
|
@ -166,9 +167,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
|
|
|
|
_entityList.Add(_detailEntity); |
|
|
|
} |
|
|
|
await _notRepository.DbContext.BulkDeleteAsync(p_list); |
|
|
|
// _repository.DbContext.Database.BeginTransaction();
|
|
|
|
await _repository.DbContext.BulkDeleteAsync(p_list); |
|
|
|
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity }); |
|
|
|
await _repository.DbContext.BulkInsertAsync(_entityList); |
|
|
|
//_repository.DbContext.Database.CommitTransaction();
|
|
|
|
} |
|
|
|
return errors; |
|
|
|
|
|
|
|