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
b757bc91
Commit
b757bc91
authored
Apr 02, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
a9c71cd7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
ExcelController.java
...n/java/com/keymobile/rest/controller/ExcelController.java
+6
-14
DataInfo.java
src/main/java/com/keymobile/rest/model/DataInfo.java
+4
-1
application-test.yml
src/main/resources/application-test.yml
+11
-6
No files found.
src/main/java/com/keymobile/rest/controller/ExcelController.java
View file @
b757bc91
...
...
@@ -4,12 +4,9 @@ import com.keymobile.rest.common.bean.ApiResponse;
import
com.keymobile.rest.common.utils.DateUtil
;
import
com.keymobile.rest.common.validator.CommonValidator
;
import
com.keymobile.rest.model.DataInfo
;
import
com.keymobile.rest.model.
Mission
;
import
com.keymobile.rest.model.
Process
;
import
com.keymobile.rest.model.Template
;
import
com.keymobile.rest.service.DataInfoService
;
import
com.keymobile.rest.service.TemplateService
;
import
com.keymobile.rest.service.MissionService
;
import
com.keymobile.rest.service.UserService
;
import
com.keymobile.rest.service.*
;
import
io.swagger.annotations.*
;
import
org.activiti.engine.*
;
import
org.activiti.engine.task.Task
;
...
...
@@ -28,7 +25,7 @@ public class ExcelController {
@Autowired
private
DataInfoService
dataInfoService
;
@Autowired
private
MissionService
mission
Service
;
private
ProcessService
process
Service
;
@Autowired
private
UserService
userService
;
@Autowired
...
...
@@ -49,11 +46,14 @@ public class ExcelController {
Template
template
=
templateService
.
get
(
excelId
);
CommonValidator
.
notNull
(
template
,
"模板不存在"
);
Process
process
=
processService
.
findByProcessId
(
task
.
getProcessInstanceId
());
DataInfo
dataInfo
=
new
DataInfo
();
dataInfo
.
setCreateAt
(
DateUtil
.
getTimestamp
());
dataInfo
.
setTemplate
(
template
);
dataInfo
.
setTaskId
(
taskId
);
dataInfo
.
setUserId
(
3L
);
dataInfo
.
setProcess
(
process
);
dataInfo
.
setData
(
dataStr
);
dataInfoService
.
save
(
dataInfo
);
...
...
@@ -88,15 +88,7 @@ public class ExcelController {
)
@PostMapping
(
value
=
"/excel/getData"
)
public
ApiResponse
getRecordData
(
long
excelId
)
{
// User curUser = userService.getNormalUser();
// ProcessInfo processInfo = processInfoService.findByExcelIdAndUserId(excelId, curUser.getId());
//
// List<DataInfo> dataInfoList = processInfo.getDataInfoList();
// if (dataInfoList.size() > 0) {
// return ApiResponse.ok(dataInfoList.get(0));
// } else {
return
ApiResponse
.
ok
();
// }
}
}
src/main/java/com/keymobile/rest/model/DataInfo.java
View file @
b757bc91
...
...
@@ -28,10 +28,13 @@ public class DataInfo implements Serializable {
@Column
(
nullable
=
false
,
columnDefinition
=
(
"bigint(22) comment '补录人员id'"
))
private
Long
userId
;
@Column
(
nullable
=
false
,
columnDefinition
=
(
"bigint(22) comment '
补录任务
id'"
))
@Column
(
nullable
=
false
,
columnDefinition
=
(
"bigint(22) comment '
task
id'"
))
private
String
taskId
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
private
Process
process
;
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
@JsonIgnore
private
Template
template
;
}
src/main/resources/application-test.yml
View file @
b757bc91
...
...
@@ -28,9 +28,12 @@ spring:
hibernate
:
ddl-auto
:
update
datasource
:
url
:
jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username
:
test
password
:
test
# url: jdbc:mysql://192.168.0.192:3306/cmb_dev?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
# username: test
# password: test
url
:
jdbc:mysql://47.105.193.165:3306/dev0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username
:
root
password
:
123456
hikari
:
maximum-pool-size
:
3
servlet
:
...
...
@@ -38,7 +41,8 @@ spring:
max-file-size
:
20Mb
max-request-size
:
100Mb
redis
:
host
:
192.168.0.192
# host: 192.168.0.192
host
:
127.0.0.1
port
:
6379
session
:
store-type
:
redis
...
...
@@ -58,4 +62,5 @@ swagger2:
security
:
authUser
:
root
authPwd
:
pwd
permit
:
false
\ No newline at end of file
# permit: false
permit
:
true
\ No newline at end of file
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