审批完成回调更新

usertest
嵇文龙 3 months ago
parent 36474256b6
commit 76ee52976b

@ -99,22 +99,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
TenantDb.QueryFilter.Clear<IOrgId>(); 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> /// <summary>
/// 创建关联任务 /// 创建关联任务
@ -376,8 +360,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
{ {
BusinessId = request.BusinessId, BusinessId = request.BusinessId,
BusinessType = request.BusinessType, BusinessType = request.BusinessType,
TaskTypeName = task.NextType.Value.ToString(), TaskTypeName = task.NextType.Value.ToString()
RecvUserIdList = task.RecvUserIdArray
}; };
result = await CreateTaskAsync(req, false); result = await CreateTaskAsync(req, false);
if (!result.Succeeded) if (!result.Succeeded)
@ -393,7 +376,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
if (task.TaskStatus == TaskStatusEnum.Complete)//目前限制任务完成才触发 if (task.TaskStatus == TaskStatusEnum.Complete)//目前限制任务完成才触发
{ {
Dictionary<string, object>? dic = null; Dictionary<string, object>? dic = null;
if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT) if (task.NextType == TaskBaseTypeEnum.WAIT_BOOKING)
{ {
dic = new Dictionary<string, object>(); dic = new Dictionary<string, object>();
var param = await ClientParamService.GetParamAsync<string>(task.BusinessId, BookingSelector.Booking_Route, 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>
/// 获取指定类型的业务关联任务 /// 获取指定类型的业务关联任务
/// </summary> /// </summary>

Loading…
Cancel
Save