package jnpf.flowable; import jnpf.flowable.entity.TemplateEntity; import jnpf.flowable.entity.TemplateJsonEntity; import jnpf.flowable.fallback.TemplateApiFallback; import jnpf.flowable.model.template.*; import jnpf.flowable.model.templatejson.FlowFormModel; import jnpf.model.FlowWorkListVO; import jnpf.permission.model.user.WorkHandoverModel; import jnpf.utils.FeignName; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import java.util.List; import java.util.Map; /** * 类的描述 * * @author JNPF@YinMai Info. Co., Ltd * @version 5.0.x * @since 2024/5/28 15:37 */ @FeignClient(name = FeignName.WORKFLOW_SERVER_NAME, fallback = TemplateApiFallback.class, path = "/template") public interface TemplateApi { /** * 根据表单主键获取流程 * * @param formId 表单主键 * @param start 是否仅查询开始节点关联的表单 */ @PostMapping("/getFlowByFormId") FlowByFormModel getFlowByFormId(@RequestParam("formId") String formId,@RequestParam("start") Boolean start); /** * 流程模板获取发起节点表单id * * @param templateId * @return */ @GetMapping("/getFormByFlowId") String getFormByFlowId(@RequestParam("templateId") String templateId); /** * 根据流程版本获取流程基本信息 * * @param flowId * @return */ @PostMapping("/getListByFlowIds") List getListByFlowIds(@RequestBody List flowId); /** * 获取流程权限 * * @return */ @GetMapping("/treeListWithPower") List treeListWithPower(); /** * 离职交接 * * @param fromId * @return */ @GetMapping("/flowWork") FlowWorkListVO flowWork(@RequestParam("fromId") String fromId); /** * 离职交接 * * @param workHandoverModel * @return */ @PostMapping("/flowWork") boolean flowWork(@RequestBody WorkHandoverModel workHandoverModel); /** * 收藏的流程列表 * * @param pagination * @return */ @PostMapping("/getCommonList") List getCommonList(@RequestBody TemplatePagination pagination); /** * 获取常用流程列表 * * @return */ @PostMapping("/getMenuUseNum") List getMenuUseNum(@RequestParam("i")Integer i, @RequestBody List authFlowList); /** * 获取用户创建的所有模板 * * @param creUser * @return */ @GetMapping("/getListByCreUser") List getListByCreUser(@RequestParam("creUser") String creUser); }