feige
2024-08-24 8da97927452fc3485168db17d9e948f4180ee0a8
修改权限相关
1个文件已修改
27 ■■■■ 已修改文件
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java
@@ -421,12 +421,15 @@
//        lqw.between(zInfoUser.getBirth() != null, ZInfoUser::getBirth, zInfoUser.getBirth(),zInfoUser.getBirth());
        lqw.eq(zInfoUser.getClanId()!=null, ZInfoUser::getClanId,zInfoUser.getClanId());
        List<ZInfoUser> allPeopleList = list(lqw);
        System.out.println(allPeopleList);
        System.out.println("============z=============zzzzzzzzzzzzzzzzzzz");
//        List<ZInfoUser> allPeopleList = list();
        List<ZInfoUser> result = null;
        try {
            result = allPeopleList.stream().filter(people -> people.getUserId() != 1 && ((people.getFatherId()!=null&&people.getFatherId() == 0) || (people.getMomId()!=null&&people.getMomId() == 0)))
                    .map(people -> {
                        if (depth > 1) {
                        if (depth >= 1) {
                            people.setIdentity(1);
                            people.setChildList(fillChildren2(people, allPeopleList, depth - 1));
                        }
@@ -436,6 +439,7 @@
            throw new RuntimeException("您在加入成员的时候没有指定该成员的父亲或者母亲");
        }
        System.out.println(result);
//        result.stream().map(
//                data->{
@@ -478,9 +482,11 @@
     */
    @Override
    public AjaxResult listGenealogy(Genealogy genealogy, Integer pageNum, Integer pageSize) {
        userList.clear();
        List<ZInfoUser> treeList = (List<ZInfoUser>) listWithTreeByCondition(100, genealogy).get("data");
        recursionFindUser(treeList);
      //  System.out.println(userList);
        System.out.println("---------------");
        List<Genealogy> allData = userList.stream().map(
                zInfoUser -> {
                    Genealogy newGenealogy = new Genealogy();
@@ -496,10 +502,12 @@
                        spouseInfo.setSpouseName(zInfoUser.getNickName());
                        newGenealogy.setSpouseName(spouse.getNickName());
                    }
                    System.out.println(newGenealogy);
                    return newGenealogy;
                }
        ).collect(Collectors.toList());
        System.out.println(allData);
        System.out.println("999999999988888888888++++++++++++++++++++++");
        List<Genealogy> collect = allData.stream()
                .distinct()
                .filter((data)-> data.getIsMyFamily() == 1)
@@ -513,8 +521,10 @@
            }
            resultData.add(collect.get(i));
        }
        System.out.println(resultData);
        System.out.println("999999999988888888888++++++++++++++++++++++");
//
//
        //对result做一个条件筛选
        Iterator<Genealogy> it = resultData.iterator();
        while(it.hasNext()){
@@ -565,6 +575,7 @@
        System.out.println(resultData);
        System.out.println("================++++++++++++++66666666666666666999999999");
//        for (Genealogy data : resultData) {
@@ -893,7 +904,7 @@
        // layer = layer + 1;
        System.out.println(depth);
        List<ZInfoUser> collect = allPeopleList.stream().filter(
                one -> (one.getFatherId() == people.getUserId() || one.getMomId() == people.getUserId())
                one ->  Objects.equals(one.getFatherId(), people.getUserId()) ||  Objects.equals(one.getMomId(),people.getUserId())
        ).map(
                one -> {
                    if (depth == 1)
@@ -909,14 +920,14 @@
                        }
                        List<ZInfoUser> zinfo = fillChildren2(one, allPeopleList, depth - 1);
                        one.setChildList(zinfo);
                        System.out.println(one);
                       // System.out.println(one);
                        return one;
                    }
                    //return one;
                }
        ).collect(Collectors.toList());
        System.out.println(collect);
       // System.out.println(collect);
        return collect;
    }