|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 交互任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface ITaskService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取业务的任务信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">业务ID</param>
|
|
|
|
|
/// <param name="businessType">业务类型</param>
|
|
|
|
|
/// <param name="types">任务类型</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult<List<BusinessTaskDto>>> GetTasks(long id, BusinessType businessType, params TaskBaseTypeEnum[] types);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 返回指定类型的任务是否已存在
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">业务ID</param>
|
|
|
|
|
/// <param name="businessType">业务类型</param>
|
|
|
|
|
/// <param name="type">任务类型</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult<bool>> Exists(long id, BusinessType businessType, TaskBaseTypeEnum type);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建关联任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="useTransaction">是否使用事务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> CreateTaskAsync(TaskCreationRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置任务状态
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="useTransaction">是否使用事务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult<TaskBaseTypeEnum?>> SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发起任务审核
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> SubmitAuditAsync(TaskRequest request);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务审核
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> AuditAsync(TaskAuditRequest request);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 审批完成回调更新
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="callback">回调信息</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task UpdateBusinessAsync(FlowCallback callback);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通知审批执行人变更
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="callback">回调信息</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task MarkerChangedAsync(MarkerChangedCallback callback);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="businessType"></param>
|
|
|
|
|
/// <param name="taskTypes"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> Delete(long id, BusinessType businessType, params TaskBaseTypeEnum[] taskTypes);
|
|
|
|
|
}
|
|
|
|
|
}
|