123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- 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 IBaseWorkflowServices<TEntity>
- {
- /// <summary>
- /// 查询对应的接入流程表开始流程环节的Pid(对应的流程环节Pid)
- /// </summary>
- /// <returns></returns>
- int? GetStartStatus();
- /// <summary>
- /// 查询对应的接入流程表已退回流程环节Pid(注:不包含开始环节、结束环节且为[BP]标识)
- /// </summary>
- /// <returns></returns>
- int? GetSendBackStatus();
- /// <summary>
- /// 查询对应的接入流程表已通过流程环节Pid(注:不包含开始环节、结束环节且为[PASS]标识)
- /// </summary>
- /// <returns></returns>
- int? GetPassNoEndStatus();
- /// <summary>
- /// 查询对应的结束流程环节Pid
- /// </summary>
- /// <returns></returns>
- List<int?> GetEndStatus();
- /// <summary>
- /// 查询对应的结束流程环节且正常结束的流程环节Pid(注:结束环节且不为[BP]标识的)
- /// </summary>
- /// <returns></returns>
- int? GetCorrectEndStatus();
- /// <summary>
- /// 查询对应的接入流程表非正常结束的流程环节Pid(注:通常为结束环节且为[BP]标识的)
- /// </summary>
- /// <returns></returns>
- List<int?> GetBackpointStatus();
- /// <summary>
- /// 查询对应的接入流程表中开始环节、审核流程环节Pid(注:不包含结束、非正常[BP]结束环节)
- /// </summary>
- /// <returns></returns>
- List<int?> GetStartApproveStatusList();
- /// <summary>
- /// 查询对应的接入流程表中全部流程环节信息(WorkflowStatusView)
- /// </summary>
- /// <returns></returns>
- List<WorkflowStatusView> GetStatusViewList();
- /// <summary>
- /// 查询对应的接入流程表中审核流程环节信息(WorkflowStatusView,不包含开始、结束、非正常[BP]结束环节)
- /// </summary>
- /// <returns></returns>
- List<WorkflowStatusView> GetApproveStatusViewList();
- /// <summary>
- /// 查询重录待审,重新录入环节Pid(用于期末设定学生名单背景颜色)
- /// </summary>
- /// <returns></returns>
- List<int?> GetRebutStatus();
- /// <summary>
- /// 重载方法,根据当前流程环节ID获取全部审批动作
- /// </summary>
- /// <returns></returns>
- List<ActionView> GetActionView();
- /// <summary>
- /// 查询开始流程环节的动作列表List
- /// </summary>
- /// <returns></returns>
- List<ActionView> GetStartActionView();
- /// <summary>
- /// 根据当前环节ID、用户ID查询下一步审批动作信息List(ActionView)
- /// </summary>
- /// <param name="formID">表单ID</param>
- /// <param name="userID">当前用户ID</param>
- /// <returns></returns>
- List<ActionView> GetActionView(Guid formID, Guid userID);
- /// <summary>
- /// 查询对应的工作流程中是否有对应的操作权限
- /// </summary>
- /// <param name="formID"></param>
- /// <param name="userID"></param>
- /// <returns></returns>
- bool IsCanApprove(Guid formID, Guid userID);
- List<WorkflowPermissionView> IsCanApprove(Guid userID, List<Guid> formIDs);
- /// <summary>
- /// 根据当前用户ID、actionID、formIDs判断是否有权限
- /// </summary>
- /// <param name="userID"></param>
- /// <returns></returns>
- bool GetRangeUserList(Guid userID, Guid actionID, List<Guid> formIDs);
- /// <summary>
- /// 启动对应的流程并执行指定的动作至下一环节(提交)
- /// </summary>
- /// <param name="formID">需要提交的记录主键ID</param>
- /// <param name="userID">提交人ID</param>
- /// <param name="comment">提交意见</param>
- void StartUp(List<Guid> formIDList, Guid userID, string comment = "");
- /// <summary>
- /// 重载方法,启动对应的流程并执行指定的动作至下一环节(提交),适用于开始节点有两个以上动作时
- /// </summary>
- /// <param name="formID">需要提交的记录主键ID</param>
- /// <param name="userID">提交人ID</param>
- /// <param name="actionID">动作ID</param>
- /// <param name="comment">提交意见</param>
- void StartUp(Guid formID, Guid userID, Guid actionID, string comment = "");
- /// <summary>
- /// 审核流程(不包括提交——不包含流程启动)
- /// </summary>
- /// <param name="formID">需要审核的记录主键ID</param>
- /// <param name="userID">审核人ID</param>
- /// <param name="actionID">审核动作ID</param>
- /// <param name="comment">提交意见</param>
- void Approve(List<Guid> formIDList, Guid userID, Guid actionID, string comment = "");
- /// <summary>
- /// 工作流流程状态修改(通常用于取消申请、撤销等环节)
- /// </summary>
- /// <param name="formID">表单ID</param>
- /// <param name="status">状态:A为活动,D为结束、其他的自己定义</param>
- /// <param name="description">描述改变内容</param>
- void ModifyProcessState(Guid formID, string status, string description);
- /// <summary>
- /// 查询对应的审核历史信息列表List(WorkflowApproveHistoryView)
- /// </summary>
- /// <param name="formID">需要获取的记录主键ID</param>
- /// <returns></returns>
- IList<WorkflowApproveHistoryView> GetApproveHistoryViewList(Guid formID);
- /// <summary>
- /// 根据相应的信息查询待办信息View
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <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>(IQueryable<T> query, Guid userID, Expression<Func<T, Guid>> pkSelector,
- Expression<Func<T, TOrder>> orderby, bool isDescending = false, int? pageIndex = null, int? pageSize = null);
- }
- }
|