|
@@ -5061,6 +5061,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
public HttpRespMsg exportReport(@RequestParam String startDate, @RequestParam String endDate, Integer projectId,Integer stateKey,Integer departmentId, HttpServletRequest request) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
DateFormat timeDf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ long t0 = System.currentTimeMillis();
|
|
|
try {
|
|
|
String userId = request.getHeader("Token");
|
|
|
User user = userMapper.selectById(userId);
|
|
@@ -5221,11 +5222,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
else {
|
|
|
//看公司所有人的
|
|
|
+ long t1 = System.currentTimeMillis();
|
|
|
if (timeType.getShowFillauditTime() == 1) {
|
|
|
allReportByDate = reportMapper.getAllReportByDateWithReportLog(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
|
} else {
|
|
|
allReportByDate = reportMapper.getAllReportByDate(startDate, user.getCompanyId(), null, endDate, projectId,stateKey,branchDepartment);
|
|
|
}
|
|
|
+ long t2 = System.currentTimeMillis();
|
|
|
+ System.out.println("查数据库耗时:"+(t2-t1)/1000+"s");
|
|
|
}
|
|
|
//获取企业微信考勤数据
|
|
|
List<UserCorpwxTime> userCorpwxTimeList = new ArrayList<>();
|
|
@@ -5557,6 +5561,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
//生成Excel文件
|
|
|
String fileUrlSuffix = (startDate==null?"":(startDate+MessageUtils.message("leave.to")+endDate))+MessageUtils.message("excel.workReport") + System.currentTimeMillis();
|
|
|
+ long t3 = System.currentTimeMillis();
|
|
|
+ System.out.println("处理数据耗时:"+(t3-t0)+"ms");
|
|
|
httpRespMsg = excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileUrlSuffix,dataList,path);
|
|
|
} catch (NullPointerException e) {
|
|
|
//httpRespMsg.setError("验证失败或缺少数据");
|