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
236d1c49
Commit
236d1c49
authored
Mar 26, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
3e4517b9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
31 deletions
+38
-31
TaskController.java
...in/java/com/keymobile/rest/controller/TaskController.java
+4
-1
UserController.java
...in/java/com/keymobile/rest/controller/UserController.java
+0
-3
Activity.java
src/main/java/com/keymobile/rest/model/Activity.java
+8
-5
Group.java
src/main/java/com/keymobile/rest/model/Group.java
+11
-1
Mission.java
src/main/java/com/keymobile/rest/model/Mission.java
+7
-8
Process.java
src/main/java/com/keymobile/rest/model/Process.java
+8
-8
RecordScope.java
src/main/java/com/keymobile/rest/model/RecordScope.java
+0
-3
RecordScopeService.java
...n/java/com/keymobile/rest/service/RecordScopeService.java
+0
-2
No files found.
src/main/java/com/keymobile/rest/controller/TaskController.java
View file @
236d1c49
...
...
@@ -158,6 +158,7 @@ public class TaskController {
CommonValidator
.
isTrue
(
excelForm
.
getNeedConfirm
()
!=
null
&&
excelForm
.
getNeedConfirm
()
!=
0
,
"模板needConfirm不能为空"
);
RecordScope
scope
=
recordScopeService
.
findById
(
excelForm
.
getScopeId
());
CommonValidator
.
isTrue
(
scope
!=
null
,
"补录范围不能为空"
);
CommonValidator
.
isFalse
((
StringUtils
.
isEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isNotEmpty
(
excelForm
.
getBackStreamAddr
())
||
(
StringUtils
.
isNotEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isEmpty
(
excelForm
.
getBackStreamAddr
()))),
"上游地址和回流地址需同时填写或者同时为空"
);
...
...
@@ -309,7 +310,9 @@ public class TaskController {
public
User
getAdmin
()
{
return
userService
.
findAllByUsername
(
"发起人"
).
get
(
0
);
User
user
=
new
User
();
user
.
setUsername
(
"发起人"
);
return
user
;
}
}
src/main/java/com/keymobile/rest/controller/UserController.java
View file @
236d1c49
...
...
@@ -21,8 +21,6 @@ public class UserController {
@Autowired
private
UserService
userService
;
@Autowired
private
UserFeignService
userFeignService
;
@Autowired
private
GroupService
groupService
;
@Autowired
private
RecordScopeService
recordScopeService
;
...
...
@@ -56,7 +54,6 @@ public class UserController {
map
.
put
(
"userList"
,
users
);
userList
.
add
(
map
);
});
// List<User> userList = userService.findAll();
return
ApiResponse
.
ok
(
userList
);
}
...
...
src/main/java/com/keymobile/rest/model/Activity.java
View file @
236d1c49
...
...
@@ -26,7 +26,9 @@ public class Activity implements Serializable {
public
static
int
TYPE_AUTO
=
2
;
public
static
int
TYPE_MANUAL
=
1
;
// 报送频度 按年 按周 按月 按日 自动推送
/**
* 报送频度 按年 按周 按月 按日 自动推送
*/
public
static
int
FREQ_YEAR
=
1
;
public
static
int
FREQ_WEEK
=
2
;
public
static
int
FREQ_MONTH
=
3
;
...
...
@@ -55,13 +57,14 @@ public class Activity implements Serializable {
@OneToMany
(
fetch
=
FetchType
.
EAGER
,
mappedBy
=
"activity"
)
private
List
<
Template
>
excelList
;
/*
发送人
*/
/**
* 发送人
*/
@ManyToOne
private
User
user
;
/*
/*
*
* 该活动跑过得所有流程
*/
@OneToMany
(
fetch
=
FetchType
.
LAZY
,
mappedBy
=
"activity"
)
...
...
src/main/java/com/keymobile/rest/model/Group.java
View file @
236d1c49
package
com
.
keymobile
.
rest
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -38,6 +37,17 @@ public class Group implements Serializable {
@Column
(
name
=
"parent_id"
,
columnDefinition
=
(
"bigint(22) default 0 comment '父机构id'"
))
private
long
parentId
;
/**
* 常见的父子数据结构
* {
* node: {
* id: 0,
* name: "",
* fullName: ""
* },
* subNodes: []
* }
*/
@Transient
private
List
<
Group
>
children
;
...
...
src/main/java/com/keymobile/rest/model/Mission.java
View file @
236d1c49
...
...
@@ -27,7 +27,6 @@ public class Mission implements Serializable {
public
static
int
STATUS_BEGIN
=
1
;
public
static
int
STATUS_COMPLETED
=
2
;
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
...
...
@@ -45,21 +44,21 @@ public class Mission implements Serializable {
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 1 COMMENT '状态'"
))
private
int
status
;
/*
补录模板
/*
*
*
补录模板
*/
@OneToOne
private
Template
template
;
/*
操作人员
/*
*
*
操作人员
*/
@OneToOne
private
User
user
;
/*
补录数据
*/
/*
*
*
补录数据
*/
@OneToOne
(
fetch
=
FetchType
.
EAGER
)
private
DataInfo
dataInfo
;
...
...
src/main/java/com/keymobile/rest/model/Process.java
View file @
236d1c49
...
...
@@ -21,25 +21,25 @@ import java.util.List;
@Table
(
name
=
"t_process"
)
public
class
Process
implements
Serializable
{
public
static
int
STATUS_BEGIN
=
0
;
public
static
int
STATUS_RECORDING
=
1
;
public
static
int
STATUS_AUDIT
=
2
;
public
static
int
STATUS_COMPLETED
=
3
;
public
static
int
STATUS_BEGIN
=
0
;
// 起始状态
public
static
int
STATUS_RECORDING
=
1
;
// 补录中
public
static
int
STATUS_AUDIT
=
2
;
// 审核中
public
static
int
STATUS_COMPLETED
=
3
;
// 已经完成
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
/*
activiti运行中的流程实例id
*/
/*
*
*
activiti运行中的流程实例id
*/
@Column
(
name
=
"process_id"
,
unique
=
true
,
columnDefinition
=
(
"varchar(100) comment '当前活动在跑进程 id'"
))
private
String
processId
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) default 0 comment '进程状态'"
))
private
int
status
;
/*
/*
*
* 该进程启动得所有子任务
*/
@OneToMany
(
fetch
=
FetchType
.
LAZY
,
mappedBy
=
"process"
)
...
...
src/main/java/com/keymobile/rest/model/RecordScope.java
View file @
236d1c49
...
...
@@ -34,9 +34,6 @@ public class RecordScope implements Serializable {
@Column
(
name
=
"`desc`"
,
nullable
=
false
,
columnDefinition
=
(
"varchar(100) comment '补录角色描述'"
))
private
String
desc
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"integer(2) comment '补录角色'"
))
private
int
role
;
@ManyToOne
(
fetch
=
FetchType
.
EAGER
)
@JsonIgnore
private
Group
group
;
...
...
src/main/java/com/keymobile/rest/service/RecordScopeService.java
View file @
236d1c49
...
...
@@ -28,12 +28,10 @@ public class RecordScopeService {
if
(
exists
.
size
()
!=
2
)
{
RecordScope
scope
=
new
RecordScope
();
scope
.
setGroup
(
group
);
scope
.
setRole
(
RecordScope
.
ROLE_RECORD
);
scope
.
setDesc
(
group
.
getName
()
+
RecordScope
.
ROLE_RECORD_DESC
);
recordScopeDao
.
save
(
scope
);
scope
=
new
RecordScope
();
scope
.
setGroup
(
group
);
scope
.
setRole
(
RecordScope
.
ROLE_AUDIT
);
scope
.
setDesc
(
group
.
getName
()
+
RecordScope
.
ROLE_AUDIT_DESC
);
recordScopeDao
.
save
(
scope
);
}
...
...
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