|
@@ -366,14 +366,14 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response, String downloadPath) throws IOException {
|
|
|
+ public HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response, String downloadPath,String path) throws IOException {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
if (null != userVO.getIds()) {
|
|
|
List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(userVO.getIds());
|
|
|
for (Integer id : ids) {
|
|
|
Mould mould = mouldMapper.selectById(id);
|
|
|
List<MouldFile> mouldFiles = mouldFileMapper.selectList(new QueryWrapper<MouldFile>().eq("model_id", id).eq("state", 3));
|
|
|
- feedBackDirectMultiDownload(request, response, downloadPath, mould, mouldFiles);
|
|
|
+ feedBackDirectMultiDownload(request, response, downloadPath, mould, mouldFiles,path);
|
|
|
}
|
|
|
}
|
|
|
return msg;
|
|
@@ -453,7 +453,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
}
|
|
|
|
|
|
|
|
|
- public Map<String, Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response, String downloadPath, Mould vo, List<MouldFile> mouldFiles) throws IOException {
|
|
|
+ public Map<String, Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response, String downloadPath, Mould vo, List<MouldFile> mouldFiles,String oldFilePath) throws IOException {
|
|
|
//压缩文件初始设置
|
|
|
String path = downloadPath;
|
|
|
String base_name = vo.getModelNo() + vo.getModelName();
|
|
@@ -463,7 +463,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
//mouldFiles为根据前台传过来的信息,通过数据库查询所得出的pdf文件路径集合(具体到后缀),此处省略
|
|
|
File[] files = new File[mouldFiles.size()];//
|
|
|
for (int i = 0; i < mouldFiles.size(); i++) {
|
|
|
- files[i] = new File(mouldFiles.get(i).getFileUrl());//获取所有需要下载的pdf
|
|
|
+ files[i] = new File(oldFilePath+mouldFiles.get(i).getFileUrl());//获取所有需要下载的pdf
|
|
|
}
|
|
|
|
|
|
// 创建临时压缩文件
|