BpmModelFeignClient.java
3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.hotent.Feign;
import com.hotent.Feign.exception.BpmModelFeignFallBackException;
import com.hotent.entity.CommonResult;
import com.hotent.vo.BpmVariableDefVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Optional;
/**
* @Author: Cola
* @Date: 2021/08/20/10:49
* @Description: eip-bpm-model远程接口
**/
@FeignClient(name="${eip.feignClient.bpmModel:eip-bpm-model}",contextId = "api-manager-eip-bpm-model",fallbackFactory = BpmModelFeignFallBackException.class)
public interface BpmModelFeignClient {
/**
* 根据用户ID和流程ID判断是否有启动权限
* @param userId 用户ID
* @param defId 流程定义ID
* @param leadId 领导id
* @param instId 实例id
* @return 根据用户ID和流程ID判断是否有启动权限
* @throws Exception
*/
@RequestMapping(value = "/${openApi.prefix}/flow/defAuthorize/v1/startRight", method = RequestMethod.GET , produces = { "application/json; charset=utf-8" })
public CommonResult<Boolean> startRight(@RequestParam(value = "userId") String userId,
@RequestParam(value = "defId")String defId,
@RequestParam(value = "leadId")String leadId,
@RequestParam(value = "instId")
Optional<String> instId) throws Exception;
// 获取流程节点的列表 一些基本信息而已
@RequestMapping(value="/${openApi.prefix}/flow/node/v1/getNodes",method= RequestMethod.GET, produces = { "application/json; charset=utf-8" })
public CommonResult getNodes( @RequestParam(value = "defId") String defId) throws Exception;
// 流程定义节点配置页面json数据
@RequestMapping(value="/${openApi.prefix}/flow/node/v1/getDefSetting",method=RequestMethod.GET, produces = { "application/json; charset=utf-8" })
public CommonResult nodeDefSetting(@RequestParam(value = "defId") String defId, @RequestParam("topDefKey") String topDefKey) throws Exception;
/**
* 流程变量列表数据
* @param defId 常用语id
* @param nodeId 节点id
*/
@RequestMapping(value="/${openApi.prefix}/flow/var/v1/listJson", method=RequestMethod.GET, produces={"application/json; charset=utf-8" })
public CommonResult listJson(@RequestParam(value = "defId") String defId,@RequestParam(value = "nodeId") String nodeId) throws Exception;
/**
* 保存节点规则
*/
@RequestMapping(value="/${openApi.prefix}/flow/var/v1/save",method=RequestMethod.POST, produces = { "application/json; charset=utf-8" })
public CommonResult<String> save(@RequestBody BpmVariableDefVo variableDefVo) throws Exception;
/**
* 编辑节点变量
*/
@RequestMapping(value="/${openApi.prefix}/flow/var/v1/defVarEdit", method=RequestMethod.GET, produces={"application/json; charset=utf-8" })
public CommonResult defVarEdit( @RequestParam(value = "defId") String defId,@RequestParam(value = "varKey") String varKey) throws Exception;
/**
* 保存节点规则
* @param variableDefVo 保存节点规则
* @return
* @throws Exception
*/
@RequestMapping(value="/${openApi.prefix}/flow/var/v1/save",method=RequestMethod.POST, produces = { "application/json; charset=utf-8" })
public CommonResult<String> saveBpmVariableDef(@RequestBody BpmVariableDefVo variableDefVo) throws Exception;
}