Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
a9fe2bab
Commit
a9fe2bab
authored
Dec 19, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化-fxj
parent
7380f8b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+5
-2
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
a9fe2bab
...
...
@@ -170,6 +170,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
HashMap
<
String
,
String
>
userMap
=
new
HashMap
<>();
ExcelWriter
excelWriter
=
null
;
try
{
R
<
AllUserNaVo
>
userListR
=
upmsDaprUtils
.
getAllUserName
();
if
(
Common
.
isNotNull
(
userListR
))
{
...
...
@@ -190,7 +191,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
redisLabelMap
.
putAll
(
userMap
);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfoExportVo
.
class
)
excelWriter
=
EasyExcel
.
write
(
out
,
TDispatchInfoExportVo
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
...
...
@@ -219,7 +220,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
...
...
@@ -227,6 +227,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
null
!=
out
)
{
out
.
close
();
}
if
(
null
!=
excelWriter
){
excelWriter
.
finish
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
...
...
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