|
|
@@ -538,6 +538,7 @@ public class IotRhDailyReportController {
|
|
|
|
|
|
// 查询指定部门下所有子部门
|
|
|
Set<Long> childDeptIds = deptService.getChildDeptIdListFromCache(deptId);
|
|
|
+ childDeptIds.add(deptId);
|
|
|
Map<Long, DeptDO> allDeptPair = deptService.getDeptMap(childDeptIds);
|
|
|
// 查询 瑞恒 所有设备 只统计包含 施工 状态设备的队伍
|
|
|
IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
|
|
|
@@ -566,9 +567,15 @@ public class IotRhDailyReportController {
|
|
|
// 遍历所有部门 只筛选出有设备的队伍
|
|
|
allDeptPair.forEach((departmentId, dept) -> {
|
|
|
// 不需要找出每个项目部下的队伍 根据筛选的日期和部门 统计数据
|
|
|
- if (projectPair.containsKey(dept.getParentId()) && haveDeviceDeptIds.contains(departmentId)) {
|
|
|
- // 获得队伍的上级项目部(LY状态的项目部)
|
|
|
- teamProjectIdPair.put(dept.getId(), dept.getParentId());
|
|
|
+ if (haveDeviceDeptIds.contains(departmentId)) {
|
|
|
+ if (projectPair.containsKey(dept.getParentId())) {
|
|
|
+ // 获得队伍的上级项目部(LY状态的项目部)
|
|
|
+ teamProjectIdPair.put(dept.getId(), dept.getParentId());
|
|
|
+ }ma
|
|
|
+ if (allDeptPair.size() == 1) {
|
|
|
+ // 查询单个队伍的情况
|
|
|
+ teamProjectIdPair.put(dept.getId(), dept.getParentId());
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|