包头bug修复
This commit is contained in:
parent
31576f7b57
commit
e1b6b2dba0
@ -131,6 +131,7 @@ public class PlanPbsController {
|
|||||||
})
|
})
|
||||||
@GetMapping(value = "/tree/page")
|
@GetMapping(value = "/tree/page")
|
||||||
public Result<IPage<PlanPbs>> queryTreePage(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
public Result<IPage<PlanPbs>> queryTreePage(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||||
|
param.put("seeI", null);
|
||||||
return Result.success(planPbsService.queryTreePage(param));
|
return Result.success(planPbsService.queryTreePage(param));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.plan.controller;
|
package com.zhgd.xmgl.modules.baotou.plan.controller;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
@ -790,17 +791,22 @@ public class PlanRecordController {
|
|||||||
}
|
}
|
||||||
//将项目清单集合添加到map中
|
//将项目清单集合添加到map中
|
||||||
map.put("listMap", listMap);
|
map.put("listMap", listMap);
|
||||||
|
Map<Integer, Map<String, Object>> root = new HashMap<>(3);
|
||||||
|
root.put(0, map);
|
||||||
|
root.put(1, new HashMap<>());
|
||||||
|
Map<String, Object> userMap = new HashMap<>();
|
||||||
|
List<Map<String, Object>> userListMap = new ArrayList<>();
|
||||||
|
userMap.put("userList", userListMap);
|
||||||
|
root.put(2, userMap);
|
||||||
File out = Fileutils.getExportTemplateFile("excel/plan/计划编制模板导出.xlsx");
|
File out = Fileutils.getExportTemplateFile("excel/plan/计划编制模板导出.xlsx");
|
||||||
TemplateExportParams params = new TemplateExportParams(out.getAbsolutePath(), 0);
|
TemplateExportParams params = new TemplateExportParams(out.getAbsolutePath(), root.keySet().toArray(new Integer[]{}));
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(params, map);
|
Workbook workbook = ExcelExportUtil.exportExcel(root, params);
|
||||||
//下拉
|
//下拉
|
||||||
XSSFSheet sheet7 = (XSSFSheet) workbook.getSheet("责任人");
|
|
||||||
if (users.size() > 0) {
|
if (users.size() > 0) {
|
||||||
for (int i = 0; i < users.size(); i++) {
|
for (int i = 0; i < users.size(); i++) {
|
||||||
XSSFRow row1 = sheet7.createRow(i);
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
XSSFCell cell1 = row1.createCell(0);
|
hashMap.put("userName", users.get(i).getRealName());
|
||||||
cell1.setCellType(CellType.STRING);
|
userListMap.add(hashMap);
|
||||||
cell1.setCellValue(users.get(i).getRealName());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExcelUtils.downLoadExcel("计划编制模板导出.xlsx", response, workbook);
|
ExcelUtils.downLoadExcel("计划编制模板导出.xlsx", response, workbook);
|
||||||
@ -828,7 +834,7 @@ public class PlanRecordController {
|
|||||||
mp.put("plannedFinish", DateUtil.formatDateTime(planRecord.getPlannedFinish()));
|
mp.put("plannedFinish", DateUtil.formatDateTime(planRecord.getPlannedFinish()));
|
||||||
mp.put("actualStart", DateUtil.formatDateTime(planRecord.getActualStart()));
|
mp.put("actualStart", DateUtil.formatDateTime(planRecord.getActualStart()));
|
||||||
mp.put("actualFinish", DateUtil.formatDateTime(planRecord.getActualFinish()));
|
mp.put("actualFinish", DateUtil.formatDateTime(planRecord.getActualFinish()));
|
||||||
mp.put("weightRate", planRecord.getWeightRate());
|
mp.put("weightRate", Optional.ofNullable(planRecord.getWeightRate()).map(m -> m.multiply(new BigDecimal("0.01")).setScale(2, RoundingMode.HALF_UP)).orElse(null));
|
||||||
mp.put("chargerName", Optional.ofNullable(userIdMap.get(planRecord.getChargerId())).map(SystemUser::getRealName).orElse(""));
|
mp.put("chargerName", Optional.ofNullable(userIdMap.get(planRecord.getChargerId())).map(SystemUser::getRealName).orElse(""));
|
||||||
mp.put("plannedDuration", planRecord.getPlannedDuration());
|
mp.put("plannedDuration", planRecord.getPlannedDuration());
|
||||||
Optional.ofNullable(ridToMilestoneListMap.get(planRecord.getId())).ifPresent(planMilestones -> {
|
Optional.ofNullable(ridToMilestoneListMap.get(planRecord.getId())).ifPresent(planMilestones -> {
|
||||||
|
|||||||
@ -893,7 +893,7 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
|||||||
|
|
||||||
}
|
}
|
||||||
levelIds.set(parentLevelIndex + 1, excelRecord.getId());
|
levelIds.set(parentLevelIndex + 1, excelRecord.getId());
|
||||||
levelAncestors.set(parentLevelIndex + 1, excelRecord.getAncestors());
|
levelAncestors.set(parentLevelIndex + 1, excelRecord.getAncestors() + "," + excelRecord.getId());
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(addPlanMilestones)) {
|
if (CollUtil.isNotEmpty(addPlanMilestones)) {
|
||||||
planMilestoneService.saveBatch(addPlanMilestones);
|
planMilestoneService.saveBatch(addPlanMilestones);
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user