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