|
|
@@ -62,23 +62,8 @@ public class DataAuthUtil
|
|
|
* 查询分配的地块列表
|
|
|
*/
|
|
|
public List<String> blockList() {
|
|
|
- List<String> list = new ArrayList<>();
|
|
|
List<String> blockIds = fmsBlockService.userBindList(SecurityUtils.getUserId(),SecurityUtils.getTid());
|
|
|
- if(!blockIds.isEmpty()){
|
|
|
- FmsBlock fmsBlock = new FmsBlock();
|
|
|
- fmsBlock.setTid(SecurityUtils.getTid());
|
|
|
- fmsBlock.setBlockIds(blockIds);
|
|
|
- fmsBlock.setDataFilter(true);
|
|
|
- // 查询地块负责人所属地块
|
|
|
- List<FmsBlock> blocks = fmsBlockService.selectFmsBlockList(fmsBlock);
|
|
|
- for (FmsBlock block : blocks) {
|
|
|
- list.add(block.getBlockId());
|
|
|
- }
|
|
|
- }
|
|
|
- // 查询负责人所属地块
|
|
|
- List<FmsBlock> fmsBlocks = fmsBlockService.selectFmsBlockListByLandManager(SecurityUtils.getUserId(), SecurityUtils.getTid());
|
|
|
- // 合并两个地块列表,并对地块标识进行去重
|
|
|
- return Stream.concat(list.stream(),fmsBlocks.stream().map(FmsBlock::getBlockId)).distinct().collect(Collectors.toList());
|
|
|
+ return blockIds;
|
|
|
}
|
|
|
|
|
|
public boolean checkRole(String roleKey){
|