|
|
@@ -518,6 +518,8 @@ public class IotRhDailyReportController {
|
|
|
Set<String> projectDeptNames = new HashSet<>();
|
|
|
// 项目部id集合
|
|
|
Set<Long> projectDeptIds = new HashSet<>();
|
|
|
+ // 队伍id集合
|
|
|
+ Set<Long> teamIds = new HashSet<>();
|
|
|
// key项目部id value项目部名称
|
|
|
Map<Long, String> projectPair = new HashMap<>();
|
|
|
// key施工队伍id value状态为LY的项目部id
|
|
|
@@ -563,12 +565,15 @@ public class IotRhDailyReportController {
|
|
|
projectDeptNames.add(dept.getName());
|
|
|
projectPair.put(departmentId, dept.getName());
|
|
|
}
|
|
|
+ if ("3".equals(dept.getType())) {
|
|
|
+ teamIds.add(departmentId);
|
|
|
+ }
|
|
|
});
|
|
|
// 遍历所有部门 只筛选出有设备的队伍
|
|
|
allDeptPair.forEach((departmentId, dept) -> {
|
|
|
// 不需要找出每个项目部下的队伍 根据筛选的日期和部门 统计数据
|
|
|
if (haveDeviceDeptIds.contains(departmentId)) {
|
|
|
- if (projectPair.containsKey(dept.getParentId())) {
|
|
|
+ if (projectPair.containsKey(dept.getParentId()) && teamIds.contains(departmentId)) {
|
|
|
// 获得队伍的上级项目部(LY状态的项目部)
|
|
|
teamProjectIdPair.put(dept.getId(), dept.getParentId());
|
|
|
}
|