소스 검색

pms 5#国任务列表查询 兼容任务数量为空的情况

zhangcl 1 주 전
부모
커밋
41b7ed39ac

+ 6 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotprojectinfo/IotProjectInfoServiceImpl.java

@@ -275,6 +275,8 @@ public class IotProjectInfoServiceImpl implements IotProjectInfoService {
             ryChildDeptIds.add(158l);
             Set<Long> rdChildDeptIds = deptService.getChildDeptIdListFromCache(163l);
             rdChildDeptIds.add(163l);
+            Set<Long> fiveChildDeptIds = deptService.getChildDeptIdListFromCache(388l);
+            fiveChildDeptIds.add(388l);
             if (rhChildDeptIds.contains(deptId)) {
                 // 当前登录所属公司为 瑞恒
                 allChildDeptIds.add(157l);
@@ -287,6 +289,10 @@ public class IotProjectInfoServiceImpl implements IotProjectInfoService {
                 // 当前登录所属公司为 瑞都
                 allChildDeptIds.add(163l);
             }
+            if (fiveChildDeptIds.contains(deptId)) {
+                // 当前登录所属公司为 5#公司
+                allChildDeptIds.add(388l);
+            }
         });
 
         return allChildDeptIds;

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/iotprojecttask/IotProjectTaskServiceImpl.java

@@ -297,6 +297,9 @@ public class IotProjectTaskServiceImpl implements IotProjectTaskService {
                 dataPermissionTaskIds.add(task.getId());
             });
         }
+        if (CollUtil.isEmpty(dataPermissionTaskIds)) {
+            return new PageResult<>(new ArrayList<>(), 0l);
+        }
         Set<Long> departmentIds = new HashSet<>();
 
         // 客户名称模板搜索