using System.Linq.Expressions; using DS.Module.Core; using DS.WMS.Core.Flow.Dtos; using DS.WMS.Core.Flow.Entity; using DS.WMS.Core.Op.Entity; namespace DS.WMS.Core.Flow.Interface; /// /// 租户端工作流 /// public interface IClientFlowInstanceService { /// /// 确定是否为最后审批人 /// /// 任务类型 /// 业务ID /// 业务类型 /// DataResult IsLastMarker(TaskBaseTypeEnum taskType, long bsId, BusinessType? bsType); /// /// 确定工作流是否正在运行中 /// /// 工作流类型 /// 业务类型 /// 业务ID /// Task IsRunning(TaskBaseTypeEnum type, BusinessType? businessType = null, params long[] ids); /// /// 确定工作流是否存在 /// /// 工作流类型 /// 业务类型 /// 自定义查询条件 /// 业务ID /// Task Exists(TaskBaseTypeEnum? type = null, BusinessType? businessType = null, Expression>? expression = null, params long[] ids); /// /// 根据业务ID获取关联工作流 /// /// 工作流类型 /// 业务类型 /// 业务ID /// Task> GetInstanceByBSIdAsync(TaskBaseTypeEnum type, BusinessType? businessType = null, params long[] ids); /// /// 列表查询 /// /// /// DataResult> GetListByPage(PageRequest request); /// /// 添加编辑 /// /// /// DataResult EditFlowInstance(FlowInstanceReq req); /// /// 获取详情 /// /// /// DataResult GetFlowInstanceInfo(string id); /// /// 启动实例 /// /// /// DataResult StartFlowInstance(string id); /// /// 创建工作流实例 /// /// /// DataResult CreateFlowInstance(CreateFlowInstanceReq req); /// /// 工作流审批 /// /// /// DataResult AuditFlowInstance(FlowInstanceAuditReq req); /// /// 工作流审批 /// /// /// DataResult AuditFlowInstance(FlowAuditInfo info); /// /// 撤销工作流 /// /// /// DataResult WithdrawFlowInstance(CancelFlowInstanceReq req); /// /// 撤销工作流 /// /// /// 备注 /// Task WithdrawAsync(long[] ids, string? note = null); /// /// 撤销审核 /// /// 任务类型 /// 业务ID /// 业务类型 /// 备注 /// Task WithdrawAsync(TaskBaseTypeEnum taskType, long[] bsIds, BusinessType? businessType = null, string? note = null); /// /// 运行回调更新 /// /// 业务ID /// 业务类型 /// 回调URL /// Task RunCallbackAsync(long bsId, BusinessType? businessType = null, string? callbackURL = null); /// /// 获取流程操作历史 /// /// /// DataResult> GetFlowInstanceHistoryList(string id); /// /// 获取工作流实例信息 /// /// 业务ID /// 业务类型 /// 审批类型 /// DataResult> GetFlowInstances(long businessId, BusinessType? businessType, params TaskBaseTypeEnum[]? types); }