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
5475c19a
Commit
5475c19a
authored
Mar 25, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
8b029989
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
121 additions
and
99 deletions
+121
-99
ExcelController.java
...n/java/com/keymobile/rest/controller/ExcelController.java
+43
-18
TaskController.java
...in/java/com/keymobile/rest/controller/TaskController.java
+39
-22
UserController.java
...in/java/com/keymobile/rest/controller/UserController.java
+7
-17
ProcessDao.java
src/main/java/com/keymobile/rest/dao/ProcessDao.java
+1
-2
Activity.java
src/main/java/com/keymobile/rest/model/Activity.java
+1
-1
Mission.java
src/main/java/com/keymobile/rest/model/Mission.java
+3
-1
Process.java
src/main/java/com/keymobile/rest/model/Process.java
+1
-1
Template.java
src/main/java/com/keymobile/rest/model/Template.java
+9
-9
DataInfoService.java
...main/java/com/keymobile/rest/service/DataInfoService.java
+4
-14
MissionService.java
src/main/java/com/keymobile/rest/service/MissionService.java
+4
-0
ProcessService.java
src/main/java/com/keymobile/rest/service/ProcessService.java
+2
-8
ExcelForm.java
src/main/java/com/keymobile/rest/vo/ExcelForm.java
+4
-4
MoreSubProcessTest.bpmn
src/main/resources/MoreSubProcessTest.bpmn
+1
-0
MoreSubProcessTestV2.bpmn
src/main/resources/MoreSubProcessTestV2.bpmn
+0
-0
application-test.yml
src/main/resources/application-test.yml
+2
-2
No files found.
src/main/java/com/keymobile/rest/controller/ExcelController.java
View file @
5475c19a
package
com
.
keymobile
.
rest
.
controller
;
package
com
.
keymobile
.
rest
.
controller
;
import
com.google.common.collect.ImmutableMap
;
import
com.keymobile.rest.common.bean.ApiResponse
;
import
com.keymobile.rest.common.bean.ApiResponse
;
import
com.keymobile.rest.common.utils.DateUtil
;
import
com.keymobile.rest.model.DataInfo
;
import
com.keymobile.rest.model.Mission
;
import
com.keymobile.rest.model.Template
;
import
com.keymobile.rest.service.DataInfoService
;
import
com.keymobile.rest.service.TemplateService
;
import
com.keymobile.rest.service.TemplateService
;
import
com.keymobile.rest.service.MissionService
;
import
com.keymobile.rest.service.MissionService
;
import
com.keymobile.rest.service.UserService
;
import
com.keymobile.rest.service.UserService
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.activiti.engine.*
;
import
org.activiti.engine.*
;
import
org.activiti.engine.task.Task
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.sql.Timestamp
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Api
(
description
=
"模板 控制器"
)
@Api
(
description
=
"模板 控制器"
)
@RestController
@RestController
@RequestMapping
(
path
=
"/api"
)
@RequestMapping
(
path
=
"/api"
)
...
@@ -17,6 +29,8 @@ public class ExcelController {
...
@@ -17,6 +29,8 @@ public class ExcelController {
@Autowired
@Autowired
private
TemplateService
templateService
;
private
TemplateService
templateService
;
@Autowired
@Autowired
private
DataInfoService
dataInfoService
;
@Autowired
private
MissionService
missionService
;
private
MissionService
missionService
;
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
...
@@ -31,24 +45,35 @@ public class ExcelController {
...
@@ -31,24 +45,35 @@ public class ExcelController {
})
})
@PostMapping
(
value
=
"/excel/saveData"
)
@PostMapping
(
value
=
"/excel/saveData"
)
public
ApiResponse
saveRecordData
(
long
excelId
,
String
dataStr
)
{
public
ApiResponse
saveRecordData
(
long
excelId
,
String
dataStr
)
{
// User curUser = userService.getNormalUser();
// excelId 其实就是当前得missionId
// Template template = excelService.get(form.getExcelId());
Mission
mission
=
missionService
.
findById
(
excelId
);
// ProcessInfo processInfo = jobInfoService.findByExcelIdAndUserId(form.getExcelId(), curUser.getId());
Template
template
=
mission
.
getTemplate
();
// DataInfo dataInfo;
// if (form.getDataId() != null) {
DataInfo
dataInfo
=
new
DataInfo
();
// dataInfo = recordDataService.update(form);
Timestamp
now
=
Timestamp
.
valueOf
(
DateUtil
.
getDateTime
());
// } else {
dataInfo
.
setCreateAt
(
now
);
// form.setProcessInfo(processInfo);
// dataInfo = recordDataService.save(form);
dataInfo
.
setData
(
dataStr
);
// }
dataInfo
.
setMission
(
mission
);
// Assignment assignment = template.getAssignment();
dataInfoService
.
save
(
dataInfo
);
// String processId = assignment.getProcessId();
// // 发起人把流程发送到下一个人
String
processId
=
mission
.
getProcess
().
getProcessId
();
// List<Task> taskList = taskService.createTaskQuery().processInstanceId(processId)
String
taskId
=
mission
.
getTaskId
();
// .taskAssignee(curUser.getUsername()).list();
// 发起人把流程发送到下一个人
// Task task = taskList.get(0);
Task
task
=
taskService
.
createTaskQuery
().
processInstanceId
(
processId
).
taskId
(
taskId
)
// User judge = userService.getAudit();
.
singleResult
();
// taskService.complete(task.getId(), ImmutableMap.of("judgeId", judge.getUsername()));
Map
vars
=
new
HashMap
<>();
if
(
template
.
getNeedAudit
()
==
Template
.
NEED_AUDIT
)
{
vars
.
put
(
"sign"
,
true
);
vars
.
put
(
"inputDataApply"
,
"审核人"
);
vars
.
put
(
"applySign"
,
template
.
getNeedConfirm
()
==
Template
.
NEED_CONFIRM
);
}
else
{
vars
.
put
(
"_ACTIVITI_SKIP_EXPRESSION_ENABLED"
,
true
);
vars
.
put
(
"sign"
,
false
);
vars
.
put
(
"inputDataApply"
,
""
);
vars
.
put
(
"applySign"
,
template
.
getNeedConfirm
()
==
Template
.
NEED_CONFIRM
);
}
taskService
.
complete
(
task
.
getId
(),
vars
);
return
ApiResponse
.
ok
();
return
ApiResponse
.
ok
();
}
}
...
...
src/main/java/com/keymobile/rest/controller/TaskController.java
View file @
5475c19a
...
@@ -112,21 +112,31 @@ public class TaskController {
...
@@ -112,21 +112,31 @@ public class TaskController {
for
(
Task
task
:
tasks
)
{
for
(
Task
task
:
tasks
)
{
String
processId
=
task
.
getProcessInstanceId
();
String
processId
=
task
.
getProcessInstanceId
();
List
<
Process
>
processList
=
processService
.
findAllByProcessId
(
processId
);
Process
process
=
processService
.
findByProcessId
(
processId
);
// Process process = processService.findByProcessIdAndStatus(processId, Process.STATUS_RECORDING);
List
<
Mission
>
missionList
=
process
.
getMissionList
();
if
(
processList
.
size
()
!=
0
)
{
if
(
process
!=
null
&&
missionList
.
size
()
>
0
)
{
Map
mission
=
new
HashMap
();
missionList
.
forEach
(
mission
->
{
mission
.
put
(
"1"
,
1
);
// 只能查看得时候更新这个人属于这个进行得任务id
if
(
task
.
getTaskDefinitionKey
().
equals
(
"addData"
))
{
mission
.
setTaskId
(
task
.
getId
());
missionService
.
save
(
mission
);
}
else
{
Map
map
=
new
HashMap
();
}
map
.
put
(
"id"
,
mission
.
getId
());
missions
.
add
(
mission
);
map
.
put
(
"userId"
,
mission
.
getUser
().
getId
());
map
.
put
(
"username"
,
mission
.
getUser
().
getUsername
());
map
.
put
(
"excelList"
,
Arrays
.
asList
(
mission
.
getTemplate
()));
if
(
task
.
getTaskDefinitionKey
().
equals
(
"dataEntrySubTask"
))
{
map
.
put
(
"kind"
,
1
);
}
else
{
map
.
put
(
"kind"
,
2
);
}
missions
.
add
(
map
);
});
}
}
}
}
return
ApiResponse
.
ok
();
return
ApiResponse
.
ok
(
missions
);
}
}
...
@@ -150,11 +160,17 @@ public class TaskController {
...
@@ -150,11 +160,17 @@ public class TaskController {
// 新建excel实例
// 新建excel实例
List
<
ExcelForm
>
excelFormList
=
form
.
getExcels
();
List
<
ExcelForm
>
excelFormList
=
form
.
getExcels
();
excelFormList
.
forEach
(
excelForm
->
{
excelFormList
.
forEach
(
excelForm
->
{
TwinkleValidator
.
isNotNULL
(
excelForm
.
getScopeId
(),
"模板scopeId不能为空"
);
TwinkleValidator
.
isTrue
(
excelForm
.
getName
()
!=
null
,
"模板名称不能为空"
);
TwinkleValidator
.
isTrue
(
excelForm
.
getConfig
()
!=
null
,
"模板配置config不能为空"
);
TwinkleValidator
.
isTrue
(
excelForm
.
getScopeId
()
!=
null
&&
excelForm
.
getScopeId
()
!=
0
,
"模板scopeId不能为空"
);
TwinkleValidator
.
isTrue
(
excelForm
.
getNeedAudit
()
!=
null
&&
excelForm
.
getNeedAudit
()
!=
0
,
"模板needAudit不能为空"
);
TwinkleValidator
.
isTrue
(
excelForm
.
getNeedConfirm
()
!=
null
&&
excelForm
.
getNeedConfirm
()
!=
0
,
"模板needConfirm不能为空"
);
RecordScope
scope
=
recordScopeService
.
findById
(
excelForm
.
getScopeId
());
RecordScope
scope
=
recordScopeService
.
findById
(
excelForm
.
getScopeId
());
TwinkleValidator
.
is
NotNULL
(
scope
,
"补录范围不能为空"
);
TwinkleValidator
.
is
True
(
scope
!=
null
,
"补录范围不能为空"
);
TwinkleValidator
.
isFalse
((
StringUtils
.
isEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isNotEmpty
(
excelForm
.
getBackStreamAddr
())
TwinkleValidator
.
isFalse
((
StringUtils
.
isEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isNotEmpty
(
excelForm
.
getBackStreamAddr
())
||
(
StringUtils
.
isNotEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isEmpty
(
excelForm
.
getBackStreamAddr
()))),
"上游地址和回流地址需同时填写或者同时为空"
);
||
(
StringUtils
.
isNotEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isEmpty
(
excelForm
.
getBackStreamAddr
()))),
"上游地址和回流地址需同时填写或者同时为空"
);
excelForm
.
setActivity
(
finalActivity
);
excelForm
.
setActivity
(
finalActivity
);
Template
template
=
BeanUtils
.
convertTo
(
excelForm
,
new
Template
());
Template
template
=
BeanUtils
.
convertTo
(
excelForm
,
new
Template
());
template
.
setCreateAt
(
now
);
template
.
setCreateAt
(
now
);
...
@@ -187,7 +203,7 @@ public class TaskController {
...
@@ -187,7 +203,7 @@ public class TaskController {
Activity
activity
=
activityService
.
get
(
taskId
);
Activity
activity
=
activityService
.
get
(
taskId
);
TwinkleValidator
.
notNull
(
activity
,
"活动不存在"
);
TwinkleValidator
.
notNull
(
activity
,
"活动不存在"
);
// 根据活动查找需要填写的人 目前只支持一人
// 根据活动查找需要填写的人 目前只支持一人
List
<
Template
>
templateList
=
activity
.
get
Template
List
();
List
<
Template
>
templateList
=
activity
.
get
Excel
List
();
TwinkleValidator
.
notLessThan
(
templateList
.
size
(),
1
,
"补录模板不存在"
);
TwinkleValidator
.
notLessThan
(
templateList
.
size
(),
1
,
"补录模板不存在"
);
// 部署补录流程
// 部署补录流程
...
@@ -206,12 +222,14 @@ public class TaskController {
...
@@ -206,12 +222,14 @@ public class TaskController {
String
inputUser
=
activity
.
getUser
().
getUsername
();
String
inputUser
=
activity
.
getUser
().
getUsername
();
Map
<
String
,
Object
>
variables
=
new
HashMap
<>();
Map
<
String
,
Object
>
variables
=
new
HashMap
<>();
variables
.
put
(
"inputUser"
,
inputUser
);
variables
.
put
(
"inputUser"
,
inputUser
);
//启动流程
//启动流程
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
processDefinition
.
getKey
(),
variables
);
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
processDefinition
.
getKey
(),
variables
);
Process
process
=
new
Process
();
Process
process
=
new
Process
();
process
.
setProcessId
(
processInstance
.
getId
());
process
.
setProcessId
(
processInstance
.
getId
());
process
.
setActivity
(
activity
);
process
.
setActivity
(
activity
);
// 新建当前任务进程,但是先不绑定missions
process
.
setMissionList
(
null
);
process
.
setMissionList
(
null
);
process
.
setStatus
(
Process
.
STATUS_BEGIN
);
process
.
setStatus
(
Process
.
STATUS_BEGIN
);
processService
.
save
(
process
);
processService
.
save
(
process
);
...
@@ -224,18 +242,18 @@ public class TaskController {
...
@@ -224,18 +242,18 @@ public class TaskController {
//直接提交标准到下个节点
//直接提交标准到下个节点
taskService
.
claim
(
resultTask
.
getId
(),
inputUser
);
taskService
.
claim
(
resultTask
.
getId
(),
inputUser
);
//保存审批意见
//保存审批意见
taskService
.
addComment
(
resultTask
.
getId
(),
processInstance
.
getId
(),
""
);
taskService
.
addComment
(
resultTask
.
getId
(),
processInstance
.
getId
(),
"
发起人启动分发任务
"
);
List
<
String
>
userNameList
=
new
ArrayList
<>();
List
<
String
>
userNameList
=
new
ArrayList
<>();
List
<
Mission
>
allMissions
=
new
ArrayList
<>();
List
<
Mission
>
allMissions
=
new
ArrayList
<>();
// 所有模板绑定的人查找任务, 现在基本都是补录任务
templateList
.
forEach
(
template
->
{
templateList
.
forEach
(
template
->
{
List
<
Mission
>
missionList
=
missionService
.
findAllByTemplateIdAndStatus
(
template
.
getId
(),
Mission
.
STATUS_BEGIN
);
List
<
Mission
>
missionList
=
missionService
.
findAllByTemplateIdAndStatus
(
template
.
getId
(),
Mission
.
STATUS_BEGIN
);
// 当前所有任务的参与人员
// 当前所有任务的参与人员
missionList
.
forEach
(
mission
->
{
missionList
.
forEach
(
mission
->
{
mission
.
setProcess
(
process
);
mission
.
setProcess
(
process
);
// 更新mission
missionService
.
save
(
mission
);
missionService
.
save
(
mission
);
User
user
=
mission
.
getUser
();
User
user
=
mission
.
getUser
();
userNameList
.
add
(
user
.
getUsername
());
userNameList
.
add
(
user
.
getUsername
());
...
@@ -245,13 +263,12 @@ public class TaskController {
...
@@ -245,13 +263,12 @@ public class TaskController {
process
.
setMissionList
(
allMissions
);
process
.
setMissionList
(
allMissions
);
processService
.
save
(
process
);
processService
.
save
(
process
);
Map
<
String
,
Object
>
vars
=
new
HashMap
<>();
Map
<
String
,
Object
>
vars
=
new
HashMap
<>();
//
如果是开始录入环节,需要给出子任务录入人员
//
分发录入任务
if
(
resultTask
.
getTaskDefinitionKey
().
contains
(
"startEntry"
))
{
if
(
resultTask
.
getTaskDefinitionKey
().
contains
(
"startEntry"
))
{
vars
.
put
(
"candiateUserList"
,
userNameList
);
vars
.
put
(
"candiateUserList"
,
userNameList
);
}
}
//
审批任务
//
提交任务,并把补录人任务划分好
taskService
.
complete
(
resultTask
.
getId
(),
vars
);
taskService
.
complete
(
resultTask
.
getId
(),
vars
);
return
ApiResponse
.
ok
();
return
ApiResponse
.
ok
();
}
}
...
...
src/main/java/com/keymobile/rest/controller/UserController.java
View file @
5475c19a
...
@@ -44,6 +44,12 @@ public class UserController {
...
@@ -44,6 +44,12 @@ public class UserController {
map
.
put
(
"desc"
,
recordScope
.
getDesc
());
map
.
put
(
"desc"
,
recordScope
.
getDesc
());
map
.
put
(
"groupId"
,
recordScope
.
getGroup
().
getId
());
map
.
put
(
"groupId"
,
recordScope
.
getGroup
().
getId
());
map
.
put
(
"groupName"
,
recordScope
.
getGroup
().
getId
());
map
.
put
(
"groupName"
,
recordScope
.
getGroup
().
getId
());
List
<
User
>
existUsers
=
recordScope
.
getUserList
();
User
user
=
null
;
if
(
existUsers
.
size
()
>=
1
)
{
user
=
existUsers
.
get
(
0
);
}
map
.
put
(
"bindedUser"
,
user
);
List
<
User
>
users
=
userService
.
findAllByGroupId
(
recordScope
.
getGroup
().
getId
());
List
<
User
>
users
=
userService
.
findAllByGroupId
(
recordScope
.
getGroup
().
getId
());
map
.
put
(
"userList"
,
users
);
map
.
put
(
"userList"
,
users
);
userList
.
add
(
map
);
userList
.
add
(
map
);
...
@@ -56,22 +62,7 @@ public class UserController {
...
@@ -56,22 +62,7 @@ public class UserController {
@PostMapping
(
value
=
"/scope/list"
)
@PostMapping
(
value
=
"/scope/list"
)
public
ApiResponse
getScopeList
()
{
public
ApiResponse
getScopeList
()
{
List
<
RecordScope
>
recordScopeList
=
recordScopeService
.
findAll
();
List
<
RecordScope
>
recordScopeList
=
recordScopeService
.
findAll
();
List
<
Map
>
result
=
new
ArrayList
<>();
return
ApiResponse
.
ok
(
recordScopeList
);
recordScopeList
.
forEach
(
recordScope
->
{
Map
map
=
new
HashMap
();
map
.
put
(
"id"
,
recordScope
.
getId
());
map
.
put
(
"desc"
,
recordScope
.
getDesc
());
map
.
put
(
"groupId"
,
recordScope
.
getGroup
().
getId
());
map
.
put
(
"groupName"
,
recordScope
.
getGroup
().
getId
());
List
<
User
>
users
=
recordScope
.
getUserList
();
User
user
=
null
;
if
(
users
.
size
()
>=
1
)
{
user
=
users
.
get
(
0
);
}
map
.
put
(
"user"
,
user
);
result
.
add
(
map
);
});
return
ApiResponse
.
ok
(
result
);
}
}
@ApiOperation
(
value
=
"补录范围绑定人员"
)
@ApiOperation
(
value
=
"补录范围绑定人员"
)
...
@@ -99,7 +90,6 @@ public class UserController {
...
@@ -99,7 +90,6 @@ public class UserController {
return
ApiResponse
.
ok
(
getGroupTree
());
return
ApiResponse
.
ok
(
getGroupTree
());
}
}
public
Group
getGroupTree
()
{
public
Group
getGroupTree
()
{
List
<
Group
>
children
=
groupService
.
findAllByParentId
(
root
.
getId
());
List
<
Group
>
children
=
groupService
.
findAllByParentId
(
root
.
getId
());
root
.
setChildren
(
children
);
root
.
setChildren
(
children
);
...
...
src/main/java/com/keymobile/rest/dao/ProcessDao.java
View file @
5475c19a
...
@@ -7,7 +7,6 @@ import java.util.List;
...
@@ -7,7 +7,6 @@ import java.util.List;
public
interface
ProcessDao
extends
JpaRepository
<
Process
,
Long
>
{
public
interface
ProcessDao
extends
JpaRepository
<
Process
,
Long
>
{
List
<
Process
>
findAllByProcessId
(
String
processId
);
Process
findByProcessId
AndStatus
(
String
processId
,
int
status
);
Process
findByProcessId
(
String
processId
);
}
}
src/main/java/com/keymobile/rest/model/Activity.java
View file @
5475c19a
...
@@ -53,7 +53,7 @@ public class Activity implements Serializable {
...
@@ -53,7 +53,7 @@ public class Activity implements Serializable {
private
Timestamp
createAt
;
private
Timestamp
createAt
;
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
mappedBy
=
"activity"
)
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
mappedBy
=
"activity"
)
private
List
<
Template
>
template
List
;
private
List
<
Template
>
excel
List
;
/*
/*
发送人
发送人
...
...
src/main/java/com/keymobile/rest/model/Mission.java
View file @
5475c19a
...
@@ -36,10 +36,12 @@ public class Mission implements Serializable {
...
@@ -36,10 +36,12 @@ public class Mission implements Serializable {
@CreationTimestamp
@CreationTimestamp
private
Timestamp
createAt
;
private
Timestamp
createAt
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 1 COMMENT '类型'"
))
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 1 COMMENT '类型'"
))
private
int
type
;
private
int
type
;
@Column
(
columnDefinition
=
(
"varchar(20) COMMENT '当前activiti任务id'"
))
private
String
taskId
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 1 COMMENT '状态'"
))
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 1 COMMENT '状态'"
))
private
int
status
;
private
int
status
;
...
...
src/main/java/com/keymobile/rest/model/Process.java
View file @
5475c19a
...
@@ -33,7 +33,7 @@ public class Process implements Serializable {
...
@@ -33,7 +33,7 @@ public class Process implements Serializable {
/*
/*
activiti运行中的流程实例id
activiti运行中的流程实例id
*/
*/
@Column
(
name
=
"process_id"
,
columnDefinition
=
(
"varchar(100) comment '当前活动在跑进程 id'"
))
@Column
(
name
=
"process_id"
,
unique
=
true
,
columnDefinition
=
(
"varchar(100) comment '当前活动在跑进程 id'"
))
private
String
processId
;
private
String
processId
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 0 comment '进程状态'"
))
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 0 comment '进程状态'"
))
...
...
src/main/java/com/keymobile/rest/model/Template.java
View file @
5475c19a
...
@@ -20,14 +20,14 @@ import java.sql.Timestamp;
...
@@ -20,14 +20,14 @@ import java.sql.Timestamp;
@Table
(
name
=
"t_template"
)
@Table
(
name
=
"t_template"
)
public
class
Template
implements
Serializable
{
public
class
Template
implements
Serializable
{
public
static
int
NEED_AUDIT
=
1
;
public
static
int
NEED_AUDIT
=
2
;
public
static
int
NO_NEED_AUDIT
=
2
;
public
static
int
NO_NEED_AUDIT
=
1
;
public
static
int
NEED_CONFIRM
=
1
;
public
static
int
NEED_CONFIRM
=
2
;
public
static
int
NO_NEED_CONFIRM
=
2
;
public
static
int
NO_NEED_CONFIRM
=
1
;
public
static
int
NEED_MERGE
=
1
;
public
static
int
NEED_MERGE
=
2
;
public
static
int
NO_NEED_MERGE
=
2
;
public
static
int
NO_NEED_MERGE
=
1
;
@Id
@Id
...
@@ -43,13 +43,13 @@ public class Template implements Serializable {
...
@@ -43,13 +43,13 @@ public class Template implements Serializable {
@Column
(
name
=
"data_at"
,
columnDefinition
=
(
"integer(20) default 1 comment '数据开始行数'"
))
@Column
(
name
=
"data_at"
,
columnDefinition
=
(
"integer(20) default 1 comment '数据开始行数'"
))
private
Integer
dataAt
;
private
Integer
dataAt
;
@Column
(
name
=
"need_audit"
,
columnDefinition
=
(
"integer(2) default
0
comment '需要审核'"
))
@Column
(
name
=
"need_audit"
,
columnDefinition
=
(
"integer(2) default
1
comment '需要审核'"
))
private
Integer
needAudit
;
private
Integer
needAudit
;
@Column
(
name
=
"need_confirm"
,
columnDefinition
=
(
"integer(2) default
0
comment '需要负责人确认'"
))
@Column
(
name
=
"need_confirm"
,
columnDefinition
=
(
"integer(2) default
1
comment '需要负责人确认'"
))
private
Integer
needConfirm
;
private
Integer
needConfirm
;
@Column
(
name
=
"need_merge"
,
columnDefinition
=
(
"integer(2) default
0
comment '需要数据合并'"
))
@Column
(
name
=
"need_merge"
,
columnDefinition
=
(
"integer(2) default
1
comment '需要数据合并'"
))
private
Integer
needMerge
;
private
Integer
needMerge
;
@Column
(
name
=
"up_stream_addr"
,
columnDefinition
=
(
"varchar(100) comment '上游地址'"
))
@Column
(
name
=
"up_stream_addr"
,
columnDefinition
=
(
"varchar(100) comment '上游地址'"
))
...
...
src/main/java/com/keymobile/rest/service/DataInfoService.java
View file @
5475c19a
...
@@ -18,18 +18,8 @@ public class DataInfoService {
...
@@ -18,18 +18,8 @@ public class DataInfoService {
return
dataInfoDao
.
getOne
(
id
);
return
dataInfoDao
.
getOne
(
id
);
}
}
// public DataInfo save(RecordDataForm form) {
public
DataInfo
save
(
DataInfo
dataInfo
)
{
// DataInfo data = new DataInfo();
dataInfoDao
.
save
(
dataInfo
);
// data.setMission(form.getMission());
return
dataInfo
;
// Timestamp now = Timestamp.valueOf(DateUtil.getDateTime());
}
// data.setCreateAt(now);
// data = dataInfoDao.save(data);
// return data;
// }
// public DataInfo update(RecordDataForm form) {
// DataInfo data = this.get(form.getDataId());
// data = dataInfoDao.save(data);
// return data;
// }
}
}
src/main/java/com/keymobile/rest/service/MissionService.java
View file @
5475c19a
...
@@ -34,6 +34,10 @@ public class MissionService {
...
@@ -34,6 +34,10 @@ public class MissionService {
return
mission
;
return
mission
;
}
}
public
Mission
findById
(
long
missionId
)
{
return
missionDao
.
getOne
(
missionId
);
}
public
List
<
Mission
>
findAllByTemplateIdAndStatus
(
long
templateId
,
int
status
)
{
public
List
<
Mission
>
findAllByTemplateIdAndStatus
(
long
templateId
,
int
status
)
{
return
missionDao
.
findAllByTemplateIdAndStatus
(
templateId
,
status
);
return
missionDao
.
findAllByTemplateIdAndStatus
(
templateId
,
status
);
}
}
...
...
src/main/java/com/keymobile/rest/service/ProcessService.java
View file @
5475c19a
...
@@ -13,19 +13,13 @@ public class ProcessService {
...
@@ -13,19 +13,13 @@ public class ProcessService {
@Autowired
@Autowired
private
ProcessDao
processDao
;
private
ProcessDao
processDao
;
public
Process
save
(
Process
process
)
{
public
Process
save
(
Process
process
)
{
processDao
.
save
(
process
);
processDao
.
save
(
process
);
return
process
;
return
process
;
}
}
public
List
<
Process
>
findAllByProcessId
(
String
processId
)
{
public
Process
findByProcessId
(
String
processId
)
{
return
processDao
.
findAllByProcessId
(
processId
);
return
processDao
.
findByProcessId
(
processId
);
}
public
Process
findByProcessIdAndStatus
(
String
processId
,
int
status
)
{
return
processDao
.
findByProcessIdAndStatus
(
processId
,
status
);
}
}
}
}
src/main/java/com/keymobile/rest/vo/ExcelForm.java
View file @
5475c19a
...
@@ -30,16 +30,16 @@ public class ExcelForm {
...
@@ -30,16 +30,16 @@ public class ExcelForm {
@ApiModelProperty
(
name
=
"remark"
,
value
=
"表格描述"
)
@ApiModelProperty
(
name
=
"remark"
,
value
=
"表格描述"
)
private
String
remark
;
private
String
remark
;
@ApiModelProperty
(
name
=
"dataAt"
,
value
=
"数据开始行数"
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"dataAt"
,
value
=
"数据开始行数
列如 1
"
,
example
=
"1"
)
private
Integer
dataAt
;
private
Integer
dataAt
;
@ApiModelProperty
(
name
=
"needAudit"
,
value
=
"需要审核"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"needAudit"
,
value
=
"需要审核
1 不需要 2 需要
"
,
required
=
true
,
example
=
"1"
)
private
Integer
needAudit
;
private
Integer
needAudit
;
@ApiModelProperty
(
name
=
"needConfirm"
,
value
=
"需要负责人确认"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"needConfirm"
,
value
=
"需要负责人确认
1 不需要 2 需要
"
,
required
=
true
,
example
=
"1"
)
private
Integer
needConfirm
;
private
Integer
needConfirm
;
@ApiModelProperty
(
name
=
"needMerge"
,
value
=
"需要数据合并"
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"needMerge"
,
value
=
"需要数据合并
1 不需要 2 需要
"
,
example
=
"1"
)
private
Integer
needMerge
;
private
Integer
needMerge
;
@ApiModelProperty
(
name
=
"upStreamAddr"
,
value
=
"上游地址 与 回流地址 同时填写"
)
@ApiModelProperty
(
name
=
"upStreamAddr"
,
value
=
"上游地址 与 回流地址 同时填写"
)
...
...
src/main/resources/MoreSubProcessTest.bpmn
View file @
5475c19a
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<subProcess
activiti:exclusive=
"true"
id=
"entrySubprocess"
name=
"录入子流程"
triggeredByEvent=
"false"
>
<subProcess
activiti:exclusive=
"true"
id=
"entrySubprocess"
name=
"录入子流程"
triggeredByEvent=
"false"
>
<multiInstanceLoopCharacteristics
activiti:collection=
"candiateUserList"
activiti:elementVariable=
"candiateUser"
isSequential=
"false"
>
<multiInstanceLoopCharacteristics
activiti:collection=
"candiateUserList"
activiti:elementVariable=
"candiateUser"
isSequential=
"false"
>
<completionCondition>
<completionCondition>
<!-- 这里表示当完成数和总数相等的时候到下一步 -->
<![CDATA[${nrOfCompletedInstances/nrOfInstances >= 1}]]>
<![CDATA[${nrOfCompletedInstances/nrOfInstances >= 1}]]>
</completionCondition>
</completionCondition>
</multiInstanceLoopCharacteristics>
</multiInstanceLoopCharacteristics>
...
...
src/main/resources/MoreSubProcessTestV2.bpmn
0 → 100644
View file @
5475c19a
This diff is collapsed.
Click to expand it.
src/main/resources/application-test.yml
View file @
5475c19a
...
@@ -15,7 +15,7 @@ spring:
...
@@ -15,7 +15,7 @@ spring:
application
:
application
:
name
:
activiti
name
:
activiti
jpa
:
jpa
:
show-sql
:
tru
e
show-sql
:
fals
e
database-platform
:
org.hibernate.dialect.MySQL5Dialect
database-platform
:
org.hibernate.dialect.MySQL5Dialect
hibernate
:
hibernate
:
ddl-auto
:
update
ddl-auto
:
update
...
@@ -43,7 +43,7 @@ server:
...
@@ -43,7 +43,7 @@ server:
port
:
8110
port
:
8110
app
:
app
:
active-process
:
MoreSubProcessTest.bpmn
active-process
:
MoreSubProcessTest
V2
.bpmn
swagger2
:
swagger2
:
host
:
localhost:8110
host
:
localhost:8110
...
...
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