支持审批流程中的分支网关和节点触发条件
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using BaseOUDAL;
|
||||
using YLErp.BLL;
|
||||
using YLErp.BLL.Eod;
|
||||
using YLErp.Helpers;
|
||||
using YLErp.Model;
|
||||
using YLErp.Model.Enum;
|
||||
using YLErp.Modules.ClientModule;
|
||||
@@ -140,7 +141,8 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
return result;
|
||||
}
|
||||
//TODO 如果是审批组
|
||||
var tradeProessQuery = TradeProcess();
|
||||
// 需求②:按交易状态推断开仓/了结流程。了结类(平仓/行权/互换待复核)走 CloseProcess。
|
||||
var tradeProessQuery = TradeProcessByCategory(td);
|
||||
var count = tradeProessQuery.Count();
|
||||
if (count == 0 || td.ProcessOrderId == ProcessTradeLog.审批通过)//投资规模校验已经将数据设置为已通过
|
||||
{
|
||||
@@ -166,6 +168,8 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
//{
|
||||
// td.ProcessOrderBranch = 0;
|
||||
//}
|
||||
// 节点触发条件(需求①):下一节点配置了 triggerCondition 时,满足才进入审批,不满足则跳过。
|
||||
nextOrder = AdvanceThroughTriggerNodes(tradeProessQuery, nextOrder, BuildTriggerContext(td, UserId));
|
||||
if (nextOrder==null)
|
||||
{
|
||||
|
||||
@@ -225,7 +229,8 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
var childrenTrades = DbContext.trade.Where(x => childrenTradeIds.Contains(x.id)).ToList();
|
||||
var result = new TradeOpenResult(td);
|
||||
// 如果是审批组
|
||||
var tradeProessQuery = TradeProcess();
|
||||
// 需求②:分组了结按交易状态推断开仓/了结流程。
|
||||
var tradeProessQuery = TradeProcessByCategory(td);
|
||||
var count = tradeProessQuery.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
@@ -246,6 +251,8 @@ namespace YLErp.Modules.TradeModule.DealModule
|
||||
{
|
||||
nextOrder = tradeProessQuery.FirstOrDefault(x => x.order > td.ProcessOrderId && x.node == td.ProcessOrderBranch && x.approvalGroupId == 0);
|
||||
}
|
||||
// 节点触发条件(需求①):分组了结推进同样支持触发条件。
|
||||
nextOrder = AdvanceThroughTriggerNodes(tradeProessQuery, nextOrder, BuildTriggerContext(td, UserId));
|
||||
if (nextOrder == null)
|
||||
{
|
||||
SetParentTradeOpen(req, td, childrenTrades, parentTradeCash);
|
||||
|
||||
Reference in New Issue
Block a user