|
@@ -1,5 +1,6 @@
|
|
package org.jeecg.modules.admin_order.service.impl;
|
|
package org.jeecg.modules.admin_order.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.exceptions.UtilException;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
import cn.hutool.core.util.ZipUtil;
|
|
import cn.hutool.core.util.ZipUtil;
|
|
@@ -272,7 +273,12 @@ public class AdminOrderServiceImpl extends ServiceImpl<AdminOrderMapper, AdminOr
|
|
// 生成zip文件中的内容
|
|
// 生成zip文件中的内容
|
|
List<String> genFileNameList = generatePdfFileByOrderList(orderIdList, outputFolder);
|
|
List<String> genFileNameList = generatePdfFileByOrderList(orderIdList, outputFolder);
|
|
// 生成zip文件
|
|
// 生成zip文件
|
|
- File zip = ZipUtil.zip(outputFolder);
|
|
|
|
|
|
+ File zip = null;
|
|
|
|
+ try {
|
|
|
|
+ zip = ZipUtil.zip(outputFolder);
|
|
|
|
+ } catch (UtilException e) {
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
adminFileExport.setFileNum(genFileNameList.size());
|
|
adminFileExport.setFileNum(genFileNameList.size());
|
|
adminFileExport.setFileSize(zip.length());
|
|
adminFileExport.setFileSize(zip.length());
|
|
adminFileExport.setUrl(systemHost + "/sys/common/static/tempFile/" + adminFileExport.getName());
|
|
adminFileExport.setUrl(systemHost + "/sys/common/static/tempFile/" + adminFileExport.getName());
|