|
@@ -47,6 +47,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.concurrent.Future;
|
|
|
|
|
|
/**
|
|
|
* @Description: 订单管理
|
|
@@ -268,17 +269,26 @@ public class AdminOrderServiceImpl extends ServiceImpl<AdminOrderMapper, AdminOr
|
|
|
adminFileExportService.saveOrUpdateNoInfo(adminFileExport);
|
|
|
return;
|
|
|
}
|
|
|
- JSONArray jsonArray = JSONUtil.parseArray(exportParam);
|
|
|
- List<String> orderIdList = jsonArray.toList(String.class);
|
|
|
- // 生成zip文件中的内容
|
|
|
- List<String> genFileNameList = generatePdfFileByOrderList(orderIdList, outputFolder);
|
|
|
- // 生成zip文件
|
|
|
+ List<String> orderIdList = null;
|
|
|
+ List<String> genFileNameList = null;
|
|
|
File zip = null;
|
|
|
try {
|
|
|
+ JSONArray jsonArray = JSONUtil.parseArray(exportParam);
|
|
|
+ orderIdList = jsonArray.toList(String.class);
|
|
|
+ // 生成zip文件中的内容
|
|
|
+ genFileNameList = generatePdfFileByOrderList(orderIdList, outputFolder);
|
|
|
+ // 生成zip文件
|
|
|
zip = ZipUtil.zip(outputFolder);
|
|
|
- } catch (UtilException e) {
|
|
|
+ } catch (Exception e) {
|
|
|
+ adminFileExport.setFileNum(0);
|
|
|
+ adminFileExport.setFileSize(0L);
|
|
|
+ adminFileExport.setExportStatus("2");
|
|
|
+ adminFileExport.setExportDesc("生成文件时出现异常");
|
|
|
+ adminFileExport.setUrl(systemHost + "/sys/common/static/tempFile/" + adminFileExport.getName());
|
|
|
+ adminFileExportService.saveOrUpdateNoInfo(adminFileExport);
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
+
|
|
|
adminFileExport.setFileNum(genFileNameList.size());
|
|
|
adminFileExport.setFileSize(zip.length());
|
|
|
adminFileExport.setUrl(systemHost + "/sys/common/static/tempFile/" + adminFileExport.getName());
|