Quellcode durchsuchen

评估项目作废

sangwenwei vor 1 Jahr
Ursprung
Commit
5c2b138ed5

+ 1 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramReportCancellationMapper.java

@@ -14,6 +14,6 @@ public interface ProgramReportCancellationMapper extends BaseMapper<ProgramRepor
     void deleteByCanId(@Param("id") String id);
 
     void updateInfoById(ProgramReportCancellation cancellation);
-
+    //根据报告类型和当前年份查询报告号作废表中的报告号
     ProgramReportCancellation getInfos(@Param("type") String type,@Param("currentYear") String currentYear);
 }

+ 119 - 68
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/ProjectListService.java

@@ -166,25 +166,26 @@ public class ProjectListService {
             String currentYear = String.valueOf(currentDate.getYear());
             if(StringUtils.isNotBlank(info.getReportType())){
                 //用于查询报告号时不同的报告类型
-                String type = "";
-                if (info.getReportType().equals("1")){
-                    //先从报告号作废表中查询当年是否还有未被使用的报告号
-                    type = "报字";
-                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
-                    if (ObjectUtil.isNotEmpty(infos)){
-                        reportNo = infos.getReportNo();
-                    }else {
-                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
-                    }
-                } else if (info.getReportType().equals("2")) {
-                    type = "咨字";
-                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
-                    if (ObjectUtil.isNotEmpty(infos)){
-                        reportNo = infos.getReportNo();
-                    }else {
-                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
-                    }
-                }
+//                String type = "";
+//                if (info.getReportType().equals("1")){
+//                    //先从报告号作废表中查询当年是否还有未被使用的报告号
+//                    type = "报字";
+//                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+//                    if (ObjectUtil.isNotEmpty(infos)){
+//                        reportNo = infos.getReportNo();
+//                    }else {
+//                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
+//                    }
+//                } else if (info.getReportType().equals("2")) {
+//                    type = "咨字";
+//                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+//                    if (ObjectUtil.isNotEmpty(infos)){
+//                        reportNo = infos.getReportNo();
+//                    }else {
+//                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
+//                    }
+//                }
+                reportNo = this.generateReportNo(info.getReportType());
                 ProgramReportNo programReportNo = new ProgramReportNo();
                 programReportNo.setProgramId(id);
                 programReportNo.setReportNo(reportNo);
@@ -404,15 +405,22 @@ public class ProjectListService {
                     if (programAuditDto.getStatus().equals("5")) {
                         if (projectListInfo.getGenerateReportNumber().equals("false")) {
                             if(StringUtils.isNotBlank(projectListInfo.getReportType())){
-                                if (projectListInfo.getReportType().equals("1")){
-                                    reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
-                                } else if (projectListInfo.getReportType().equals("2")) {
-                                    reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
-                                }
+//                                if (projectListInfo.getReportType().equals("1")){
+//                                    reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
+//                                } else if (projectListInfo.getReportType().equals("2")) {
+//                                    reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
+//                                }
+                                //生成报告号
+                                reportNo = this.generateReportNo(projectListInfo.getReportType());
                                 ProgramReportNo programReportNo = new ProgramReportNo();
                                 programReportNo.setProgramId(projectListInfo.getId());
                                 programReportNo.setReportNo(reportNo);
                                 programReportNoMapper.insert(programReportNo);
+                                //根据报告号去报告号作废表中查询数据,并进行逻辑删除
+                                ProgramReportCancellation byReportNo = reportCancellationMapper.getByReportNo(reportNo);
+                                if (ObjectUtil.isNotEmpty(byReportNo)){
+                                    reportCancellationMapper.deleteById(byReportNo.getId());
+                                }
                             }
                         }
                     }
@@ -470,26 +478,27 @@ public class ProjectListService {
             ProgramReportNo programReportNo = programReportNoMapper.selectByProgramId(info.getId());
             if (null == programReportNo) {
                 if(StringUtils.isNotBlank(info.getReportType())){
-                    //用于查询报告号时不同的报告类型
-                    String type = "";
-                    if (info.getReportType().equals("1")) {
-                        //先从报告号作废表中查询当年是否还有未被使用的报告号
-                        type = "报字";
-                        ProgramReportCancellation infos = reportCancellationMapper.getInfos(type,currentYear);
-                        if (ObjectUtil.isNotEmpty(infos)) {
-                            reportNo = infos.getReportNo();
-                        } else {
-                            reportNo = SpringUtil.getBean(IWorkAttachmentApi.class).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE, currentToken);
-                        }
-                    }else if (info.getReportType().equals("2")) {
-                        type = "咨字";
-                        ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
-                        if (ObjectUtil.isNotEmpty(infos)){
-                            reportNo = infos.getReportNo();
-                        }else {
-                            reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
-                        }
-                    }
+//                    //用于查询报告号时不同的报告类型
+//                    String type = "";
+//                    if (info.getReportType().equals("1")) {
+//                        //先从报告号作废表中查询当年是否还有未被使用的报告号
+//                        type = "报字";
+//                        ProgramReportCancellation infos = reportCancellationMapper.getInfos(type,currentYear);
+//                        if (ObjectUtil.isNotEmpty(infos)) {
+//                            reportNo = infos.getReportNo();
+//                        } else {
+//                            reportNo = SpringUtil.getBean(IWorkAttachmentApi.class).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE, currentToken);
+//                        }
+//                    }else if (info.getReportType().equals("2")) {
+//                        type = "咨字";
+//                        ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+//                        if (ObjectUtil.isNotEmpty(infos)){
+//                            reportNo = infos.getReportNo();
+//                        }else {
+//                            reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
+//                        }
+//                    }
+                    reportNo = this.generateReportNo(info.getReportType());
                     programReportNo = new ProgramReportNo();
                     programReportNo.setProgramId(info.getId());
                     programReportNo.setReportNo(reportNo);
@@ -533,6 +542,11 @@ public class ProjectListService {
                                 programReport.setId(programReportNo1.getId());
                                 programReport.setReportNo(reportNo);
                                 programReportNoMapper.updateById(programReport);
+                                //根据报告号去报告号作废表中查询数据,并进行逻辑删除
+                                ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(reportNo);
+                                if (ObjectUtil.isNotEmpty(byReportNo1)){
+                                    reportCancellationMapper.deleteById(byReportNo1.getId());
+                                }
                             }
                         }
                     }
@@ -2114,10 +2128,6 @@ public class ProjectListService {
         //根据id查询项目
         ProgramCancellation programCancellation = programCancellationMapper.selectById(dto.getCancellId());
         if (ObjectUtil.isNotEmpty(programCancellation)){
-            // 获取当前日期
-            LocalDate currentDate = LocalDate.now();
-            // 获取当前年份
-            String currentYear = String.valueOf(currentDate.getYear());
             ProgramProjectListInfo listInfo = projectListMapper.getById(programCancellation.getProjectId());
             if (ObjectUtil.isNotEmpty(listInfo) && "true".equals(listInfo.getGenerateReportNumber())){
                 //根据报告号去报告号作废表中是否有该报告号
@@ -2133,31 +2143,37 @@ public class ProjectListService {
                         String reportNo = "";
                         if (("true").equals(listInfo.getGenerateReportNumber())) {
                             if(StringUtils.isNotBlank(listInfo.getReportType())){
-                                //用于查询报告号时不同的报告类型
-                                String type = "";
-                                if (listInfo.getReportType().equals("1")){
-                                    //先从报告号作废表中查询当年是否还有未被使用的报告号
-                                    type = "报字";
-                                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
-                                    if (ObjectUtil.isNotEmpty(infos)){
-                                        reportNo = infos.getReportNo();
-                                    }else {
-                                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
-                                    }
-                                } else if (listInfo.getReportType().equals("2")) {
-                                    type = "咨字";
-                                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
-                                    if (ObjectUtil.isNotEmpty(infos)){
-                                        reportNo = infos.getReportNo();
-                                    }else {
-                                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
-                                    }
-                                }
+//                                //用于查询报告号时不同的报告类型
+//                                String type = "";
+//                                if (listInfo.getReportType().equals("1")){
+//                                    //先从报告号作废表中查询当年是否还有未被使用的报告号
+//                                    type = "报字";
+//                                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+//                                    if (ObjectUtil.isNotEmpty(infos)){
+//                                        reportNo = infos.getReportNo();
+//                                    }else {
+//                                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
+//                                    }
+//                                } else if (listInfo.getReportType().equals("2")) {
+//                                    type = "咨字";
+//                                    ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+//                                    if (ObjectUtil.isNotEmpty(infos)){
+//                                        reportNo = infos.getReportNo();
+//                                    }else {
+//                                        reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
+//                                    }
+//                                }
+                                reportNo = this.generateReportNo(listInfo.getReportType());
                                 ProgramReportNo programReportNo = programReportNoMapper.selectByProgramId(listInfo.getId());
                                 ProgramReportNo programReport = new ProgramReportNo();
                                 programReport.setId(programReportNo.getId());
                                 programReport.setReportNo(reportNo);
                                 programReportNoMapper.updateById(programReport);
+                                //根据报告号去报告号作废表中查询数据,并进行逻辑删除
+                                ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(reportNo);
+                                if (ObjectUtil.isNotEmpty(byReportNo1)){
+                                    reportCancellationMapper.deleteById(byReportNo1.getId());
+                                }
                             }
                         }
                     }
@@ -2253,4 +2269,39 @@ public class ProjectListService {
         List<ProgramReportNo> list=programReportNoMapper.getCancelledProject();
         return list;
     }
+
+    /**
+     * 用于生成报告号
+     */
+    private String generateReportNo(String reportType) throws Exception {
+        String currentToken = TokenProvider.getCurrentToken();
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+
+        String reportNo="";
+        // 获取当前日期
+        LocalDate currentDate = LocalDate.now();
+        // 获取当前年份
+        String currentYear = String.valueOf(currentDate.getYear());
+        //用于查询报告号时不同的报告类型
+        String type = "";
+        if (reportType.equals("1")){
+            //先从报告号作废表中查询当年是否还有未被使用的报告号
+            type = "报字";
+            ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+            if (ObjectUtil.isNotEmpty(infos)){
+                reportNo = infos.getReportNo();
+            }else {
+                reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE,currentToken);
+            }
+        } else if (reportType.equals("2")) {
+            type = "咨字";
+            ProgramReportCancellation infos=reportCancellationMapper.getInfos(type,currentYear);
+            if (ObjectUtil.isNotEmpty(infos)){
+                reportNo = infos.getReportNo();
+            }else {
+                reportNo = SpringUtil.getBean ( IWorkAttachmentApi.class ).genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_,currentToken);
+            }
+        }
+        return reportNo;
+    }
 }

+ 6 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/controller/ReimbursementInfoController.java

@@ -108,6 +108,12 @@ public class ReimbursementInfoController {
         List<TreeUserDto> list = service.userTree(name);
         return ResponseEntity.ok(list);
     }
+    @ApiOperation(value = "用户树形")
+    @GetMapping(value = "/userTree2")
+    public ResponseEntity<List<TreeUserDto>> userTree2(@RequestParam String name) {
+        List<TreeUserDto> list = service.userTree2(name);
+        return ResponseEntity.ok(list);
+    }
 
 
     @ApiLog(value = "评估报销数据")

+ 4 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java

@@ -88,5 +88,9 @@ public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
     @InterceptorIgnore(tenantLine = "true")
     List<TreeUserDto> findZhglgsUserList( @Param("name")String name);
     @InterceptorIgnore(tenantLine = "true")
+    List<TreeUserDto> findZhglgsUserList2( @Param("name")String name);
+    @InterceptorIgnore(tenantLine = "true")
     List<TreeUserDto> finduserAllList(@Param("name")String name);
+    @InterceptorIgnore(tenantLine = "true")
+    List<TreeUserDto> findCertUserList(@Param("name")String name);
 }

+ 36 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -186,6 +186,42 @@
 		</if>
 	</select>
 
+	<select id="findCertUserList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0'
+		WHERE
+		a.del_flag = 0 and a.is_admin is null and sc.type = '6' and a.tenant_id = '10003'
+		<if test="name != null and name != ''">
+			and a.`name` LIKE CONCAT ('%', #{name}, '%')
+		</if>
+	</select>
+
+	<select id="findZhglgsUserList2" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0'
+		WHERE
+		a.del_flag = 0 and a.is_admin is null and a.tenant_id = '10002' and sc.type = '6'
+		<if test="name != null and name != ''">
+			and a.`name` LIKE CONCAT ('%', #{name}, '%')
+		</if>
+	</select>
+
 
 	<select id="findExportList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
 		SELECT

+ 148 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -831,6 +831,154 @@ public class ReimbursementInfoService {
         return newList;
     }
 
+    //用户树形(用于查询会计公司有资质的员工)
+    public List<TreeUserDto> userTree2(String name) {
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        List<TreeUserDto> list = new ArrayList<>();
+        List<TreeUserDto> officeList = Lists.newArrayList();
+        // 查询部门
+        if(userDTO.isAdmin() || (null != userDTO.getTenantDTO() && "10002".equals(userDTO.getTenantDTO().getId()))){
+            officeList = infoMapper.findOfficeListByNotTenantId("10000");
+        }else{
+            officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
+        }
+        List<TreeUserDto> filterList = new ArrayList<>();
+        filterList.addAll(officeList);
+        //查询综合管理公司
+        UserDTO dtoByName = SpringUtil.getBean(IUserApi.class).getByLoginNameNoTen("潘中");
+        List<TreeUserDto> officeList1 = infoMapper.findOfficeListByCompanyId2(dtoByName.getCompanyDTO().getId());
+        filterList.addAll(officeList1);
+        ArrayList<TreeUserDto> treeUsers = new ArrayList<>();
+        //如果当前登录人角色是多公司报销则查询全部公司
+//        if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
+//            for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
+//                RoleDTO roleDTOById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
+//                if (roleDTOById.getEnName().equals("dgsbx")|| roleDTOById.getEnName().equals("zjbry")){
+//                    List<TreeUserDto> officeList2 = infoMapper.findOfficeList2();
+//                    filterList.addAll(officeList2);
+//                    List<TreeUserDto> users=infoMapper.finduserAllList(name);
+//                    treeUsers.addAll(users);
+//                }
+//            }
+//        }
+        /*if (userDTO.isAdmin ()) {
+            filterList = officeList;
+        } else {
+            String parentIds = SpringUtil.getBean ( IOfficeApi.class ).selectById(userDTO.getOfficeDTO().getId()).getParentIds();
+            String[] split = parentIds.split(",");
+            if(split.length>2){
+                // 公司id
+                String companyId = split[2];
+                // 过滤出登录人所属公司和集团
+                List<TreeUserDto> finalFilterList5 = filterList;
+                officeList.stream().forEach(o -> {
+                    if (split[2].equals(o.getId())) {
+                        finalFilterList5.add(o);
+                    } else if(split[1].equals(o.getId())) {
+                        finalFilterList5.add(o);
+                    }
+                });
+                // 根据公司id找到其下部门
+                List<Office> oList = SpringUtil.getBean ( IOfficeApi.class ).selectListByParentId(companyId);
+                // 过滤出这些部门
+                List<TreeUserDto> finalFilterList4 = filterList;
+                oList.stream().forEach(item -> {
+                    officeList.stream().forEach(o -> {
+                        if (item.getId().equals(o.getId())) {
+                            finalFilterList4.add(o);
+                        }
+                    });
+                });
+                // 找到所有的公有部门
+                List<Office> publicOfficeList = SpringUtil.getBean ( IOfficeApi.class ).selectListByIsPublic("1");
+                // 过滤出这些部门
+                List<TreeUserDto> finalFilterList3 = filterList;
+                publicOfficeList.stream().forEach(item -> {
+                    officeList.stream().forEach(o -> {
+                        if (item.getId().equals(o.getId())) {
+                            finalFilterList3.add(o);
+                        }
+                    });
+                });
+            }else{
+                // 私有的
+                if ("0".equals(userDTO.getOfficeDTO().getIsPublic())) {
+                    // 公司id
+                    String companyId = userDTO.getOfficeDTO().getId();
+                    // 过滤出登录人所属公司和集团
+                    List<TreeUserDto> finalFilterList2 = filterList;
+                    officeList.stream().forEach(o -> {
+                        if (companyId.equals(o.getId())) {
+                            finalFilterList2.add(o);
+                        } else if(split[1].equals(o.getId()) && !split[1].equals(companyId)) {
+                            finalFilterList2.add(o);
+                        }
+                    });
+                    // 根据公司id找到其下部门
+                    List<Office> oList = SpringUtil.getBean ( IOfficeApi.class ).selectListByParentId(companyId);
+                    // 过滤出这些部门
+                    List<TreeUserDto> finalFilterList1 = filterList;
+                    oList.stream().forEach(item -> {
+                        officeList.stream().forEach(o -> {
+                            if (item.getId().equals(o.getId())) {
+                                finalFilterList1.add(o);
+                            }
+                        });
+                    });
+                    // 找到所有的公有部门
+                    List<Office> publicOfficeList = SpringUtil.getBean ( IOfficeApi.class ).selectListByIsPublic("1");
+                    // 过滤出这些部门
+                    List<TreeUserDto> finalFilterList = filterList;
+                    publicOfficeList.stream().forEach(item -> {
+                        officeList.stream().forEach(o -> {
+                            if (item.getId().equals(o.getId())) {
+                                finalFilterList.add(o);
+                            }
+                        });
+                    });
+                } else {
+                    filterList = officeList;
+                }
+            }
+        }*/
+
+        /*if (CollectionUtils.isNotEmpty(officeList)) {
+            list.addAll(officeList);
+        }*/
+        //如果当前登录人是会计公司,则查询有资质的员工
+        if ("10003".equals(userDTO.getTenantDTO().getId())){
+            List<TreeUserDto> certUserList = infoMapper.findCertUserList(name);
+            treeUsers.addAll(certUserList);
+        }
+        // 查询用户
+//        List<TreeUserDto> userList = infoMapper.findUserList(name);
+        //查询综合管理公司用户信息
+        List<TreeUserDto> userList1=infoMapper.findZhglgsUserList2(name);
+        /*if (CollectionUtils.isNotEmpty(userList)) {
+            list.addAll(userList);
+        }*/
+        ArrayList<TreeUserDto> treeUserDtos = new ArrayList<>();
+//        treeUserDtos.addAll(userList);
+        treeUserDtos.addAll(userList1);
+        treeUserDtos.addAll(treeUsers);
+        list = disposeUserTree(treeUserDtos, filterList);
+        for (TreeUserDto officeDto : officeList) {
+            if("0".equals(officeDto.getParentId())){
+                list.add(officeDto);
+            }
+        }
+        for (TreeUserDto officeDto : officeList1) {
+            if("0".equals(officeDto.getParentId())){
+                list.add(officeDto);
+            }
+        }
+        //去重
+        List<TreeUserDto> newList = list.stream().collect(Collectors.collectingAndThen(
+                Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TreeUserDto::getId))), ArrayList::new)
+        );
+        return newList;
+    }
+
     /**
      * 用户树形数据处理
      * @param userList