|
|
@ -216,17 +216,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
_dbcontext.BulkDelete(notlist);//删除不可结数据
|
|
|
|
_dbcontext.BulkInsert(billDetails);//插入可结主表
|
|
|
|
_dbcontext.BulkInsert(billList);//插入可结明细
|
|
|
|
var flaglist= _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.IsReturn == true).ToList(); |
|
|
|
foreach (var flag in flaglist) { |
|
|
|
flag.IsReturn = false; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(flaglist);//插入可结明细
|
|
|
|
|
|
|
|
issucess = true; |
|
|
|
transaction.Commit(); |
|
|
|
} |
|
|
|
var flaglist = _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.IsReturn == true).ToList(); |
|
|
|
foreach (var flag in flaglist) |
|
|
|
{ |
|
|
|
flag.IsReturn = false; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(flaglist);//插入可结明细
|
|
|
|
} |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
var flaglist = _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.IsReturn == true).ToList(); |
|
|
|
foreach (var flag in flaglist) |
|
|
|
{ |
|
|
|
flag.IsReturn = false; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(flaglist);//插入可结明细
|
|
|
|
issucess = false; |
|
|
|
// 回滚事务
|
|
|
|
transaction.Rollback(); |
|
|
@ -362,13 +370,26 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
issucess = false;// 回滚事务
|
|
|
|
transaction.Rollback(); |
|
|
|
} |
|
|
|
|
|
|
|
var flaglist = _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.IsReturn == true).ToList(); |
|
|
|
foreach (var flag in flaglist) |
|
|
|
{ |
|
|
|
flag.IsReturn = false; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(flaglist);//插入可结明细
|
|
|
|
|
|
|
|
} |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
var flaglist = _dbcontext.Set<BBAC_NOT_SA_DETAIL>().Where(p => p.IsReturn == true).ToList(); |
|
|
|
foreach (var flag in flaglist) |
|
|
|
{ |
|
|
|
flag.IsReturn = false; |
|
|
|
} |
|
|
|
_dbcontext.BulkUpdate(flaglist);//插入可结明细
|
|
|
|
issucess = false;// 回滚事务
|
|
|
|
transaction.Rollback(); |
|
|
|
} |
|
|
|