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
675871dc
Commit
675871dc
authored
Jan 15, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化-fxj
parent
97126b8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+7
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
675871dc
...
@@ -4361,14 +4361,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -4361,14 +4361,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
response
.
setContentType
(
"application/octet-stream"
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"content-type"
,
"application/octet-stream"
);
response
.
setHeader
(
"content-type"
,
"application/octet-stream"
);
response
.
setHeader
(
HttpHeaders
.
CONTENT_DISPOSITION
,
"attachment; filename="
+
URLEncoder
.
encode
(
departName
+
departNo
,
"UTF-8"
)
+
".zip"
);
response
.
setHeader
(
HttpHeaders
.
CONTENT_DISPOSITION
,
"attachment; filename="
+
URLEncoder
.
encode
(
departName
+
departNo
,
"UTF-8"
)
+
".zip"
);
ZipArchiveOutputStream
zipOutput
=
null
;
zipOutput
=
new
ZipArchiveOutputStream
(
response
.
getOutputStream
());
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
// 获取人员档案所有的附件信息
// 获取人员档案所有的附件信息
getFilesInfo
(
handles
);
getFilesInfo
(
handles
);
// 处理附件 压缩并下载
// 处理附件 压缩并下载
if
(
Common
.
isNotNull
(
handles
))
{
if
(
Common
.
isNotNull
(
handles
))
{
try
{
try
(
ZipArchiveOutputStream
zipOutput
=
new
ZipArchiveOutputStream
(
response
.
getOutputStream
()))
{
CloseableHttpResponse
response1
;
CloseableHttpResponse
response1
;
HttpEntity
entity
;
HttpEntity
entity
;
byte
[]
data
;
byte
[]
data
;
...
@@ -4387,11 +4385,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -4387,11 +4385,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
zipOutput
.
finish
();
zipOutput
.
finish
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
"C端项目人员签字附件下载打包异常:"
,
e
);
}
}
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"C端项目人员签字附件下载异常:"
,
e
);
}
finally
{
if
(
Common
.
isNotNull
(
handles
)){
handles
.
clear
();
}
}
}
}
}
...
...
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