using Hotline.FlowEngine; using Hotline.FlowEngine.Definitions; using Hotline.FlowEngine.WorkflowModules; using Hotline.FlowEngine.Workflows; using Hotline.Orders; using Hotline.Share.Dtos; using Hotline.Share.Dtos.File; using Hotline.Share.Dtos.FlowEngine; using Hotline.Share.Dtos.FlowEngine.Definition; using Hotline.Share.Dtos.FlowEngine.Workflow; using Hotline.Share.Dtos.Order; using Hotline.Share.Dtos.Order.Handle; using Hotline.Share.Dtos.Settings; using Hotline.Share.Enums.FlowEngine; using Microsoft.AspNetCore.Mvc; using SqlSugar; using XF.Domain.Authentications; namespace Hotline.Application.FlowEngine { public interface IWorkflowApplication { // /// // /// 开始流程 // /// // Task StartWorkflowAsync(StartWorkflowDto dto, string externalId, DateTime? expiredTime = null, // CancellationToken cancellationToken = default); /// /// 开始流程并停留在开始节点(开始节点作为待办节点) /// Task StartWorkflowToStartStepAsync(StartWorkflowDto dto, string externalId, DateTime? expiredTime = null, CancellationToken cancellationToken = default); /// /// 查询下一节点办理对象类型(user or org)及实际办理对象 /// Task GetNextStepFlowAssignInfoAsync(Workflow workflow, WorkflowStep currentStep, BasicWorkflowDto dto, StepDefine nextStepDefine, bool isNextDynamic, CancellationToken cancellationToken); ///// ///// 流转至下一节点(节点办理) ///// //Task NextAsync(NextWorkflowDto dto, DateTime? expiredTime = null, CancellationToken cancellationToken = default); /// /// 退回(返回前一节点) /// Task<(Workflow workflow, WorkflowStep currentStep, StepDefine prevDefine, WorkflowStep prevStep, WorkflowStep newStep, EFlowDirection flowDirection)> PreviousAsync(PreviousWorkflowDto dto, Action? newStepConfig = null, CancellationToken cancellationToken = default); /// /// 工单退回(返回前一节点) /// Task<(Workflow workflow, WorkflowStep currentStep, StepDefine prevDefine, WorkflowStep prevStep, WorkflowStep newStep, EFlowDirection flowDirection)> PreviousAsync(PreviousWorkflowDto dto, string applicantId, string applicantOrgId, string[] applicantRoleIds, Action? newStepConfig = null, CancellationToken cancellationToken = default); ///// ///// 撤回至任意节点 ///// //Task RecallAsync(RecallDto dto, FlowAssignInfo flowAssignInfo, DateTime? expiredTime, bool isOrderFiled, EWorkflowTraceType traceType, CancellationToken cancellationToken); /// /// 办理至结束节点(无视流程模板配置,操作人需是当前节点办理对象) /// Task HandleToEndAsync(string workflowId, string opinion, List files, DateTime? expiredTime = null, EReviewResult reviewResult = EReviewResult.Unknown, CancellationToken cancellationToken = default); //////// /// /// 查询开始流程的下一步待选节点 /// Task> GetStartStepsAsync(string moduleCode, CancellationToken cancellationToken); /// /// 查询办理流程的下一步待选节点 /// Task> GetNextStepsAsync(string workflowId, CancellationToken cancellationToken); /// /// 查询指定节点的下一步待选节点 /// Task> GetNextStepsAsync(string workflowId, string stepId, CancellationToken cancellationToken); /// /// 跨级指派查询下一步可选节点及办理对象参数 /// Task> GetCrossLevelStepsAsync(GetCrossLevelStepsDto dto, CancellationToken cancellationToken); /// /// 查询撤回可选节点 /// Task> GetRecallStepsAsync(string workflowId, CancellationToken cancellationToken); /// /// 否决 /// Task RejectAsync(RejectDto dto, CancellationToken cancellationToken); /// /// 获取流程模板信息 /// /// /// /// Task GetWorkflowModuleAsync(string code, CancellationToken cancellationToken); /// /// 检查退回节点信息 /// Task<(WorkflowStep currentStep, WorkflowStep prevStep,List steps, bool isOrgToCenter, bool isSecondToFirstOrgLevel)> GetPreviousInformationAsync(string workflowId, string operatorId, string operatorOrgId, string[] roles, CancellationToken cancellationToken); /// /// 更新省平台办理结果节点附件 /// Task UpdateProvinceHandleResultFilesAsync(string workflowId, List files, CancellationToken cancellationToken); /// /// 查询会签信息 /// /// /// /// ISugarQueryable QueryOrderCountersigns(QueryOrderCountersignDto dto, ISessionContext _sessionContext); } }