合并分支 'dev_foton_GJB' 到 'master'

Dev foton gjb

查看合并请求 laws-foton-slrs/foton-slrs-system-rest!20
This commit is contained in:
陈栋
2023-02-14 16:27:30 +08:00
4 changed files with 100 additions and 23 deletions
@@ -455,25 +455,23 @@ public class SarFileSplitItemsEOController extends BaseController<SarFileSplitIt
"attachment; filename=\""+ ReadExcel.encodeFileName(fileOriName+".zip", request) +"\"");
response.setContentType("application/force-download");
response.flushBuffer();
os = response.getOutputStream();
workbook.write(excelOS);
excelOS.flush();
excelOS.close();
// ZipUtil.zip(fileNowPath,fileNowPath+".zip");
// FileInputStream fis = new FileInputStream(fileNowPath+".zip");
// int len = 0;
// while ((len = fis.read()) != -1) {
// os.write(len);
// }
// os.flush();
// os.close(); // 后开先关
// fis.close(); // 先开后关
List<AttFileEO> multiFileInfos = this.attFileEOService.getMultiFileInfos(fileIds);
if(CollectionUtils.isNotEmpty(multiFileInfos)){
for (AttFileEO data : multiFileInfos){
if(StringUtils.isNotBlank(data.getOldFileName())){
String[] split = data.getOldFileName().split("\\.");
//存在则更换后缀
if(split.length>0){
data.setOldFileName(split[0]+".png");
}
}
}
this.attFileEOService.downLoadFileList(multiFileInfos,fileNowPath);
}
ZipUtil.zip(fileNowPath,fileNowPath+".zip");
FileInputStream fis = new FileInputStream(fileNowPath+".zip");
int len = 0;
@@ -483,7 +481,6 @@ public class SarFileSplitItemsEOController extends BaseController<SarFileSplitIt
os.flush();
os.close(); // 后开先关
fis.close(); // 先开后关
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw new AdcDaBaseException("下载文件失败,请重试");