Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
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
Spencer Chang
hel-developer-guide
Commits
6238fbdb
Commit
6238fbdb
authored
Aug 02, 2017
by
yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update jad.md
parent
75e7b760
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
jad.md
jad.md
+6
-6
No files found.
jad.md
View file @
6238fbdb
## Excel文件批量导出
## Excel文件批量导出
本系统支持Excel文件导出排队处理,支持超大数据量,能实时查询文件生成情况,支持取消导出。
本系统支持Excel文件导出排队处理,支持超大数据量,能实时查询文件生成情况,支持取消导出。
#### 使用方法
#### 使用方法
1.
在代码中注入Excel导出Service
1.
在代码中注入Excel导出Service
```
java
```
java
@AutoWired
@AutoWired
private
ExcelExportServiceImpl
excelService
;
private
ExcelExportServiceImpl
excelService
;
```
```
2.
在自己的controller中调用方法
2.
在自己的controller中调用方法
```
java
```
java
excelService
.
saveExportInfo
(
sqlId
,
iRequest
,
config
,
rowMaxNumber
);
excelService
.
saveExportInfo
(
sqlId
,
iRequest
,
config
,
rowMaxNumber
);
```
```
...
@@ -18,12 +18,12 @@ excelService.saveExportInfo(sqlId,iRequest,config,rowMaxNumber);
...
@@ -18,12 +18,12 @@ excelService.saveExportInfo(sqlId,iRequest,config,rowMaxNumber);
| config | ExportConfig | 包含Excel各列信息的对象,由前台传递json对象转换而来 |
| config | ExportConfig | 包含Excel各列信息的对象,由前台传递json对象转换而来 |
| rowMaxNumber | int | 生成Excel的最大行数,可使用重载方法,不包含次参数默认为1,000,000 |
| rowMaxNumber | int | 生成Excel的最大行数,可使用重载方法,不包含次参数默认为1,000,000 |
3.
运行Excel导出程序(获取该程序,请联系部门相关负责人)
3.
运行Excel导出程序(获取该程序,请联系部门相关负责人)
```
shell
```
shell
java
-jar
hel-batch-parent.jar &
java
-jar
hel-batch-parent.jar &
```
```
4.
Excel导出情况查询
4.
Excel导出情况查询
用户若是为管理员身份,则查询全部人的导出情况,否则只显示当前用户的导出数据
用户若是为管理员身份,则查询全部人的导出情况,否则只显示当前用户的导出数据
```
java
```
java
excelService
.
queryExportInfo
(
status
,
iRequest
);
excelService
.
queryExportInfo
(
status
,
iRequest
);
```
```
...
@@ -33,7 +33,7 @@ excelService.queryExportInfo(status, iRequest);
...
@@ -33,7 +33,7 @@ excelService.queryExportInfo(status, iRequest);
| status | String | 指定Excel导出的状态,该参数可为空查询全部状态数据
<br><ll><li>
new->等待
</li><li>
generating->文件导出中
</li><li>
finished->导出完成
</li><li>
failed-> 导出失败
</li></ll>
|
| status | String | 指定Excel导出的状态,该参数可为空查询全部状态数据
<br><ll><li>
new->等待
</li><li>
generating->文件导出中
</li><li>
finished->导出完成
</li><li>
failed-> 导出失败
</li></ll>
|
| iRequest | IRequest | 带有上下文信息的reuqest对象 |
| iRequest | IRequest | 带有上下文信息的reuqest对象 |
5.
下载已完成的Excel文件
5.
下载已完成的Excel文件
```
java
```
java
excel
.
downloadExcel
(
filePath
,
fileName
,
request
,
response
);
excel
.
downloadExcel
(
filePath
,
fileName
,
request
,
response
);
```
```
...
...
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