using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.TaskInteraction.Dtos;
using DS.WMS.Core.TaskInteraction.Entity;
namespace DS.WMS.Core.TaskInteraction.Interface
{
///
/// 交互任务
///
public interface ITaskService
{
///
/// 返回任务交互模块是否已授权
///
/// 如果已授权则为true,否则为false
Task HasAuthorizedAsync();
///
/// 获取业务的任务信息
///
/// 业务ID
/// 业务类型
/// 是否获取子任务
/// 任务类型
///
Task>> GetTasks(long id, BusinessType? businessType, bool withSubTask, params TaskBaseTypeEnum[] types);
///
/// 返回指定类型的任务是否已存在
///
/// 业务ID
/// 业务类型
/// 任务类型
///
Task> ExistsAsync(long id, BusinessType businessType, TaskBaseTypeEnum type);
///
/// 批量创建关联任务
///
///
/// 是否使用事务
///
Task CreateMultipleTaskAsync(TaskCreationRequest request, bool useTransaction = true);
///
/// 创建关联任务
///
///
/// 是否使用事务
///
Task CreateTaskAsync(TaskCreationRequest request, bool useTransaction = true);
///
/// 设置任务状态
///
///
/// 是否使用事务
///
Task SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true);
///
/// 设置任务步骤
///
///
/// 是否使用事务
///
Task SetStepsAsync(TaskRequest request, bool useTransaction = true);
///
/// 更新任务台描述
///
///
/// 业务ID
/// 任务类型
/// 描述信息
Task SetTaskBaseDescription(long id, TaskBaseTypeEnum taskType, string description);
///
/// 删除任务
///
/// 业务ID
/// 业务类型
/// 备注
/// 任务类型,不指定任务类型则删除全部任务
///
Task DeleteAsync(long id, BusinessType? businessType, string? remark = null, params TaskBaseTypeEnum[] taskTypes);
}
}