|
@@ -642,6 +642,19 @@ public class IotRhDailyReportController {
|
|
|
if (CollUtil.isNotEmpty(projectDeptIds)) {
|
|
if (CollUtil.isNotEmpty(projectDeptIds)) {
|
|
|
projectDeptMap = deptService.getDeptMap(projectDeptIds);
|
|
projectDeptMap = deptService.getDeptMap(projectDeptIds);
|
|
|
}
|
|
}
|
|
|
|
|
+ // 查询每个队伍对应的项目部名称集合
|
|
|
|
|
+ Map<Long, String> projectDeptNamePair = new HashMap<>();
|
|
|
|
|
+ if (CollUtil.isNotEmpty(deptMap)) {
|
|
|
|
|
+ Map<Long, DeptDO> finalProjectDeptMap1 = projectDeptMap;
|
|
|
|
|
+ deptMap.forEach((deptId, dept) -> {
|
|
|
|
|
+ if (finalProjectDeptMap1.containsKey(dept.getParentId())) {
|
|
|
|
|
+ DeptDO parentDept = finalProjectDeptMap1.get(dept.getParentId());
|
|
|
|
|
+ if (ObjUtil.isNotEmpty(parentDept)) {
|
|
|
|
|
+ projectDeptNamePair.put(deptId, parentDept.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
// 设置施工队伍与 上级项目部对应关系
|
|
// 设置施工队伍与 上级项目部对应关系
|
|
|
if (CollUtil.isNotEmpty(deptMap)) {
|
|
if (CollUtil.isNotEmpty(deptMap)) {
|
|
|
Map<Long, DeptDO> finalProjectDeptMap = projectDeptMap;
|
|
Map<Long, DeptDO> finalProjectDeptMap = projectDeptMap;
|
|
@@ -872,6 +885,8 @@ public class IotRhDailyReportController {
|
|
|
}
|
|
}
|
|
|
// 2.1 拼接部门信息
|
|
// 2.1 拼接部门信息
|
|
|
findAndThen(deptMap, reportVO.getDeptId(), dept -> reportVO.setDeptName(dept.getName()));
|
|
findAndThen(deptMap, reportVO.getDeptId(), dept -> reportVO.setDeptName(dept.getName()));
|
|
|
|
|
+ // 2.1 拼接项目部信息
|
|
|
|
|
+ findAndThen(projectDeptNamePair, reportVO.getDeptId(), projectDeptName -> reportVO.setProjectDeptName(projectDeptName));
|
|
|
// 队伍当年累计注气量
|
|
// 队伍当年累计注气量
|
|
|
findAndThen(yearGasInjectionPair, reportVO.getDeptId(), gasInjection -> {
|
|
findAndThen(yearGasInjectionPair, reportVO.getDeptId(), gasInjection -> {
|
|
|
// 转换单位为 万方
|
|
// 转换单位为 万方
|