IBaseWorkflowServices.cs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.SystemView;
  6. using Bowin.Common.Linq.Entity;
  7. using System.Linq.Expressions;
  8. using EMIS.Entities;
  9. using EMIS.ViewModel.WorkflowManage;
  10. namespace EMIS.CommonLogic.SystemServices
  11. {
  12. public interface IBaseWorkflowServices<TEntity>
  13. {
  14. /// <summary>
  15. /// 查询对应的接入流程表开始流程环节的Pid(对应的流程环节Pid)
  16. /// </summary>
  17. /// <returns></returns>
  18. int? GetStartStatus();
  19. /// <summary>
  20. /// 查询对应的接入流程表已退回流程环节Pid(注:不包含开始环节、结束环节且为[BP]标识)
  21. /// </summary>
  22. /// <returns></returns>
  23. int? GetSendBackStatus();
  24. /// <summary>
  25. /// 查询对应的接入流程表已通过流程环节Pid(注:不包含开始环节、结束环节且为[PASS]标识)
  26. /// </summary>
  27. /// <returns></returns>
  28. int? GetPassNoEndStatus();
  29. /// <summary>
  30. /// 查询对应的结束流程环节Pid
  31. /// </summary>
  32. /// <returns></returns>
  33. List<int?> GetEndStatus();
  34. /// <summary>
  35. /// 查询对应的结束流程环节且正常结束的流程环节Pid(注:结束环节且不为[BP]标识的)
  36. /// </summary>
  37. /// <returns></returns>
  38. int? GetCorrectEndStatus();
  39. /// <summary>
  40. /// 查询对应的接入流程表非正常结束的流程环节Pid(注:通常为结束环节且为[BP]标识的)
  41. /// </summary>
  42. /// <returns></returns>
  43. List<int?> GetBackpointStatus();
  44. /// <summary>
  45. /// 查询对应的接入流程表中开始环节、审核流程环节Pid(注:不包含结束、非正常[BP]结束环节)
  46. /// </summary>
  47. /// <returns></returns>
  48. List<int?> GetStartApproveStatusList();
  49. /// <summary>
  50. /// 查询对应的接入流程表中全部流程环节信息(WorkflowStatusView)
  51. /// </summary>
  52. /// <returns></returns>
  53. List<WorkflowStatusView> GetStatusViewList();
  54. /// <summary>
  55. /// 查询对应的接入流程表中审核流程环节信息(WorkflowStatusView,不包含开始、结束、非正常[BP]结束环节)
  56. /// </summary>
  57. /// <returns></returns>
  58. List<WorkflowStatusView> GetApproveStatusViewList();
  59. /// <summary>
  60. /// 查询重录待审,重新录入环节Pid(用于期末设定学生名单背景颜色)
  61. /// </summary>
  62. /// <returns></returns>
  63. List<int?> GetRebutStatus();
  64. /// <summary>
  65. /// 重载方法,根据当前流程环节ID获取全部审批动作
  66. /// </summary>
  67. /// <returns></returns>
  68. List<ActionView> GetActionView();
  69. /// <summary>
  70. /// 查询开始流程环节的动作列表List
  71. /// </summary>
  72. /// <returns></returns>
  73. List<ActionView> GetStartActionView();
  74. /// <summary>
  75. /// 根据当前环节ID、用户ID查询下一步审批动作信息List(ActionView)
  76. /// </summary>
  77. /// <param name="formID">表单ID</param>
  78. /// <param name="userID">当前用户ID</param>
  79. /// <returns></returns>
  80. List<ActionView> GetActionView(Guid formID, Guid userID);
  81. /// <summary>
  82. /// 查询对应的工作流程中是否有对应的操作权限
  83. /// </summary>
  84. /// <param name="formID"></param>
  85. /// <param name="userID"></param>
  86. /// <returns></returns>
  87. bool IsCanApprove(Guid formID, Guid userID);
  88. List<WorkflowPermissionView> IsCanApprove(Guid userID, List<Guid> formIDs);
  89. /// <summary>
  90. /// 根据当前用户ID、actionID、formIDs判断是否有权限
  91. /// </summary>
  92. /// <param name="userID"></param>
  93. /// <returns></returns>
  94. bool GetRangeUserList(Guid userID, Guid actionID, List<Guid> formIDs);
  95. /// <summary>
  96. /// 启动对应的流程并执行指定的动作至下一环节(提交)
  97. /// </summary>
  98. /// <param name="formID">需要提交的记录主键ID</param>
  99. /// <param name="userID">提交人ID</param>
  100. /// <param name="comment">提交意见</param>
  101. void StartUp(List<Guid> formIDList, Guid userID, string comment = "");
  102. /// <summary>
  103. /// 重载方法,启动对应的流程并执行指定的动作至下一环节(提交),适用于开始节点有两个以上动作时
  104. /// </summary>
  105. /// <param name="formID">需要提交的记录主键ID</param>
  106. /// <param name="userID">提交人ID</param>
  107. /// <param name="actionID">动作ID</param>
  108. /// <param name="comment">提交意见</param>
  109. void StartUp(Guid formID, Guid userID, Guid actionID, string comment = "");
  110. /// <summary>
  111. /// 审核流程(不包括提交——不包含流程启动)
  112. /// </summary>
  113. /// <param name="formID">需要审核的记录主键ID</param>
  114. /// <param name="userID">审核人ID</param>
  115. /// <param name="actionID">审核动作ID</param>
  116. /// <param name="comment">提交意见</param>
  117. void Approve(List<Guid> formIDList, Guid userID, Guid actionID, string comment = "");
  118. /// <summary>
  119. /// 工作流流程状态修改(通常用于取消申请、撤销等环节)
  120. /// </summary>
  121. /// <param name="formID">表单ID</param>
  122. /// <param name="status">状态:A为活动,D为结束、其他的自己定义</param>
  123. /// <param name="description">描述改变内容</param>
  124. void ModifyProcessState(Guid formID, string status, string description);
  125. /// <summary>
  126. /// 查询对应的审核历史信息列表List(WorkflowApproveHistoryView)
  127. /// </summary>
  128. /// <param name="formID">需要获取的记录主键ID</param>
  129. /// <returns></returns>
  130. IList<WorkflowApproveHistoryView> GetApproveHistoryViewList(Guid formID);
  131. /// <summary>
  132. /// 根据相应的信息查询待办信息View
  133. /// </summary>
  134. /// <typeparam name="T"></typeparam>
  135. /// <param name="query">查询视图,指定一个IQueryable决定如何获取表单记录</param>
  136. /// <param name="userID">待办用户ID</param>
  137. /// <param name="pkSelector">指定主键列</param>
  138. /// <param name="pageIndex">页码</param>
  139. /// <param name="pageSize">每页行数</param>
  140. /// <returns></returns>
  141. IGridResultSet<T> QueryByPendingJob<T, TOrder>(IQueryable<T> query, Guid userID, Expression<Func<T, Guid>> pkSelector,
  142. Expression<Func<T, TOrder>> orderby, bool isDescending = false, int? pageIndex = null, int? pageSize = null);
  143. }
  144. }