Commit 55e86d63 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.5' into MVP1.7.5

parents a9e47e44 363cb77b
......@@ -4395,14 +4395,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
response.setContentType("application/octet-stream");
response.setHeader("content-type", "application/octet-stream");
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();
// 获取人员档案所有的附件信息
getFilesInfo(handles);
// 处理附件 压缩并下载
if (Common.isNotNull(handles)) {
try {
try (ZipArchiveOutputStream zipOutput = new ZipArchiveOutputStream(response.getOutputStream())){
CloseableHttpResponse response1;
HttpEntity entity;
byte[] data;
......@@ -4421,11 +4419,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
zipOutput.finish();
} catch (Exception e) {
e.printStackTrace();
log.error("C端项目人员签字附件下载打包异常:",e);
}
}
} catch (IOException e) {
e.printStackTrace();
log.error("C端项目人员签字附件下载异常:",e);
}finally {
if (Common.isNotNull(handles)){
handles.clear();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment