调整:根据当前节点Id,获取工作流下一个任务类型

usertest
zhangxiaofeng 3 months ago
parent 8572214da1
commit 47d99da6dc

@ -189,7 +189,7 @@ namespace DS.Module.Core
TRNAS_PLAN_HAS_CHANGE = 30,
#region 工作流--主流程
#region 工作流--主流程任务类型
/// <summary>
/// 审单
/// </summary>
@ -329,5 +329,19 @@ namespace DS.Module.Core
[Description("箱使")]
WAIT_XIANGSHI = 316,
#endregion
#region 工作流--流程编码
/// <summary>
/// 工作流任务创建主流程
/// </summary>
[Description("工作流任务创建主流程")]
WORK_FLOW_MAIN = 601,
/// <summary>
/// 工作流退舱流程
/// </summary>
[Description("工作流退舱流程")]
WORK_FLOW_RETURN_CABIN = 602
#endregion
}
}

@ -83,7 +83,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
{
TaskFlowRuner flowRuner = new TaskFlowRuner(TenantDb, ServiceProvider);
var result = await flowRuner.GetWorkFlowNextConfig(new TaskFlowDataContext(
var result = await flowRuner.GetWorkFlowNextConfig(TaskBaseTypeEnum.WORK_FLOW_MAIN, new TaskFlowDataContext(
), current.NextId);

@ -366,13 +366,14 @@ namespace DS.WMS.Core.TaskPlat
/// <summary>
/// 根据当前节点Id获取工作流下一个任务类型
/// </summary>
/// <param name="workFlowType">工作流流程类型</param>
/// <param name="dataContext"></param>
/// <param name="currentConfigId">当前执行的配置Id如果为空则返回首个任务类型</param>
/// <returns>下一个任务类型下一节点Id</returns>
public async Task<(TaskBaseTypeEnum taskType, long configId)?> GetWorkFlowNextConfig(TaskFlowDataContext dataContext, long? currentConfigId = null)
public async Task<(TaskBaseTypeEnum taskType, long configId)?> GetWorkFlowNextConfig(TaskBaseTypeEnum workFlowType, TaskFlowDataContext dataContext, long? currentConfigId = null)
{
var allConfigList = await tenantDb.Queryable<TaskFlowConfig>()
.Where(t => t.MainConfigId == SqlFunc.Subqueryable<TaskFlowConfig>().Where(x => x.IsMain && x.TaskType == "WORK_FLOW").Select(x => x.Id))
.Where(t => t.MainConfigId == SqlFunc.Subqueryable<TaskFlowConfig>().Where(x => x.IsMain && x.TaskType == workFlowType.ToString()).Select(x => x.Id))
.OrderBy(t => t.Id)
.ToListAsync();

@ -265,6 +265,6 @@ public class SaasTest
(TaskFlowDataNameConst.Business, order)
);
TaskFlowRuner runer = new TaskFlowRuner(tenantDb, _serviceProvider);
var result =await runer.GetWorkFlowNextConfig(dataContext, null);
var result = await runer.GetWorkFlowNextConfig(TaskBaseTypeEnum.WORK_FLOW_MAIN, dataContext);
}
}
Loading…
Cancel
Save