|
|
|
@ -99,22 +99,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
TenantDb.QueryFilter.Clear<IOrgId>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取给定任务的下一任务类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="current">当前任务对象</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
protected async Task<TaskBaseTypeEnum?> GetNextTypeAsync(BusinessTask current)
|
|
|
|
|
{
|
|
|
|
|
var order = await ActionService.GetBusinessDataAsync(current.BusinessId, current.BusinessType);
|
|
|
|
|
TaskFlowRuner flowRuner = new(TenantDb, ServiceProvider);
|
|
|
|
|
var taskType = await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN,
|
|
|
|
|
new TaskFlowDataContext(
|
|
|
|
|
(TaskFlowDataNameConst.Business, order)
|
|
|
|
|
), current.TaskType);
|
|
|
|
|
|
|
|
|
|
return taskType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建关联任务
|
|
|
|
@ -376,8 +360,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
{
|
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
|
|
BusinessType = request.BusinessType,
|
|
|
|
|
TaskTypeName = task.NextType.Value.ToString(),
|
|
|
|
|
RecvUserIdList = task.RecvUserIdArray
|
|
|
|
|
TaskTypeName = task.NextType.Value.ToString()
|
|
|
|
|
};
|
|
|
|
|
result = await CreateTaskAsync(req, false);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
@ -393,7 +376,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
if (task.TaskStatus == TaskStatusEnum.Complete)//目前限制任务完成才触发
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, object>? dic = null;
|
|
|
|
|
if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
|
if (task.NextType == TaskBaseTypeEnum.WAIT_BOOKING)
|
|
|
|
|
{
|
|
|
|
|
dic = new Dictionary<string, object>();
|
|
|
|
|
var param = await ClientParamService.GetParamAsync<string>(task.BusinessId, BookingSelector.Booking_Route,
|
|
|
|
@ -690,6 +673,23 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取给定任务的下一任务类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="current">当前任务对象</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
protected async Task<TaskBaseTypeEnum?> GetNextTypeAsync(BusinessTask current)
|
|
|
|
|
{
|
|
|
|
|
var order = await ActionService.GetBusinessDataAsync(current.BusinessId, current.BusinessType);
|
|
|
|
|
TaskFlowRuner flowRuner = new(TenantDb, ServiceProvider);
|
|
|
|
|
var taskType = await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN,
|
|
|
|
|
new TaskFlowDataContext(
|
|
|
|
|
(TaskFlowDataNameConst.Business, order)
|
|
|
|
|
), current.TaskType);
|
|
|
|
|
|
|
|
|
|
return taskType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取指定类型的业务关联任务
|
|
|
|
|
/// </summary>
|
|
|
|
|