Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datacollector
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweisong
datacollector
Commits
e6ea28af
Commit
e6ea28af
authored
Apr 24, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
040b1cef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
+39
-10
TaskController.java
...in/java/com/keymobile/rest/controller/TaskController.java
+11
-10
SimpleProcess.java
src/main/java/com/keymobile/rest/vo/SimpleProcess.java
+28
-0
No files found.
src/main/java/com/keymobile/rest/controller/TaskController.java
View file @
e6ea28af
...
@@ -13,6 +13,7 @@ import com.keymobile.rest.service.*;
...
@@ -13,6 +13,7 @@ import com.keymobile.rest.service.*;
import
com.keymobile.rest.dto.ExcelForm
;
import
com.keymobile.rest.dto.ExcelForm
;
import
com.keymobile.rest.dto.TaskForm
;
import
com.keymobile.rest.dto.TaskForm
;
import
com.keymobile.rest.vo.Mission
;
import
com.keymobile.rest.vo.Mission
;
import
com.keymobile.rest.vo.SimpleProcess
;
import
com.keymobile.rest.vo.SimpleTask
;
import
com.keymobile.rest.vo.SimpleTask
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.activiti.engine.*
;
import
org.activiti.engine.*
;
...
@@ -346,14 +347,14 @@ public class TaskController {
...
@@ -346,14 +347,14 @@ public class TaskController {
String
propBy
=
"id"
;
// groupBy
String
propBy
=
"id"
;
// groupBy
Page
<
Process
>
page
=
processService
.
findAll
(
pageNo
,
pageSize
,
orderBy
,
propBy
);
Page
<
Process
>
page
=
processService
.
findAll
(
pageNo
,
pageSize
,
orderBy
,
propBy
);
List
<
Process
>
processes
=
page
.
getContent
();
List
<
Process
>
processes
=
page
.
getContent
();
List
<
Map
>
list
=
new
ArrayList
<>();
List
<
SimpleProcess
>
list
=
new
ArrayList
<>();
try
{
try
{
processes
.
forEach
(
process
->
{
processes
.
forEach
(
process
->
{
Map
map
=
new
HashMap
();
SimpleProcess
simpleProcess
=
new
SimpleProcess
();
map
.
put
(
"id"
,
process
.
getId
());
simpleProcess
.
setId
(
process
.
getId
());
map
.
put
(
"name"
,
process
.
getActivity
().
getName
());
simpleProcess
.
setName
(
process
.
getActivity
().
getName
());
map
.
put
(
"startAt"
,
process
.
getStartAt
());
simpleProcess
.
setStart
(
process
.
getStartAt
());
map
.
put
(
"remake"
,
process
.
getActivity
().
getRemark
());
simpleProcess
.
setRemark
(
process
.
getActivity
().
getRemark
());
HistoricProcessInstance
historicProcessInstance
=
historyService
.
createHistoricProcessInstanceQuery
().
processInstanceId
(
process
.
getProcessId
()).
singleResult
();
HistoricProcessInstance
historicProcessInstance
=
historyService
.
createHistoricProcessInstanceQuery
().
processInstanceId
(
process
.
getProcessId
()).
singleResult
();
int
total
=
0
;
int
total
=
0
;
int
completed
=
0
;
int
completed
=
0
;
...
@@ -384,10 +385,10 @@ public class TaskController {
...
@@ -384,10 +385,10 @@ public class TaskController {
}
}
map
.
put
(
"status"
,
status
);
simpleProcess
.
setStatus
(
status
);
map
.
put
(
"total"
,
total
);
simpleProcess
.
setTotal
(
total
);
map
.
put
(
"completed"
,
completed
);
simpleProcess
.
setCompleted
(
completed
);
list
.
add
(
map
);
list
.
add
(
simpleProcess
);
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/keymobile/rest/vo/SimpleProcess.java
0 → 100644
View file @
e6ea28af
package
com
.
keymobile
.
rest
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.sql.Timestamp
;
@Data
public
class
SimpleProcess
{
@ApiModelProperty
(
name
=
"id"
,
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
name
=
"name"
,
value
=
"活动名称"
)
private
String
name
;
@ApiModelProperty
(
name
=
"total"
,
value
=
"子任务总数"
)
private
int
total
;
@ApiModelProperty
(
name
=
"completed"
,
value
=
"completed 子任务完成数"
)
private
int
completed
;
@ApiModelProperty
(
name
=
"remark"
,
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态"
)
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Timestamp
start
;
}
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