|  | @@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.poi.excel.ExcelUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.poi.excel.ExcelWriter;
 | 
	
		
			
				|  |  |  import com.alibaba.fastjson2.JSON;
 | 
	
		
			
				|  |  | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.metadata.IPage;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
	
	
		
			
				|  | @@ -37,7 +36,6 @@ import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  import java.io.IOException;
 | 
	
		
			
				|  |  |  import java.net.URLEncoder;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  | -import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  import java.util.stream.Stream;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
	
		
			
				|  | @@ -62,7 +60,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              page = new Page<>();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        final List<Long> list = dealParentOrgId(sysLearningMaterials.getOrgId());
 | 
	
		
			
				|  |  | +        final List<Long> list = dealParentOrgId(sysLearningMaterials.getOrgId(), true);
 | 
	
		
			
				|  |  |          sysLearningMaterials.setOrgIdList(list);
 | 
	
		
			
				|  |  |          sysLearningMaterials.setUserId(SecurityUtils.getUserId());
 | 
	
		
			
				|  |  |          //获取数据
 | 
	
	
		
			
				|  | @@ -79,7 +77,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |          return tableDataInfo;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    private List<Long> dealParentOrgId(Long orgId) {
 | 
	
		
			
				|  |  | +    private List<Long> dealParentOrgId(Long orgId, Boolean isNeedRemoveSelf) {
 | 
	
		
			
				|  |  |          SysOrg sysOrg = remoteOrgService.selectSysOrgById(orgId, SecurityConstants.INNER);
 | 
	
		
			
				|  |  |          if (sysOrg == null || ObjectUtil.isEmpty(sysOrg.getPath())) {
 | 
	
		
			
				|  |  |              throw new RuntimeException("机构不存在或机构信息缺失!");
 | 
	
	
		
			
				|  | @@ -87,7 +85,9 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |          String[] split = sysOrg.getPath().split("-");
 | 
	
		
			
				|  |  |          List<Long> list = new ArrayList<>();
 | 
	
		
			
				|  |  |          Stream.of(split).forEach(s -> list.add(Long.valueOf(s)));
 | 
	
		
			
				|  |  | -        //list.remove(sysLearningMaterials.getOrgId());
 | 
	
		
			
				|  |  | +        if (isNeedRemoveSelf) {
 | 
	
		
			
				|  |  | +            list.remove(orgId);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          return list;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -208,7 +208,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public TableDataInfo filePageList(SysLearningMaterialsFileListPageDto request) {
 | 
	
		
			
				|  |  | -        final List<Long> list = dealParentOrgId(request.getOrgId());
 | 
	
		
			
				|  |  | +        final List<Long> list = dealParentOrgId(request.getOrgId(), false);
 | 
	
		
			
				|  |  |          request.setOrgIdList(list);
 | 
	
		
			
				|  |  |          final IPage<SysLearningMaterialsFileListVo> page = sysLearningMaterialsMapper.selectFilePageList(request.getPageRequest(), request);
 | 
	
		
			
				|  |  |          final List<SysLearningMaterialsFileListVo> records = page.getRecords();
 |