|
@@ -58,6 +58,35 @@ public class TaskesTimateServiceImpl extends ZtBaseServiceImpl<TaskesTimateEntit
|
|
return Result.success(new PageInfo<>(this.findAll()));
|
|
return Result.success(new PageInfo<>(this.findAll()));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// @Override
|
|
|
|
+// public Result<FinanceMonthVo> allProjectEffortByMonthExcel(String date) {
|
|
|
|
+//
|
|
|
|
+// long start = System.currentTimeMillis();
|
|
|
|
+// List<FinanceMonthVo> effortVos = entityMapper.allProjectEffortByMonth(date);
|
|
|
|
+// long end = System.currentTimeMillis();
|
|
|
|
+// log.info("sql耗时: {}s", (end-start)/1000);
|
|
|
|
+// 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("project", "项目id");
|
|
|
|
+// rowTitle.put("code", "项目号");
|
|
|
|
+// rowTitle.put("projectName", "项目名称");
|
|
|
|
+// rowTitle.put("account", "账号");
|
|
|
|
+// rowTitle.put("realname", "姓名");
|
|
|
|
+// rowTitle.put("consumed", "消耗时间(天)");
|
|
|
|
+// ExcelUtils.createExcel(effortVos, savePath, rowTitle);
|
|
|
|
+//
|
|
|
|
+// String domain = configConstant.serverDomain + time + ".xlsx";
|
|
|
|
+// log.info("url: {}", domain);
|
|
|
|
+//
|
|
|
|
+// HashMap<String, Object> result = new HashMap<>();
|
|
|
|
+// result.put("size", effortVos.size());
|
|
|
|
+// result.put("domain", domain);
|
|
|
|
+// return Result.success(domain);
|
|
|
|
+// }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Result<FinanceMonthVo> allProjectEffortByMonthExcel(String date) {
|
|
public Result<FinanceMonthVo> allProjectEffortByMonthExcel(String date) {
|
|
|
|
|
|
@@ -68,6 +97,7 @@ public class TaskesTimateServiceImpl extends ZtBaseServiceImpl<TaskesTimateEntit
|
|
String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
|
String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
|
String savePath = configConstant.serverBasePath + time + ".xlsx";
|
|
String savePath = configConstant.serverBasePath + time + ".xlsx";
|
|
HashMap<String, String> rowTitle = new HashMap<>();
|
|
HashMap<String, String> rowTitle = new HashMap<>();
|
|
|
|
+// LinkedHashMap<String, String> rowTitle = new LinkedHashMap<>();
|
|
|
|
|
|
rowTitle.put("slack", "工号");
|
|
rowTitle.put("slack", "工号");
|
|
// rowTitle.put("project", "项目id");
|
|
// rowTitle.put("project", "项目id");
|
|
@@ -189,23 +219,24 @@ public class TaskesTimateServiceImpl extends ZtBaseServiceImpl<TaskesTimateEntit
|
|
long end = System.currentTimeMillis();
|
|
long end = System.currentTimeMillis();
|
|
String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
|
String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmss");
|
|
String savePath = configConstant.serverBasePath + time + ".xlsx";
|
|
String savePath = configConstant.serverBasePath + time + ".xlsx";
|
|
- HashMap<String, String> rowTitle = new HashMap<>();
|
|
|
|
|
|
+// HashMap<String, String> rowTitle = new HashMap<>();
|
|
|
|
+ // 2023-07-12 需要按顺序
|
|
|
|
+ LinkedHashMap<String, String> rowTitle = new LinkedHashMap<>();
|
|
|
|
|
|
- rowTitle.put("slack", "工号");
|
|
|
|
rowTitle.put("date", "日期");
|
|
rowTitle.put("date", "日期");
|
|
- rowTitle.put("task", "任务号");
|
|
|
|
- rowTitle.put("project", "项目id");
|
|
|
|
- rowTitle.put("code", "项目号");
|
|
|
|
- rowTitle.put("projectName", "项目名称");
|
|
|
|
rowTitle.put("account", "账号");
|
|
rowTitle.put("account", "账号");
|
|
|
|
+ rowTitle.put("slack", "工号");
|
|
rowTitle.put("realname", "姓名");
|
|
rowTitle.put("realname", "姓名");
|
|
|
|
+ rowTitle.put("deptName", "部门名称");
|
|
rowTitle.put("consumed", "消耗时间(天)");
|
|
rowTitle.put("consumed", "消耗时间(天)");
|
|
|
|
+ rowTitle.put("task", "任务号");
|
|
|
|
+ rowTitle.put("code", "项目号");
|
|
|
|
+ rowTitle.put("projectName", "项目名称");
|
|
|
|
+ rowTitle.put("moduleName", "模块名称");
|
|
|
|
+ rowTitle.put("taskName", "任务名称");
|
|
rowTitle.put("deptId", "部门Id");
|
|
rowTitle.put("deptId", "部门Id");
|
|
- rowTitle.put("deptName", "部门名称");
|
|
|
|
|
|
+ rowTitle.put("project", "项目id");
|
|
|
|
|
|
- // 2022-2-24 by owen 新增
|
|
|
|
- rowTitle.put("taskName", "任务名称");
|
|
|
|
- rowTitle.put("moduleName", "模块名称");
|
|
|
|
ExcelUtils.createExcel(effortVos, savePath, rowTitle);
|
|
ExcelUtils.createExcel(effortVos, savePath, rowTitle);
|
|
|
|
|
|
log.info("sql耗时: {}s", (end-start)/1000);
|
|
log.info("sql耗时: {}s", (end-start)/1000);
|