Browse Source

更新撤銷退回邏輯

master
学 赵 1 year ago
parent
commit
8d30e81374
  1. 48
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

48
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -250,12 +250,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
_dbcontext.BulkUpdate(pdList);
_dbcontext.BulkUpdate(pdinvList);
}
else
{
_dbcontext.BulkDelete(pdList);
_dbcontext.BulkDelete(p_ls);
foreach (var item in pdList)
{
item.State = SettleBillState.;
}
foreach (var item in pdinvList)
{
if(item.State!=SettleBillState.QAD)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(pdList);
_dbcontext.BulkUpdate(pdinvList);
}
}
var bbacList = _dbcontext.Set<BBAC_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
@ -274,12 +284,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
_dbcontext.BulkUpdate(bbacList);
_dbcontext.BulkUpdate(bbacinvList);
}
else
{
_dbcontext.BulkDelete(pdList);
_dbcontext.BulkDelete(p_ls);
foreach (var item in bbacList)
{
item.State = SettleBillState.;
}
foreach (var item in bbacinvList)
{
if (item.State != SettleBillState.QAD)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(bbacList);
_dbcontext.BulkUpdate(bbacinvList);
}
}
var hbpoList = _dbcontext.Set<HBPO_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
@ -298,12 +318,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
_dbcontext.BulkUpdate(hbpoList);
_dbcontext.BulkUpdate(hbpoinvList);
}
else
{
_dbcontext.BulkDelete(pdList);
_dbcontext.BulkDelete(p_ls);
foreach (var item in hbpoList)
{
item.State = SettleBillState.;
}
foreach (var item in hbpoinvList)
{
if (item.State != SettleBillState.QAD)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(hbpoList);
_dbcontext.BulkUpdate(hbpoinvList);
}
}
}

Loading…
Cancel
Save