TemplateApi.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. package jnpf.workflow.service;
  2. import jnpf.flowable.entity.TemplateEntity;
  3. import jnpf.flowable.entity.TemplateJsonEntity;
  4. import jnpf.flowable.model.template.*;
  5. import jnpf.model.FlowWorkListVO;
  6. import jnpf.permission.model.user.WorkHandoverModel;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import java.util.List;
  9. import java.util.Map;
  10. /**
  11. * 类的描述
  12. *
  13. * @author JNPF@YinMai Info. Co., Ltd
  14. * @version 5.0.x
  15. * @since 2024/5/28 15:37
  16. */
  17. public interface TemplateApi {
  18. /**
  19. * 根据表单主键获取流程
  20. *
  21. * @param formId 表单主键
  22. * @param start 是否仅查询开始节点关联的表单
  23. */
  24. FlowByFormModel getFlowByFormId(String formId, Boolean start);
  25. /**
  26. * 流程模板获取发起节点表单id
  27. *
  28. * @param templateId
  29. * @return
  30. */
  31. String getFormByFlowId(String templateId);
  32. /**
  33. * 根据流程主键获取版本主键集合
  34. *
  35. * @param templateId 流程主键(大id)
  36. */
  37. List<String> getFlowIdsByTemplateId(String templateId);
  38. /**
  39. * 根据流程主键获取版本主键集合
  40. *
  41. * @param templateId 流程主键(大id)
  42. */
  43. List<TemplateJsonEntity> getFlowIdsByTemplate(String templateId);
  44. /**
  45. * 根据流程版本获取流程基本信息
  46. *
  47. * @param flowId
  48. * @return
  49. */
  50. List<TemplateEntity> getListByFlowIds(List<String> flowId);
  51. /**
  52. * 获取流程权限
  53. *
  54. * @return
  55. */
  56. List<TemplateTreeListVo> treeListWithPower();
  57. /**
  58. * 离职交接
  59. *
  60. * @param fromId
  61. * @return
  62. */
  63. FlowWorkListVO flowWork(String fromId);
  64. /**
  65. * 离职交接
  66. *
  67. * @param workHandoverModel
  68. * @return
  69. */
  70. boolean flowWork(WorkHandoverModel workHandoverModel);
  71. /**
  72. * 获取启用的流程版本的表单集合
  73. */
  74. List<String> getFormList();
  75. /**
  76. * 根据流程版本id获取流程模板id
  77. *
  78. * @param flowId 流程模板主键
  79. */
  80. String getTemplateByVersionId(@RequestParam("flowId") String flowId);
  81. /**
  82. * 获取流程templateId和表单formId组成的map
  83. */
  84. Map<String, String> getFlowFormMap();
  85. /**
  86. * 收藏的流程列表
  87. *
  88. * @param pagination
  89. * @return
  90. */
  91. List<TemplatePageVo> getCommonList(TemplatePagination pagination);
  92. /**
  93. * 获取常用流程列表
  94. *
  95. * @return
  96. */
  97. List<TemplateUseNumVo> getMenuUseNum(int i, List<String> authFlowList);
  98. /**
  99. * 获取用户创建的所有模板
  100. *
  101. * @param creUser
  102. * @return
  103. */
  104. List<TemplateEntity> getListByCreUser(String creUser);
  105. }