Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
excel-export-service
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
export-service
excel-export-service
Commits
dc17bcda
提交
dc17bcda
authored
10月 10, 2025
作者:
lixiaojuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cms地址变更
上级
96ec7169
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
6 行删除
+7
-6
ExcelExportService.java
...m/zzsn/excelexportservice/service/ExcelExportService.java
+3
-2
application-local.yml
src/main/resources/application-local.yml
+2
-2
application-test.yml
src/main/resources/application-test.yml
+2
-2
没有找到文件。
src/main/java/com/zzsn/excelexportservice/service/ExcelExportService.java
浏览文件 @
dc17bcda
...
@@ -52,6 +52,7 @@ public class ExcelExportService {
...
@@ -52,6 +52,7 @@ public class ExcelExportService {
workbook
=
new
SXSSFWorkbook
(
1000
);
workbook
=
new
SXSSFWorkbook
(
1000
);
workbook
.
setCompressTempFiles
(
true
);
workbook
.
setCompressTempFiles
(
true
);
int
i
=
1
;
int
i
=
1
;
String
fileName
=
exportReqList
.
get
(
0
).
getFileName
();
for
(
ExportReq
exportReq
:
exportReqList
)
{
for
(
ExportReq
exportReq
:
exportReqList
)
{
ExportDataResponse
resp
=
null
;
ExportDataResponse
resp
=
null
;
String
serviceName
=
exportReq
.
getServiceName
();
String
serviceName
=
exportReq
.
getServiceName
();
...
@@ -114,7 +115,7 @@ public class ExcelExportService {
...
@@ -114,7 +115,7 @@ public class ExcelExportService {
// 最后写到 response
// 最后写到 response
log
.
info
(
"生成excel结束------->"
+
System
.
currentTimeMillis
());
log
.
info
(
"生成excel结束------->"
+
System
.
currentTimeMillis
());
writeExcelToResponse
(
"导出"
,
workbook
,
response
);
writeExcelToResponse
(
fileName
,
workbook
,
response
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"导出Excel异常"
,
e
);
log
.
error
(
"导出Excel异常"
,
e
);
...
@@ -309,7 +310,7 @@ public class ExcelExportService {
...
@@ -309,7 +310,7 @@ public class ExcelExportService {
response
.
reset
();
response
.
reset
();
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
String
fileName
=
URLEncoder
.
encode
(
String
fileName
=
URLEncoder
.
encode
(
(
fileNamePrefix
!=
null
?
fileNamePrefix
:
"导出"
)
+
System
.
currentTimeMillis
()
+
".xlsx"
,
(
fileNamePrefix
!=
null
?
fileNamePrefix
:
"导出"
)
+
".xlsx"
,
"UTF-8"
"UTF-8"
);
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
);
...
...
src/main/resources/application-local.yml
浏览文件 @
dc17bcda
...
@@ -27,4 +27,4 @@ forest:
...
@@ -27,4 +27,4 @@ forest:
connect-timeout
:
600000
# HTTP请求连接超时时间
connect-timeout
:
600000
# HTTP请求连接超时时间
read-timeout
:
600000
# HTTP请求读取超时时间
read-timeout
:
600000
# HTTP请求读取超时时间
variables
:
variables
:
cmsQuestionUrl
:
http://1.95.77.159:10089/api/v4/cms/cmsSubject/getSubjectRelationInfo
cmsQuestionUrl
:
http://1.95.14.24:20602/cms/cmsSubject/getSubjectRelationInfo
\ No newline at end of file
\ No newline at end of file
src/main/resources/application-test.yml
浏览文件 @
dc17bcda
...
@@ -27,4 +27,4 @@ forest:
...
@@ -27,4 +27,4 @@ forest:
connect-timeout
:
600000
# HTTP请求连接超时时间
connect-timeout
:
600000
# HTTP请求连接超时时间
read-timeout
:
600000
# HTTP请求读取超时时间
read-timeout
:
600000
# HTTP请求读取超时时间
variables
:
variables
:
cmsQuestionUrl
:
http://1.95.77.159:10089/api/v4/cms/cmsSubject/getSubjectRelationInfo
cmsQuestionUrl
:
http://1.95.14.24:20602/cms/cmsSubject/getSubjectRelationInfo
\ No newline at end of file
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论