|
@@ -65,7 +65,7 @@ public class TaskesTimateServiceImpl extends ZtBaseServiceImpl<TaskesTimateEntit
|
|
|
rowTitle.put("projectName", "项目名称");
|
|
|
rowTitle.put("account", "账号");
|
|
|
rowTitle.put("realname", "姓名");
|
|
|
- rowTitle.put("consumed", "消耗时间(单位:天)");
|
|
|
+ rowTitle.put("consumed", "消耗时间(天)");
|
|
|
ExcelUtils.createExcel(effortVos, savePath, rowTitle);
|
|
|
|
|
|
String domain = configConstant.serverDomain + time + ".xlsx";
|
|
@@ -171,5 +171,39 @@ public class TaskesTimateServiceImpl extends ZtBaseServiceImpl<TaskesTimateEntit
|
|
|
return Result.success(new PageInfo<>(effortVos));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result<DetailVo> excelDetailByDay(DeptDto param) {
|
|
|
+ long start = System.currentTimeMillis();
|
|
|
+ List<DetailVo> effortVos = entityMapper.excelDetailByDay(param);
|
|
|
+
|
|
|
+ long end = System.currentTimeMillis();
|
|
|
+ String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
|
|
+ String savePath = configConstant.serverBasePath + time + ".xlsx";
|
|
|
+ HashMap<String, String> rowTitle = new HashMap<>();
|
|
|
+
|
|
|
+ rowTitle.put("slack", "工号");
|
|
|
+ rowTitle.put("date", "日期");
|
|
|
+ rowTitle.put("task", "任务号");
|
|
|
+ rowTitle.put("project", "项目id");
|
|
|
+ rowTitle.put("code", "项目号");
|
|
|
+ rowTitle.put("projectName", "项目名称");
|
|
|
+ rowTitle.put("account", "账号");
|
|
|
+ rowTitle.put("realname", "姓名");
|
|
|
+ rowTitle.put("consumed", "消耗时间(天)");
|
|
|
+ rowTitle.put("deptId", "部门Id");
|
|
|
+ rowTitle.put("deptName", "部门名称");
|
|
|
+ ExcelUtils.createExcel(effortVos, savePath, rowTitle);
|
|
|
+
|
|
|
+ log.info("sql耗时: {}s", (end-start)/1000);
|
|
|
+
|
|
|
+ String domain = configConstant.serverDomain + time + ".xlsx";
|
|
|
+
|
|
|
+ HashMap<String, Object> result = new HashMap<>();
|
|
|
+ result.put("size", effortVos.size());
|
|
|
+ result.put("path", domain);
|
|
|
+
|
|
|
+ return Result.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|