|
|
|
|
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>
|
|
|
|
|
/// <returns>如果已授权则为<c>true</c>,否则为<c>false</c></returns>
|
|
|
|
|
Task<bool> HasAuthorizedAsync();
|
|
|
|
|
|
|
|
|
|
/// <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>> ExistsAsync(long id, BusinessType businessType, TaskBaseTypeEnum type);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量创建关联任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="useTransaction">是否使用事务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> CreateMultipleTaskAsync(TaskCreationRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <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> SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 更新任务台描述
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <param name="id">业务ID</param>
|
|
|
|
|
/// <param name="taskType">任务类型</param>
|
|
|
|
|
/// <param name="description">描述信息</param>
|
|
|
|
|
Task SetTaskBaseDescription(long id, TaskBaseTypeEnum taskType, string description);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发起任务审核
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="useTransaction">是否使用事务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> SubmitAuditAsync(TaskRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 撤销审核任务
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="useTransaction">是否使用事务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> WithdrawAsync(TaskRequest request, bool useTransaction = true);
|
|
|
|
|
|
|
|
|
|
/// <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">业务ID</param>
|
|
|
|
|
/// <param name="businessType">业务类型</param>
|
|
|
|
|
/// <param name="remark">备注</param>
|
|
|
|
|
/// <param name="taskTypes">任务类型,不指定任务类型则删除全部任务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DataResult> Delete(long id, BusinessType? businessType, string? remark = null, params TaskBaseTypeEnum[] taskTypes);
|
|
|
|
|
}
|
|
|
|
|
}
|