|
|
|
@ -83,7 +83,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task TriggerTest(TaskBaseTypeEnum taskType, long? id)
|
|
|
|
|
public async Task<DataResult> TriggerTest(TaskBaseTypeEnum taskType, long? id)
|
|
|
|
|
{
|
|
|
|
|
var task = await TenantDb.Queryable<BusinessTask>()
|
|
|
|
|
.Where(t => t.TaskType == taskType
|
|
|
|
@ -95,14 +95,17 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
if (task != null)
|
|
|
|
|
{
|
|
|
|
|
TaskFlowDataContext dataContext = new(
|
|
|
|
|
(TaskFlowDataNameConst.BusinessTask, task),
|
|
|
|
|
("ActionType", 1),
|
|
|
|
|
("Name", "订舱代理通知")
|
|
|
|
|
(TaskFlowDataNameConst.BusinessTask, task)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
TaskFlowRuner taskFlow = new(TenantDb, ServiceProvider);
|
|
|
|
|
await taskFlow.RunWithBsno(task.TaskType, task.BusinessId, dataContext);
|
|
|
|
|
return DataResult.Success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var result = DataResult.Failed("找不到指定类型的任务");
|
|
|
|
|
result.Data = 404;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|