获取给定任务的下一任务类型

usertest
嵇文龙 3 months ago
parent 34c12e4a3c
commit 1547cb915c

@ -113,7 +113,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (request.HasCabin.GetValueOrDefault())
{
//如果为现舱,获取下一任务类型进行创建
var nextType = await GetNextTypeAsync(request.BusinessId, request.BusinessType, request.TaskType);
var nextType = await GetNextTypeAsync(request.BusinessId, request.BusinessType, request.TaskType, request.HasCabin);
if (nextType.HasValue)
request.TaskTypeName = nextType.Value.ToString();
}
@ -759,15 +759,17 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <param name="bsId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="currentType">当前任务类型</param>
/// <param name="hasCabin">是否现舱</param>
/// <returns></returns>
protected async Task<TaskBaseTypeEnum?> GetNextTypeAsync(long bsId, BusinessType businessType, TaskBaseTypeEnum currentType)
protected async Task<TaskBaseTypeEnum?> GetNextTypeAsync(long bsId, BusinessType businessType, TaskBaseTypeEnum currentType, bool? hasCabin = null)
{
var order = await ActionService.GetBusinessDataAsync(bsId, businessType);
TaskFlowRuner flowRuner = new(TenantDb, ServiceProvider);
return await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN,
new TaskFlowDataContext(
(TaskFlowDataNameConst.Business, order)
), currentType);
var dataContext = new TaskFlowDataContext(
(TaskFlowDataNameConst.Business, order),
(nameof(hasCabin), hasCabin)
);
return await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN, dataContext, currentType);
}
/// <summary>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>

Loading…
Cancel
Save