You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.9 KiB
C#

using DS.Module.Core;
4 months ago
using DS.Module.Core.Condition;
using DS.Module.Core.Data;
4 months ago
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
4 months ago
using DS.WMS.Core.Op.Entity.TaskInteraction;
namespace DS.WMS.Core.Op.Interface.TaskInteraction
{
/// <summary>
/// 动作执行管理
/// </summary>
public interface IActionManagerService
4 months ago
{
4 months ago
/// <summary>
/// 根据指定条件返回是否匹配的结果
/// </summary>
/// <param name="request">任务请求</param>
/// <param name="conditions">匹配条件</param>
/// <returns></returns>
Task<bool> IsMatchAsync(TaskRequest request, IEnumerable<ConditionContent> conditions);
/// <summary>
/// 获取所需业务数据
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="conditions">条件字段</param>
/// <returns></returns>
Task<dynamic?> GetBusinessDataAsync(long businessId, BusinessType businessType, IEnumerable<ConditionContent> conditions);
/// <summary>
/// 获取所需业务数据
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="fields">返回字段列表</param>
/// <returns></returns>
4 months ago
Task<dynamic?> GetBusinessDataAsync(long businessId, BusinessType businessType, params string[] fields);
4 months ago
/// <summary>
/// 执行特定动作
/// </summary>
/// <param name="dataContext">数据上下文</param>
/// <returns></returns>
Task ExecuteAsync(TaskFlowDataContext dataContext);
/// <summary>
/// 触发任务执行动作
/// </summary>
/// <param name="dataContext"></param>
/// <returns></returns>
Task TriggerActionAsync(TaskFlowDataContext dataContext);
/// <summary>
/// 触发任务执行动作
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="taskType">任务类型</param>
/// <returns></returns>
Task TriggerActionAsync(long businessId, BusinessType businessType, TaskBaseTypeEnum taskType);
4 months ago
/// <summary>
/// 触发任务执行动作
/// </summary>
/// <param name="businessTask">任务信息</param>
/// <param name="includeOrder">是否包含订单数据</param>
/// <param name="additionalData">附加参数</param>
4 months ago
/// <returns></returns>
Task TriggerActionAsync(BusinessTask businessTask, bool includeOrder = false, IDictionary<string, object>? additionalData = null);
/// <summary>
/// 执行放舱任务(任务台使用)
/// </summary>
Task SpaceReleaseTask(TaskFlowDataContext dataContext);
4 months ago
}
}