xuhy
9 天以前 9364cf6824389a3264dc2cdb2bc3b5857ce76ad5
bug修改
2个文件已修改
172 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WorkbenchesController.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -77,12 +77,21 @@
            if (deptType == 1) {
                // 查询片区
                TProjectDept projectDept = projectDeptService.getById(deptId);
                // 查询项目部
                TProjectDept parent = projectDeptService.getById(projectDept.getParentId());
                List<TProjectDept> children = new ArrayList<>();
                children.add(projectDept);
                parent.setChildren(children);
                projectDeptList.add(parent);
                if("0".equals(projectDept.getParentId())){
                    // 查询项目部
                    List<TProjectDept> childProjectDept = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                            .eq(TProjectDept::getStatus,1)
                            .eq(TProjectDept::getParentId,projectDept.getId()));
                    projectDept.setChildren(childProjectDept);
                    projectDeptList.add(projectDept);
                }else {
                    // 查询项目部
                    TProjectDept parent = projectDeptService.getById(projectDept.getParentId());
                    List<TProjectDept> children = new ArrayList<>();
                    children.add(projectDept);
                    parent.setChildren(children);
                    projectDeptList.add(parent);
                }
            }else {
                projectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                        .eq(TProjectDept::getStatus,1)
@@ -153,8 +162,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -264,8 +282,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -379,8 +406,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -518,8 +554,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -576,7 +621,7 @@
                    .eq(TDictData::getDataType, 2));
            List<AnalysisUnqualifiedCleaningDetailVO> analysisUnqualifiedCleaningDetailVOS = new ArrayList<>();
            for (TDictData tDictData : dictDataList) {
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> StringUtils.isNotEmpty(taskDetail.getUnqualified())&&taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                AnalysisUnqualifiedCleaningDetailVO analysisUnqualifiedCleaningDetailVO = new AnalysisUnqualifiedCleaningDetailVO();
                analysisUnqualifiedCleaningDetailVO.setUnqualifiedName(tDictData.getDataContent());
                analysisUnqualifiedCleaningDetailVO.setCount(tTaskDetails.size());
@@ -645,7 +690,7 @@
                    .eq(TDictData::getDataType, 2));
            List<AnalysisUnqualifiedCleaningDetailVO> analysisUnqualifiedCleaningDetailVOS = new ArrayList<>();
            for (TDictData tDictData : dictDataList) {
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> org.springframework.util.StringUtils.hasLength(taskDetail.getUnqualified())&& taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> StringUtils.isNotEmpty(taskDetail.getUnqualified())&& taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                AnalysisUnqualifiedCleaningDetailVO analysisUnqualifiedCleaningDetailVO = new AnalysisUnqualifiedCleaningDetailVO();
                analysisUnqualifiedCleaningDetailVO.setUnqualifiedName(tDictData.getDataContent());
                analysisUnqualifiedCleaningDetailVO.setCount(tTaskDetails.size());
@@ -707,8 +752,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -994,8 +1048,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -1141,8 +1204,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WorkbenchesController.java
@@ -189,8 +189,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -345,8 +354,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -519,8 +537,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -682,8 +709,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -796,8 +832,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -951,8 +996,17 @@
            if (deptType == 1) {
                // 项目部人员
                if(CollectionUtils.isEmpty(query.getProjectId())){
                    TProjectDept projectDept = projectDeptService.getById(deptId);
                    List<String> projectIds = new ArrayList<>();
                    projectIds.add(deptId);
                    if("0".equals(projectDept.getParentId())){
                        List<TProjectDept> tProjectDeptList = projectDeptService.list(Wrappers.lambdaQuery(TProjectDept.class)
                                .eq(TProjectDept::getStatus, 1)
                                .eq(TProjectDept::getParentId, projectDept.getId()));
                        List<String> ids = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(ids);
                    }else {
                        projectIds.add(deptId);
                    }
                    query.setProjectId(projectIds);
                }
            }else {
@@ -1010,7 +1064,7 @@
                    .eq(TDictData::getDataType, 2));
            List<AnalysisUnqualifiedCleaningDetailVO> analysisUnqualifiedCleaningDetailVOS = new ArrayList<>();
            for (TDictData tDictData : dictDataList) {
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> StringUtils.isNotEmpty(taskDetail.getUnqualified())&&taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                AnalysisUnqualifiedCleaningDetailVO analysisUnqualifiedCleaningDetailVO = new AnalysisUnqualifiedCleaningDetailVO();
                analysisUnqualifiedCleaningDetailVO.setUnqualifiedName(tDictData.getDataContent());
                analysisUnqualifiedCleaningDetailVO.setCount(tTaskDetails.size());
@@ -1079,7 +1133,7 @@
                    .eq(TDictData::getDataType, 2));
            List<AnalysisUnqualifiedCleaningDetailVO> analysisUnqualifiedCleaningDetailVOS = new ArrayList<>();
            for (TDictData tDictData : dictDataList) {
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                List<TTaskDetail> tTaskDetails = taskDetailList.stream().filter(taskDetail -> StringUtils.isNotEmpty(taskDetail.getUnqualified())&&taskDetail.getUnqualified().equals(tDictData.getId())).collect(Collectors.toList());
                AnalysisUnqualifiedCleaningDetailVO analysisUnqualifiedCleaningDetailVO = new AnalysisUnqualifiedCleaningDetailVO();
                analysisUnqualifiedCleaningDetailVO.setUnqualifiedName(tDictData.getDataContent());
                analysisUnqualifiedCleaningDetailVO.setCount(tTaskDetails.size());