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
7ad00e16
Commit
7ad00e16
authored
Apr 24, 2020
by
chenweisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
be1b3b48
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
15 deletions
+27
-15
机构数据导入数据文件.xlsx
origin/补录系统excel拆分java代码/数据和模板文件/机构数据导入数据文件.xlsx
+0
-0
机构数据导入数据文件导出模板.xlsx
origin/补录系统excel拆分java代码/数据和模板文件/机构数据导入数据文件导出模板.xlsx
+0
-0
TaskController.java
...in/java/com/keymobile/rest/controller/TaskController.java
+3
-3
TemplateController.java
...ava/com/keymobile/rest/controller/TemplateController.java
+13
-4
ExcelForm.java
src/main/java/com/keymobile/rest/dto/ExcelForm.java
+7
-4
Template.java
src/main/java/com/keymobile/rest/model/Template.java
+1
-1
application-test.yml
src/main/resources/application-test.yml
+3
-3
No files found.
origin/补录系统excel拆分java代码/数据和模板文件/机构数据导入数据文件.xlsx
0 → 100644
View file @
7ad00e16
File added
origin/补录系统excel拆分java代码/数据和模板文件/机构数据导入数据文件导出模板.xlsx
0 → 100644
View file @
7ad00e16
File added
src/main/java/com/keymobile/rest/controller/TaskController.java
View file @
7ad00e16
...
...
@@ -171,8 +171,8 @@ public class TaskController {
CommonValidator
.
isTrue
(
excelForm
.
getAuditIdList
()
!=
null
&&
excelForm
.
getAuditIdList
().
size
()
!=
0
,
"模板审核人idList不能为空"
);
CommonValidator
.
isTrue
(
excelForm
.
getNeedAudit
()
!=
null
&&
excelForm
.
getNeedAudit
()
!=
0
,
"模板needAudit不能为空"
);
CommonValidator
.
isFalse
((
StringUtils
.
isEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isNotEmpty
(
excelForm
.
get
BackStreamAddr
())
||
(
StringUtils
.
isNotEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isEmpty
(
excelForm
.
get
BackStreamAddr
()))),
"上游地址和回流地址
需同时填写或者同时为空"
);
CommonValidator
.
isFalse
((
StringUtils
.
isEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isNotEmpty
(
excelForm
.
get
ColumnName
())
||
(
StringUtils
.
isNotEmpty
(
excelForm
.
getUpStreamAddr
())
&&
StringUtils
.
isEmpty
(
excelForm
.
get
ColumnName
()))),
"上游地址和拆分字段名称
需同时填写或者同时为空"
);
excelForm
.
setActivity
(
finalActivity
);
...
...
@@ -350,7 +350,7 @@ public class TaskController {
for
(
HistoricActivityInstance
hai
:
lisst
)
{
System
.
out
.
println
(
"活动ID:"
+
hai
.
getId
());
}
List
<
ProcessInstance
>
s
=
runtimeService
.
createProcessInstanceQuery
()
List
<
ProcessInstance
>
s
=
runtimeService
.
createProcessInstanceQuery
()
.
processInstanceId
(
process
.
getProcessId
())
.
list
();
for
(
ProcessInstance
hai
:
s
)
{
...
...
src/main/java/com/keymobile/rest/controller/TemplateController.java
View file @
7ad00e16
...
...
@@ -149,12 +149,21 @@ public class TemplateController {
return
DataFileUtil
.
convertDatToJson
(
path
.
getPath
(),
dataAt
);
}
@ApiOperation
(
value
=
"按列名拆分excel"
,
hidden
=
true
)
@ApiOperation
(
value
=
"按列名拆分excel"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"columnName"
,
required
=
true
,
value
=
"列名称"
,
dataType
=
"string"
,
paramType
=
"query"
)
@ApiImplicitParam
(
name
=
"columnName"
,
required
=
true
,
value
=
"列名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"exportPath"
,
required
=
true
,
value
=
"导出路径"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"modelPath"
,
required
=
true
,
value
=
"模板路径"
,
dataType
=
"string"
,
paramType
=
"query"
)
})
@PostMapping
(
value
=
"/excel/breakExcel"
)
public
Object
breakExcelByColumn
(
MultipartFile
file
,
String
columnName
)
{
return
null
;
public
Object
breakExcelByColumn
(
MultipartFile
file
,
String
columnName
,
String
exportPath
,
String
modelPath
)
{
String
msg
=
null
;
try
{
msg
=
breakExcelService
.
breakExcel
(
file
,
columnName
,
exportPath
,
modelPath
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
msg
;
}
}
src/main/java/com/keymobile/rest/dto/ExcelForm.java
View file @
7ad00e16
...
...
@@ -33,21 +33,24 @@ public class ExcelForm {
@ApiModelProperty
(
name
=
"remark"
,
value
=
"表格描述"
)
private
String
remark
;
@ApiModelProperty
(
name
=
"
dataAt"
,
value
=
"数据开始行数 列如 1"
,
example
=
"1
"
)
private
Integer
dataAt
=
1
;
@ApiModelProperty
(
name
=
"
headerLine"
,
value
=
"spreadJs表头行数"
,
example
=
"0
"
)
private
Integer
headerLine
=
0
;
@ApiModelProperty
(
name
=
"needAudit"
,
value
=
"需要审核 1 不需要 2 需要"
,
required
=
true
,
example
=
"1"
)
private
Integer
needAudit
=
1
;
@ApiModelProperty
(
name
=
"needMerge"
,
value
=
"需要数据合并 1 不需要 2 需要"
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"needMerge"
,
value
=
"需要数据合并 1 不需要 2 需要"
,
example
=
"1"
,
hidden
=
true
)
private
Integer
needMerge
=
1
;
@ApiModelProperty
(
name
=
"upStreamAddr"
,
value
=
"上游地址 与 回流地址 同时填写"
)
private
String
upStreamAddr
;
@ApiModelProperty
(
name
=
"backStreamAddr"
,
value
=
"回流地址 与 上流地址 同时填写"
)
@ApiModelProperty
(
name
=
"backStreamAddr"
,
value
=
"回流地址 与 上流地址 同时填写"
,
hidden
=
true
)
private
String
backStreamAddr
;
@ApiModelProperty
(
name
=
"columnName"
,
value
=
"拆分字段"
)
private
String
columnName
;
@JsonIgnore
private
Activity
activity
;
}
src/main/java/com/keymobile/rest/model/Template.java
View file @
7ad00e16
...
...
@@ -31,7 +31,7 @@ public class Template implements Serializable {
@Column
(
nullable
=
false
,
columnDefinition
=
(
"varchar(2000) comment '模板配置'"
))
private
String
config
;
@Column
(
name
=
"data_at"
,
columnDefinition
=
(
"integer(20) default 1 comment '
数据开始
行数'"
))
@Column
(
name
=
"data_at"
,
columnDefinition
=
(
"integer(20) default 1 comment '
spreadJs表头
行数'"
))
private
Integer
dataAt
=
1
;
@Column
(
name
=
"need_audit"
,
columnDefinition
=
(
"integer(2) default 1 comment '需要审核'"
))
...
...
src/main/resources/application-test.yml
View file @
7ad00e16
...
...
@@ -25,7 +25,7 @@ spring:
application
:
name
:
dataCollector
jpa
:
show-sql
:
fals
e
show-sql
:
tru
e
database-platform
:
org.hibernate.dialect.MySQL5Dialect
hibernate
:
ddl-auto
:
update
...
...
@@ -61,8 +61,8 @@ app:
default-bpmn-file
:
SubProcessStandard.bpmn
swagger2
:
host
:
192.168.0.240:8762/api/datacollector
#
host: localhost:8110
#
host: 192.168.0.240:8762/api/datacollector
host
:
localhost:8110
security
:
authUser
:
root
authPwd
:
pwd
...
...
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