|
|
@@ -85,6 +85,8 @@ public class CreateRyZjDailyReportOrderJob implements JobHandler {
|
|
|
deptTypeReqVO.setType("zj");
|
|
|
List<IotDeptTypeDO> deptTypes = iotDeptTypeMapper.selectList(deptTypeReqVO);
|
|
|
Set<Long> zjDeptIds = new HashSet<>();
|
|
|
+ // 包含设备但是也要生成空日报的队伍
|
|
|
+ Set<Long> zjContainsDeviceDeptIds = new HashSet<>();
|
|
|
// 无设备 的部门id集合
|
|
|
Set<Long> affiliatedDeptIds = new HashSet<>();
|
|
|
// key部门id value日报填报人id
|
|
|
@@ -108,6 +110,10 @@ public class CreateRyZjDailyReportOrderJob implements JobHandler {
|
|
|
usernames.add(deptType.getCreator());
|
|
|
deptUsernamePair.put(deptType.getDeptId(), deptType.getCreator());
|
|
|
}
|
|
|
+ // 包含设备的队伍也要生成空日报 录井1队
|
|
|
+ if (StrUtil.isNotBlank(deptType.getCategory())) {
|
|
|
+ zjContainsDeviceDeptIds.add(deptType.getDeptId());
|
|
|
+ }
|
|
|
});
|
|
|
// 根据 用户账号 查询用户id 无设备队伍 日报填报人
|
|
|
if (CollUtil.isNotEmpty(usernames)) {
|
|
|
@@ -142,7 +148,7 @@ public class CreateRyZjDailyReportOrderJob implements JobHandler {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- // 查询瑞鹰所有队伍关联的设备 筛选出不包含任何设备的队伍
|
|
|
+ // 查询瑞鹰所有队伍关联的设备 筛选出不包含任何设备的队伍 包含设备的队伍 也需要生成日报 如 录井1队
|
|
|
IotDevicePageReqVO reqVO = new IotDevicePageReqVO();
|
|
|
reqVO.setDeptIds(new ArrayList<>(ryTeamDeptIds));
|
|
|
List<IotDeviceDO> devices = iotDeviceMapper.selectListAlone(reqVO);
|
|
|
@@ -158,6 +164,9 @@ public class CreateRyZjDailyReportOrderJob implements JobHandler {
|
|
|
.filter(deptId -> !containsDeviceDeptIds.contains(deptId))
|
|
|
.collect(Collectors.toSet());
|
|
|
|
|
|
+ // 合并 包含设备设备但是也要生成空日报的队伍 录井1队
|
|
|
+ noDeviceZjDeptIds.addAll(zjContainsDeviceDeptIds);
|
|
|
+
|
|
|
// 查询 无设备 钻井 队伍 日报列表
|
|
|
IotRyDailyReportPageReqVO ryReqVO = new IotRyDailyReportPageReqVO();
|
|
|
ryReqVO.setDeptIds(noDeviceZjDeptIds);
|