Browse Source

更新版本

master
zhaoxinyu 10 months ago
parent
commit
c5328f60f8
  1. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

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

@ -216,7 +216,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
_dbcontext.BulkDelete(notlist);//删除不可结数据 _dbcontext.BulkDelete(notlist);//删除不可结数据
_dbcontext.BulkInsert(billDetails);//插入可结主表 _dbcontext.BulkInsert(billDetails);//插入可结主表
_dbcontext.BulkInsert(billList);//插入可结明细 _dbcontext.BulkInsert(billList);//插入可结明细
issucess = true; issucess = true;
transaction.Commit(); transaction.Commit();
} }
@ -258,7 +257,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
_dbcontext.BulkUpdate(salist);//更新结算数据 _dbcontext.BulkUpdate(salist);//更新结算数据
} }
} }
if (businesstype == "JisHBPO") if (businesstype == "JisHBPO" || businesstype== "MaiDanJianHBPO")
{ {
List<HBPO_NOT_SA_DETAIL> notlist = new List<HBPO_NOT_SA_DETAIL>(); List<HBPO_NOT_SA_DETAIL> notlist = new List<HBPO_NOT_SA_DETAIL>();
List<HBPO_CAN_SA> billList = new List<HBPO_CAN_SA>(); List<HBPO_CAN_SA> billList = new List<HBPO_CAN_SA>();
@ -300,7 +299,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}, },
b = d b = d
}; };
var hbpo_can_list = query.Select(p => p.a).ToList(); var hbpo_can_list = query.Select(p => p.a).ToList();
var hbpo_not_list = query.Select(p => p.b).ToList(); var hbpo_not_list = query.Select(p => p.b).ToList();
if (hbpo_can_list.Count > 0) if (hbpo_can_list.Count > 0)
@ -314,7 +312,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
entity.State = SettleBillState.; entity.State = SettleBillState.;
entity.SettleBillNum = string.Empty; entity.SettleBillNum = string.Empty;
entity.Site = "104T"; entity.Site = "104T";
entity.BusinessType = EnumBusinessType.JisBBAC;
entity.BusinessType =(businesstype== "JisHBPO")?EnumBusinessType.JisHBPO:EnumBusinessType.MaiDanJianHBPO ;
billList.Add(entity); billList.Add(entity);
notlist.AddRange(hbpo_not_list); notlist.AddRange(hbpo_not_list);
foreach (var itm in hbpo_can_list) foreach (var itm in hbpo_can_list)
@ -370,7 +369,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
else else
{ {
issucess = false;// 回滚事务 issucess = false;// 回滚事务
transaction.Rollback(); transaction.Rollback();
} }
@ -380,7 +378,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
flag.IsReturn = false; flag.IsReturn = false;
} }
_dbcontext.BulkUpdate(flaglist);//插入可结明细 _dbcontext.BulkUpdate(flaglist);//插入可结明细
} }
catch (Exception) catch (Exception)
{ {
@ -413,6 +410,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
} }
return id.ToString(); return id.ToString();
} }

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

@ -104,6 +104,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var notlist = _notRepository.Where(p => ls.Contains(p.GroupNum) && p.BusinessType==first.BusinessType).ToList();//JIT_ASN整发 var notlist = _notRepository.Where(p => ls.Contains(p.GroupNum) && p.BusinessType==first.BusinessType).ToList();//JIT_ASN整发
if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC) if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC)
{ {
var subqueryA = (from a in notlist var subqueryA = (from a in notlist
where a.BusinessType == first.BusinessType where a.BusinessType == first.BusinessType
group a by new { a.GroupNum, a.SettleBillNum, a.Version, a.Site } into groupedData group a by new { a.GroupNum, a.SettleBillNum, a.Version, a.Site } into groupedData
@ -126,7 +127,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupedData.Key.SettleBillNum, groupedData.Key.SettleBillNum,
groupedData.Key.Version, groupedData.Key.Version,
groupedData.Key.Site groupedData.Key.Site
}).AsQueryable(); }).AsQueryable();
var result = from tmp1 in notlist var result = from tmp1 in notlist
join tmp2 in (from a in subqueryA join tmp2 in (from a in subqueryA
@ -303,8 +303,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}, },
b = d b = d
}; };
var pub_can_list = query1.Select(p => p.a).ToList(); var pub_can_list = query1.Select(p => p.a).ToList();
var pub_not_list = query1.Select(p => p.b).ToList(); var pub_not_list = query1.Select(p => p.b).ToList();
if (pub_can_list.Count > 0) if (pub_can_list.Count > 0)

Loading…
Cancel
Save