123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.SystemView;
- using Bowin.Common.Linq.Entity;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel.WorkflowManage;
- namespace EMIS.CommonLogic.SystemServices
- {
- public interface IWorkflowServices
- {
- /// <summary>
- /// 查询对应的接入流程表开始流程环节的Pid(对应的流程环节Pid)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- int? GetStartStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表已退回流程环节Pid(注:不包含开始环节、结束环节且为[BP]标识)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- int? GetSendBackStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表已通过流程环节Pid(注:不包含开始环节、结束环节且为[PASS]标识)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- int? GetPassNoEndStatus(string tableName);
- /// <summary>
- /// 查询对应的结束流程环节Pid
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- List<int?> GetEndStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表结束流程环节且正常结束的流程环节Pid(注:结束环节且不为[BP]标识的)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- int? GetCorrectEndStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表非正常结束的流程环节Pid(注:通常为结束环节且为[BP]标识的)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- List<int?> GetBackpointStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表中开始环节、审核流程环节Pid(注:不包含结束、非正常[BP]结束环节)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- List<int?> GetStartApproveStatusList(string tableName);
- /// <summary>
- /// 查询对应的接入流程表中全部流程环节信息(WorkflowStatusView)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <returns></returns>
- List<WorkflowStatusView> GetStatusViewList(string tableName);
- /// <summary>
- /// 查询对应的接入流程表中审核流程环节信息(WorkflowStatusView,不包含开始、结束、非正常[BP]结束环节)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <returns></returns>
- List<WorkflowStatusView> GetApproveStatusViewList(string tableName);
- /// <summary>
- /// 查询重录待审,重新录入环节Pid(用于期末设定学生名单背景颜色)
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- List<int?> GetRebutStatus(string tableName);
- /// <summary>
- /// 查询对应的接入流程表中全部非开始流程环节信息(WorkflowStatusView,不包含开始环节)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <returns></returns>
- List<WorkflowStatusView> GetNoStartStatusViewList(string tableName);
- /// <summary>
- /// 查询对应的接入流程表中全部结束流程环节信息
- /// </summary>
- /// <param name="tableName"></param>
- /// <returns></returns>
- List<WorkflowStatusView> GetEndStatusViewList(string tableName);
- /// <summary>
- /// 查询工作流程中是否有对应的操作权限——动作(根据对应的信息-处理人、处理人标识)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="userID">用户ID</param>
- /// <param name="actionID">审核动作ID(路由ID)</param>
- /// <param name="formIDs">表单ID列表</param>
- /// <param name="dataRangeUserFunc">获取数据范围用户的方法</param>
- /// <returns></returns>
- bool IsCanApprove(string tableName, Guid userID, Guid actionID, List<Guid> formIDs, Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- /// 查询工作流程中是否有对应的操作权限——动作(根据对应的信息-处理人、处理人标识)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="userID">用户ID</param>
- /// <param name="actionID">审核动作ID(路由ID)</param>
- /// <param name="formIDs">表单ID列表</param>
- /// <param name="dataRangeUserFunc">获取数据范围用户的方法</param>
- /// <returns></returns>
- List<WorkflowPermissionView> IsCanApprove(string tableName, Guid userID, List<Guid> formIDs);
- /// <summary>
- /// 重载方法,启动对应的流程并执行指定的动作至下一环节(提交),适用于开始节点有两个以上动作时
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">需要提交的记录主键ID</param>
- /// <param name="userID">提交人ID</param>
- /// <param name="userID">动作ID</param>
- /// <param name="comment">提交意见</param>
- /// <param name="dataRangeUserFunc">获取数据范围用户的方法</param>
- void StartUp(string tableName, Guid formID, Guid userID, Guid actionID, string comment = "", Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- /// 启动对应的流程并执行指定的动作至下一环节(提交)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">需要提交的记录主键ID</param>
- /// <param name="userID">提交人ID</param>
- /// <param name="comment">提交意见</param>
- /// <param name="dataRangeUserFunc">获取数据范围用户的方法</param>
- void StartUp(string tableName, Guid formID, Guid userID, string comment = "", Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- ///
- /// </summary>
- /// <param name="tableName"></param>
- /// <param name="formIDList"></param>
- /// <param name="userID"></param>
- /// <param name="comment"></param>
- /// <param name="dataRangeUserFunc"></param>
- void BatchStartUp(string tableName, List<Guid> formIDList, Guid userID, string comment, Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- /// 审核流程(不包括提交——不包含流程启动)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">需要审核的记录主键ID</param>
- /// <param name="userID">审核人ID</param>
- /// <param name="actionID">审核动作ID</param>
- /// <param name="comment">提交意见</param>
- /// <param name="dataRangeUserFunc">获取数据范围用户的方法</param>
- void Approve(string tableName, Guid formID, Guid userID, Guid actionID, string comment = "", Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- ///
- /// </summary>
- /// <param name="tableName"></param>
- /// <param name="formIDList"></param>
- /// <param name="userID"></param>
- /// <param name="actionID"></param>
- /// <param name="comment"></param>
- /// <param name="dataRangeUserFunc"></param>
- void BatchApprove(string tableName, List<Guid> formIDList, Guid userID, Guid actionID, string comment = "", Func<List<Guid>, Guid, bool> dataRangeUserFunc = null);
- /// <summary>
- /// 工作流流程状态修改(通常用于取消申请、撤销等环节)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">表单ID</param>
- /// <param name="status">状态:A为活动,D为结束、其他的自己定义</param>
- /// <param name="description">描述改变内容</param>
- void ModifyProcessState(string tableName, Guid formID, string status, string description);
- /// <summary>
- /// 根据当前流程环节ID获取下一步审批动作
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">表单ID</param>
- /// <param name="userID">当前用户ID</param>
- /// <returns></returns>
- List<ActionView> GetActionView(string tableName, Guid formID, Guid userID);
- /// <summary>
- /// 重载方法,根据当前流程环节ID获取全部审批动作
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <returns></returns>
- List<ActionView> GetActionView(string tableName);
- /// <summary>
- /// 查询开始流程环节的动作列表List
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <returns></returns>
- List<ActionView> GetStartActionView(string tableName);
- /// <summary>
- /// 查询对应的审核历史信息列表List(WorkflowApproveHistoryView)
- /// </summary>
- /// <param name="tableName">主表表名</param>
- /// <param name="formID">需要获取的记录主键ID</param>
- /// <returns></returns>
- IList<ViewModel.SystemView.WorkflowApproveHistoryView> GetApproveHistoryViewList(string tableName, Guid formID);
- /// <summary>
- /// 获取待办列表
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="tableName">主表表名</param>
- /// <param name="query">查询视图,指定一个IQueryable决定如何获取表单记录</param>
- /// <param name="userID">待办用户ID</param>
- /// <param name="pkSelector">指定主键列</param>
- /// <param name="pageIndex">页码</param>
- /// <param name="pageSize">每页行数</param>
- /// <returns></returns>
- IGridResultSet<T> QueryByPendingJob<T, TOrder>(string tableName, IQueryable<T> query, Guid userID,
- Expression<Func<T, Guid>> pkSelector, Expression<Func<T, TOrder>> orderby, bool isDescending = false,
- int? pageIndex = null, int? pageSize = null);
- }
- }
|