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.

79 lines
3.0 KiB
C#

using DS.Module.Core;
4 months ago
using DS.Module.Core.Condition;
using DS.Module.Core.Data;
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>
4 months ago
/// <param name="source">要对比的数据源</param>
/// <param name="condition">匹配条件</param>
/// <returns></returns>
bool IsMatch(object source, ConditionContent condition);
/// <summary>
/// 根据指定条件返回是否匹配的结果
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="businessType">业务类型</param>
4 months ago
/// <param name="conditions">匹配条件</param>
/// <returns></returns>
4 months ago
Task<bool> IsMatchAsync(long bsId, BusinessType businessType, IEnumerable<ConditionContent> conditions);
4 months ago
/// <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="businessTask">任务信息</param>
/// <param name="includeOrder">是否包含订单数据</param>
/// <param name="additionalData">附加参数</param>
4 months ago
/// <returns></returns>
Task<DataResult> TriggerActionAsync(BusinessTask businessTask, bool includeOrder = false, IDictionary<string, object>? additionalData = null);
/// <summary>
/// 执行放舱任务(任务台使用)
/// </summary>
Task SpaceReleaseTask(TaskFlowDataContext dataContext);
/// <summary>
/// 自动订舱
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
Task<DataResult> AutomaticBooking(long businessId, BusinessType businessType);
4 months ago
}
}