IProcessTaskService.java 3.6 KB

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