无关风月
7 天以前 53d014edd19f57125c355abe71ec5b478500e610
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ReportController.java
@@ -77,6 +77,8 @@
    @Resource
    private ISysUserService sysUserService;
    @Resource
    private TInspectorDetailService inspectorDetailService;
    @Resource
    private TDictDataService dictDataService;
    @Resource
    private TokenService tokenService;
@@ -135,7 +137,7 @@
            if (patrolInspectorIds.isEmpty()) {
                return R.ok(new PageInfo<>());
            }
            if (!query.getPatrolInspectorIds().isEmpty()) {
            if (query.getPatrolInspectorIds()!=null&&!query.getPatrolInspectorIds().isEmpty()) {
                // 取交集
                patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
            }
@@ -234,13 +236,21 @@
    public void taskProgressExport(@RequestBody TaskProgressQuery query) {
        List<SysUser> sysUsers = sysUserService.selectAllList();
        if (StringUtils.hasLength(query.getDeptName())) {
            List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list()
            List<TProjectDept> list = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list();
            List<String> projectIds = list
                    .stream().map(TProjectDept::getId).collect(Collectors.toList());
            List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list()
                    .stream().map(TDept::getId).collect(Collectors.toList());
            for (TProjectDept projectDept : list) {
                if (projectDept.getParentId().equals("0")){
                    List<TProjectDept> list1 = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()).list();
                    List<String> collect = list1.stream().map(TProjectDept::getId).collect(Collectors.toList());
                    projectIds.addAll(collect);
                }
            }
            projectIds.addAll(deptIds);
            if (projectIds.isEmpty()) {
                projectIds.add("-1");
                projectIds.add("0");
            }
            // 用户ids
            List<Long> collect = sysUsers.stream().filter(e -> e.getDeptType() == 1 && projectIds.contains(e.getDeptId())).map(SysUser::getUserId)
@@ -249,7 +259,7 @@
                    .collect(Collectors.toList());
            collect.addAll(collect1);
            if (collect.isEmpty()) {
                collect.add(0L);
projectIds.add("0");
            }
            query.setPatrolInspectorIds(collect);
@@ -661,25 +671,25 @@
            entityList.add(excelExportEntity1);
        }
        ExcelExportEntity excelExportEntity8 = new ExcelExportEntity("整改完成任务", "total", 15);
        ExcelExportEntity excelExportEntity8 = new ExcelExportEntity("整改完成任务", "num7", 15);
        excelExportEntity8.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity8);
        ExcelExportEntity excelExportEntity7 = new ExcelExportEntity("超时未执行任务", "total", 15);
        ExcelExportEntity excelExportEntity7 = new ExcelExportEntity("超时未执行任务", "num6", 15);
        excelExportEntity7.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity7);
        ExcelExportEntity excelExportEntity6 = new ExcelExportEntity("审核通过任务", "total", 15);
        ExcelExportEntity excelExportEntity6 = new ExcelExportEntity("审核通过任务", "num5", 15);
        excelExportEntity6.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity6);
        ExcelExportEntity excelExportEntity5 = new ExcelExportEntity("待整改任务", "total", 15);
        ExcelExportEntity excelExportEntity5 = new ExcelExportEntity("待整改任务", "num4", 15);
        excelExportEntity5.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity5);
        ExcelExportEntity excelExportEntity4 = new ExcelExportEntity("未执行任务", "total", 15);
        ExcelExportEntity excelExportEntity4 = new ExcelExportEntity("未执行任务", "num3", 15);
        excelExportEntity4.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity4);
        ExcelExportEntity excelExportEntity3 = new ExcelExportEntity("清洁不合格", "total", 15);
        ExcelExportEntity excelExportEntity3 = new ExcelExportEntity("清洁不合格", "num2", 15);
        excelExportEntity3.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity3);
        ExcelExportEntity excelExportEntity2 = new ExcelExportEntity("清洁合格", "total", 15);
        ExcelExportEntity excelExportEntity2 = new ExcelExportEntity("清洁合格", "num1", 15);
        excelExportEntity2.setGroupName("任务情况汇总");
        entityList.add(excelExportEntity2);
        ExcelExportEntity excelExportEntity1 = new ExcelExportEntity("总数", "total", 15);
@@ -711,6 +721,7 @@
                map.put("num6", row.getNum6());
                map.put("num7", row.getNum7());
                mapList.add(map);
                break;
            }
        }
@@ -829,7 +840,9 @@
                    if (tProjectDept1 != null)
                        patrolInspectorVO.setDeptName(tProjectDept1.getProjectName() + ">" + tProjectDept.getProjectName());
                } else {
                    patrolInspectorVO.setDeptName(tProjectDept.getProjectName());
                    if (tProjectDept != null){
                        patrolInspectorVO.setDeptName(tProjectDept.getProjectName());
                    }
                }
            } else {
                TDept tDept = deptService.getById(sysUser.getDeptId());
@@ -912,10 +925,18 @@
        tLeaveLambdaQueryWrapper.eq(TLeave::getAuditStatus, 2);
        List<TLeave> leaves = leaveService.list(tLeaveLambdaQueryWrapper);
        if (StringUtils.hasLength(query.getDeptName())) {
            List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list()
            List<TProjectDept> list = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list();
            List<String> projectIds = list
                    .stream().map(TProjectDept::getId).collect(Collectors.toList());
            List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list()
                    .stream().map(TDept::getId).collect(Collectors.toList());
            for (TProjectDept projectDept : list) {
                if (projectDept.getParentId().equals("0")){
                    List<TProjectDept> list1 = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()).list();
                    List<String> collect = list1.stream().map(TProjectDept::getId).collect(Collectors.toList());
                    projectIds.addAll(collect);
                }
            }
            projectIds.addAll(deptIds);
            if (projectIds.isEmpty()) {
                projectIds.add("-1");
@@ -1099,43 +1120,78 @@
    @PostMapping(value = "/inspectorList")
    public R<List<InspectorVO>> inspectorList(@RequestBody InspectorQuery query) {
        List<SysUser> sysUsers = sysUserService.selectAllList();
        List<TInspectorDetail> list2 = inspectorDetailService.list();
        List<TTask> listAll = taskCleanerService.list();
        List<String> listAllTaskIds = listAll.stream().map(TTask::getId).collect(Collectors.toList());
        List<TLocation> locations = locationService.list();
        if (StringUtils.hasLength(query.getDeptName())) {
            List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list()
            List<TProjectDept> list = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list();
            List<String> projectIds = list
                    .stream().map(TProjectDept::getId).collect(Collectors.toList());
            List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list()
                    .stream().map(TDept::getId).collect(Collectors.toList());
            for (TProjectDept projectDept : list) {
                if (projectDept.getParentId().equals("0")){
                        List<TProjectDept> list1 = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()).list();
                        List<String> collect = list1.stream().map(TProjectDept::getId).collect(Collectors.toList());
                        projectIds.addAll(collect);
                }
            }
            projectIds.addAll(deptIds);
            if (projectIds.isEmpty()) {
                return R.ok(new ArrayList<>());
                projectIds.add("0");
            }
            // 用户ids
            List<Long> collect = sysUsers.stream().filter(e -> e.getDeptType() == 1 && projectIds.contains(e.getDeptId())).map(SysUser::getUserId)
                    .collect(Collectors.toList());
            List<Long> collect1 = sysUsers.stream().filter(e -> e.getDeptType() == 2 && deptIds.contains(e.getDeptId())).map(SysUser::getUserId)
                    .collect(Collectors.toList());
            collect.addAll(collect1);
            if (collect.isEmpty()) {
            collect.add(-1L);
            }
            query.setPatrolInspectorIds(collect);
            if (StringUtils.hasLength(query.getPhonenumber())) {
                List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                        sysUser.getPhonenumber().equals(query.getPhonenumber())
                                && projectIds.contains(sysUser.getDeptId())
                ).map(SysUser::getUserId).collect(Collectors.toList());
                if (patrolInspectorIds.isEmpty()) {
                    return R.ok(new ArrayList<>());
                    patrolInspectorIds.add(-1L);
                } else {
                    patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
                    query.setPatrolInspectorIds(patrolInspectorIds);
                }
                query.setPatrolInspectorIds(patrolInspectorIds);
            }
        }
        if (StringUtils.hasLength(query.getPhonenumber())) {
        if (StringUtils.hasLength(query.getNickName())){
            List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                    sysUser.getPhonenumber().equals(query.getPhonenumber())
                    sysUser.getNickName().contains(query.getNickName())
            ).map(SysUser::getUserId).collect(Collectors.toList());
            if (!query.getPatrolInspectorIds().isEmpty()) {
            if (query.getPatrolInspectorIds()!=null&&!query.getPatrolInspectorIds().isEmpty()){
                // 取交集
                patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
            if (patrolInspectorIds.isEmpty()) {
                return R.ok(new ArrayList<>());
            if (patrolInspectorIds.isEmpty()){
                patrolInspectorIds.add(-1L);
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
        }
        if (StringUtils.hasLength(query.getPhonenumber())){
            List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                    sysUser.getPhonenumber().contains(query.getPhonenumber())
            ).map(SysUser::getUserId).collect(Collectors.toList());
            if (query.getPatrolInspectorIds()!=null&&!query.getPatrolInspectorIds().isEmpty()){
                // 取交集
                patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
            }
            if (patrolInspectorIds.isEmpty()){
                patrolInspectorIds.add(-1L);
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
        }
        LambdaQueryWrapper<TInspector> tTaskLambdaQueryWrapper = new LambdaQueryWrapper<>();
        tTaskLambdaQueryWrapper.eq(TInspector::getAuditStatus, 1);
        tTaskLambdaQueryWrapper.isNotNull(TInspector::getClearStatus);
        if (StringUtils.hasLength(query.getStartTime())) {
            tTaskLambdaQueryWrapper.ge(TInspector::getCreateTime, query.getStartTime());
@@ -1147,12 +1203,21 @@
                patrolInspectorIds.add(0L);
                query.setPatrolInspectorIds(patrolInspectorIds);
            }
            tTaskLambdaQueryWrapper.in(TInspector::getCommitPerson, query.getPatrolInspectorIds());
            List<String> collect = locations.stream().filter(e -> query.getPatrolInspectorIds().contains(Long.valueOf(e.getLocationLeader())))
                    .map(TLocation::getId).collect(Collectors.toList());
            tTaskLambdaQueryWrapper.in(TInspector::getLocationId, collect);
            sysUsers = sysUsers.stream().filter(sysUser -> query.getPatrolInspectorIds().contains(sysUser.getUserId())).collect(Collectors.toList());
        }
        List<InspectorVO> res = new ArrayList<>();
        List<TInspector> inspectors = inspectorService.list(tTaskLambdaQueryWrapper);
        sysUsers = sysUsers.stream().filter(e -> e.getUserId() != 1).collect(Collectors.toList());
        List<String> locationIds = inspectors.stream().map(TInspector::getLocationId).collect(Collectors.toList());
        if (locationIds.isEmpty()){
            locationIds.add("0");
        }
        List<String> userIds = locations.stream().filter(e -> locationIds.contains(e.getId())).map(TLocation::getLocationLeader)
                .collect(Collectors.toList());
        sysUsers = sysUsers.stream().filter(e -> e.getUserId() != 1&&userIds.contains(e.getUserId()+"")).collect(Collectors.toList());
        for (SysUser sysUser : sysUsers) {
            InspectorVO inspectorVO = new InspectorVO();
            inspectorVO.setNickName(sysUser.getNickName());
@@ -1171,22 +1236,25 @@
                if (tDept != null)
                    inspectorVO.setDeptName(tDept.getDeptName());
            }
            List<String> collect1 = listAll.stream().filter(e -> e.getPatrolInspector().equals(sysUser.getUserId() + "")).map(TTask::getId).collect(Collectors.toList());
            List<TInspector> collect = inspectors.stream().filter(e -> collect1.contains(e.getTaskId())).collect(Collectors.toList());
            List<String> collect1 = locations.stream().filter(e -> e.getLocationLeader().equals(sysUser.getUserId() + "")).map(TLocation::getId).collect(Collectors.toList());
            List<TInspector> collect = inspectors.stream().filter(e -> collect1.contains(e.getLocationId())).collect(Collectors.toList());
            List<String> collect3 = collect.stream().map(TInspector::getId).collect(Collectors.toList());
            List<TInspectorDetail> collect2 = list2.stream().filter(e -> collect3.contains(e.getInspectorId()))
                    .collect(Collectors.toList());
            inspectorVO.setTotal(collect.size());
            List<TInspector> status1 = collect.stream().filter(e -> e.getClearStatus() == 1).collect(Collectors.toList());
            List<TInspector> status2 = collect.stream().filter(e -> e.getClearStatus() == 2).collect(Collectors.toList());
            List<TInspector> status4 = collect.stream().filter(e -> e.getStatus() == 1).collect(Collectors.toList());
            List<TInspector> status5 = collect.stream().filter(e -> e.getStatus() == 2).collect(Collectors.toList());
            List<TInspector> status6 = collect.stream().filter(e -> e.getStatus() == 3).collect(Collectors.toList());
            inspectorVO.setNum1(status1.size());
            inspectorVO.setNum2(status2.size());
            inspectorVO.setNum3(!status1.isEmpty() || !status2.isEmpty() ? new BigDecimal(status1.size()).divide(new BigDecimal(status2.size() + status1.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal(100)) : BigDecimal.ZERO);
            inspectorVO.setNum3(!status1.isEmpty() ? new BigDecimal(status1.size()).divide(new BigDecimal(status2.size() + status1.size()), 2, RoundingMode.HALF_DOWN) : BigDecimal.ZERO);
            inspectorVO.setNum4(status4.size());
            inspectorVO.setNum5(status5.size());
            inspectorVO.setNum6(status6.size());
            inspectorVO.setNum7(!status6.isEmpty() || !status5.isEmpty() ? new BigDecimal(status6.size()).divide(new BigDecimal(status5.size() + status6.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal(100)) : new BigDecimal(0));
            inspectorVO.setNum7(!status6.isEmpty() ? new BigDecimal(status6.size()).divide(new BigDecimal(status5.size() + status6.size()), 2, RoundingMode.HALF_DOWN) : new BigDecimal(0));
            res.add(inspectorVO);
        }
        return R.ok(res);
@@ -1198,43 +1266,78 @@
    public void inspectorListExport(@RequestBody InspectorQuery query) {
        query.setPatrolInspectorIds(null);
        List<SysUser> sysUsers = sysUserService.selectAllList();
        List<TInspectorDetail> list2 = inspectorDetailService.list();
        List<TTask> listAll = taskCleanerService.list();
        List<String> listAllTaskIds = listAll.stream().map(TTask::getId).collect(Collectors.toList());
        List<TLocation> locations = locationService.list();
        if (StringUtils.hasLength(query.getDeptName())) {
            List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list()
            List<TProjectDept> list = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list();
            List<String> projectIds = list
                    .stream().map(TProjectDept::getId).collect(Collectors.toList());
            List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list()
                    .stream().map(TDept::getId).collect(Collectors.toList());
            for (TProjectDept projectDept : list) {
                if (projectDept.getParentId().equals("0")){
                    List<TProjectDept> list1 = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()).list();
                    List<String> collect = list1.stream().map(TProjectDept::getId).collect(Collectors.toList());
                    projectIds.addAll(collect);
                }
            }
            projectIds.addAll(deptIds);
            if (projectIds.isEmpty()) {
                projectIds.add("-1");
                projectIds.add("0");
            }
            // 用户ids
            List<Long> collect = sysUsers.stream().filter(e -> e.getDeptType() == 1 && projectIds.contains(e.getDeptId())).map(SysUser::getUserId)
                    .collect(Collectors.toList());
            List<Long> collect1 = sysUsers.stream().filter(e -> e.getDeptType() == 2 && deptIds.contains(e.getDeptId())).map(SysUser::getUserId)
                    .collect(Collectors.toList());
            collect.addAll(collect1);
            if (collect.isEmpty()) {
                collect.add(-1L);
            }
            query.setPatrolInspectorIds(collect);
            if (StringUtils.hasLength(query.getPhonenumber())) {
                List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                        sysUser.getPhonenumber().equals(query.getPhonenumber())
                                && projectIds.contains(sysUser.getDeptId())
                ).map(SysUser::getUserId).collect(Collectors.toList());
                if (patrolInspectorIds.isEmpty()) {
                    patrolInspectorIds.add(0L);
                    patrolInspectorIds.add(-1L);
                } else {
                    patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
                    query.setPatrolInspectorIds(patrolInspectorIds);
                }
                query.setPatrolInspectorIds(patrolInspectorIds);
            }
        }
        if (StringUtils.hasLength(query.getPhonenumber())) {
        if (StringUtils.hasLength(query.getNickName())){
            List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                    sysUser.getPhonenumber().equals(query.getPhonenumber())
                    sysUser.getNickName().contains(query.getNickName())
            ).map(SysUser::getUserId).collect(Collectors.toList());
            if (!query.getPatrolInspectorIds().isEmpty()) {
            if (query.getPatrolInspectorIds()!=null&&!query.getPatrolInspectorIds().isEmpty()){
                // 取交集
                patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
            if (patrolInspectorIds.isEmpty()) {
                patrolInspectorIds.add(0L);
            if (patrolInspectorIds.isEmpty()){
                patrolInspectorIds.add(-1L);
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
        }
        if (StringUtils.hasLength(query.getPhonenumber())){
            List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser ->
                    sysUser.getPhonenumber().contains(query.getPhonenumber())
            ).map(SysUser::getUserId).collect(Collectors.toList());
            if (query.getPatrolInspectorIds()!=null&&!query.getPatrolInspectorIds().isEmpty()){
                // 取交集
                patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList());
            }
            if (patrolInspectorIds.isEmpty()){
                patrolInspectorIds.add(-1L);
            }
            query.setPatrolInspectorIds(patrolInspectorIds);
        }
        LambdaQueryWrapper<TInspector> tTaskLambdaQueryWrapper = new LambdaQueryWrapper<>();
        tTaskLambdaQueryWrapper.eq(TInspector::getAuditStatus, 1);
        tTaskLambdaQueryWrapper.isNotNull(TInspector::getClearStatus);
        if (StringUtils.hasLength(query.getStartTime())) {
            tTaskLambdaQueryWrapper.ge(TInspector::getCreateTime, query.getStartTime());
@@ -1246,12 +1349,21 @@
                patrolInspectorIds.add(0L);
                query.setPatrolInspectorIds(patrolInspectorIds);
            }
            tTaskLambdaQueryWrapper.in(TInspector::getCommitPerson, query.getPatrolInspectorIds());
            List<String> collect = locations.stream().filter(e -> query.getPatrolInspectorIds().contains(Long.valueOf(e.getLocationLeader())))
                    .map(TLocation::getId).collect(Collectors.toList());
            tTaskLambdaQueryWrapper.in(TInspector::getLocationId, collect);
            sysUsers = sysUsers.stream().filter(sysUser -> query.getPatrolInspectorIds().contains(sysUser.getUserId())).collect(Collectors.toList());
        }
        List<InspectorVO> res = new ArrayList<>();
        List<TInspector> inspectors = inspectorService.list(tTaskLambdaQueryWrapper);
        sysUsers = sysUsers.stream().filter(e -> e.getUserId() != 1).collect(Collectors.toList());
        List<String> locationIds = inspectors.stream().map(TInspector::getLocationId).collect(Collectors.toList());
        if (locationIds.isEmpty()){
            locationIds.add("0");
        }
        List<String> userIds = locations.stream().filter(e -> locationIds.contains(e.getId())).map(TLocation::getLocationLeader)
                .collect(Collectors.toList());
        sysUsers = sysUsers.stream().filter(e -> e.getUserId() != 1&&userIds.contains(e.getUserId()+"")).collect(Collectors.toList());
        for (SysUser sysUser : sysUsers) {
            InspectorVO inspectorVO = new InspectorVO();
            inspectorVO.setNickName(sysUser.getNickName());
@@ -1270,22 +1382,25 @@
                if (tDept != null)
                    inspectorVO.setDeptName(tDept.getDeptName());
            }
            List<String> collect1 = listAll.stream().filter(e -> e.getPatrolInspector().equals(sysUser.getUserId() + "")).map(TTask::getId).collect(Collectors.toList());
            List<TInspector> collect = inspectors.stream().filter(e -> collect1.contains(e.getTaskId())).collect(Collectors.toList());
            List<String> collect1 = locations.stream().filter(e -> e.getLocationLeader().equals(sysUser.getUserId() + "")).map(TLocation::getId).collect(Collectors.toList());
            List<TInspector> collect = inspectors.stream().filter(e -> collect1.contains(e.getLocationId())).collect(Collectors.toList());
            List<String> collect3 = collect.stream().map(TInspector::getId).collect(Collectors.toList());
            List<TInspectorDetail> collect2 = list2.stream().filter(e -> collect3.contains(e.getInspectorId()))
                    .collect(Collectors.toList());
            inspectorVO.setTotal(collect.size());
            List<TInspector> status1 = collect.stream().filter(e -> e.getClearStatus() == 1).collect(Collectors.toList());
            List<TInspector> status2 = collect.stream().filter(e -> e.getClearStatus() == 2).collect(Collectors.toList());
            List<TInspector> status4 = collect.stream().filter(e -> e.getStatus() == 1).collect(Collectors.toList());
            List<TInspector> status5 = collect.stream().filter(e -> e.getStatus() == 2).collect(Collectors.toList());
            List<TInspector> status6 = collect.stream().filter(e -> e.getStatus() == 3).collect(Collectors.toList());
            inspectorVO.setNum1(status1.size());
            inspectorVO.setNum2(status2.size());
            inspectorVO.setNum3(!status1.isEmpty() || !status2.isEmpty() ? new BigDecimal(status1.size()).divide(new BigDecimal(status2.size() + status1.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal(100)) : BigDecimal.ZERO);
            inspectorVO.setNum3(!status1.isEmpty() ? new BigDecimal(status1.size()).divide(new BigDecimal(status2.size() + status1.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal("100")) : BigDecimal.ZERO);
            inspectorVO.setNum4(status4.size());
            inspectorVO.setNum5(status5.size());
            inspectorVO.setNum6(status6.size());
            inspectorVO.setNum7(!status6.isEmpty() || !status5.isEmpty() ? new BigDecimal(status6.size()).divide(new BigDecimal(status5.size() + status6.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal(100)) : new BigDecimal(0));
            inspectorVO.setNum7(!status6.isEmpty() ? new BigDecimal(status6.size()).divide(new BigDecimal(status5.size() + status6.size()), 2, RoundingMode.HALF_DOWN).multiply(new BigDecimal("100")) : new BigDecimal(0));
            res.add(inspectorVO);
        }
        //1.获取excel模板