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
9663fa30
Commit
9663fa30
authored
Jul 30, 2021
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加工作流feign接口
parent
2e9bc04b
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
407 additions
and
5 deletions
+407
-5
common-lib/pom.xml
common-lib/pom.xml
+5
-0
common-lib/src/main/java/com/mortals/xhx/common/pdu/api/ApiReqPdu.java
...c/main/java/com/mortals/xhx/common/pdu/api/ApiReqPdu.java
+2
-4
government-flowable/src/main/java/com/mortals/xhx/flowable/controller/ApiFlowImpl.java
...java/com/mortals/xhx/flowable/controller/ApiFlowImpl.java
+283
-0
government-flowable/src/main/java/com/mortals/xhx/flowable/listener/MyListener.java
...in/java/com/mortals/xhx/flowable/listener/MyListener.java
+2
-0
government-flowable/src/main/resources/static/index.html
government-flowable/src/main/resources/static/index.html
+1
-1
government-manager/pom.xml
government-manager/pom.xml
+1
-0
government-manager/src/main/java/com/mortals/xhx/daemon/demo/RequestDispatchController.http
...om/mortals/xhx/daemon/demo/RequestDispatchController.http
+12
-0
government-manager/src/main/java/com/mortals/xhx/daemon/demo/RequestDispatchController.java
...om/mortals/xhx/daemon/demo/RequestDispatchController.java
+101
-0
No files found.
common-lib/pom.xml
View file @
9663fa30
...
@@ -43,6 +43,11 @@
...
@@ -43,6 +43,11 @@
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<artifactId>
guava
</artifactId>
...
...
common-lib/src/main/java/com/mortals/xhx/common/pdu/api/ApiReqPdu.java
View file @
9663fa30
...
@@ -7,10 +7,8 @@ import lombok.Data;
...
@@ -7,10 +7,8 @@ import lombok.Data;
*/
*/
@Data
@Data
public
class
ApiReqPdu
<
T
>
{
public
class
ApiReqPdu
<
T
>
{
/**
* 会员编号
private
String
seq
;
*/
private
Member
member
;
/**
/**
* 透传数据
* 透传数据
...
...
government-flowable/src/main/java/com/mortals/xhx/flowable/controller/ApiFlowImpl.java
0 → 100644
View file @
9663fa30
This diff is collapsed.
Click to expand it.
government-flowable/src/main/java/com/mortals/xhx/flowable/listener/MyListener.java
View file @
9663fa30
package
com.mortals.xhx.flowable.listener
;
package
com.mortals.xhx.flowable.listener
;
import
lombok.extern.apachecommons.CommonsLog
;
import
org.flowable.engine.RuntimeService
;
import
org.flowable.engine.RuntimeService
;
import
org.flowable.engine.delegate.DelegateExecution
;
import
org.flowable.engine.delegate.DelegateExecution
;
import
org.flowable.engine.delegate.ExecutionListener
;
import
org.flowable.engine.delegate.ExecutionListener
;
...
@@ -14,6 +15,7 @@ import javax.annotation.PostConstruct;
...
@@ -14,6 +15,7 @@ import javax.annotation.PostConstruct;
* 会签监听器示例
* 会签监听器示例
*/
*/
@Component
@Component
@CommonsLog
public
class
MyListener
implements
ExecutionListener
{
public
class
MyListener
implements
ExecutionListener
{
// 页面配置参数注入
// 页面配置参数注入
...
...
government-flowable/src/main/resources/static/index.html
View file @
9663fa30
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<link
rel=
"Stylesheet"
href=
"libs/handsontable_0.31.2/handsontable.full.min.css"
type=
"text/css"
/>
<link
rel=
"Stylesheet"
href=
"libs/handsontable_0.31.2/handsontable.full.min.css"
type=
"text/css"
/>
<!-- build:css styles/3thparty.css -->
<!-- build:css styles/3thparty.css -->
<link
rel=
"stylesheet"
href=
"libs/bootstrap_3.1.1/css/bootstrap.css"
/>
<link
rel=
"stylesheet"
href=
"libs/bootstrap_3.1.1/css/bootstrap.
min.
css"
/>
<link
rel=
"stylesheet"
href=
"libs/bootstrap-tour_0.9.1/bootstrap-tour.min.css"
/>
<link
rel=
"stylesheet"
href=
"libs/bootstrap-tour_0.9.1/bootstrap-tour.min.css"
/>
<link
rel=
"stylesheet"
href=
"libs/angular-spectrum-colorpicker_1.0.13/spectrum.css"
/>
<link
rel=
"stylesheet"
href=
"libs/angular-spectrum-colorpicker_1.0.13/spectrum.css"
/>
<!-- endbuild -->
<!-- endbuild -->
...
...
government-manager/pom.xml
View file @
9663fa30
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
</dependency>
</dependency>
<!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 -->
<!-- 引入 SpringMVC 相关依赖,并实现对其的自动配置 -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
...
government-manager/src/main/java/com/mortals/xhx/daemon/demo/RequestDispatchController.http
0 → 100644
View file @
9663fa30
###流程查询
POST {{baseUrl}}/m/test/task/acceptor
Content-Type: application/json
{"seq":"123456","transmission":{"processInstanceId":"11111"}}
###流程部署
POST {{baseUrl}}/m/test/task/deploy
Content-Type: application/json
{"seq":"123456","transmission":{"processInstanceId":"11111","modelId":"f589444d-efa8-11eb-99ca-c25bd865180b"}}
\ No newline at end of file
government-manager/src/main/java/com/mortals/xhx/daemon/demo/RequestDispatchController.java
0 → 100644
View file @
9663fa30
package
com.mortals.xhx.daemon.demo
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.xhx.common.model.RequestTaskReq
;
import
com.mortals.xhx.common.pdu.api.ApiReqPdu
;
import
com.mortals.xhx.common.pdu.api.ApiRespPdu
;
import
com.mortals.xhx.feign.flowable.IApiFlowFeign
;
import
lombok.extern.apachecommons.CommonsLog
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
/**
* @author karlhoo
*/
@CommonsLog
@RestController
@RequestMapping
(
"test"
)
public
class
RequestDispatchController
{
@Autowired
private
IApiFlowFeign
apiFlowFeign
;
@PostMapping
(
"task/acceptor"
)
public
ApiRespPdu
taskAcceptor
(
@RequestBody
ApiReqPdu
<
RequestTaskReq
>
req
)
{
log
.
info
(
"receive api request:"
+
JSON
.
toJSONString
(
req
));
String
processDiagram
=
apiFlowFeign
.
getProcessDiagram
(
req
.
getTransmission
().
getProcessInstanceId
());
log
.
info
(
"receive api base64 receive:"
+
processDiagram
);
ApiRespPdu
<
String
>
respPdu
=
new
ApiRespPdu
<>();
respPdu
.
setData
(
processDiagram
);
return
respPdu
;
}
@PostMapping
(
"task/deploy"
)
public
ApiRespPdu
deploy
(
@RequestBody
ApiReqPdu
<
RequestTaskReq
>
req
)
{
log
.
info
(
"receive api request:"
+
JSON
.
toJSONString
(
req
));
ApiRespPdu
<
String
>
deploy
=
apiFlowFeign
.
deploy
(
req
.
getTransmission
().
getModelId
());
log
.
info
(
"receive api base64 receive:"
+
JSON
.
toJSONString
(
deploy
));
ApiRespPdu
<
String
>
respPdu
=
new
ApiRespPdu
<>();
respPdu
.
setData
(
JSON
.
toJSONString
(
deploy
));
return
respPdu
;
}
@PostMapping
(
"task/start"
)
public
ApiRespPdu
start
(
@RequestBody
ApiReqPdu
<
RequestTaskReq
>
req
)
{
log
.
info
(
"receive api request:"
+
JSON
.
toJSONString
(
req
));
ApiRespPdu
<
String
>
start
=
apiFlowFeign
.
start
(
req
.
getTransmission
().
getDeployId
(),
req
.
getTransmission
().
getUserId
(),
req
.
getTransmission
().
getDataKey
());
log
.
info
(
"receive api start receive:"
+
JSON
.
toJSONString
(
start
));
ApiRespPdu
<
String
>
respPdu
=
new
ApiRespPdu
<>();
respPdu
.
setData
(
JSON
.
toJSONString
(
start
));
return
respPdu
;
}
@PostMapping
(
"task/complete"
)
public
ApiRespPdu
taskComplete
(
@RequestBody
ApiReqPdu
<
RequestTaskReq
>
req
)
{
log
.
info
(
"receive api request:"
+
JSON
.
toJSONString
(
req
));
//任务完成,设置审核人,完成当前任务
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"test"
,
"1111"
);
apiFlowFeign
.
taskByAssignee
(
req
.
getTransmission
().
getTaskId
(),
req
.
getTransmission
().
getAssignee
(),
map
);
ApiRespPdu
<
String
>
start
=
apiFlowFeign
.
start
(
req
.
getTransmission
().
getDeployId
(),
req
.
getTransmission
().
getUserId
(),
req
.
getTransmission
().
getDataKey
());
log
.
info
(
"receive api complete receive:"
+
JSON
.
toJSONString
(
start
));
ApiRespPdu
<
String
>
respPdu
=
new
ApiRespPdu
<>();
respPdu
.
setData
(
JSON
.
toJSONString
(
start
));
return
respPdu
;
}
public
static
void
main
(
String
[]
args
)
{
RequestTaskReq
requestTaskReq
=
new
RequestTaskReq
();
requestTaskReq
.
setProcessInstanceId
(
"11111"
);
requestTaskReq
.
setDeployId
(
"1"
);
requestTaskReq
.
setUserId
(
"admin"
);
requestTaskReq
.
setDataKey
(
"data"
);
ApiReqPdu
<
RequestTaskReq
>
requestTaskReqApiReqPdu
=
new
ApiReqPdu
<>();
requestTaskReqApiReqPdu
.
setTransmission
(
requestTaskReq
);
requestTaskReqApiReqPdu
.
setSeq
(
"123456"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
requestTaskReqApiReqPdu
));
}
}
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