TemplateService.java 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. package jnpf.flowable.service;
  2. import jnpf.base.entity.VisualdevEntity;
  3. import jnpf.base.service.SuperService;
  4. import jnpf.exception.WorkFlowException;
  5. import jnpf.flowable.entity.TemplateEntity;
  6. import jnpf.flowable.model.template.*;
  7. import jnpf.flowable.model.templatejson.FlowFormModel;
  8. import jnpf.permission.entity.UserEntity;
  9. import java.util.List;
  10. import java.util.Map;
  11. public interface TemplateService extends SuperService<TemplateEntity> {
  12. /**
  13. * 列表
  14. *
  15. * @return
  16. */
  17. List<TemplateEntity> getList(TemplatePagination pagination);
  18. /**
  19. * 列表
  20. *
  21. * @return
  22. */
  23. List<TemplatePageVo> getSelector(TemplatePagination pagination);
  24. /**
  25. * 树形常用
  26. */
  27. List<TemplateTreeListVo> getTreeCommon();
  28. /**
  29. * 树形集合
  30. */
  31. List<TemplateTreeListVo> treeList(Integer formType);
  32. /**
  33. * 权限树形集合
  34. */
  35. List<TemplateTreeListVo> treeListWithPower();
  36. /**
  37. * 列表
  38. *
  39. * @param pagination 分页参数
  40. * @param isPage 是否分页
  41. */
  42. List<TemplateEntity> getListAll(TemplatePagination pagination, boolean isPage);
  43. /**
  44. * 根据版本主键集合获取流程模板集合
  45. *
  46. * @param flowIds 版本主键集合
  47. */
  48. List<TemplateEntity> getListByFlowIds(List<String> flowIds);
  49. /**
  50. * 信息
  51. *
  52. * @param id 主键值
  53. * @return ignore
  54. */
  55. TemplateEntity getInfo(String id) throws WorkFlowException;
  56. /**
  57. * 验证名称
  58. *
  59. * @param fullName 名称
  60. * @param id 主键值
  61. * @return
  62. */
  63. boolean isExistByFullName(String fullName, String id, String systemId);
  64. /**
  65. * 验证编码
  66. *
  67. * @param enCode 编码
  68. * @param id 主键值
  69. * @return
  70. */
  71. boolean isExistByEnCode(String enCode, String id, String systemId);
  72. /**
  73. * 创建
  74. *
  75. * @param entity 实体对象
  76. */
  77. void create(TemplateEntity entity, String flowXml, Map<String, Map<String, Object>> flowNodes) throws WorkFlowException;
  78. /**
  79. * 更新
  80. *
  81. * @param id 主键值
  82. * @param entity 实体对象
  83. * @return ignore
  84. */
  85. boolean update(String id, TemplateEntity entity) throws WorkFlowException;
  86. /**
  87. * 删除
  88. *
  89. * @param entity 实体对象
  90. */
  91. void delete(TemplateEntity entity) throws WorkFlowException;
  92. /**
  93. * 复制
  94. *
  95. * @param entity 实体对象
  96. */
  97. void copy(TemplateEntity entity) throws WorkFlowException;
  98. /**
  99. * 导出
  100. *
  101. * @param id 定义主键
  102. */
  103. TemplateExportModel export(String id) throws WorkFlowException;
  104. /**
  105. * 导入
  106. *
  107. * @param model 导出model
  108. * @param type 类型
  109. */
  110. void importData(TemplateExportModel model, String type) throws WorkFlowException;
  111. /**
  112. * 查询
  113. */
  114. List<TemplateEntity> getList(List<String> ids);
  115. /**
  116. * 查询(status为 1、2 的)
  117. */
  118. List<TemplateEntity> getListOfHidden(List<String> ids);
  119. /**
  120. * 根据表单主键获取流程(权限过滤)
  121. *
  122. * @param formId 表单主键
  123. */
  124. FlowByFormModel getFlowByFormId(String formId, Boolean start);
  125. /**
  126. * 子流程可发起人员
  127. *
  128. * @param flowId 流程主键
  129. * @param pagination 分页参数
  130. */
  131. List<UserEntity> getSubFlowUserList(String flowId, TemplatePagination pagination) throws WorkFlowException;
  132. /**
  133. * 根据模板主键获取表单
  134. *
  135. * @param templateId 流程模板主键
  136. */
  137. VisualdevEntity getFormByTemplateId(String templateId) throws WorkFlowException;
  138. /**
  139. * 根据模板主键获取表单主键和流程版本主键
  140. *
  141. * @param templateId 流程模板主键
  142. */
  143. FlowFormModel getFormIdAndFlowId(String templateId) throws WorkFlowException;
  144. /**
  145. * 根据模板主键获取表单主键和流程版本主键
  146. *
  147. * @param templateId 流程模板主键
  148. */
  149. FlowFormModel getFormIdAndFlowId(List<String> userId, String templateId) throws WorkFlowException;
  150. /**
  151. * 获取启用的流程版本的表单集合
  152. */
  153. List<String> getFormList();
  154. /**
  155. * 获取流程templateId和表单formId组成的map
  156. */
  157. Map<String, String> getFlowFormMap();
  158. /**
  159. * 收藏的流程列表
  160. *
  161. * @param pagination
  162. * @return
  163. */
  164. List<TemplatePageVo> getCommonList(TemplatePagination pagination);
  165. /**
  166. * 获取用户创建的所有模板
  167. *
  168. * @param creUser
  169. * @return
  170. */
  171. List<TemplateEntity> getListByCreUser(String creUser);
  172. }