|  | @@ -278,11 +278,13 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
 | 
	
		
			
				|  |  |          List <OfficeDTO> offices = Lists.newArrayList ( );
 | 
	
		
			
				|  |  |          parentId = StrUtil.isEmpty ( parentId ) ? OfficeDTO.getRootId ( ) : parentId;
 | 
	
		
			
				|  |  |          for (OfficeDTO root : list) {
 | 
	
		
			
				|  |  | -            if ( parentId.equals ( root.getParentId ( ) ) ) {
 | 
	
		
			
				|  |  | -                if ( this.isUseAble ( extId, type, root, showAll ) ) {
 | 
	
		
			
				|  |  | -                    // 不是被排除节点的子节点
 | 
	
		
			
				|  |  | -                    List <OfficeDTO> officeList = formatListToTree ( root, list, extId, type, showAll );
 | 
	
		
			
				|  |  | -                    offices.addAll ( officeList );
 | 
	
		
			
				|  |  | +            if (!root.getName().equals("平台运营")){
 | 
	
		
			
				|  |  | +                if ( parentId.equals ( root.getParentId ( ) ) ) {
 | 
	
		
			
				|  |  | +                    if ( this.isUseAble ( extId, type, root, showAll ) ) {
 | 
	
		
			
				|  |  | +                        // 不是被排除节点的子节点
 | 
	
		
			
				|  |  | +                        List <OfficeDTO> officeList = formatListToTree ( root, list, extId, type, showAll );
 | 
	
		
			
				|  |  | +                        offices.addAll ( officeList );
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -518,4 +520,47 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
 | 
	
		
			
				|  |  |      public List<Office> selectListByIsPublic(String isPublic){
 | 
	
		
			
				|  |  |          return officeMapper.selectListByIsPublic(isPublic);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public List getFinanceTree(List<OfficeDTO> objects, String extId, String type, String showAll, String showMyOffice) {
 | 
	
		
			
				|  |  | +        List<OfficeDTO> offices = Lists.newArrayList ();
 | 
	
		
			
				|  |  | +        // 获取到所有parent_id为‘0’的部门数据
 | 
	
		
			
				|  |  | +        List<Office> children = officeMapper.getChild(OfficeDTO.getRootId());
 | 
	
		
			
				|  |  | +        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
 | 
	
		
			
				|  |  | +        for (OfficeDTO root : rootTrees) {
 | 
	
		
			
				|  |  | +            if (root.getName().equals("兴光会计师事务所")||root.getName().equals("综合管理公司")){
 | 
	
		
			
				|  |  | +                if (this.isUseAble ( extId, type,root, showAll )){
 | 
	
		
			
				|  |  | +                    // 不是被排除节点的子节点
 | 
	
		
			
				|  |  | +                    List<OfficeDTO> officeList = formatListToTree (root, objects, extId, type, showAll);
 | 
	
		
			
				|  |  | +                    offices.addAll (officeList);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotBlank(showMyOffice)) {
 | 
	
		
			
				|  |  | +            OfficeDTO officeDTO = UserUtils.getCurrentUserDTO().getOfficeDTO();
 | 
	
		
			
				|  |  | +            // 排除管理员
 | 
	
		
			
				|  |  | +            if (!UserUtils.getCurrentUserDTO().isAdmin()){
 | 
	
		
			
				|  |  | +                if (org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())) {
 | 
	
		
			
				|  |  | +                    String[] split = officeDTO.getParentIds().split(",");
 | 
	
		
			
				|  |  | +                    if (split.length > 2) {
 | 
	
		
			
				|  |  | +                        Office office = officeMapper.selectById(split[2]);
 | 
	
		
			
				|  |  | +                        if ("0".equals(office.getIsPublic())) {
 | 
	
		
			
				|  |  | +                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
 | 
	
		
			
				|  |  | +                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
 | 
	
		
			
				|  |  | +                                offices = this.getCompanyFromTree(offices);
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        if ("0".equals(officeDTO.getIsPublic())) {
 | 
	
		
			
				|  |  | +                            // isPublic为“0”,当前用户的公司为私有,查询的部门包含自己所属公司全部部门和其他的公有部门
 | 
	
		
			
				|  |  | +                            if(null != officeDTO && org.apache.commons.lang.StringUtils.isNotBlank(officeDTO.getParentIds())){
 | 
	
		
			
				|  |  | +                                offices = this.getCompanyFromTree(offices);
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return offices;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |