Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
e73dbd47
Commit
e73dbd47
authored
Aug 07, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel注解支持导出对象的子列表方法
parent
e0cd5381
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
202 additions
and
25 deletions
+202
-25
ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java
...mmon/src/main/java/com/ruoyi/common/annotation/Excel.java
+6
-17
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/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
...
@@ -88,6 +88,11 @@ public @interface Excel
*/
*/
public
String
[]
combo
()
default
{};
public
String
[]
combo
()
default
{};
/**
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
*/
public
boolean
needMerge
()
default
false
;
/**
/**
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
*/
*/
...
@@ -104,7 +109,7 @@ public @interface Excel
...
@@ -104,7 +109,7 @@ public @interface Excel
public
boolean
isStatistics
()
default
false
;
public
boolean
isStatistics
()
default
false
;
/**
/**
* 导出类型(0数字 1字符串)
* 导出类型(0数字 1字符串
2图片
)
*/
*/
public
ColumnType
cellType
()
default
ColumnType
.
STRING
;
public
ColumnType
cellType
()
default
ColumnType
.
STRING
;
...
@@ -143,22 +148,6 @@ public @interface Excel
...
@@ -143,22 +148,6 @@ public @interface Excel
*/
*/
public
String
[]
args
()
default
{};
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:仅导入)
* 字段类型(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