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
335a5949
Commit
335a5949
authored
Sep 13, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出功能统一增加过滤条件,目前实现类都没有传入参数,进行过滤
parent
87a7eca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+12
-10
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+1
-1
No files found.
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 @
335a5949
...
@@ -7,13 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
...
@@ -7,13 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestPart
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -21,6 +15,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -21,6 +15,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
/**
/**
* 导出导入
* 导出导入
...
@@ -53,15 +48,22 @@ public class ExcelController extends BaseController {
...
@@ -53,15 +48,22 @@ public class ExcelController extends BaseController {
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
}
/**
* * @param Map par 可以传递过滤条件,传入具体实现类中
* @return
* <PRE>
* author tw
* date 2021/9/13
* </PRE>
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类"
)
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
try
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonExport
(
response
,
excelDto
);
excelService
.
commonExport
(
response
,
excelDto
,
par
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
335a5949
...
@@ -158,7 +158,7 @@ public class ExcelServiceImpl {
...
@@ -158,7 +158,7 @@ public class ExcelServiceImpl {
true
);
true
);
}
}
public
void
commonExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
{
public
void
commonExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
,
Map
par
)
{
switch
(
excelDto
.
getType
())
{
switch
(
excelDto
.
getType
())
{
case
"WHP"
:
case
"WHP"
:
...
...
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