IProcessTaskService.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. package com.aizuda.boot.modules.flw.service;
  2. import com.aizuda.boot.modules.flw.entity.dto.AssigneeTaskDTO;
  3. import com.aizuda.boot.modules.flw.entity.dto.ExecuteTaskDTO;
  4. import com.aizuda.boot.modules.flw.entity.dto.ProcessTaskDTO;
  5. import com.aizuda.boot.modules.flw.entity.dto.RejectTaskDTO;
  6. import com.aizuda.boot.modules.flw.entity.vo.*;
  7. import com.aizuda.core.api.PageParam;
  8. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  9. import com.flowlong.bpm.engine.core.FlowCreator;
  10. import java.util.List;
  11. /**
  12. * 流程任务 服务类
  13. *
  14. * @author 青苗
  15. * @since 2023-12-11
  16. */
  17. public interface IProcessTaskService {
  18. /**
  19. * 待认领任务分页列表
  20. */
  21. Page<PendingClaimTaskVO> pagePendingClaim(PageParam<ProcessTaskDTO> pageParam);
  22. /**
  23. * 待审批任务分页列表
  24. */
  25. Page<PendingApprovalTaskVO> pagePendingApproval(PageParam<ProcessTaskDTO> pageParam);
  26. /**
  27. * 我的申请任务分页列表
  28. */
  29. Page<ProcessTaskVO> pageMyApplication(PageParam<ProcessTaskDTO> pageParam);
  30. /**
  31. * 我收到的任务分页列表
  32. */
  33. Page<ProcessTaskVO> pageMyReceived(PageParam<ProcessTaskDTO> pageParam);
  34. /**
  35. * 已审批任务分页列表
  36. */
  37. Page<ProcessTaskVO> pageApproved(PageParam<ProcessTaskDTO> pageParam);
  38. /**
  39. * 审批信息
  40. *
  41. * @param taskId 任务ID
  42. */
  43. TaskApprovalVO approvalInfo(Long taskId);
  44. /**
  45. * 设置任务为已阅状态
  46. *
  47. * @param taskId 任务ID
  48. * @param flowCreator 流程创建者
  49. */
  50. boolean viewed(Long taskId, FlowCreator flowCreator);
  51. /**
  52. * 转办任务
  53. *
  54. * @param taskId 任务ID
  55. * @param flowCreator 任务参与者
  56. * @param assigneeFlowCreator 任务办理人
  57. */
  58. boolean transfer(Long taskId, FlowCreator flowCreator, FlowCreator assigneeFlowCreator);
  59. /**
  60. * 委派任务
  61. *
  62. * @param taskId 任务ID
  63. * @param flowCreator 任务参与者
  64. * @param assigneeFlowCreator 任务办理人
  65. */
  66. boolean delegate(Long taskId, FlowCreator flowCreator, FlowCreator assigneeFlowCreator);
  67. /**
  68. * 拿回任务
  69. *
  70. * @param taskId 任务ID
  71. * @param flowCreator 任务创建者
  72. */
  73. boolean reclaim(Long taskId, FlowCreator flowCreator);
  74. /**
  75. * 认领任务
  76. *
  77. * @param taskId 任务ID
  78. * @param flowCreator 任务创建者
  79. */
  80. boolean claim(Long taskId, FlowCreator flowCreator);
  81. /**
  82. * 执行节点跳转任务
  83. *
  84. * @param taskId 任务ID
  85. * @param nodeName 节点名称
  86. * @param flowCreator 任务创建者
  87. */
  88. boolean executeJump(Long taskId, String nodeName, FlowCreator flowCreator);
  89. /**
  90. * 执行流程任务
  91. *
  92. * @param flowCreator 流程创建者
  93. * @param dto 执行任务对象 {@link ExecuteTaskDTO}
  94. */
  95. boolean execute(FlowCreator flowCreator, ExecuteTaskDTO dto);
  96. /**
  97. * 驳回至上一步任务
  98. *
  99. * @param flowCreator 流程创建者
  100. * @param dto 执行任务对象 {@link RejectTaskDTO}
  101. */
  102. boolean reject(FlowCreator flowCreator, RejectTaskDTO dto);
  103. boolean transfer(FlowCreator flowCreator, AssigneeTaskDTO dto);
  104. boolean delegate(FlowCreator flowCreator, AssigneeTaskDTO dto);
  105. /**
  106. * 查询流程实例ID的审批历史
  107. *
  108. * @param instanceId 流程实例ID
  109. * @return 审批历史VO列表
  110. */
  111. List<FlwHisTaskVO> listHisTaskByInstanceId(Long instanceId);
  112. }