Browse Source

更新版本

master
zhaoxinyu 10 months ago
parent
commit
b1872b6743
  1. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  3. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

33
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs

@ -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();
}

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

@ -203,7 +203,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
[UnitOfWork(false)]
public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType, string p_email, bool flag = true)
where T : PD_BASE, new()
{
{
var ls=new List<VmiLog>();
var invbills=p_ls.Select(p => p.BillNum).ToList();//发票号
var invs=_dbcontext.Set<INVOICE_GRP>().Where(p => invbills.Contains(p.InvbillNum)).ToList();//所有发票

1
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -146,7 +146,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var jit3 = result.Where(p => p.Site == "1041").ToList();
if (jit1.Count > 0)
{
notlist.AddRange(jit1);
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var entity = new PUB_CAN_SA();

Loading…
Cancel
Save