Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
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
liyang
sts网站
Commits
e73dbd47
Commit
e73dbd47
authored
Aug 07, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel注解支持导出对象的子列表方法
parent
e0cd5381
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
202 additions
and
25 deletions
+202
-25
Excel.java
...mmon/src/main/java/com/ruoyi/common/annotation/Excel.java
+6
-17
ExcelUtil.java
...n/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+196
-8
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
View file @
e73dbd47
...
...
@@ -88,6 +88,11 @@ public @interface Excel
*/
public
String
[]
combo
()
default
{};
/**
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
*/
public
boolean
needMerge
()
default
false
;
/**
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
*/
...
...
@@ -104,7 +109,7 @@ public @interface Excel
public
boolean
isStatistics
()
default
false
;
/**
* 导出类型(0数字 1字符串)
* 导出类型(0数字 1字符串
2图片
)
*/
public
ColumnType
cellType
()
default
ColumnType
.
STRING
;
...
...
@@ -143,22 +148,6 @@ public @interface Excel
*/
public
String
[]
args
()
default
{};
public
enum
Align
{
AUTO
(
0
),
LEFT
(
1
),
CENTER
(
2
),
RIGHT
(
3
);
private
final
int
value
;
Align
(
int
value
)
{
this
.
value
=
value
;
}
public
int
value
()
{
return
this
.
value
;
}
}
/**
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
*/
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
View file @
e73dbd47
This diff is collapsed.
Click to expand it.
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