using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Op.Interface.TaskInteraction
{
///
/// 交互任务
///
public interface ITaskService
{
///
/// 返回任务交互模块是否已授权
///
/// 如果已授权则为true,否则为false
Task HasAuthorized();
///
/// 获取业务的任务信息
///
/// 业务ID
/// 业务类型
/// 任务类型
///
Task>> GetTasks(long id, BusinessType? businessType, params TaskBaseTypeEnum[] types);
///
/// 返回指定类型的任务是否已存在
///
/// 业务ID
/// 业务类型
/// 任务类型
///
Task> ExistsAsync(long id, BusinessType businessType, TaskBaseTypeEnum type);
///
/// 创建关联任务
///
///
/// 是否使用事务
///
Task CreateTaskAsync(TaskCreationRequest request, bool useTransaction = true);
///
/// 设置任务状态
///
///
/// 是否使用事务
///
Task SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true);
///
/// 发起任务审核
///
///
/// 是否使用事务
///
Task SubmitAuditAsync(TaskRequest request, bool useTransaction = true);
///
/// 撤销审核任务
///
///
/// 是否使用事务
///
Task WithdrawAsync(TaskRequest request, bool useTransaction = true);
///
/// 任务审核
///
///
///
Task AuditAsync(TaskAuditRequest request);
///
/// 审批完成回调更新
///
/// 回调信息
///
Task UpdateBusinessAsync(FlowCallback callback);
///
/// 通知审批执行人变更
///
/// 回调信息
///
Task MarkerChangedAsync(MarkerChangedCallback callback);
///
/// 删除任务
///
/// 业务ID
/// 业务类型
/// 备注
/// 任务类型,不指定任务类型则删除全部任务
///
Task Delete(long id, BusinessType? businessType, string? remark = null, params TaskBaseTypeEnum[] taskTypes);
}
}