Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
government-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
government-platform
Commits
504cbb82
Commit
504cbb82
authored
Jul 30, 2021
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加工作流feign接口
parent
9663fa30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
226 additions
and
0 deletions
+226
-0
common-lib/src/main/java/com/mortals/xhx/common/model/RequestTaskReq.java
...ain/java/com/mortals/xhx/common/model/RequestTaskReq.java
+32
-0
common-lib/src/main/java/com/mortals/xhx/feign/flowable/IApiFlowFeign.java
...in/java/com/mortals/xhx/feign/flowable/IApiFlowFeign.java
+194
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/common/model/RequestTaskReq.java
0 → 100644
View file @
504cbb82
package
com.mortals.xhx.common.model
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.xhx.common.pdu.api.ApiRespPdu
;
import
lombok.Data
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* @author: 流程实体类
* @date: 2021/7/29 14:13
* @description: //TODO 请完善注释信息
**/
@Data
public
class
RequestTaskReq
{
private
String
processInstanceId
;
private
String
modelId
;
private
String
deployId
;
private
String
userId
;
private
String
dataKey
;
private
String
taskId
;
//设置审核人
private
String
assignee
;
}
common-lib/src/main/java/com/mortals/xhx/feign/flowable/IApiFlowFeign.java
0 → 100644
View file @
504cbb82
package
com.mortals.xhx.feign.flowable
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.xhx.common.pdu.api.ApiRespPdu
;
import
com.mortals.xhx.common.pdu.sms.SmsSendReq
;
import
com.mortals.xhx.feign.IFeign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* 工作流api
*/
@FeignClient
(
name
=
"${application.register.service-name:government-flowable}"
)
public
interface
IApiFlowFeign
extends
IFeign
{
/**
* 流程部署
*
* @param modelId 流程ID,来自 ACT_DE_MODEL
* @return
* @throws AppException
*/
@PostMapping
(
value
=
"/flowable/api/deploy"
)
ApiRespPdu
<
String
>
deploy
(
@RequestParam
(
"modelId"
)
String
modelId
)
throws
AppException
;
/**
* 启动流程
*
* @param deployId 部署的流程 Id,来自 ACT_RE_PROCDEF
* @param userId 用户 Id
* @param dataKey 数据 Key,业务键,一般为表单数据的 ID,仅作为表单数据与流程实例关联的依据
* @return
* @throws AppException
*/
@PostMapping
(
value
=
"/flowable/api/start"
)
ApiRespPdu
<
String
>
start
(
@RequestParam
(
value
=
"deployId"
)
String
deployId
,
@RequestParam
(
value
=
"userId"
)
String
userId
,
@RequestParam
(
value
=
"dataKey"
)
String
dataKey
);
/**
* 设置任务参数
*
* @param taskId 任务ID
* @param map 用户列表
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/setVariables"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
setVariables
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
,
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 设置任务参数
*
* @param taskId 任务ID
* @param key 键
* @param value 值
* @return
*/
@RequestMapping
(
value
=
"/setVariable"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
setVariable
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
,
@RequestParam
(
value
=
"key"
)
String
key
,
@RequestParam
(
value
=
"value"
)
Object
value
);
/**
* 设置任务参数,List 使用
*
* @param taskId 任务ID
* @param key 键
* @param value 值
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/setListVariable"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
setListVariable
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
,
@RequestParam
(
value
=
"key"
)
String
key
,
@RequestParam
(
value
=
"value"
)
List
<
String
>
value
);
/**
* 任务处理1
*
* @param taskId 任务 Id,来自 ACT_RU_TASK
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/task/{taskId}"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
task
(
@PathVariable
(
value
=
"taskId"
)
String
taskId
);
/**
* 任务处理
*
* @param taskId 任务 Id,来自 ACT_RU_TASK
* @param assignee 设置审核人,替换
* @param map 完成任务需要的条件参数
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/task"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
taskByAssignee
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
,
@RequestParam
(
value
=
"assignee"
)
String
assignee
,
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 中止流程
*
* @param processId 流程ID
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/deleteProcess"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
deleteProcess
(
@RequestParam
(
value
=
"processId"
)
String
processId
);
/**
* 获取正在运行的数据 Id 列表
*
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getRuntimeDataId"
,
method
=
RequestMethod
.
GET
)
ApiRespPdu
<
List
<
String
>>
getRuntimeDataId
();
/**
* 根据用户,获取需要审核的业务键 business_key 列表
*
* @param userId 用户 Id
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getRuntimeBusinessKeyByUser"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
List
<
Map
<
String
,
Object
>>>
getRuntimeBusinessKeyByUser
(
@RequestParam
(
value
=
"userId"
)
String
userId
);
/**
* 获取组,获取需要审核的业务键 business_key 列表
*
* @param groupIds 组 Id
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getRuntimeBusinessKeyByGroup"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
List
<
Map
<
String
,
Object
>>>
getRuntimeBusinessKeyByGroup
(
@RequestBody
List
<
String
>
groupIds
);
/**
* 获取用户审核历史
*
* @param userId 发起人 Id
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getHistoryByUser"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
List
<
Map
<
String
,
Object
>>>
getHistoryByUser
(
@RequestParam
(
value
=
"userId"
)
String
userId
);
/**
* 通过流程实例 Id,判断流程是否结束
*
* @param processInstanceId 流程实例 Id
* @return true 结束,false 未结束
*/
@RequestMapping
(
value
=
"/flowable/api/checkProcessInstanceFinish"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
Boolean
>
checkProcessInstanceFinish
(
@RequestParam
(
value
=
"processInstanceId"
)
String
processInstanceId
);
/**
* 根据任务节点获取流程实例 Id
*
* @param taskId 任务节点 Id
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getTaskInfo"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
getTaskInfo
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
);
/**
* 根据流程实例 ID 获取任务进度流程图
*
* @param processInstanceId 流程实例id
* @return base64图片数据
* @throws AppException
*/
@RequestMapping
(
value
=
"/flowable/api/getProcessDiagram"
,
method
=
RequestMethod
.
POST
)
String
getProcessDiagram
(
@RequestParam
(
"processInstanceId"
)
String
processInstanceId
);
/**
* 根据任务 ID 获取任务进度流程图
*
* @param taskId 任务节点 Id
* @return
*/
@RequestMapping
(
value
=
"/flowable/api/getTaskProcessDiagram"
,
method
=
RequestMethod
.
POST
)
ApiRespPdu
<
String
>
getTaskProcessDiagram
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment