Ver código fonte

测试导出修改

zhouyy 5 meses atrás
pai
commit
9b57ae09a8

+ 4 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/CustomController.java

@@ -130,6 +130,8 @@ public class CustomController {
     private String path;
     @RequestMapping("/exportData")
     public HttpRespMsg exportData(Custom custom , HttpServletRequest request) throws Exception {
+        System.out.println("========导出客户信息==========");
+        long startTimeSec = System.currentTimeMillis();
         User user = userMapper.selectById(request.getHeader("token"));
         SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCompanyId, user.getCompanyId()).eq(SysForm::getCode, "Customer").eq(SysForm::getIsCurrent, 1));
         WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, user.getCompanyId()));
@@ -198,6 +200,8 @@ public class CustomController {
             dataList.add(item);
         }
         String fileName="客户表导出_"+ System.currentTimeMillis();
+        long endTimeSec = System.currentTimeMillis();
+        System.out.println("========客户信息导出数据准备结束==========耗时"+(endTimeSec-startTimeSec)+"毫秒");
         return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
     }
 

+ 4 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -1,7 +1,6 @@
 package com.management.platform.service.impl;
 
 import com.management.platform.entity.CorpwxJobResult;
-import com.management.platform.entity.User;
 import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.mapper.CorpwxJobResultMapper;
 import com.management.platform.mapper.UserMapper;
@@ -70,6 +69,8 @@ public class ExcelExportServiceImpl implements ExcelExportService {
     }
 
     public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
+        long startTimeSec = System.currentTimeMillis();
+        System.out.println("excel导出数据开始");
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         if (title.contains("/")) {
             //文件名不能含有路径,得替换掉
@@ -151,6 +152,8 @@ public class ExcelExportServiceImpl implements ExcelExportService {
         }else {
             httpRespMsg.data = resp;
         }
+        long endTimeSec = System.currentTimeMillis();
+        System.out.println("========excel导出数据结束==========耗时"+(endTimeSec-startTimeSec)+"毫秒");
         return httpRespMsg;
     }