Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
9f0fb557
Commit
9f0fb557
authored
Aug 04, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
22b7f936
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
ExcelDto.java
...com/yeejoin/amos/boot/module/common/api/dto/ExcelDto.java
+6
-0
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+13
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/ExcelDto.java
View file @
9f0fb557
...
...
@@ -25,6 +25,12 @@ public class ExcelDto {
this
.
type
=
type
;
}
public
ExcelDto
(
String
fileName
,
String
sheetName
,
String
type
)
{
this
.
fileName
=
fileName
;
this
.
sheetName
=
sheetName
;
this
.
type
=
type
;
}
public
String
getFileName
()
{
return
StringUtils
.
isEmpty
(
fileName
)
?
DateUtils
.
convertDateToString
(
new
Date
(),
"yyyyMMddHHmmss"
)
:
fileName
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
9f0fb557
...
...
@@ -73,6 +73,19 @@ public class ExcelController extends BaseController {
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类2"
)
@GetMapping
(
"/export/list"
)
public
void
exportByType
(
HttpServletResponse
response
,
@RequestParam
(
required
=
false
)
String
fileName
,
@RequestParam
(
required
=
false
)
String
sheetName
,
@RequestParam
String
type
)
{
try
{
excelService
.
commonExport
(
response
,
new
ExcelDto
(
fileName
,
sheetName
,
type
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"上传文件数据-"
)
@PostMapping
(
"/upload"
)
public
void
upload
(
@RequestPart
(
"file"
)
MultipartFile
multipartFile
,
ExcelDto
excelDto
)
{
...
...
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