Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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
INET-TWO
server
dcs-plan
Commits
a9402e84
Commit
a9402e84
authored
Nov 06, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量下载接口
parent
9774734e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
ExtQuarterlyReportServiceImpl.java
...plan/core/service/impl/ExtQuarterlyReportServiceImpl.java
+8
-7
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtQuarterlyReportServiceImpl.java
View file @
a9402e84
...
...
@@ -81,7 +81,10 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
List
<
V
>
quarterlyReportVOList
=
this
.
findRecursion
(
query
).
getContent
();
if
(!
ObjectUtils
.
isEmpty
(
quarterlyReportVOList
))
{
ExtQuarterlyReportVO
extQuarterlyReportVO
=
quarterlyReportVOList
.
get
(
0
);
this
.
extFindFileIds
(
fileIds
,
extQuarterlyReportVO
.
getObjFileLinks
(),
Constants
.
MASTER_FILE
);
//取出所有行动项的附件id
for
(
ExtActionItemVO
extActionItemVO:
extQuarterlyReportVO
.
getExtActionItems
()){
this
.
extFindFileIds
(
fileIds
,
extActionItemVO
.
getObjFileLinks
(),
Constants
.
MASTER_FILE
);
}
if
(!
CollectionUtils
.
isEmpty
(
fileIds
))
{
fileIds
.
stream
().
forEach
(
fileId
->
{
try
{
...
...
@@ -94,7 +97,8 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
});
//压缩文件
downloadDataZip
(
response
,
tempDir
);
// todo 删除临时文件夹
//删除生成后的临时文件
FileUtils
.
deleteDirectory
(
tempDir
);
}
else
{
throw
new
DxBusinessException
(
"-1"
,
"根据季报id:"
+
id
+
"未查到报表数据"
);
}
...
...
@@ -154,11 +158,8 @@ public class ExtQuarterlyReportServiceImpl<V extends ExtQuarterlyReportVO> imple
*/
private
void
extFindFileIds
(
List
<
Long
>
fileIds
,
List
<
ObjFileLinkVO
>
objFileLinks
,
String
fileType
)
{
if
(!
CollectionUtils
.
isEmpty
(
objFileLinks
))
{
//遍历取主内容的文件id
List
<
ObjFileLinkVO
>
objFileLinkVOs
=
objFileLinks
.
stream
().
filter
(
n
->
n
.
getContentType
().
equals
(
fileType
)).
collect
(
Collectors
.
toList
());
objFileLinkVOs
.
stream
().
forEach
(
o
->
{
fileIds
.
add
(
o
.
getTargetId
());
});
//遍历取文件id
objFileLinks
.
stream
().
forEach
(
o
->
{
fileIds
.
add
(
o
.
getTargetId
());});
}
}
}
...
...
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