|
@@ -1013,7 +1013,8 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
|
|
|
|
|
// 构建项目部映射和父子部门关系
|
|
// 构建项目部映射和父子部门关系
|
|
|
depts.forEach(dept -> {
|
|
depts.forEach(dept -> {
|
|
|
- if ("2".equals(dept.getType())) {
|
|
|
|
|
|
|
+ // 暂时过滤掉 欧洲项目部 克拉玛依项目部
|
|
|
|
|
+ if ("2".equals(dept.getType()) && dept.getId() != 352 && dept.getId() != 166) {
|
|
|
// 项目部
|
|
// 项目部
|
|
|
projectDeptIds.add(dept.getId());
|
|
projectDeptIds.add(dept.getId());
|
|
|
projectDeptPair.put(dept.getId(), dept);
|
|
projectDeptPair.put(dept.getId(), dept);
|
|
@@ -1035,11 +1036,20 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
LocalDate endLocalDate = endTime.toLocalDate();
|
|
LocalDate endLocalDate = endTime.toLocalDate();
|
|
|
if (startLocalDate.isEqual(endLocalDate)) {
|
|
if (startLocalDate.isEqual(endLocalDate)) {
|
|
|
// 查询日期区间是 同一天
|
|
// 查询日期区间是 同一天
|
|
|
- // 设置每个项目部下的队伍数量
|
|
|
|
|
|
|
+ // 设置每个项目部下的队伍数量 只筛选 包含设备的队伍数量
|
|
|
|
|
+ Set<Long> deviceDeptIds = new HashSet<>();
|
|
|
|
|
+ IotDevicePageReqVO deviceReqVO = new IotDevicePageReqVO();
|
|
|
|
|
+ deviceReqVO.setDeptIds(new ArrayList<>(allRhChildDeptIds));
|
|
|
|
|
+ List<IotDeviceDO> devices = iotDeviceMapper.selectListAlone(deviceReqVO);
|
|
|
|
|
+ if (CollUtil.isNotEmpty(devices)) {
|
|
|
|
|
+ devices.forEach(device -> {
|
|
|
|
|
+ deviceDeptIds.add(device.getDeptId());
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
projectDeptPair.forEach((projectDeptId, projectDept) -> {
|
|
projectDeptPair.forEach((projectDeptId, projectDept) -> {
|
|
|
- // 找到每个项目部下的队伍
|
|
|
|
|
|
|
+ // 找到每个项目部下的队伍 只筛选 包含设备的队伍
|
|
|
teamProjectIdPair.forEach((deptId, parentDeptId) -> {
|
|
teamProjectIdPair.forEach((deptId, parentDeptId) -> {
|
|
|
- if (parentDeptId.equals(projectDeptId)) {
|
|
|
|
|
|
|
+ if (parentDeptId.equals(projectDeptId) && deviceDeptIds.contains(deptId)) {
|
|
|
if (teamCountPair.containsKey(projectDeptId)) {
|
|
if (teamCountPair.containsKey(projectDeptId)) {
|
|
|
Integer tempCount = teamCountPair.get(projectDeptId);
|
|
Integer tempCount = teamCountPair.get(projectDeptId);
|
|
|
teamCountPair.put(projectDeptId, ++tempCount);
|
|
teamCountPair.put(projectDeptId, ++tempCount);
|